1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/auto-regress/bug746376.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,70 @@ 1.4 +// Binary: cache/js-dbg-64-67bf9a4a1f77-linux 1.5 +// Flags: --ion-eager 1.6 +// 1.7 +var callStack = new Array(); 1.8 +var gTestcases = new Array(); 1.9 +var gTc = gTestcases.length; 1.10 +function TestCase(n, d, e, a) { 1.11 + this.expect = e; 1.12 + this.actual = a; 1.13 + this.passed = getTestCaseResult(e, a); 1.14 + this.reason = ''; 1.15 + this.bugnumber = typeof(BUGNUMER) != 'undefined' ? BUGNUMBER : ''; 1.16 + this.type = (typeof window == 'undefined' ? 'shell' : 'browser'); 1.17 + gTestcases[gTc++] = this; 1.18 +} 1.19 +function reportCompare (expected, actual, description) { 1.20 + var output = ""; 1.21 + if (typeof description == "undefined") 1.22 + if (expected != actual) 1.23 + printStatus ("Expected value '" + toPrinted(expected) + 1.24 + "' matched actual value '" + toPrinted(actual) + "'"); 1.25 + var testcase = new TestCase("unknown-test-name", description, expected, actual); 1.26 + testcase.reason = output; 1.27 + if (testcase.passed) { } 1.28 + return testcase.passed; 1.29 +} 1.30 +function enterFunc (funcName) { 1.31 + var lastFunc = callStack.pop(); 1.32 + reportCompare(funcName, lastFunc, "Test driver failure wrong exit function "); 1.33 +} 1.34 +function getTestCaseResult(expected, actual) 1.35 +function getFailedCases() { 1.36 + for ( var i = 0; i < gTestcases.length; i++ ) {} 1.37 +}; 1.38 +function jit(on) {} 1.39 +var lfcode = new Array(); 1.40 +lfcode.push("\ 1.41 +var summary = 'decompilation of \"let with with\" ';\ 1.42 +var actual = '';\ 1.43 +var expect = '';\ 1.44 +test();\ 1.45 +function test() {\ 1.46 + enterFunc ('test');\ 1.47 + gczeal(2);\ 1.48 + for (let q = 0; q < 50; ++q) {\ 1.49 + new Function('for (var i = 0; i < 5; ++i) { } ')();\ 1.50 + var w = 'r'.match(/r/);\ 1.51 + new Function('for (var j = 0; j < 1; ++j) { } ')();\ 1.52 + }\ 1.53 + jit(('Math.log'));\ 1.54 + reportCompare(expect, actual, summary);\ 1.55 +}\ 1.56 +"); 1.57 +delete Debugger; 1.58 +while (true) { 1.59 + var file = lfcode.shift(); if (file == undefined) { break; } 1.60 + if (file == "evaluate") { 1.61 + } else { 1.62 + loadFile(file); 1.63 + } 1.64 +} 1.65 +function loadFile(lfVarx) { 1.66 + try { 1.67 + if (lfVarx.substr(-3) == ".js") { 1.68 + } else { 1.69 + evaluate(lfVarx); 1.70 + } 1.71 + } catch (lfVare) { 1.72 + } 1.73 +}