Debian Codegraph @

js/src/tests/non262/jit/regress-489682.js

raw
1 /* -*- indent-tabs-mode: nil; js-indent-level: 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 //-----------------------------------------------------------------------------
7 var BUGNUMBER = 489682;
8 var summary = 'TM: wrong number with nested type-unstable loops';
9 var actual = '';
10 var expect = '';
11
12 printBugNumber(BUGNUMBER);
13 printStatus (summary);
14
15
16 var v = 0;
17
18 for (var a of [0, {}, {}, {}]) {
19 print(v);
20 v = v >>> 0;
21 for (var b of [{}, {}, new String(''), 42, new String(''), {}, 42])
22 {
23 }
24 }
25 print(v);
26
27
28 expect = '0';
29 actual = v + '';
30
31 reportCompare(expect, actual, summary);