Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-476049.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 var gTestfile = 'regress-476049.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 476049;
9 var summary = 'JSOP_DEFVAR enables gvar optimization for non-permanent properties';
10 var actual = '';
11 var expect = '';
12
13 printBugNumber(BUGNUMBER);
14 printStatus (summary);
15
16 // This test requires either two input files in the shell or two
17 // script blocks in the browser.
18
19 if (typeof window == 'undefined')
20 {
21 print(expect = actual = 'Test skipped');
22 }
23 else
24 {
25 document.write(
26 '<script type="text/javascript">' +
27 'for (var i = 0; i != 1000; ++i)' +
28 ' this["a"+i] = 0;' +
29 'eval("var x");' +
30 'for (var i = 0; i != 1000; ++i)' +
31 ' delete this["a"+i];' +
32 '<\/script>'
33 );
34
35 document.write(
36 '<script type="text/javascript">' +
37 'var x;' +
38 'eval("delete x;");' +
39 'x={};' +
40 '<\/script>'
41 );
42 }
43
44 reportCompare(expect, actual, summary);