js/src/tests/js1_8_1/regress/regress-452498-117.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

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 #117 From Gary Kwong [:nth10sd]
michael@0 24
michael@0 25 // The following all do not require -j.
michael@0 26
michael@0 27 // =====
michael@0 28
michael@0 29 try
michael@0 30 {
michael@0 31 eval('x; function x(){}; const x;');
michael@0 32 }
michael@0 33 catch(ex)
michael@0 34 {
michael@0 35 }
michael@0 36
michael@0 37 // Assertion failure: !pn->isPlaceholder(), at ../jsparse.cpp:4876
michael@0 38 // =====
michael@0 39 (function(){ var x; eval("var x; x = null"); })();
michael@0 40
michael@0 41 // Assertion failure: !(pnu->pn_dflags & PND_BOUND), at ../jsemit.cpp:1818
michael@0 42 // =====
michael@0 43 (function(){const x = 0, y = delete x;})()
michael@0 44
michael@0 45 // Assertion failure: JOF_OPTYPE(op) == JOF_ATOM, at ../jsemit.cpp:1710
michael@0 46 // =====
michael@0 47 try
michael@0 48 {
michael@0 49 (function(){(yield []) (function(){with({}){x} }); const x;})();
michael@0 50 }
michael@0 51 catch(ex)
michael@0 52 {
michael@0 53 }
michael@0 54
michael@0 55 // Assertion failure: cg->upvars.lookup(atom), at ../jsemit.cpp:2022
michael@0 56 // =====
michael@0 57 try
michael@0 58 {
michael@0 59 (function(){([]) ((function(q) { return q; })for (each in [1,2]))})();
michael@0 60 }
michael@0 61 catch(ex)
michael@0 62 {
michael@0 63 }
michael@0 64 // Assertion failure: lexdep->frameLevel() <= funbox->level, at ../jsparse.cpp:1782
michael@0 65 // Opt crash [@ JSCompiler::setFunctionKinds] near null
michael@0 66 // =====
michael@0 67
michael@0 68 try
michael@0 69 {
michael@0 70 eval("((x1) > [(x)(function() { x;}) for each (x in x)])()");
michael@0 71 }
michael@0 72 catch(ex)
michael@0 73 {
michael@0 74 }
michael@0 75
michael@0 76 // Assertion failure: pnu->pn_lexdef == dn, at ../jsemit.cpp:1817
michael@0 77 // =====
michael@0 78 uneval(function(){for(var [arguments] = ({ get y(){} }) in y ) (x);});
michael@0 79
michael@0 80 // Assertion failure: n != 0, at ../jsfun.cpp:2689
michael@0 81 // =====
michael@0 82 try
michael@0 83 {
michael@0 84 eval('(function(){{for(c in (function (){ for(x in (x1))window} )()) {const x;} }})();');
michael@0 85 }
michael@0 86 catch(ex)
michael@0 87 {
michael@0 88 }
michael@0 89
michael@0 90 // Assertion failure: op == JSOP_GETLOCAL, at ../jsemit.cpp:4557
michael@0 91 // =====
michael@0 92 try
michael@0 93 {
michael@0 94 (eval("(function(){let x , x = (x for (x in null))});"))();
michael@0 95 }
michael@0 96 catch(ex)
michael@0 97 {
michael@0 98 }
michael@0 99
michael@0 100 // Assertion failure: (fun->u.i.script)->upvarsOffset != 0, at ../jsfun.cpp:1537
michael@0 101 // Opt crash [@ js_NewFlatClosure] near null
michael@0 102 // =====
michael@0 103 "" + function(){for(var [x] in x1) ([]); function x(){}}
michael@0 104
michael@0 105 // Assertion failure: cg->stackDepth == stackDepth, at ../jsemit.cpp:3664
michael@0 106 // Opt crash [@ JS_ArenaRealloc] near null
michael@0 107 // =====
michael@0 108 try
michael@0 109 {
michael@0 110 eval(
michael@0 111 "for (a in (function(){" +
michael@0 112 " for each (let x in ['']) { return new function x1 (\u3056) { yield x } ();" +
michael@0 113 " }})())" +
michael@0 114 " function(){}"
michael@0 115 );
michael@0 116 }
michael@0 117 catch(ex)
michael@0 118 {
michael@0 119 }
michael@0 120 // Crash [@ js_Interpret] near null
michael@0 121 // =====
michael@0 122
michael@0 123 reportCompare(expect, actual, summary);
michael@0 124
michael@0 125 exitFunc ('test');
michael@0 126 }

mercurial