Debian Codegraph @

rhino/testsrc/tests/js1_8_1/regress/regress-452498-102.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-452498-102.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 452498;
9 var summary = 'TM: upvar2 regression tests';
10 var actual = '';
11 var expect = '';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 enterFunc ('test');
21 printBugNumber(BUGNUMBER);
22 printStatus (summary);
23
24 // ------- Comment #102 From Gary Kwong [:nth10sd]
25
26 // =====
27
28 (function(){function x(){} function x()y})();
29
30 // Assertion failure: JOF_OPTYPE(op) == JOF_ATOM, at ../jsemit.cpp:1710
31
32 // =====
33 function f() {
34 "" + (function(){
35 for( ; [function(){}] ; x = 0)
36 with({x: ""})
37 const x = []
38 });
39 }
40 f();
41
42 // Assertion failure: ss->top - saveTop <= 1U, at ../jsopcode.cpp:2156
43
44 // =====
45
46 try
47 {
48 function f() {
49 var x;
50 eval("const x = [];");
51 }
52 f();
53 }
54 catch(ex)
55 {
56 }
57 // Assertion failure: regs.sp == StackBase(fp), at ../jsinterp.cpp:2984
58
59 // =====
60 try
61 {
62 do {x} while([[] for (x in []) ]);
63 }
64 catch(ex)
65 {
66 }
67 // Assertion failure: !(pnu->pn_dflags & PND_BOUND), at ../jsemit.cpp:1818
68 // =====
69
70 try
71 {
72 {x} ((x=[] for (x in []))); x;
73 }
74 catch(ex)
75 {
76 }
77 // Assertion failure: cg->staticLevel >= level, at ../jsemit.cpp:2014
78 // Crash [@ BindNameToSlot] in opt without -j
79
80 // =====
81
82 reportCompare(expect, actual, summary);
83
84 exitFunc ('test');
85 }
86
87
88