Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * Any copyright is dedicated to the Public Domain.
4 * http://creativecommons.org/licenses/publicdomain/
5 * Contributor: Jason Orendorff
6 */
8 //-----------------------------------------------------------------------------
9 var BUGNUMBER = 452498;
10 var summary = 'TM: upvar2 regression tests';
11 var actual = '';
12 var expect = '';
15 //-----------------------------------------------------------------------------
16 test();
17 //-----------------------------------------------------------------------------
19 function test()
20 {
21 enterFunc ('test');
22 printBugNumber(BUGNUMBER);
23 printStatus (summary);
25 // ------- Comment #53 From Jason Orendorff
27 // Assertion failure: (slot) < (uint32_t)(obj)->dslots[-1]
28 // at ../jsobj.cpp:5559
29 // On the last line of BindLet, we have
30 // JS_SetReservedSlot(cx, blockObj, index, PRIVATE_TO_JSVAL(pn));
31 // but this uses reserved slots as though they were unlimited.
32 // blockObj only has 2.
33 let (a=0, b=1, c=2) {}
35 // In RecycleTree at ../jsparse.cpp:315, we hit
36 // MOZ_ASSUME_UNREACHABLE("RecycleUseDefKids");
37 // pn->pn_type is TOK_UNARYOP
38 // pn->pn_op is JSOP_XMLNAME
39 // pn->pn_defn is 1
40 // pn->pn_used is 1
41 try
42 {
43 true; 0;
44 }
45 catch(ex)
46 {
47 }
48 // Calls LinkUseToDef with pn->pn_defn == 1.
49 //
50 // If you say "var x;" first, then run this case, it gets further,
51 // crashing in NoteLValue like the first case in comment 52.
52 //
53 try
54 {
55 for (var [x] = x in y) var x;
56 }
57 catch(ex)
58 {
59 }
60 // Assertion failure: !pn2->pn_defn, at ../jsparse.h:461
61 // Another case where some optimization is going on.
62 try
63 {
64 if (true && foo) ;
65 }
66 catch(ex)
67 {
68 }
69 // Assertion failure: scope->object == ctor
70 // in js_FastNewObject at ../jsbuiltins.cpp:237
71 //
72 // With the patch, we're new-ing a different function each time, and the
73 // .prototype property is missing.
74 //
75 for (var z = 0; z < 3; z++) { (new function(){}); }
77 reportCompare(expect, actual, summary);
79 exitFunc ('test');
80 }