Debian Codegraph @

js/src/tests/non262/regress/regress-452498-102.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 = 452498;
8 var summary = 'TM: upvar2 regression tests';
9 var actual = '';
10 var expect = '';
11
12
13 //-----------------------------------------------------------------------------
14 test();
15 //-----------------------------------------------------------------------------
16
17 function test()
18 {
19 printBugNumber(BUGNUMBER);
20 printStatus (summary);
21
22 // ------- Comment #102 From Gary Kwong [:nth10sd]
23
24 // =====
25
26 (function(){function x(){} function x() { return y; }})();
27
28 // Assertion failure: JOF_OPTYPE(op) == JOF_ATOM, at ../jsemit.cpp:1710
29
30 // =====
31 function f() {
32 "" + (function(){
33 for( ; [function(){}] ; x = 0)
34 with({x: ""}) {
35 const x = []
36 }});
37 }
38 f();
39
40 // Assertion failure: ss->top - saveTop <= 1U, at ../jsopcode.cpp:2156
41
42 // =====
43
44 try
45 {
46 function f() {
47 var x;
48 eval("const x = [];");
49 }
50 f();
51 }
52 catch(ex)
53 {
54 }
55 // Assertion failure: regs.sp == StackBase(fp), at ../jsinterp.cpp:2984
56
57 // Assertion failure: cg->staticLevel >= level, at ../jsemit.cpp:2014
58 // Crash [@ BindNameToSlot] in opt without -j
59
60 // =====
61
62 reportCompare(expect, actual, summary);
63 }
64
65
66