Debian Codegraph @

rhino/testsrc/tests/js1_5/Array/regress-456845.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-456845.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 456845;
9 var summary = 'JIT: popArrs[a].pop is not a function';
10 var actual = 'No Error';
11 var expect = 'No Error';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 enterFunc ('test');
21 printBugNumber(BUGNUMBER);
22 printStatus (summary);
23
24 jit(true);
25
26 try
27 {
28 var chars = '0123456789abcdef';
29 var size = 1000;
30 var mult = 100;
31
32 var arr = [];
33 var lsize = size;
34 while (lsize--) { arr.push(chars); }
35
36 var popArrs = [];
37 for (var i=0; i<mult; i++) { popArrs.push(arr.slice()); }
38
39
40 for(var a=0;a<mult;a++) {
41 var x; while (x = popArrs[a].pop()) { }
42 }
43
44 jit(false);
45 }
46 catch(ex)
47 {
48 jit(false);
49 actual = ex + '';
50 }
51
52 reportCompare(expect, actual, summary);
53
54 exitFunc ('test');
55 }