Wed, 31 Dec 2014 07:53:36 +0100
Correct small whitespace inconsistency, lost while renaming variables.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | //----------------------------------------------------------------------------- |
michael@0 | 7 | var BUGNUMBER = 452498; |
michael@0 | 8 | var summary = 'TM: upvar2 regression tests'; |
michael@0 | 9 | var actual = ''; |
michael@0 | 10 | var expect = ''; |
michael@0 | 11 | |
michael@0 | 12 | |
michael@0 | 13 | //----------------------------------------------------------------------------- |
michael@0 | 14 | test(); |
michael@0 | 15 | //----------------------------------------------------------------------------- |
michael@0 | 16 | |
michael@0 | 17 | function test() |
michael@0 | 18 | { |
michael@0 | 19 | enterFunc ('test'); |
michael@0 | 20 | printBugNumber(BUGNUMBER); |
michael@0 | 21 | printStatus (summary); |
michael@0 | 22 | |
michael@0 | 23 | // ------- Comment #102 From Gary Kwong [:nth10sd] |
michael@0 | 24 | |
michael@0 | 25 | // ===== |
michael@0 | 26 | |
michael@0 | 27 | (function(){function x(){} function x()y})(); |
michael@0 | 28 | |
michael@0 | 29 | // Assertion failure: JOF_OPTYPE(op) == JOF_ATOM, at ../jsemit.cpp:1710 |
michael@0 | 30 | |
michael@0 | 31 | // ===== |
michael@0 | 32 | function f() { |
michael@0 | 33 | "" + (function(){ |
michael@0 | 34 | for( ; [function(){}] ; x = 0) |
michael@0 | 35 | with({x: ""}) |
michael@0 | 36 | const x = [] |
michael@0 | 37 | }); |
michael@0 | 38 | } |
michael@0 | 39 | f(); |
michael@0 | 40 | |
michael@0 | 41 | // Assertion failure: ss->top - saveTop <= 1U, at ../jsopcode.cpp:2156 |
michael@0 | 42 | |
michael@0 | 43 | // ===== |
michael@0 | 44 | |
michael@0 | 45 | try |
michael@0 | 46 | { |
michael@0 | 47 | function f() { |
michael@0 | 48 | var x; |
michael@0 | 49 | eval("const x = [];"); |
michael@0 | 50 | } |
michael@0 | 51 | f(); |
michael@0 | 52 | } |
michael@0 | 53 | catch(ex) |
michael@0 | 54 | { |
michael@0 | 55 | } |
michael@0 | 56 | // Assertion failure: regs.sp == StackBase(fp), at ../jsinterp.cpp:2984 |
michael@0 | 57 | |
michael@0 | 58 | // ===== |
michael@0 | 59 | try |
michael@0 | 60 | { |
michael@0 | 61 | do {x} while([[] for (x in []) ]); |
michael@0 | 62 | } |
michael@0 | 63 | catch(ex) |
michael@0 | 64 | { |
michael@0 | 65 | } |
michael@0 | 66 | // Assertion failure: !(pnu->pn_dflags & PND_BOUND), at ../jsemit.cpp:1818 |
michael@0 | 67 | // ===== |
michael@0 | 68 | |
michael@0 | 69 | try |
michael@0 | 70 | { |
michael@0 | 71 | {x} ((x=[] for (x in []))); x; |
michael@0 | 72 | } |
michael@0 | 73 | catch(ex) |
michael@0 | 74 | { |
michael@0 | 75 | } |
michael@0 | 76 | // Assertion failure: cg->staticLevel >= level, at ../jsemit.cpp:2014 |
michael@0 | 77 | // Crash [@ BindNameToSlot] in opt without -j |
michael@0 | 78 | |
michael@0 | 79 | // ===== |
michael@0 | 80 | |
michael@0 | 81 | reportCompare(expect, actual, summary); |
michael@0 | 82 | |
michael@0 | 83 | exitFunc ('test'); |
michael@0 | 84 | } |
michael@0 | 85 | |
michael@0 | 86 | |
michael@0 | 87 |