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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/js1_8_1/regress/regress-452498-130.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,57 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +//-----------------------------------------------------------------------------
    1.10 +var BUGNUMBER = 452498;
    1.11 +var summary = 'TM: upvar2 regression tests';
    1.12 +var actual = '';
    1.13 +var expect = '';
    1.14 +
    1.15 +
    1.16 +//-----------------------------------------------------------------------------
    1.17 +test();
    1.18 +//-----------------------------------------------------------------------------
    1.19 +
    1.20 +function test()
    1.21 +{
    1.22 +  enterFunc ('test');
    1.23 +  printBugNumber(BUGNUMBER);
    1.24 +  printStatus (summary);
    1.25 +
    1.26 +// ------- Comment #130 From Gary Kwong [:nth10sd]
    1.27 +
    1.28 +// Does not require -j:
    1.29 +// =====
    1.30 +  ((function x()x in []) for (y in []))
    1.31 +
    1.32 +//Assertion failure: lexdep->frameLevel() <= funbox->level, at ../jsparse.cpp:1778
    1.33 +// Opt crash [@ JSCompiler::setFunctionKinds]
    1.34 +// =====
    1.35 +    let(x=[]) function(){try {x} catch(x) {} }
    1.36 +
    1.37 +// Assertion failure: cg->upvars.lookup(atom), at ../jsemit.cpp:2034
    1.38 +// =====
    1.39 +  try
    1.40 +  {
    1.41 +    eval('for(let [y] = (let (x) (y)) in []) function(){}');
    1.42 +  }
    1.43 +  catch(ex)
    1.44 +  {
    1.45 +  }
    1.46 +// Assertion failure: !(pnu->pn_dflags & PND_BOUND), at ../jsemit.cpp:1818
    1.47 +// =====
    1.48 +
    1.49 +
    1.50 +// Requires -j:
    1.51 +// =====
    1.52 +  for (var x = 0; x < 3; ++x) { new function(){} }
    1.53 +
    1.54 +// Assertion failure: cx->bailExit, at ../jstracer.cpp:4672
    1.55 +// Opt crash [@ LeaveTree] near null
    1.56 +
    1.57 +  reportCompare(expect, actual, summary);
    1.58 +
    1.59 +  exitFunc ('test');
    1.60 +}

mercurial