1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/auto-regress/bug763039.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,69 @@ 1.4 +// Binary: cache/js-dbg-32-5cfb73435e06-linux 1.5 +// Flags: --ion-eager 1.6 +// 1.7 +var actual = ''; 1.8 +function TestCase(n, d, e, a) { 1.9 + this.reason = ''; 1.10 +} 1.11 +function inSection(x) {} 1.12 +function reportCompare (expected, actual, description) { 1.13 + var testcase = new TestCase("unknown-test-name", description, expected, actual); 1.14 + testcase.reason = output; 1.15 +} 1.16 +var lfcode = new Array(); 1.17 +lfcode.push("4"); 1.18 +lfcode.push("function START(summary) {\ 1.19 +}\ 1.20 +function TEST(section, expected, actual) {\ 1.21 + return reportCompare(expected, actual, inSection(section) + SUMMARY);\ 1.22 +}\ 1.23 +var expect = (1);\ 1.24 +TEST(1,1 << this < assertEq++ < this, actual);\ 1.25 +"); 1.26 +lfcode.push("\ 1.27 +gczeal(4);\ 1.28 +data >>>= RunSingleBenchmark(data);\ 1.29 +"); 1.30 +lfcode.push("4"); 1.31 +lfcode.push("\ 1.32 +var BUGNUMBER = 345855;\ 1.33 +var summary = 'Blank yield expressions are not syntax errors';\ 1.34 +test();\ 1.35 +function test() {\ 1.36 + try {\ 1.37 + eval('(function() {x = 12 + yield;})');\ 1.38 + } catch(ex) {}\ 1.39 + try { eval('(function() {x = 12 + yield 42})'); } catch(ex) {\ 1.40 + status = inSection(4);\ 1.41 + }\ 1.42 + try {\ 1.43 + eval('(function() {x = 12 + (yield);})');\ 1.44 + } catch(ex) { }\ 1.45 + try {\ 1.46 + eval('(function () {foo((yield))})');\ 1.47 + } catch(ex) { }\ 1.48 + try {\ 1.49 + eval('(function() {x = 12 + (yield 42)})');\ 1.50 + } catch(ex) { }\ 1.51 + reportCompare(expect, actual, summary + ': function() {x = 12 + (yield 42)}');\ 1.52 +}\ 1.53 +"); 1.54 +while (true) { 1.55 + var file = lfcode.shift(); if (file == undefined) { break; } 1.56 + loadFile(file); 1.57 +} 1.58 +function loadFile(lfVarx) { 1.59 + try { 1.60 + if (lfVarx.substr(-3) == ".js") { 1.61 + } else if (!isNaN(lfVarx)) { 1.62 + lfRunTypeId = lfVarx; 1.63 + } else { 1.64 + switch (lfRunTypeId) { 1.65 + case 1: eval(read(lfVarx)); break; 1.66 + default: evaluate(lfVarx); 1.67 + } 1.68 + } 1.69 + } catch (lfVare) { 1.70 + print(lfVare); 1.71 + } 1.72 +}