diff options
Diffstat (limited to 'js/src/jit-test/tests/auto-regress')
313 files changed, 5392 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/auto-regress/bug1147907.js b/js/src/jit-test/tests/auto-regress/bug1147907.js new file mode 100644 index 000000000..4d34f5999 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1147907.js @@ -0,0 +1,14 @@ +var evalInFrame = (function (global) { + var dbgGlobal = newGlobal(); + var dbg = new dbgGlobal.Debugger(); + return function evalInFrame(upCount, code) { + dbg.addDebuggee(global); + var frame = dbg.getNewestFrame().older; + var completion = frame.eval(code); + }; +})(this); +var x = 5; +{ + let x = eval("this.x++"); + evalInFrame(0, ("for (var x = 0; x < 3; ++x) { (function(){})() } ")) +} diff --git a/js/src/jit-test/tests/auto-regress/bug1263532.js b/js/src/jit-test/tests/auto-regress/bug1263532.js new file mode 100644 index 000000000..e9d222d3c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263532.js @@ -0,0 +1,13 @@ +setJitCompilerOption("ion.warmup.trigger", 1); +function f(g) { + for (var i = 0; i < 99; i++) { + "abc".match("b."); + g(); + } +} +f(function() {}); +f(function() { + Object.defineProperty(RegExp.prototype, "sticky", { + get: function() {} + }); +}); diff --git a/js/src/jit-test/tests/auto-regress/bug1263558.js b/js/src/jit-test/tests/auto-regress/bug1263558.js new file mode 100644 index 000000000..66aa81d8d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263558.js @@ -0,0 +1,17 @@ +if (!('oomTest' in this)) + quit(); + +evalcx(` + eval('\ + var appendToActual = function(s) {};\ + gczeal = function() {};\ + gcslice = function() {};\ + selectforgc = function() {};\ + if (!("verifyprebarriers" in this)) {\ + verifyprebarriers = function() {};\ + }\ + '); + oomTest(() => eval('Array(..."")')); + if ('Intl' in this) + Intl.NumberFormat.prototype.format(0); +`, newGlobal()); diff --git a/js/src/jit-test/tests/auto-regress/bug1263857.js b/js/src/jit-test/tests/auto-regress/bug1263857.js new file mode 100644 index 000000000..906e92740 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263857.js @@ -0,0 +1,4 @@ +// |jit-test| allow-oom; allow-unhandlable-oom +gcparam("maxBytes", gcparam("gcBytes") + 1); +fullcompartmentchecks(true); +/x/g[Symbol.replace](" x".repeat(32768), ""); diff --git a/js/src/jit-test/tests/auto-regress/bug1263865.js b/js/src/jit-test/tests/auto-regress/bug1263865.js new file mode 100644 index 000000000..313d6d9c7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263865.js @@ -0,0 +1,12 @@ +if (!('oomTest' in this)) + quit(); + +loadFile(""); +loadFile(""); +loadFile("Array.prototype.splice.call(1)"); +function loadFile(lfVarx) { + parseInt("1"); + oomTest(function() { + eval(lfVarx); + }); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1263879.js b/js/src/jit-test/tests/auto-regress/bug1263879.js new file mode 100644 index 000000000..96ce00eae --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263879.js @@ -0,0 +1,21 @@ +if (!('oomTest' in this)) + quit(); + +var lines = ` + + + +"".replace([[2], 3]) +`.split('\n'); +var code = ""; +while (true) { + var line = lines.shift(); + if (line == null) + break; + loadFile(); + code += line + "\n"; +} +loadFile(code); +function loadFile(code) { + oomTest(() => eval(code)); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1263888.js b/js/src/jit-test/tests/auto-regress/bug1263888.js new file mode 100644 index 000000000..c5e8a12db --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1263888.js @@ -0,0 +1,3 @@ +Array.prototype.constructor = []; +for (let i = 0; i < 100; i++) + [].slice(); diff --git a/js/src/jit-test/tests/auto-regress/bug1264561.js b/js/src/jit-test/tests/auto-regress/bug1264561.js new file mode 100644 index 000000000..b5cc40bb2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1264561.js @@ -0,0 +1,6 @@ +var r = RegExp(""); +var s = ""; +s += "".replace(r, Function("x")); +for (var x = 0; x < 5; x++) { + s += "".replace(r, this); +} diff --git a/js/src/jit-test/tests/auto-regress/bug1264823.js b/js/src/jit-test/tests/auto-regress/bug1264823.js new file mode 100644 index 000000000..67856c6c9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1264823.js @@ -0,0 +1,11 @@ +if (!('oomTest' in this)) + quit(); + +loadFile(""); +loadFile(""); +loadFile(` function lalala() {} + new Map([[1, 2]]).forEach(lalala) + `); +function loadFile(lfVarx) oomTest(function() { + eval(lfVarx) +}) diff --git a/js/src/jit-test/tests/auto-regress/bug1266579.js b/js/src/jit-test/tests/auto-regress/bug1266579.js new file mode 100644 index 000000000..ff3f6986c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1266579.js @@ -0,0 +1,28 @@ +function test1() { + do { + "8pan08pa8pan08pa".split(""); + } while (!inIon()); +} + +function test2() { + do { + "abababababababababababababababab".split("a"); + } while (!inIon()); +} + +function test3() { + do { + "abcabcabcabcabcabcabcabcabcabcabcabcabcabcabc".split("ab"); + } while (!inIon()); +} + +function test4() { + do { + "".split(""); + } while (!inIon()); +} + +test1(); +test2(); +test3(); +test4(); diff --git a/js/src/jit-test/tests/auto-regress/bug1268034.js b/js/src/jit-test/tests/auto-regress/bug1268034.js new file mode 100644 index 000000000..6985c4368 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1268034.js @@ -0,0 +1,7 @@ +if (!('oomTest' in this)) + quit(); + +oomTest(function() { + offThreadCompileScript(""); +}); +"".match(); diff --git a/js/src/jit-test/tests/auto-regress/bug1269074.js b/js/src/jit-test/tests/auto-regress/bug1269074.js new file mode 100644 index 000000000..40c67c6e5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1269074.js @@ -0,0 +1,6 @@ +// |jit-test| allow-oom + +if (!('oomTest' in this)) + quit(); + +evalcx('oomTest(function() { Array(...""); })', newGlobal()); diff --git a/js/src/jit-test/tests/auto-regress/bug1276082.js b/js/src/jit-test/tests/auto-regress/bug1276082.js new file mode 100644 index 000000000..5a32fa06a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1276082.js @@ -0,0 +1,5 @@ +function f() { + (function() {}).bind()(/x/); +} +f(); +f(); diff --git a/js/src/jit-test/tests/auto-regress/bug1315943.js b/js/src/jit-test/tests/auto-regress/bug1315943.js new file mode 100644 index 000000000..8d68f47af --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1315943.js @@ -0,0 +1,11 @@ +var s = "{}"; +for (var i = 0; i < 21; i++) s += s; +var g = newGlobal(); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function(frame) { + var s = frame.eval("f").return.script; +}; +g.eval("line0 = Error().lineNumber;\n" + "debugger;\n" + // line0 + 1 + "function f(i) {\n" + // line0 + 2 + s + // line0 + 3 ... line0 + where - 2 + "}\n"); diff --git a/js/src/jit-test/tests/auto-regress/bug1317460.js b/js/src/jit-test/tests/auto-regress/bug1317460.js new file mode 100644 index 000000000..87da637e7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1317460.js @@ -0,0 +1,11 @@ +// |jit-test| error:TypeError + +g = newGlobal(); +g.parent = this; +g.eval("(" + function() { + Debugger(parent).onExceptionUnwind = function() 0; +} + ")()"); +async function f() { + t; +} +f(); diff --git a/js/src/jit-test/tests/auto-regress/bug1357462.js b/js/src/jit-test/tests/auto-regress/bug1357462.js new file mode 100644 index 000000000..f2364951f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug1357462.js @@ -0,0 +1,6 @@ +var p = Object.freeze(["old-value"]); +var a = Object.setPrototypeOf([], p); + +assertEq(p[0], "old-value"); +assertEq(Reflect.set(a, 0, "new-value", p), false); +assertEq(p[0], "old-value"); diff --git a/js/src/jit-test/tests/auto-regress/bug464116.js b/js/src/jit-test/tests/auto-regress/bug464116.js new file mode 100644 index 000000000..f6b38cc5d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug464116.js @@ -0,0 +1,31 @@ +// Binary: cache/js-dbg-32-7d06dac3fe83-linux +// Flags: -j +// +function partOfSHA1(str) +{ + var rotate_left = function (n,s) { return ( n<<s ) | (n>>>(32-s)); }, + W = [], H0 = 0x67452301, + H1 = 0xEFCDAB89, H2 = 0x98BADCFE, + H3 = 0x10325476, H4 = 0xC3D2E1F0, + A, B, C, D, E, temp, str_len = str.length, + word_array = []; + i = 0x080000000; + word_array.push( (str_len<<3)&0x0ffffffff ); + for ( blockstart=0; blockstart<word_array.length; blockstart+=16 ) { + A = H0; + B = H1; + C = H2; + D = H3; + E = H4; + for (i= 0; i<=19; ++i) { + temp = (rotate_left(A,5) + ((B&C) | (~B&D)) + E + W[i] + 0x5A827999) & 0x0ffffffff; + E = D; + D = C; + C = rotate_left(B,30); + B = A; + A = temp; + } + } +} + +partOfSHA1(1226369254122); diff --git a/js/src/jit-test/tests/auto-regress/bug466076.js b/js/src/jit-test/tests/auto-regress/bug466076.js new file mode 100644 index 000000000..a5985bd5f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug466076.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-2fa341c1330b-linux +// Flags: -j +// +for (let j = 0; j < 2; ++j) { + if (j) { + (function() {})(); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug466654.js b/js/src/jit-test/tests/auto-regress/bug466654.js new file mode 100644 index 000000000..6c82c425b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug466654.js @@ -0,0 +1,8 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-29add08d84ae-linux +// Flags: -j +// +this.watch('y', /x/g ); +for each (y in ['q', 'q', 'q']) continue; +gc(); diff --git a/js/src/jit-test/tests/auto-regress/bug469262.js b/js/src/jit-test/tests/auto-regress/bug469262.js new file mode 100644 index 000000000..da05527a7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug469262.js @@ -0,0 +1,10 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-2c8e43e57337-linux +// Flags: -j +// +function b() { this.m(); } +var g = {m: function(){}}; +var a = [g, g, {}]; +for (var i = 0; i < a.length; ++i) + b.call(a[i]); diff --git a/js/src/jit-test/tests/auto-regress/bug477877.js b/js/src/jit-test/tests/auto-regress/bug477877.js new file mode 100644 index 000000000..659b95469 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug477877.js @@ -0,0 +1,179 @@ +// Binary: cache/js-dbg-32-a419ff2cf0c5-linux +// Flags: -j +// +var l=[ +-88, +-37, +-12, +-5, +9, +-7, +41, +-9, +43, +-11, +34, +38, +-22, +-17, +-16, +-34, +-33, +62, +63, +-36, +50, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +-128 +]; +var bits = [1, +1, +1, +1, +1, +1, +1, +1, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +]; +var t = 0; +var c = 3407; +var i; + +while (c--) { + i = 0; + while (l[i] < 0) { + if (bits[t]) { + i = - l[i]; + } else { + ++i; + } + ++t; + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug479747.js b/js/src/jit-test/tests/auto-regress/bug479747.js new file mode 100644 index 000000000..897682d14 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug479747.js @@ -0,0 +1,9 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-9174e1bbfa9f-linux +// Flags: -j +// +'a'.replace(/a/g, [].push); +x = []; +x++; +(function(){ eval("for(let y in []) [][x]"); })(); diff --git a/js/src/jit-test/tests/auto-regress/bug486139.js b/js/src/jit-test/tests/auto-regress/bug486139.js new file mode 100644 index 000000000..e2cdabdc0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug486139.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-023cb4350567-linux +// Flags: +// +uneval((function(){([z] = []).y >>= x})); diff --git a/js/src/jit-test/tests/auto-regress/bug487320.js b/js/src/jit-test/tests/auto-regress/bug487320.js new file mode 100644 index 000000000..01293b576 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug487320.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-57213af4a45d-linux +// Flags: +// +function outer(x) { + return (function foo() { + this.bar = foo; + return x; + })(); +} +print(outer(42)); +print(bar()); // BOOM! diff --git a/js/src/jit-test/tests/auto-regress/bug487534.js b/js/src/jit-test/tests/auto-regress/bug487534.js new file mode 100644 index 000000000..cf2c859c9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug487534.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-32-96746395df4f-linux +// Flags: -j +// +var fs = { x: /a/, y: /a/, z: /a/ }; +for (var p in fs) { this[fs[p]] = null; } diff --git a/js/src/jit-test/tests/auto-regress/bug487563.js b/js/src/jit-test/tests/auto-regress/bug487563.js new file mode 100644 index 000000000..66ce94c07 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug487563.js @@ -0,0 +1,17 @@ +// Binary: cache/js-dbg-64-86c8e18f20eb-linux +// Flags: +// +try { + !(Iterator(( + eval("\ + (function(){\ + (function a() { \ + new function(){\ + __iterator__ = a\ + }\ + }\ + )(); \ + return this\ + })") + )())) +} catch(e) {} diff --git a/js/src/jit-test/tests/auto-regress/bug488015.js b/js/src/jit-test/tests/auto-regress/bug488015.js new file mode 100644 index 000000000..5d19c2b95 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug488015.js @@ -0,0 +1,29 @@ +// Binary: cache/js-dbg-64-e1257570fef8-linux +// Flags: +// +var a = []; +function addEventListener(e, f, g) +{ + a.push(f); +} +function setTimeout(f, t) +{ + a.push(f); +} +var b; +this.document = {}; +function e(w) { + addEventListener("mousedown", d, true); + function d() { + var d; + w.setTimeout(function() { + b(d); + }, 0); + } + function b(d){ + w.document; /* Crash Here!! */ + } +} +e(this); +a[0](); +a[1](); diff --git a/js/src/jit-test/tests/auto-regress/bug488034.js b/js/src/jit-test/tests/auto-regress/bug488034.js new file mode 100644 index 000000000..08aac5829 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug488034.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-64-e1257570fef8-linux +// Flags: +// +(function(){ + var x; + eval("var x; ((function ()x)())"); +})() diff --git a/js/src/jit-test/tests/auto-regress/bug488203.js b/js/src/jit-test/tests/auto-regress/bug488203.js new file mode 100644 index 000000000..a24fae346 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug488203.js @@ -0,0 +1,13 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-32-756dd46daf6c-linux +// Flags: -j +// +var d = { + p: function () { + for (var i = 0; i < 9; ++i); + with (d) { q(); } + } +}; +d.q = function() { eval('this.p()'); } +d.p(); diff --git a/js/src/jit-test/tests/auto-regress/bug488421.js b/js/src/jit-test/tests/auto-regress/bug488421.js new file mode 100644 index 000000000..1fcad0c18 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug488421.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-862693caa320-linux +// Flags: +// +function f(foo) +{ + var x; + eval("this.__defineGetter__(\"y\", function ()x)"); +} +f(""); +try { +((function(){ throw y })()) +} catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug488693.js b/js/src/jit-test/tests/auto-regress/bug488693.js new file mode 100644 index 000000000..ddc6b4216 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug488693.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-ec03b7905b5a-linux +// Flags: -j +// +(new Function("for (var x = 0; x < 2; ++x) { gczeal(2)} "))() diff --git a/js/src/jit-test/tests/auto-regress/bug489040.js b/js/src/jit-test/tests/auto-regress/bug489040.js new file mode 100644 index 000000000..2541e8419 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug489040.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-c319b49e2880-linux +// Flags: -j +// +for (var y = 0; y < 2; ++y) { (/x/)[this] } diff --git a/js/src/jit-test/tests/auto-regress/bug489836.js b/js/src/jit-test/tests/auto-regress/bug489836.js new file mode 100644 index 000000000..ba105cb5a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug489836.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-32-1a1611bb1063-linux +// Flags: -j +// +var e; +function w(f, y) { + e = 2 * f; + for (var i = 0; i < 1; i++) { + } +} +for (var u = 0; u < 4; ++u) { + w(undefined, 0); + w(1, (2) * 2); +} diff --git a/js/src/jit-test/tests/auto-regress/bug490191.js b/js/src/jit-test/tests/auto-regress/bug490191.js new file mode 100644 index 000000000..b56ee11db --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug490191.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-daefd30072a6-linux +// Flags: +// +function f(param) { + var w; + return eval("\ + (function(){\ + this.__defineGetter__(\"y\", function()({\ + x: function(){ return w }()\ + }))\ + });\ + "); +} +(f())(); +(new Function("eval(\"y\")"))(); diff --git a/js/src/jit-test/tests/auto-regress/bug490776.js b/js/src/jit-test/tests/auto-regress/bug490776.js new file mode 100644 index 000000000..2348f1269 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug490776.js @@ -0,0 +1,37 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-7504904b5f8f-linux +// Flags: -j +// +Object.extend = function(destination, source) { + for (var property in source) + destination[property] = source[property] +} +Object.extend(Function.prototype, { + curry: function() { + var __method = this, + args = $A(arguments) + return function() { + return __method( + arguments) + } + }, + wrap: function(wrapper) { + return function() { ([]( + $A(arguments))) + } + } +}) +function $A(iterable) { + var length = iterable.length + while (length--); +} +var ga = { + c: 3, + d: 4 +} +ga. +__defineGetter__("", /x/.test.wrap("").curry(true, "")) +for (var p in ga) { + ga[p] +} diff --git a/js/src/jit-test/tests/auto-regress/bug493662.js b/js/src/jit-test/tests/auto-regress/bug493662.js new file mode 100644 index 000000000..2f7d9ed63 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug493662.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-175ef7145705-linux +// Flags: -j +// +for (let cc = 0; cc < 3; ++cc) { + var c = cc; + print("" + new Number(.5)); + for each (b in [0 / 0, 0 / 0]) {} +} diff --git a/js/src/jit-test/tests/auto-regress/bug495843.js b/js/src/jit-test/tests/auto-regress/bug495843.js new file mode 100644 index 000000000..673e8294e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug495843.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-64-fe91973cc783-linux +// Flags: +// +const [x]=''; +for(;[] && false;){} diff --git a/js/src/jit-test/tests/auto-regress/bug495962.js b/js/src/jit-test/tests/auto-regress/bug495962.js new file mode 100644 index 000000000..baccd26ae --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug495962.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-32-a9887b731f29-linux +// Flags: -j +// +(function () { + const c = 0; + with ({}) { + for each (k in [{}, {}]) { + "" + k; + } + } +})(); diff --git a/js/src/jit-test/tests/auto-regress/bug496245.js b/js/src/jit-test/tests/auto-regress/bug496245.js new file mode 100644 index 000000000..800257dcb --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug496245.js @@ -0,0 +1,6 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-9d6f5ab54933-linux +// Flags: +// +(function(a){ 1(function(){delete a;}); })(); diff --git a/js/src/jit-test/tests/auto-regress/bug496325.js b/js/src/jit-test/tests/auto-regress/bug496325.js new file mode 100644 index 000000000..4f901d9f7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug496325.js @@ -0,0 +1,19 @@ +// Binary: cache/js-dbg-32-9d6f5ab54933-linux +// Flags: -j +// +(function() { + var Y = function() {}; + function g() { + function f(x) { + for (var j = 0; j < 1; ++j) { + x.apply(this); + } + } + return function() { + f(Y); + } + }; + for (var i = 0; i < 2; ++i) { + g()(); + } +})(); diff --git a/js/src/jit-test/tests/auto-regress/bug499169.js b/js/src/jit-test/tests/auto-regress/bug499169.js new file mode 100644 index 000000000..93b196a49 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug499169.js @@ -0,0 +1,179 @@ +// Binary: cache/js-dbg-32-30b481fd82f5-linux +// Flags: -j +// +var Native = function(k) { + var f = k.initialize; + var d = f; + var j = function(n, l, o, m) { + n.prototype[l] = o; + }; + d.alias = function(n, l, o) { + n = this.prototype[n] + return j(this, l, n, o); + }; + d.implement = function(m, l, o) { + for (var n in m) { + j(this, n, m[n], l); + } + } + return d; +}; +(function() { + var a = { + Array: Array, + Function: Function, + }; + for (var h in a) { + new Native({ + initialize: a[h], + }); + } +} ()); +Array.alias("forEach", "each"); +function $merge() { + var a = Array.slice(arguments); + a.unshift({}); + return $mixin.apply(null, a); +} +function $mixin(e) { + for (var d = 1, a = arguments.length; d < a; d++) { + var b = arguments[d]; + for (var c in b) { + var g = b[c], + f = e[c]; + e[c] = f && $type(g) == "object" && $type(f) == "object" ? $mixin(f, g) : $unlink(g); + } + } +} +function $type(a) { + if (a == undefined) { + return false; + } + if (a.$family) { + } + return typeof a; +} +function $unlink(c) { + if ($type(c) == "object") { + b = {}; + } + return b; +} +var Window = new Native({ + initialize: function(a) {}, +}); +Array.implement({ + extend: function(c) { + return this; + } +}); +Function.implement({ + extend: function(a) { + for (var b in a) { + this[b] = a[b]; + } + return this; + }, + run: function(a, b) { + return this.apply(b, a); + } +}); +function Class(b) { + var a = function() { + Object.reset(this); + var c = this.initialize ? this.initialize.apply(this, arguments) : this; + }.extend(this); + a.implement(b); + return a; +} +Object.reset = function(a, c) { + if (c == null) { + for (var e in a) { + Object.reset(a, e); + } + } + switch ($type(a[c])) { + case "object": + var d = function() {}; + d.prototype = a[c]; + var b = new d; + a[c] = Object.reset(b); + } + return a; +}; +(new Native({initialize: Class})).extend({}); + function wrap(a, b, c) { + return function() { + var d = c.apply(this, arguments); + }.extend({}); + } +Class.implement({ + implement: function(a, d) { + if ($type(a) == "object") { + for (var e in a) { + this.implement(e, a[e]); + } + } + var f = Class.Mutators[a]; + if (f) { + d = f.call(this, d); + } + var c = this.prototype; + switch ($type(d)) { + case "function": + c[a] = wrap(this, a, d); + break; + case "object": + var b = c[a]; + if ($type(b) == "object") { + $mixin(b, d); + } else { + c[a] = $unlink(d); + } + } + } +}); +Class.Mutators = { + Extends: function(a) { + this.prototype = new a; + }, + Implements: function(a) { + a.each(function(b) { + b = new b; + this.implement(b); + }, + this); + } +}; +var Events = new Class({}); +var Options = new Class({ + setOptions: function() { + this.options = $merge.run([this.options].extend(arguments)); + } +}); +var Autocompleter = {}; +Autocompleter.Base = new Class({ + Implements: [Options, Events], + options: {}, +}); +Autocompleter.Ajax = {}; +Autocompleter.Ajax.Base = new Class({ + Extends: Autocompleter.Base, + options: { + postVar: "value", + onRequest: function(){}, + } +}); +Autocompleter.Ajax.Json = new Class({ + Extends: Autocompleter.Ajax.Base, +}); +Autocompleter.JsonP = new Class({ + Extends: Autocompleter.Ajax.Json, + options: { + minLength: 1 + }, + initialize: function(el, url, options) { + this.setOptions({}); + } +}); +new Autocompleter.JsonP(); diff --git a/js/src/jit-test/tests/auto-regress/bug502604.js b/js/src/jit-test/tests/auto-regress/bug502604.js new file mode 100644 index 000000000..79be300e2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug502604.js @@ -0,0 +1,30 @@ +// Binary: cache/js-dbg-32-b4fee3813956-linux +// Flags: -j +// +var aej=new Array( 'A3|297|420', 'dummy|1|1' ); +var aes=aej.length-1, +aet=new Array(); +for(var i=0; i <= aes; ++i) + aet[i] = aej[i].split('|'); +afo=4; +R=new Array( + '17523|2500|275||', + '17524|5000|300.3||', + '17535|500|207.4|=|120x120|=|=|=|=|=|=|=', + '17556|500|349.3|=|A5|=|=|=|=|=|=|=' +); +var ags = R.length-1; +px= new Array(); +for(var i=1; i<=ags; i++) { + px[i] = R[i].split('|'); + for(var j=0; j<=11;j++) + agt = ank(px[i][afo]); +} +function ank(akr) { + var XX=YY=0; + for(var i=0;i<aet.length;i++) + if((XX==0) && (akr.indexOf('x')>0)) { + var tt=akr.split('x'); + XX=tt[0];YY=tt[1] + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug504516.js b/js/src/jit-test/tests/auto-regress/bug504516.js new file mode 100644 index 000000000..253509571 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug504516.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-32-43a24a8896a3-linux +// Flags: -j +// +for (d in [0, 0]) { + const a = (d -= (++d).toString()) + for each(b in [Number(1) << d, 0, 0xC]) { + b / a + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug505305.js b/js/src/jit-test/tests/auto-regress/bug505305.js new file mode 100644 index 000000000..9b86db3ef --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug505305.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-32-aa85b2f55960-linux +// Flags: +// +var str = 'afoo$40bar'.substr(1); +print(str.replace(str, str)); diff --git a/js/src/jit-test/tests/auto-regress/bug510644.js b/js/src/jit-test/tests/auto-regress/bug510644.js new file mode 100644 index 000000000..f2cf393a6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug510644.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-32-d56149240ef8-linux +// Flags: -j +// +function foo(f) { + f() +} +foo((eval("\ + (function () {\ + for each(l in [0, 0xB504F332, 0]) {\ + for (d in Error()) {}\ + }\ + })\ +"))) diff --git a/js/src/jit-test/tests/auto-regress/bug511836.js b/js/src/jit-test/tests/auto-regress/bug511836.js new file mode 100644 index 000000000..0695e11c7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug511836.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-16baceea5fe2-linux +// Flags: +// +for (a in (function () { + return Iterator(function () {}).__proto__ +})()) { + ++b +} diff --git a/js/src/jit-test/tests/auto-regress/bug511938.js b/js/src/jit-test/tests/auto-regress/bug511938.js new file mode 100644 index 000000000..3e2df3bc9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug511938.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-16baceea5fe2-linux +// Flags: -j +// +(function () { + for (let x = 0; x < 4; ++x) { + gczeal(2) + } +})() diff --git a/js/src/jit-test/tests/auto-regress/bug515440.js b/js/src/jit-test/tests/auto-regress/bug515440.js new file mode 100644 index 000000000..935d7c198 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug515440.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-d05dc3d31c75-linux +// Flags: -j +// +for each(let c in [1.3]) { + for (var x = 0; x < 4; ++x) { + gczeal(2); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug516897.js b/js/src/jit-test/tests/auto-regress/bug516897.js new file mode 100644 index 000000000..e3caf4e6e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug516897.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-38754465ffde-linux +// Flags: +// +this.__defineSetter__("x", gc); +this.watch("x",function(){return}); +x = 3; diff --git a/js/src/jit-test/tests/auto-regress/bug520513.js b/js/src/jit-test/tests/auto-regress/bug520513.js new file mode 100644 index 000000000..79ebd1bc2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug520513.js @@ -0,0 +1,9 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-1cd24ecc343d-linux +// Flags: +// +(function(){ + var c; + eval("var c; for each(var c in s);"); +})() diff --git a/js/src/jit-test/tests/auto-regress/bug521163.js b/js/src/jit-test/tests/auto-regress/bug521163.js new file mode 100644 index 000000000..f25648f0d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug521163.js @@ -0,0 +1,11 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-c08baee44cf4-linux +// Flags: +// +for (c in [0]) { + { + let c = this.__defineGetter__("", function(){}); + eval("function w(){}")++ + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug521169.js b/js/src/jit-test/tests/auto-regress/bug521169.js new file mode 100644 index 000000000..093e86c18 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug521169.js @@ -0,0 +1,19 @@ +// Binary: cache/js-dbg-64-c08baee44cf4-linux +// Flags: -j +// +try { + with({ + x: (function f(a) { + f(1) + })() + }) {} +} catch(e) {} +for each(x in ["", true]) { + for (b = 0; b < 4; ++b) { + if (b % 2 == 0) { + (function () {})() + } { + gc() + } + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug521279.js b/js/src/jit-test/tests/auto-regress/bug521279.js new file mode 100644 index 000000000..1950ea077 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug521279.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-ca95f2397bc5-linux +// Flags: +// +for(let a in[0]){eval("var b")=x} diff --git a/js/src/jit-test/tests/auto-regress/bug521694.js b/js/src/jit-test/tests/auto-regress/bug521694.js new file mode 100644 index 000000000..dc3c4689c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug521694.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-93d2eef52108-linux +// Flags: +// +for(e in((function x(){yield(p=x())})())){} diff --git a/js/src/jit-test/tests/auto-regress/bug522624.js b/js/src/jit-test/tests/auto-regress/bug522624.js new file mode 100644 index 000000000..1ed40cb30 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug522624.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-a847cf5b4669-linux +// Flags: -j +// +function r([]) { r(); } +var a = {}; +a.__defineGetter__("t", r); +try { a.t; } catch(e) { } +print(uneval(a)); diff --git a/js/src/jit-test/tests/auto-regress/bug525618.js b/js/src/jit-test/tests/auto-regress/bug525618.js new file mode 100644 index 000000000..1cfb1e621 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug525618.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-32-c0dbbcfdb583-linux +// Flags: -j +// +(function (){ + var c; + (eval("\ + (function() {\ + eval(\"\ + for each(w in[0,0,0]) { print(c) }\ + \" , function(){})\ + })\ + "))() +})() diff --git a/js/src/jit-test/tests/auto-regress/bug528048.js b/js/src/jit-test/tests/auto-regress/bug528048.js new file mode 100644 index 000000000..f162e5fda --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug528048.js @@ -0,0 +1,20 @@ +// Binary: cache/js-dbg-32-761988dd0d81-linux +// Flags: -j +// +for (j = 0; j < 3; j++) {} +m = []; +m.concat(); +n = []; +n.concat([]); +Function("\ + for (i = 0; i < 8; i++)\ + ((function f1(b, c) {\ + if (c) {\ + return (gc)()\ + }\ + f1(b, 1);\ + ((function f2(d, e) {\ + return d.length == e ? 0 : d[e] + f2(d, e + 1)\ + })([{}, /x/, /x/], 0))\ + })())\ +")() diff --git a/js/src/jit-test/tests/auto-regress/bug531513.js b/js/src/jit-test/tests/auto-regress/bug531513.js new file mode 100644 index 000000000..acbeeb8fb --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug531513.js @@ -0,0 +1,24 @@ +// Binary: cache/js-dbg-32-4a7f5376270a-linux +// Flags: -j +// +try { + (eval("\ + (function() {\ + for (var y = 0; y < 4; y++) {\ + w = y\ + }\ + })") + )() +} catch(e) {} +(function() { + for (v in (x = {})) {} +})(); +(function() { + for (var z = 0; z < 8; z++) { + if (z == 5) { + x /= x + } else { + for each(w in [1]) {} + } + } +})() diff --git a/js/src/jit-test/tests/auto-regress/bug532363.js b/js/src/jit-test/tests/auto-regress/bug532363.js new file mode 100644 index 000000000..10cdbef4a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug532363.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-32-410468c50ca1-linux +// Flags: -j +// +load(libdir + 'asserts.js'); +assertThrowsInstanceOf(function() { + for each(z in [0, 0, 0, 0]) { ({ + __parent__: [] + } = []) + } +}, TypeError); // [].__parent__ is undefined diff --git a/js/src/jit-test/tests/auto-regress/bug533705.js b/js/src/jit-test/tests/auto-regress/bug533705.js new file mode 100644 index 000000000..b112b9e90 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug533705.js @@ -0,0 +1,25 @@ +// Binary: cache/js-dbg-64-61b1c094b729-linux +// Flags: -j +// +function mk() { + return (function () {}); +} + +function f() { + var j = 55; + + var f = function () { + return j; + } + + var g = function() { + } + + var a = [ mk(), f, g, mk(), mk() ]; + + for (var i = 0; i < 5; ++i) { + a[i].p = 99; + } +} + +f(); diff --git a/js/src/jit-test/tests/auto-regress/bug537854.js b/js/src/jit-test/tests/auto-regress/bug537854.js new file mode 100644 index 000000000..80fb3c14a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug537854.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-9d51f2a931f7-linux +// Flags: +// +({x:function(){}}).watch('x',function(){}); diff --git a/js/src/jit-test/tests/auto-regress/bug543436.js b/js/src/jit-test/tests/auto-regress/bug543436.js new file mode 100644 index 000000000..a1145cb59 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug543436.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-f57b95afb57e-linux +// Flags: +// +(function() { + try { + eval("\ + function() {\ + if (3)\ + (1 for (x in []));\ + else \ + (this._ = function(){})\ + }\ + "); + } catch(e) {} +})() diff --git a/js/src/jit-test/tests/auto-regress/bug557946.js b/js/src/jit-test/tests/auto-regress/bug557946.js new file mode 100644 index 000000000..8d1e95c53 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug557946.js @@ -0,0 +1,44 @@ +// Binary: cache/js-dbg-64-6f1a38b94754-linux +// Flags: -j +// +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ + +var x = 0; +var y = 0; + +function h() { + if (x == 1) + y++; + else + y--; +} + +function F() { + var m = null; + + function g(i) { + /* Force outgoing typemaps to have a string. */ + m = "badness"; + + /* Loop a bit. */ + for (var i = 0; i < 10; i++) { + h(); + } + } + + /* Spin for a while so trees build. */ + for (var i = 0; i < 100; i++) { + /* Capture m == TT_NULL in outgoing fi for rp[0] */ + g(); + + /* Flip the switch to bail out with deep nested frames. */ + if (i > 50) + x = 1; + + /* Set m = null on the loop tail to get better traces. */ + m = null; + } +} + +F(); + diff --git a/js/src/jit-test/tests/auto-regress/bug558618.js b/js/src/jit-test/tests/auto-regress/bug558618.js new file mode 100644 index 000000000..3fe1dfb25 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug558618.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-e69034463eeb-linux +// Flags: -j +// +/* vim: set ts=8 sts=4 et sw=4 tw=99: */ +function f() { + this.search = function(a, b, c) { + arguments[3] = { } + arguments.length = 4; + for (var i = 0; i < 100; i++) { + print(arguments[3]); + } + } +} +var o = new f(); +o.search({x: -1, y: -1, w: 100600, h: 100600}); diff --git a/js/src/jit-test/tests/auto-regress/bug560566.js b/js/src/jit-test/tests/auto-regress/bug560566.js new file mode 100644 index 000000000..bec7cb623 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug560566.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-64-58c9dd4f0c1f-linux +// Flags: +// +var o = {} +Object.defineProperty(o, "x", {get: undefined, set: function() { Object.defineProperty(o, "x", {set: function() { }}); }, configurable: true}); +o.a = 0; +o.x = 0; diff --git a/js/src/jit-test/tests/auto-regress/bug560796.js b/js/src/jit-test/tests/auto-regress/bug560796.js new file mode 100644 index 000000000..4ab93567e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug560796.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-64-a6d7a5677b4c-linux +// Flags: +// +this.__defineSetter__("x", function(){}) +this.watch("x", "".localeCompare) +window = x +Object.defineProperty(this, "x", ({ + set: window +})) diff --git a/js/src/jit-test/tests/auto-regress/bug561278.js b/js/src/jit-test/tests/auto-regress/bug561278.js new file mode 100644 index 000000000..aaeb2c2ba --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug561278.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-32-fe937d72a9ce-linux +// Flags: +// +x = Iterator([]) +for (z in x) {} +(function() { + for (l in function() {}) {} +} ()) +for (z in x) {} diff --git a/js/src/jit-test/tests/auto-regress/bug562028.js b/js/src/jit-test/tests/auto-regress/bug562028.js new file mode 100644 index 000000000..3c647da81 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug562028.js @@ -0,0 +1,20 @@ +// Binary: cache/js-dbg-64-0723bab9f15d-linux +// Flags: +// +function f(code) { + uneval(Function(code.replace(/\/\*DUPTRY\d+/, + function(k) { + n = k.substr(8) + return g("try{}catch(e){}", n) + } + ))) +} +function g(s, n) { + if (n == 1) return s + s2 = s + s + r = n % 2 + d = (n - r) / 2; + m = g(s2, d) + return r ? m: m +} +f("if(/>/(\"\")){/*DUPTRY4968(u)}else if([]()){}") diff --git a/js/src/jit-test/tests/auto-regress/bug563034.js b/js/src/jit-test/tests/auto-regress/bug563034.js new file mode 100644 index 000000000..9dfa8c7b4 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug563034.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-c9212eb6175b-linux +// Flags: +// +function f(a) { + function g() { + yield function () a; + } + return g(); +} +var x; +f(7).next()(); diff --git a/js/src/jit-test/tests/auto-regress/bug563126.js b/js/src/jit-test/tests/auto-regress/bug563126.js new file mode 100644 index 000000000..9a42bacc2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug563126.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-985cdfad1c7e-linux +// Flags: +// +(function(x){ function a () { x = 2 }; tracing(true); a(); })() diff --git a/js/src/jit-test/tests/auto-regress/bug563127.js b/js/src/jit-test/tests/auto-regress/bug563127.js new file mode 100644 index 000000000..eeb063db4 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug563127.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-985cdfad1c7e-linux +// Flags: -j +// +function a() {} +a(); +for(var j=0;j<3;++j){ evalcx("lazy");} diff --git a/js/src/jit-test/tests/auto-regress/bug564619.js b/js/src/jit-test/tests/auto-regress/bug564619.js new file mode 100644 index 000000000..08541d5ec --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug564619.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-32-a214b695dc7b-linux +// Flags: -j +// +(function() { + eval("\ + function c() {\ + for (var b = 0; b < 2; ++b) {\ + print(this)\ + }\ + }\ + c();\ + c();\ + ") +})() diff --git a/js/src/jit-test/tests/auto-regress/bug567577.js b/js/src/jit-test/tests/auto-regress/bug567577.js new file mode 100644 index 000000000..6b6229d06 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug567577.js @@ -0,0 +1,8 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-88a6e0534e03-linux +// Flags: -j +// +for (a in [/x/, null, new String - Infinity]) { + print(new evalcx(" ")) +} diff --git a/js/src/jit-test/tests/auto-regress/bug568275.js b/js/src/jit-test/tests/auto-regress/bug568275.js new file mode 100644 index 000000000..df16a0d53 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug568275.js @@ -0,0 +1,19 @@ +// Binary: cache/js-dbg-32-9ca0a738a8ad-linux +// Flags: +// +x = ({ + x: /x/ +}) +x.p = [] +Object.defineProperty(x, "x", { + writable: "" +}) +for (b in [[], null, [undefined]]) { + function f(a) { + delete a.x + a.x = Infinity + } + for each(z in [x]) { + f(z) + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug568786.js b/js/src/jit-test/tests/auto-regress/bug568786.js new file mode 100644 index 000000000..cf14af148 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug568786.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-64-fadb38356e0f-linux +// Flags: +// +function f() { + this.e = function() {}; + Object.defineProperty(this, "e", ({ + get: eval + })); +} +new f(); diff --git a/js/src/jit-test/tests/auto-regress/bug568826.js b/js/src/jit-test/tests/auto-regress/bug568826.js new file mode 100644 index 000000000..d1c7ce7de --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug568826.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-64-fadb38356e0f-linux +// Flags: -j +// +NaN = [] +for (var a = 0; a < 2; ++a) { + if (a == 1) { + for each(e in [NaN, Infinity, NaN]) {} + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug571168.js b/js/src/jit-test/tests/auto-regress/bug571168.js new file mode 100644 index 000000000..f759dccdd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug571168.js @@ -0,0 +1,9 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-b84d0be52070-linux +// Flags: +// +var x = new Proxy(Function, {}); +if (x.__proto__ = x) { + print(x); +} diff --git a/js/src/jit-test/tests/auto-regress/bug576846.js b/js/src/jit-test/tests/auto-regress/bug576846.js new file mode 100644 index 000000000..fe1d7301f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug576846.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-32-55f39d8d866c-linux +// Flags: -j +// +eval("\ + for each(d in[0,0,0,0,0,0,0,0,0,0,0,0]) {\ + (function f(aaaaaa,bbbbbb){\ + return aaaaaa.length==bbbbbb?0:aaaaaa[bbbbbb]+f(aaaaaa,bbbbbb+1)\ + })\ + ([,,true,'',,(0),(0/0),new Number,true,Number()],0)\ + }\ +") diff --git a/js/src/jit-test/tests/auto-regress/bug579348.js b/js/src/jit-test/tests/auto-regress/bug579348.js new file mode 100644 index 000000000..45ba59bec --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug579348.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-32-2d09181ec4cd-linux +// Flags: -j +// +for(a in[0,0,0]) { + ([])[-1] +} diff --git a/js/src/jit-test/tests/auto-regress/bug580694.js b/js/src/jit-test/tests/auto-regress/bug580694.js new file mode 100644 index 000000000..bcc1f99da --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug580694.js @@ -0,0 +1,20 @@ +// Binary: cache/js-dbg-32-7c6f62fcbd91-linux +// Flags: -m +// +function f3() { + try { + v = f() + } catch (r) {} +} +function f1(a, t) { + f2(f, a) +} +function f2() { + u = uneval() +} +f = (function () { + Proxy((function () {})(gc()), []) +}) +a = "" +f1() +f3(f, a) diff --git a/js/src/jit-test/tests/auto-regress/bug580699.js b/js/src/jit-test/tests/auto-regress/bug580699.js new file mode 100644 index 000000000..234c6b554 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug580699.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-7c6f62fcbd91-linux +// Flags: -m +// +function f() { + (function () { + x; + function a() {} + print(a) + })() +} +this.__defineGetter__("x", gc) +f() diff --git a/js/src/jit-test/tests/auto-regress/bug580701.js b/js/src/jit-test/tests/auto-regress/bug580701.js new file mode 100644 index 000000000..906a6b672 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug580701.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-32-7c6f62fcbd91-linux +// Flags: -m +// +for (let c in []) { + c = 0 +}(eval)() diff --git a/js/src/jit-test/tests/auto-regress/bug581785.js b/js/src/jit-test/tests/auto-regress/bug581785.js new file mode 100644 index 000000000..62a4ffdab --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug581785.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-441daac3fef9-linux +// Flags: -j +// +function f() { + this.b = function() {}; + this.b = Object.e; + Object.defineProperty(this, "b", {}) +} +for (a in [0, 0, 0, 0]) { + new f +} diff --git a/js/src/jit-test/tests/auto-regress/bug582268.js b/js/src/jit-test/tests/auto-regress/bug582268.js new file mode 100644 index 000000000..a42157e91 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug582268.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-e0988eae6c08-linux +// Flags: -m +// +7%s diff --git a/js/src/jit-test/tests/auto-regress/bug582276.js b/js/src/jit-test/tests/auto-regress/bug582276.js new file mode 100644 index 000000000..235f1a732 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug582276.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-32-e0988eae6c08-linux +// Flags: -m +// +(function() { + this / z + var z = "" +})() diff --git a/js/src/jit-test/tests/auto-regress/bug583675.js b/js/src/jit-test/tests/auto-regress/bug583675.js new file mode 100644 index 000000000..d12924535 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug583675.js @@ -0,0 +1,11 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-2ee92d697741-linux +// Flags: -m +// +{ + gczeal(2) +} +(function () { + ''.w() +})() diff --git a/js/src/jit-test/tests/auto-regress/bug583680.js b/js/src/jit-test/tests/auto-regress/bug583680.js new file mode 100644 index 000000000..5d2321229 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug583680.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-32-2ee92d697741-linux +// Flags: -m +// +function f(foo) { + foo.replace(/s/, "") + Function(foo)() +} +for (a = 0; a < 1000; a++) { + f("\ + for (var b = 0; b < 7; b++) {\ + gczeal(2)\ + }\ + ") +} diff --git a/js/src/jit-test/tests/auto-regress/bug583681.js b/js/src/jit-test/tests/auto-regress/bug583681.js new file mode 100644 index 000000000..a6d86e3c6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug583681.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-2ee92d697741-linux +// Flags: -m +// +Function[typeof h] diff --git a/js/src/jit-test/tests/auto-regress/bug584423.js b/js/src/jit-test/tests/auto-regress/bug584423.js new file mode 100644 index 000000000..b92fe3d2e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug584423.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-c761f8e85b8c-linux +// Flags: +// +uneval(Function("function r([],x){this.b=function(){x}}")) diff --git a/js/src/jit-test/tests/auto-regress/bug586538.js b/js/src/jit-test/tests/auto-regress/bug586538.js new file mode 100644 index 000000000..f3d968588 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug586538.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-f7cf2b7b7961-linux +// Flags: -m +// +Function("\ + for (var a = 0,i=0;i<10;++i) {\ + if (a % 3) {\ + return\ + }\ + function b() {}\ + b((function() {})([Infinity]))\ + }\ +")() diff --git a/js/src/jit-test/tests/auto-regress/bug590772.js b/js/src/jit-test/tests/auto-regress/bug590772.js new file mode 100644 index 000000000..a5e81091d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug590772.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-f561f17e6c27-linux +// Flags: +// +Reflect.parse("for (var x in []) { }") diff --git a/js/src/jit-test/tests/auto-regress/bug591367.js b/js/src/jit-test/tests/auto-regress/bug591367.js new file mode 100644 index 000000000..78cb0dca6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug591367.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-32-33b05dd43cd4-linux +// Flags: -m +// +for (let x in []) { + t(x !== x) +} diff --git a/js/src/jit-test/tests/auto-regress/bug591418.js b/js/src/jit-test/tests/auto-regress/bug591418.js new file mode 100644 index 000000000..c8e952848 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug591418.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-33b05dd43cd4-linux +// Flags: -j +// +(function() { + for each(let z in [0, 0, 0, 0]) { + eval("\ + for(var a = 0; a < 1; ++a) {\ + this\ + }\ + ") + } +})() diff --git a/js/src/jit-test/tests/auto-regress/bug591795.js b/js/src/jit-test/tests/auto-regress/bug591795.js new file mode 100644 index 000000000..a8227f7e6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug591795.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-eae8350841be-linux +// Flags: +// +gczeal() diff --git a/js/src/jit-test/tests/auto-regress/bug592224.js b/js/src/jit-test/tests/auto-regress/bug592224.js new file mode 100644 index 000000000..b39061e11 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug592224.js @@ -0,0 +1,16 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-e8ee411dca70-linux +// Flags: +// +__defineGetter__("x", function () {}); +function z() { + "".replace(/s/, ""); +} +z(); +(function () { + for (a = 0; a < 2; a++) { + __defineGetter__("", /a/); + for each(y in [__defineGetter__("x", function(){})]) {} + } +}()); diff --git a/js/src/jit-test/tests/auto-regress/bug593580.js b/js/src/jit-test/tests/auto-regress/bug593580.js new file mode 100644 index 000000000..e6155b9c9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug593580.js @@ -0,0 +1,29 @@ +// Binary: cache/js-dbg-64-60af58b42567-linux +// Flags: +// +realEval = eval +f = eval("(function(){for(let x in[\ + __defineGetter__(\"\",function(){})\ + ,__defineGetter__(\"\ + functional\ + \",Math.pow)\ + ]){\ + (__defineSetter__(\"\",function(){}))\ + ()\ + }})") +try { + f() +} catch (r) { + delete this.eval + delete this.Math + eval = realEval + e = this.toSource +} +f = eval("(function(){(__defineSetter__(\"\ + functional\ + \",(function(){return{t:function(){}}})))()})") +try { + f() +} catch (r) { + eval() +} diff --git a/js/src/jit-test/tests/auto-regress/bug593605.js b/js/src/jit-test/tests/auto-regress/bug593605.js new file mode 100644 index 000000000..48a0b1abc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug593605.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-32-60af58b42567-linux +// Flags: +// +function z(b) { + if (b) this.x = Object; + this.__defineGetter__("x", encodeURIComponent) + this.c = delete s +} +for each(a in [/x/, 0]) { + new z(a) +} diff --git a/js/src/jit-test/tests/auto-regress/bug596817.js b/js/src/jit-test/tests/auto-regress/bug596817.js new file mode 100644 index 000000000..247bb0c2c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug596817.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-a409054e1395-linux +// Flags: -m +// +load(libdir + 'asserts.js'); +// value is not iterable +(function() { + for (var [x] in [[] < []]) + { + // Just a useless expression. + []; + } +})(); diff --git a/js/src/jit-test/tests/auto-regress/bug596823.js b/js/src/jit-test/tests/auto-regress/bug596823.js new file mode 100644 index 000000000..6b989b90e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug596823.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-32-a409054e1395-linux +// Flags: -j +// +for (a = 0; a < 9; a++) { + "".charAt(3 / 0) +} diff --git a/js/src/jit-test/tests/auto-regress/bug599446.js b/js/src/jit-test/tests/auto-regress/bug599446.js new file mode 100644 index 000000000..a3186853f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug599446.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-32-1c913526c597-linux +// Flags: +// +(function () { + x = constructor +})() +new(x)(x) diff --git a/js/src/jit-test/tests/auto-regress/bug599464.js b/js/src/jit-test/tests/auto-regress/bug599464.js new file mode 100644 index 000000000..15b293c07 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug599464.js @@ -0,0 +1,20 @@ +// Binary: cache/js-dbg-64-1c913526c597-linux +// Flags: +// +aa = eval +function bb() { + this.eval = aa +} +var f = (function () { + (Object.seal)(this) + l +}) +try { + f() +} catch (r) {} +bb() +try { + f() +} catch (r) { + bb() +} diff --git a/js/src/jit-test/tests/auto-regress/bug600128.js b/js/src/jit-test/tests/auto-regress/bug600128.js new file mode 100644 index 000000000..490553213 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug600128.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-64-54700fad8cf9-linux +// Flags: -j +// +this.__defineSetter__("x", Object.freeze) +x = this; +for (let z = 0; z < 5; z++) { + for each(let y in [0, 0, 0]) { + print(u = "") + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug600138.js b/js/src/jit-test/tests/auto-regress/bug600138.js new file mode 100644 index 000000000..d4f7341d8 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug600138.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-54700fad8cf9-linux +// Flags: -j +// +function z() { + this.a = function () {} + this.a = this + Object.defineProperty(this, "a", ({})) +} +for (e in [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) { + new z() +} diff --git a/js/src/jit-test/tests/auto-regress/bug600889.js b/js/src/jit-test/tests/auto-regress/bug600889.js new file mode 100644 index 000000000..4024304bf --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug600889.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-98c134cf59ef-linux +// Flags: -j +// +uneval = function(){} +Function("\ + function zz(aa) {\ + if (aa) this.a = decodeURIComponent;\ + gc();\ + delete this.a\ + }\ + for each(c in [0, 0, 0, 0, 0, 0, 0, new Boolean(false), \ + 0, new Boolean(false), new Boolean(false), \"\"]) {\ + l=new zz(c)\ + }\ +")() diff --git a/js/src/jit-test/tests/auto-regress/bug601070.js b/js/src/jit-test/tests/auto-regress/bug601070.js new file mode 100644 index 000000000..11bbaab44 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug601070.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-32-82ff7c27fcb0-linux +// Flags: +// +var x = new Int32Array(); +x.set(x); diff --git a/js/src/jit-test/tests/auto-regress/bug601393.js b/js/src/jit-test/tests/auto-regress/bug601393.js new file mode 100644 index 000000000..db14f473a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug601393.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-64-0230a9e80c1f-linux +// Flags: -m +// +var code = "(function(){ function eval(){} function eval(){} "; +for (var i = 0; i < 2048; ++i) { + code += " try{}catch(e){}"; +} +code += " })()" +eval(code); diff --git a/js/src/jit-test/tests/auto-regress/bug601396.js b/js/src/jit-test/tests/auto-regress/bug601396.js new file mode 100644 index 000000000..26986b5c3 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug601396.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-0230a9e80c1f-linux +// Flags: -j +// +(function(){ + eval("\ + for each(let a in['A','A','A','A','A','A','A','A']) {\ + L:for each(let b in a) {\ + break L\ + }\ + }\ + ") +})() diff --git a/js/src/jit-test/tests/auto-regress/bug605011.js b/js/src/jit-test/tests/auto-regress/bug605011.js new file mode 100644 index 000000000..56b29c4a9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug605011.js @@ -0,0 +1,19 @@ +// Binary: cache/js-dbg-32-47a8311cf0bb-linux +// Flags: +// +function g(x, n) { + for (var i = 0; i < n; ++i) { + x = { + a: x + }; + } + return x; +} +try { + d = g(0, 672); +} catch(exc1) {} +(function() { + try { + gczeal(2)(uneval(this)) + } catch(exc2) {} +})() diff --git a/js/src/jit-test/tests/auto-regress/bug605013.js b/js/src/jit-test/tests/auto-regress/bug605013.js new file mode 100644 index 000000000..e058b256c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug605013.js @@ -0,0 +1,10 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-47a8311cf0bb-linux +// Flags: +// +x = /x/ +Function("Object.defineProperty(x,new AttributeName,({e:true,enumerable:true}))")() +{ + throw (Object.keys)(x, /x/) +} diff --git a/js/src/jit-test/tests/auto-regress/bug606639.js b/js/src/jit-test/tests/auto-regress/bug606639.js new file mode 100644 index 000000000..dd7b463bb --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug606639.js @@ -0,0 +1,9 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-32b049250e03-linux +// Flags: -m +// +function v(s) { eval(s); } +v("eval(function(){})()"); +var x = new Int32Array(0); +v("x.set()"); diff --git a/js/src/jit-test/tests/auto-regress/bug607502.js b/js/src/jit-test/tests/auto-regress/bug607502.js new file mode 100644 index 000000000..1fbeab36e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug607502.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-d253c44465ae-linux +// Flags: -m +// +function q() { ++i; } +var i = 0; +Object.freeze(this); +q(); +q(); diff --git a/js/src/jit-test/tests/auto-regress/bug607513.js b/js/src/jit-test/tests/auto-regress/bug607513.js new file mode 100644 index 000000000..cde7eba6b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug607513.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-64-d253c44465ae-linux +// Flags: +// +Object.freeze(this); +try { eval('const q;') } catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug612836.js b/js/src/jit-test/tests/auto-regress/bug612836.js new file mode 100644 index 000000000..6ed4adb1c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug612836.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-7b8898c9b54c-linux +// Flags: +// +new Proxy(this,{}) diff --git a/js/src/jit-test/tests/auto-regress/bug613400.js b/js/src/jit-test/tests/auto-regress/bug613400.js new file mode 100644 index 000000000..03448044c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug613400.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-cbd2053aa825-linux +// Flags: +// +/(?!()m)/.exec("m"); diff --git a/js/src/jit-test/tests/auto-regress/bug617485.js b/js/src/jit-test/tests/auto-regress/bug617485.js new file mode 100644 index 000000000..3ac9b7de0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug617485.js @@ -0,0 +1,6 @@ +// |jit-test| error:SyntaxError + +// Binary: cache/js-dbg-64-4c1fbfcf1d0d-linux +// Flags: +// +Iterator(evalcx('#2=*')) diff --git a/js/src/jit-test/tests/auto-regress/bug620315.js b/js/src/jit-test/tests/auto-regress/bug620315.js new file mode 100644 index 000000000..98b09cdec --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug620315.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-fc50c521bf48-linux +// Flags: -j -m +// +new Function('"use strict"; for (var j = 0; j < 9; ++j) { 4 > this; }')() diff --git a/js/src/jit-test/tests/auto-regress/bug620637.js b/js/src/jit-test/tests/auto-regress/bug620637.js new file mode 100644 index 000000000..772f420d7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug620637.js @@ -0,0 +1,20 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-aeeb631c6d43-linux +// Flags: +// +options('tracejit'); +var actual = '' +function f() { + for (var a = 0; a < 3; ++a) { + (function () { + for (var b = 0; b < 2; ++b) { + (function () { + for (a = 0, b = 0; b < 15; b++, actual = actual + "7") { + } + })(); + } + })(); + } +} +f(); diff --git a/js/src/jit-test/tests/auto-regress/bug620640.js b/js/src/jit-test/tests/auto-regress/bug620640.js new file mode 100644 index 000000000..ebaa6e49b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug620640.js @@ -0,0 +1,26 @@ +// Binary: cache/js-dbg-32-38f985b0522c-linux +// Flags: -j +// +var g; +var e; +var w; +for each (a in this) { } +d = 3; +x = 3; +for (var m = 0; m < 9; ++m) {} +for each (var c in this) { } +for each(let d in [ + [], + [], + [], + function () {}, + undefined +]) { + for each(let f in [ + [], + [], + true, + [], + true + ]) {} +} diff --git a/js/src/jit-test/tests/auto-regress/bug621816.js b/js/src/jit-test/tests/auto-regress/bug621816.js new file mode 100644 index 000000000..42a48730c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug621816.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-250bf984b8bc-linux +// Flags: -j +// +for (let j=0; j<9; ++j) { var a = new Int8Array(); a[0] = 5; a[0]; } diff --git a/js/src/jit-test/tests/auto-regress/bug621988.js b/js/src/jit-test/tests/auto-regress/bug621988.js new file mode 100644 index 000000000..0cfb16060 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug621988.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-64-250bf984b8bc-linux +// Flags: +// +f = function() { L: 3; alert(5); } +print(f.toString(28800000,23,59,999)); diff --git a/js/src/jit-test/tests/auto-regress/bug622167.js b/js/src/jit-test/tests/auto-regress/bug622167.js new file mode 100644 index 000000000..8ba412dfb --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug622167.js @@ -0,0 +1,26 @@ +// Binary: cache/js-dbg-64-fe4489fb36ab-linux +// Flags: +// +function + eval( ) { eval();} +try { +DoWhile_3(); +} catch(e) { +} +function DoWhile_3() { + var result2 = "pass"; +woohooboy: { + eval('(function() { x getter= function(){} ; var x5, x = 0x99; })();'); + } +} +test(); +function test() +{ + function foopy() + { + var f = function(){ r = arguments; test(); yield 170; } + try { for (var i in f()) { } } catch (iterError) { } + } + foopy(); + gc(); +} diff --git a/js/src/jit-test/tests/auto-regress/bug630770.js b/js/src/jit-test/tests/auto-regress/bug630770.js new file mode 100644 index 000000000..745fd526d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug630770.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-64-3b3710520c0e-linux +// Flags: +// +options('strict') +Function("function y(x,x)d") diff --git a/js/src/jit-test/tests/auto-regress/bug634236.js b/js/src/jit-test/tests/auto-regress/bug634236.js new file mode 100644 index 000000000..68eb8c48f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug634236.js @@ -0,0 +1,13 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-e25c8949931d-linux +// Flags: +// +(eval("\ + (function(){\ + b = {};\ + b.__proto__=evalcx('split');\ + print(b)\ + }\ + )\ +"))() diff --git a/js/src/jit-test/tests/auto-regress/bug635389.js b/js/src/jit-test/tests/auto-regress/bug635389.js new file mode 100644 index 000000000..5eaff7661 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug635389.js @@ -0,0 +1,8 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-a3946d490610-linux +// Flags: +// +var x = []; +x.join = x.toString; +"" + x; diff --git a/js/src/jit-test/tests/auto-regress/bug637010.js b/js/src/jit-test/tests/auto-regress/bug637010.js new file mode 100644 index 000000000..3490f6c9f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug637010.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-64-d708c2fa7fea-linux +// Flags: +// +var o0 = Iterator.prototype; +function f0(o) {} +try { + for(var i=0; i<7; i++) { + try { o0.prototype(); } catch(e) { + if (o0.next() != 7) + throw "7 not yielded"; + }; + } +} catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug637205.js b/js/src/jit-test/tests/auto-regress/bug637205.js new file mode 100644 index 000000000..9cb4f60b6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug637205.js @@ -0,0 +1,45 @@ +// Binary: cache/js-dbg-64-21e90d198613-linux +// Flags: +// +load(libdir + "immutable-prototype.js"); + +var x = {}; +function jsTestDriverEnd() +{ + for (var optionName in x) + { + } + x = {}; +} + +var o2 = this; +var o5 = Object.prototype; + +function f28(o) { + var _var_ = o; + if (globalPrototypeChainIsMutable()) + _var_['__proto_'+'_'] = null; +} + +function _var_(f7) { + function f15(o) {} +} + +function f39(o) { + for(var j=0; j<5; j++) { + try { o.__proto__ = o2; } catch(e) {} + } +} + +for(var i=0; i<11; i++) { + f39(o5); + f28(o2); +} + +jsTestDriverEnd(); + +{ + delete Function; +} + +jsTestDriverEnd(); diff --git a/js/src/jit-test/tests/auto-regress/bug638212.js b/js/src/jit-test/tests/auto-regress/bug638212.js new file mode 100644 index 000000000..4def4ca33 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug638212.js @@ -0,0 +1,21 @@ +// Binary: cache/js-dbg-64-01037ab16a65-linux +// Flags: -j -m -a +// +o2 = this; +function f0(o) { } +function f4(o) { } +(function() { +Object.seal(o2); +})(); +function f3(o) { } +function f7(o) { +var _var_ = o; +--(_var_["-1"]); +} +for(var i1=0; i1<6; i1++) { +f4(f3); +f4 = new Proxy(f7, {}); +} +f4(f0); + +try { eval("var __proto__"); } catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug638735.js b/js/src/jit-test/tests/auto-regress/bug638735.js new file mode 100644 index 000000000..63071aa7c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug638735.js @@ -0,0 +1,24 @@ +// Binary: cache/js-dbg-64-290712e55ade-linux +// Flags: -j +// +var o9 = Function.prototype; +var o13 = Array; +function f5(o) { +o.watch('p3', function() {}); +ox1 = new Proxy(o, {}); +} +f5(o9); +f5(o13); +var o0 = []; +function f3(o) { + var prop = Object.getOwnPropertyNames(ox1)[0]; + if (prop) { Object.defineProperty(ox1, prop, {configurable: true,enumerable: true,unused: 1 }); } +}(function() { +for(var o3 in o0) { +f3(f3); +} +})(); + for (var i = 0; i < 9; i++) + { + new Array(1, 2); + } diff --git a/js/src/jit-test/tests/auto-regress/bug639413.js b/js/src/jit-test/tests/auto-regress/bug639413.js new file mode 100644 index 000000000..d8dd58eaf --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug639413.js @@ -0,0 +1,9 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-1c8e91b2e3a4-linux +// Flags: +// +a = evalcx("lazy"); +a.watch("x", function() {}); +({}).watch("x", function() {}); +a.__defineGetter__("y", {}); diff --git a/js/src/jit-test/tests/auto-regress/bug640079.js b/js/src/jit-test/tests/auto-regress/bug640079.js new file mode 100644 index 000000000..2892bb5b3 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug640079.js @@ -0,0 +1,9 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-adc45b0a01c8-linux +// Flags: -m -n +// +eval("\ + x = evalcx('split');\ + evalcx(\"for(e in <x/>){}\" ,x)\ +") diff --git a/js/src/jit-test/tests/auto-regress/bug643670.js b/js/src/jit-test/tests/auto-regress/bug643670.js new file mode 100644 index 000000000..701490717 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug643670.js @@ -0,0 +1,19 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-55f463c562d4-linux +// Flags: -m -n -a +// +o3 = evalcx("split") +function f3(o) { + try { + new o + } catch(e) {} +} +function f16(o) { + Object.getOwnPropertyNames(o); + o.__defineGetter__("prototype", function() {}) +} +for (;;) { + new f3(o3); + f16(o3) +} diff --git a/js/src/jit-test/tests/auto-regress/bug643847.js b/js/src/jit-test/tests/auto-regress/bug643847.js new file mode 100644 index 000000000..0574e20b4 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug643847.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-64-c811be25eaad-linux +// Flags: +// +function f(o) { + o.constructor = function() {}; +} +__proto__.__defineSetter__('constructor', +function(v) {}); +f({}); +Object.defineProperty(__proto__, 'constructor', { + writable: true, +}); +f({}); diff --git a/js/src/jit-test/tests/auto-regress/bug647464.js b/js/src/jit-test/tests/auto-regress/bug647464.js new file mode 100644 index 000000000..2aee06b9e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug647464.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-32-c340841f0465-linux +// Flags: -m -n -a +// +RegExp.__proto__ diff --git a/js/src/jit-test/tests/auto-regress/bug648729.js b/js/src/jit-test/tests/auto-regress/bug648729.js new file mode 100644 index 000000000..2b3d4cbda --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648729.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-32-d3215d1e985a-linux +// Flags: -m -n -a +// +(function() { + for (let y in [0]) { + return + } +})() diff --git a/js/src/jit-test/tests/auto-regress/bug648739.js b/js/src/jit-test/tests/auto-regress/bug648739.js new file mode 100644 index 000000000..f270f882b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648739.js @@ -0,0 +1,10 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-6c8becdd1574-linux +// Flags: +// +(function () { + [] = x = /x/; + x.toString = Function.prototype.bind; + print(x) +})() diff --git a/js/src/jit-test/tests/auto-regress/bug648747.js b/js/src/jit-test/tests/auto-regress/bug648747.js new file mode 100644 index 000000000..136999dc4 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648747.js @@ -0,0 +1,51 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-d3215d1e985a-linux +// Flags: -m -n -a +// +function ygTreeView(id) { + this.init(id) +} +ygTreeView.prototype.init = function (id) { + this.root = new ygRootNode(this) +}; +function ygNode() {} +ygNode.prototype.init = function (_32, _33, _34) { + this.children = [] + this.expanded = _34 + if (_33) _33.appendChild(this) +}; +ygNode.prototype.appendChild = function (_35) { + this.children[this.children.length] = _35 +}; +ygNode.prototype.hasChildren = function () { + return this.children.length > 0; +}; +ygNode.prototype.getHtml = function () { + var sb = []; + if (this.hasChildren(true) && this.expanded) sb[sb.length] = this.renderChildren() +}; +ygNode.prototype.renderChildren = function () { + this.completeRender() +}; +ygNode.prototype.completeRender = function () { + for (var i = 0;;) sb[sb.length] = this.children[i].getHtml() +}; +ygRootNode.prototype = new ygNode; + +function ygRootNode(_48) { + this.init(null, null, true) +} +ygTextNode.prototype = new ygNode; +function ygTextNode(_49, _50, _51) { + this.init(_49, _50, _51) +} +function buildUserTree() { + userTree = new ygTreeView("userTree") + addMenuNode(userTree, "N", "navheader") +} +function addMenuNode(tree, label, styleClass) { + new ygTextNode({}, tree.root, false) +} +buildUserTree(); +userTree.root.getHtml() diff --git a/js/src/jit-test/tests/auto-regress/bug648839.js b/js/src/jit-test/tests/auto-regress/bug648839.js new file mode 100644 index 000000000..43908bad7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648839.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-64-d3215d1e985a-linux +// Flags: -m -n -a +// +ForIn_1( { length:4, company:"netscape", year:2000, 0:"zero" } ); +function ForIn_1( object ) { + PropertyArray = new Array(); + for ( PropertyArray[PropertyArray.length] in object ) { + object[1]; + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug648852.js b/js/src/jit-test/tests/auto-regress/bug648852.js new file mode 100644 index 000000000..e2df8b907 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648852.js @@ -0,0 +1,12 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-d3215d1e985a-linux +// Flags: -m -n -a +// +var toString = 1; +VERSION = ""; +function startTest() { + if (version) if (VERSION == "ECMA_1") {} +} +var VERSION = this; +startTest(); diff --git a/js/src/jit-test/tests/auto-regress/bug648992.js b/js/src/jit-test/tests/auto-regress/bug648992.js new file mode 100644 index 000000000..b96d4b309 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648992.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-32-74a8fb1bbec5-linux +// Flags: -m -n -a +// +o0 = (3).__proto__ +function f(o) { + var prop + [o][0][prop] = [] + try { + ({ + x: function() { + return o + } + }.x()()) + } catch (e) {} +} +f(o0) diff --git a/js/src/jit-test/tests/auto-regress/bug648999.js b/js/src/jit-test/tests/auto-regress/bug648999.js new file mode 100644 index 000000000..748a85bb1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug648999.js @@ -0,0 +1,10 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-74a8fb1bbec5-linux +// Flags: -m -n -a +// +test(); +function test() +{ + for (var j = 0; j < 10; ++j) new j; +} diff --git a/js/src/jit-test/tests/auto-regress/bug649017.js b/js/src/jit-test/tests/auto-regress/bug649017.js new file mode 100644 index 000000000..62f2a63c7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug649017.js @@ -0,0 +1,8 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-74a8fb1bbec5-linux +// Flags: +// +try { + throw {toString: parseInt.call}; +} catch(e) { e.toString(); } diff --git a/js/src/jit-test/tests/auto-regress/bug649937.js b/js/src/jit-test/tests/auto-regress/bug649937.js new file mode 100644 index 000000000..84152afc0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug649937.js @@ -0,0 +1,21 @@ +// Binary: cache/js-dbg-64-a3eeee8f7803-linux +// Flags: -m -n +// +var i = 0; +var gTestcases = new Array; +var gTc = gTestcases; +function TestCase(n, d, e, a) { + this.description=d; + gTestcases[gTc++]=this; +} +function writeTestCaseResult( expect, actual, string ) {}; +new TestCase; +test(); +function test() { + for ( gTc=0 ; ; ) { + i++; + if (i > 20) { break; } + gTestcases[gTc].description+=" )"; + gTestcases=[1,]; + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug650574.js b/js/src/jit-test/tests/auto-regress/bug650574.js new file mode 100644 index 000000000..19111508d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug650574.js @@ -0,0 +1,9 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-0906d9490eaf-linux +// Flags: +// +var e = Error(''); +e.fileName = e; +e.toSource(); +--> Crash with too much recursion in exn_toSource diff --git a/js/src/jit-test/tests/auto-regress/bug650658.js b/js/src/jit-test/tests/auto-regress/bug650658.js new file mode 100644 index 000000000..c4065a973 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug650658.js @@ -0,0 +1,9 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-ac0989a03bf1-linux +// Flags: -m -n -a +// +AddRegExpCases(/a*b/, "xxx", 0, null ); +AddRegExpCases(/x\d\dy/, "abcx45ysss235", 3,[] ); +function AddRegExpCases(regexp, pattern, index, matches_array ) + (matches_array.length, regexp) diff --git a/js/src/jit-test/tests/auto-regress/bug651827.js b/js/src/jit-test/tests/auto-regress/bug651827.js new file mode 100644 index 000000000..12bda58da --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug651827.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-32-1fe03044bfeb-linux +// Flags: -m -n -a +// +try { + function x() {} +} catch(e) {} +switch (undefined) { + case(y) = Infinity: +} diff --git a/js/src/jit-test/tests/auto-regress/bug652177.js b/js/src/jit-test/tests/auto-regress/bug652177.js new file mode 100644 index 000000000..324262d6a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug652177.js @@ -0,0 +1,18 @@ +// Binary: cache/js-dbg-32-d5fcfa622f16-linux +// Flags: +// +load(libdir + "immutable-prototype.js"); + +Function.toLocaleString.__proto__ = null +y = {}.__proto__ +y.p = function() {} +y.__defineSetter__("", function() {}) +if (globalPrototypeChainIsMutable()) + y.__proto__ = Function.toLocaleString; +function b(a) { + this.__proto__ = a; + Object.freeze(this) +} +for each(z in []) { + new b +} diff --git a/js/src/jit-test/tests/auto-regress/bug653395.js b/js/src/jit-test/tests/auto-regress/bug653395.js new file mode 100644 index 000000000..8d5ef3316 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug653395.js @@ -0,0 +1,19 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-09cce9915b80-linux +// Flags: -m -n +// +try { + (function () { + __proto__ = new Uint32Array() + }()) +} catch (e) {}(function () { +})() +eval("\ +function testAtomize() {\ + x = {};\ + for (var i = false ; i < 65536; ++i)\ + x[String.fromCharCode(i)] = 1;\ +}\ +new testAtomize()(testAtomize(), 65536);\ +"); diff --git a/js/src/jit-test/tests/auto-regress/bug653789.js b/js/src/jit-test/tests/auto-regress/bug653789.js new file mode 100644 index 000000000..68816a57f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug653789.js @@ -0,0 +1,8 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-3dd6ec45084c-linux +// Flags: +// +this.__defineGetter__("x", eval); +eval.toString = toLocaleString +eval < x diff --git a/js/src/jit-test/tests/auto-regress/bug654392.js b/js/src/jit-test/tests/auto-regress/bug654392.js new file mode 100644 index 000000000..ceae70f99 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug654392.js @@ -0,0 +1,15 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-3062ff7fef83-linux +// Flags: -m -n +// +function enterFunc (funcName) {} +test(); +function test() +{ + enterFunc ( "NaN number", "'eeeefghi'.match(/e*/)", new test( "Date.prototype" )); + function err() { + return new Error(); + } + var error = err(s,s,s,s); +} diff --git a/js/src/jit-test/tests/auto-regress/bug654665.js b/js/src/jit-test/tests/auto-regress/bug654665.js new file mode 100644 index 000000000..e1be9f9b8 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug654665.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-3062ff7fef83-linux +// Flags: -m -n -a +// +test(); +function test() +{ + for (var i = 0; i < 0e2.length; ); +} diff --git a/js/src/jit-test/tests/auto-regress/bug655507.js b/js/src/jit-test/tests/auto-regress/bug655507.js new file mode 100644 index 000000000..ec6caa52e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug655507.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-e09e209d988e-linux +// Flags: -m -n -a +// +a = new Array; +a[2] = "2"; +a[1]; diff --git a/js/src/jit-test/tests/auto-regress/bug655940.js b/js/src/jit-test/tests/auto-regress/bug655940.js new file mode 100644 index 000000000..463635e23 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug655940.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-32e8c937a409-linux +// Flags: -m -n -a +// +NaN.__proto__; +function f0() { + try {} catch(e) {} +} +for (i = 0; i < 9; i++) { + new f0; + f0(); + gc() +} diff --git a/js/src/jit-test/tests/auto-regress/bug655950.js b/js/src/jit-test/tests/auto-regress/bug655950.js new file mode 100644 index 000000000..21629924f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug655950.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-32-32e8c937a409-linux +// Flags: -m -n +// +function f() { + try { + (new { + x: function() {} + }.x)(); + } catch (e) {} +} +for (var i = 0; i<10000; i++) { + f(); +} diff --git a/js/src/jit-test/tests/auto-regress/bug657198.js b/js/src/jit-test/tests/auto-regress/bug657198.js new file mode 100644 index 000000000..a1d5a38be --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug657198.js @@ -0,0 +1,36 @@ +// |jit-test| slow; + +// Binary: cache/js-dbg-32-599d1c6cba63-linux +// Flags: -j +// +eval("") +o15 = {} +function f11(o) { + props = Object.getOwnPropertyNames(o) + prop = props.length ? prop[prop.e] + "" : "" + o[prop] = 3 +} +function f12(o) { + _someglobal_ = o; + for (j = 0; j < 5; j++) { + for (x in { + x: { + x: function() { + return _someglobal_ + } + }.x() + }.x) { + ({ + x: { + x: function() {} + }.x() + }[x]) + } + gc() + } +} { + for (i = 0; i < 100; i++) { + f12(o15) + f11(o15) + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug657586.js b/js/src/jit-test/tests/auto-regress/bug657586.js new file mode 100644 index 000000000..2e28d30e0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug657586.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-32-8aa5d9272628-linux +// Flags: -m -n +// +(function() { + with([]) {} + Object.defineProperty([], "", { + set: (function() {}) + }) +})() diff --git a/js/src/jit-test/tests/auto-regress/bug657986.js b/js/src/jit-test/tests/auto-regress/bug657986.js new file mode 100644 index 000000000..eacaf67f1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug657986.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-5d1cbc94bc42-linux +// Flags: -m -n -a +// +function f(x) { + this.i = x; +} +for each(let e in [0, 0, []]) { + try { + f(e) + } catch (e) {} +} +print(uneval(this)) diff --git a/js/src/jit-test/tests/auto-regress/bug658803.js b/js/src/jit-test/tests/auto-regress/bug658803.js new file mode 100644 index 000000000..95b1a5bba --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug658803.js @@ -0,0 +1,17 @@ +// Binary: cache/js-dbg-32-33f1ad45ccb8-linux +// Flags: -m -n +// +function f() { + var N = 624; + this.init_genrand = function(s) { + for (z = 1; z < N; z++) {} + }; +}(function() { + new f; +}()); +function g(o) { + var props = Object.getOwnPropertyNames(o); + var prop = props[props.length - 1] + "p" + o[prop] = Number.prototype.__proto__; +} +g(Number.prototype.__proto__); diff --git a/js/src/jit-test/tests/auto-regress/bug659077.js b/js/src/jit-test/tests/auto-regress/bug659077.js new file mode 100644 index 000000000..27487a634 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug659077.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-32-29f08848d96c-linux +// Flags: -j +// +try { + function l() { } + function r() { } + d = 4; + var _ = q; +} catch (e) { } +try { + v = new ArrayBuffer(); + s = []; + function e() { } + let a; + eval("for(var[x]=e in this){(function(){})()}"); +} catch (e) { } diff --git a/js/src/jit-test/tests/auto-regress/bug659779.js b/js/src/jit-test/tests/auto-regress/bug659779.js new file mode 100644 index 000000000..22ff561b3 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug659779.js @@ -0,0 +1,33 @@ +// Binary: cache/js-dbg-64-8bcb569c9bf9-linux +// Flags: -m -n -a +// + +var gTestcases = new Array; +function TestCase(n, d, e, a) { + this.description=d + gTestcases[gTc++]=this +} +TestCase.prototype.dump=function () + toPrinted(this.description) +function toPrinted(value) value=value; +function reportCompare (expected, actual, description) { + new TestCase("unknown-test-name", description, expected, actual) +} +function enterFunc (funcName) { + try { + expectCompile = 'No Error' + var actualCompile; + reportCompare(expectCompile, actualCompile, ': compile actual') + } catch(ex) {} +} +gTc=0; +function jsTestDriverEnd() { + for (var i = 0; i < gTestcases.length; i++) gTestcases[i].dump() +} +enterFunc(); +reportCompare(0, 0, 5.123456); +reportCompare(0, 0, this ); +jsTestDriverEnd(); +try { + this.__proto__=[] +} catch(ex) {} +jsTestDriverEnd() diff --git a/js/src/jit-test/tests/auto-regress/bug661840.js b/js/src/jit-test/tests/auto-regress/bug661840.js new file mode 100644 index 000000000..40326bc13 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug661840.js @@ -0,0 +1,39 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-11714be33655-linux +// Flags: -m -n +// +function f(a) {} +s = [{ + s: [], + s: function(d, b) {}, + t: function() { + try {} catch (e) {} + } +}, { + t: "", + s: [], + s: function(d, b) {} +}, { + t: "", + s: [], + s: function(d, b) {}, + t: function() {} +}, { + t: "", + x: "", + s: [], + g: function(b) {}, + t: function(f) {} +}, { + t: "", + s: [], + s: function() {} +}]; +v = 0 +Function("gc(evalcx('lazy'))")(); +gczeal(); +gc(); +(function() { + x +})() diff --git a/js/src/jit-test/tests/auto-regress/bug662132.js b/js/src/jit-test/tests/auto-regress/bug662132.js new file mode 100644 index 000000000..a3f52a2be --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug662132.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-32-6d423e5f2e48-linux +// Flags: -m -n +// +gczeal() +let n = {} +let o = {} +for (let i = 0; i < 5; i++) { + Array(); + for (let j = 0; j < 7; j++) { + o.__defineSetter__("", function() {}) + o.p3 = 1 + delete o.p3 + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug665914.js b/js/src/jit-test/tests/auto-regress/bug665914.js new file mode 100644 index 000000000..2b7b0ee10 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug665914.js @@ -0,0 +1,6 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-57ef3b619966-linux +// Flags: +// +ArrayBuffer.prototype['byteLength'] diff --git a/js/src/jit-test/tests/auto-regress/bug666305.js b/js/src/jit-test/tests/auto-regress/bug666305.js new file mode 100644 index 000000000..5a8d31871 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug666305.js @@ -0,0 +1,8 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-0428dbdf3d58-linux +// Flags: +// +o = (new Uint32Array).buffer +o.__proto__ = o +o.__proto__ = o diff --git a/js/src/jit-test/tests/auto-regress/bug666599.js b/js/src/jit-test/tests/auto-regress/bug666599.js new file mode 100644 index 000000000..7b0740bf0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug666599.js @@ -0,0 +1,17 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-0428dbdf3d58-linux +// Flags: +// +o1 = new Float32Array().buffer +o2 = ArrayBuffer.prototype +o3 = new Uint32Array().buffer +for (i = 0; i < 2; i++) { + for (var x in o2) { + o3.__defineGetter__("", function() {}) + } + o2.__defineGetter__("", function() {}) + o1[ + x] + o1.__proto__ = o3 +} diff --git a/js/src/jit-test/tests/auto-regress/bug667824.js b/js/src/jit-test/tests/auto-regress/bug667824.js new file mode 100644 index 000000000..c84b745ee --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug667824.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-32-208160c856b7-linux +// Flags: -j +// +var x; +for (let a = 0; a < 8; a++) { + Function.prototype() +} diff --git a/js/src/jit-test/tests/auto-regress/bug668206.js b/js/src/jit-test/tests/auto-regress/bug668206.js new file mode 100644 index 000000000..5af6ac9ff --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug668206.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-64-0d2a1a6e967f-linux +// Flags: -j -m +// +function f() { + for (var i = 0; i < 2; ++i) {} +} +for (let a = 0; a < 40; a++) { + f((new Array) ^ 0) +} diff --git a/js/src/jit-test/tests/auto-regress/bug669044.js b/js/src/jit-test/tests/auto-regress/bug669044.js new file mode 100644 index 000000000..a87c2e96a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug669044.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-32-f59568ec0513-linux +// Flags: -j +// +for each(let y in [0, 0]) { + eval("\ + for each(e in[0,0,0,0,0,0,0,0]) {\ + x = undefined\ + }\ + ") +} diff --git a/js/src/jit-test/tests/auto-regress/bug672104.js b/js/src/jit-test/tests/auto-regress/bug672104.js new file mode 100644 index 000000000..1150ee42b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug672104.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-64-a37127f33d22-linux +// Flags: -m -n +// +load(libdir + "immutable-prototype.js"); + +a = {}; +b = __proto__; +for (i = 0; i < 9; i++) { + if (globalPrototypeChainIsMutable()) { + __proto__ = a; + a.__proto__ = b + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug673792.js b/js/src/jit-test/tests/auto-regress/bug673792.js new file mode 100644 index 000000000..08bc11dac --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug673792.js @@ -0,0 +1,7 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-8c7adf094b8e-linux +// Flags: +// +a = {}.__proto__ +gc(evalcx('split')) diff --git a/js/src/jit-test/tests/auto-regress/bug674843.js b/js/src/jit-test/tests/auto-regress/bug674843.js new file mode 100644 index 000000000..ff1167c9b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug674843.js @@ -0,0 +1,63 @@ +// Binary: cache/js-dbg-64-d066929dd830-linux +// Flags: -m +// +function fnSupportsArrayIndexGettersOnObjects() { + if (fnExists(Object.defineProperty)) { + var obj = {}; + Object.defineProperty(obj, "0", { + get: function () { + supportsArrayIndexGettersOnObjects = true; + } + }); + var res = obj[0]; + } + return supportsArrayIndexGettersOnObjects; +} +function fnExists( /*arguments*/ ) { + return true; +} +var ES5Harness = (function () { + var $this = this; + function registerTest(test) { + if (!(test.precondition && !test.precondition())) { + try { + var res = test.test.call($this); + } catch (e) {} + } + } + return { + registerTest: registerTest + } +})(); +ES5Harness.registerTest({ + test: function testcase() { + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) {} + } + var obj = { + length: 10 + }; + Object.defineProperty(obj, "0", { + get: function () { + defineProperty(idx, idx, registerTest + ": }}}}}"); + }, + }); + try { + Array.prototype.reduce.call(obj, callbackfn, "initialValue"); + } finally {} + }, + precondition: function prereq() { + return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects(); + } +}); +ES5Harness.registerTest({ + test: function testcase() { + var obj = {}; + Object.defineProperty(obj, "property", { + configurable: new Date() + }); + }, + precondition: function prereq() { + return fnExists(gczeal(2)); + } +}); diff --git a/js/src/jit-test/tests/auto-regress/bug675251.js b/js/src/jit-test/tests/auto-regress/bug675251.js new file mode 100644 index 000000000..d3f19c3bd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug675251.js @@ -0,0 +1,25 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-d43c6dddeb2b-linux +// Flags: -m -n +// + +function printBugNumber (num) { + BUGNUMBER = num; + print ('BUGNUMBER: ' + num); +} +var actual = ''; +test(); +function test() { + printBugNumber(test); + function f(N) { + for (var i = 0; i != N; ++i) { + for (var repeat = 0;repeat != 2; ++repeat) { + var count = BUGNUMBER(repeat); + } + } + } + var array = [function() { f(10); }, ]; + for (var i = 0; i != array.length; ++i) + array[i](); +} diff --git a/js/src/jit-test/tests/auto-regress/bug677386.js b/js/src/jit-test/tests/auto-regress/bug677386.js new file mode 100644 index 000000000..0bd558f02 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug677386.js @@ -0,0 +1,25 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-82545b1e4129-linux +// Flags: +// + +var g = newGlobal(); +g.eval("var line0 = Error().lineNumber;\n" + + "function f() {\n" + // line0 + 1 + " return 2;\n" + // line0 + 2 + "}\n"); +var N = 4; +for (var i = 0; i < N; i++) { + var dbg = Debugger(g); + dbg.onDebuggerStatement = function (frame) { + var handler = {hit: function () { hits++; }}; + var s = frame.eval("f").return.script; + var offs = s.getLineOffsets(g.line0 + 2); + for (var j = 0; j < offs.length; j++) + s.setBreakpoint(offs[j], handler); + }; + g.eval('debugger;'); +} +gc(/c$...$/); +assertEq(g.f(), 2); diff --git a/js/src/jit-test/tests/auto-regress/bug677587.js b/js/src/jit-test/tests/auto-regress/bug677587.js new file mode 100644 index 000000000..447d61387 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug677587.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-f189dd6316eb-linux +// Flags: +// + +var g = newGlobal(); +g.eval("var a = {};"); +var dbg = new Debugger; +var gw = dbg.addDebuggee(g); +var desc = gw.getOwnPropertyDescriptor("a"); +gw.defineProperty("b", desc); +Debugger(g.a, g.b); diff --git a/js/src/jit-test/tests/auto-regress/bug677977.js b/js/src/jit-test/tests/auto-regress/bug677977.js new file mode 100644 index 000000000..74624e01d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug677977.js @@ -0,0 +1,26 @@ +// Binary: cache/js-dbg-64-48e43edc8834-linux +// Flags: +// + +var g = newGlobal(); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + var s = frame.eval("f").return.script; +}; +function test(s) { + g.eval("line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "function f(i) {\n" + // line0 + 2 + "}\n"); +} +test("i = 128;\n" + "}\n"); +var hits = 0; +dbg.onNewScript = function (s) { + hits++; +}; +assertEq(g.eval("eval('2 + 3')"), 5); +this.gczeal(hits, 2); +var fn = g.evaluate("(function (a) { return 5 + a; })"); +var g2 = newGlobal(); +dbg.addDebuggee(g2, dbg); +g2.clone(fn); diff --git a/js/src/jit-test/tests/auto-regress/bug678086.js b/js/src/jit-test/tests/auto-regress/bug678086.js new file mode 100644 index 000000000..8d7a9ed7d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug678086.js @@ -0,0 +1,17 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-48e43edc8834-linux +// Flags: +// + +function f() { + frame = dbg.getNewestFrame(); +} +var g = newGlobal(); +g.f = function (a, b) { return a + "/" + this . f( ) ; }; +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + var f = frame.eval("f").return; + assertEq(f.call(null, "a", "b").return, "a/b"); +}; +g.eval("debugger;"); diff --git a/js/src/jit-test/tests/auto-regress/bug678090.js b/js/src/jit-test/tests/auto-regress/bug678090.js new file mode 100644 index 000000000..a9fa365cc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug678090.js @@ -0,0 +1,24 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-609f37c36bd7-linux +// Flags: -j -m -a +// + +function toSource(arr) { + for (i=0; i<len; i++) {} +} +test(); +function test() { + function gen() { + var c = test; + try { + yield c; + } finally { + this.toSource(); + } + } + var iter = gen(); + for (i in iter) { + 500(); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug678529.js b/js/src/jit-test/tests/auto-regress/bug678529.js new file mode 100644 index 000000000..ff8b8058c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug678529.js @@ -0,0 +1,11 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-32-48e43edc8834-linux +// Flags: -j -m -a +// + +var g = newGlobal(); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (stack) { return {return: 1234}; }; +g.eval("function f() { debugger; return 'bad'; }"); +assertEq(new g.f(), 1234); diff --git a/js/src/jit-test/tests/auto-regress/bug679799.js b/js/src/jit-test/tests/auto-regress/bug679799.js new file mode 100644 index 000000000..fa899458f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug679799.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-64-2d95fc517e57-linux +// Flags: -m -n -a +// + +function test() +{ + var x = { "0": 3, "-0": 7 }; + try { + delete x["-0"]; + if ("-0" in x) + throw "0 not in x after insertion of 0 property"; + this ["-0"] = 7; + } catch(ex) {} +} +test(); +test(); diff --git a/js/src/jit-test/tests/auto-regress/bug679810.js b/js/src/jit-test/tests/auto-regress/bug679810.js new file mode 100644 index 000000000..56eafcf29 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug679810.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-64-2d95fc517e57-linux +// Flags: -m -n +// + +function WorkerBee(name, dept, projs) { + this.projects &= projs || new Array(); +} +function Engineer(name, projs, machine) { + this.base = WorkerBee; + this.base(name, "engineering", projs) + this.machine = machine || ""; +} +Engineer.prototype = {}; +var les = new Engineer("Morris, Les", new Array("JavaScript"), "indy"); diff --git a/js/src/jit-test/tests/auto-regress/bug680797.js b/js/src/jit-test/tests/auto-regress/bug680797.js new file mode 100644 index 000000000..1f7679528 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug680797.js @@ -0,0 +1,46 @@ +// |jit-test| slow; error:InternalError + +// Binary: cache/js-dbg-64-a2bbe9c999b4-linux +// Flags: -m -n +// +gczeal(2); +function Day( t ) {} +function YearFromTime( t ) {} +function HourFromTime( t ) {} +function MakeTime( hour, min, sec, ms ) {} +function MakeDay( year, month, date ) {} +function MakeDate( day, time ) {} +function TimeClip( t ) { + return ToInteger( t ); +} +function ToInteger( t ) { + sign = 1 + return sign * Math.floor( Math.abs( t ) ); +} +addNewTestCase( 28800000, 23, 59, 999,0, "TDATE = new Date(28800000);(TDATE).setHours(23,59,999);TDATE" ); +function addNewTestCase( time, hours, min, sec, ms, DateString) { + UTCDateFromTime( SetHours( time, hours, min, sec, ms )) +} +function MyDate() this.seconds=0;function UTCDateFromTime(t) { + MyDateFromTime(t) +} +function MyDateFromTime( t ) { + d = new MyDate + d.year=YearFromTime(t) + d.month= + d.date= + d.hours=HourFromTime(t) + d.minutes= + d.time=MakeTime( d.hours, d, d.seconds, d ) + d=TimeClip( MakeDate( MakeDay( d.year, d.month, ( ( MyDateFromTime(t) ) , null ) ), d.time ) ) +} +function SetHours( t, hour, min, sec, ms ) { + TIME = + HOUR = + MIN = min == 0 ? TIME : + SEC = sec == 0 ? addNewTestCaseSecFromTime : Number + var MS = ms == void 0 ? TIME : ms; + var RESULT6 = ( HOUR, MS ); + var UTC_TIME = MakeDate(Day(TIME), RESULT6); + return TimeClip(UTC_TIME); +} diff --git a/js/src/jit-test/tests/auto-regress/bug682252.js b/js/src/jit-test/tests/auto-regress/bug682252.js new file mode 100644 index 000000000..dd39e1d28 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug682252.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-64-7054f0e3e70e-linux +// Flags: +// + +re = new RegExp("([^b]*)+((..)|(\\3))+?Sc*a!(a|ab)(c|bcd)(<*)", "i"); +var str = "aNULLxabcd"; +str.replace(re, function(s) { return s; }); diff --git a/js/src/jit-test/tests/auto-regress/bug682298.js b/js/src/jit-test/tests/auto-regress/bug682298.js new file mode 100644 index 000000000..b29dfdb0b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug682298.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-cc1e08803869-linux +// Flags: +// +(function(){clear()})() diff --git a/js/src/jit-test/tests/auto-regress/bug682563.js b/js/src/jit-test/tests/auto-regress/bug682563.js new file mode 100644 index 000000000..5522e5f3b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug682563.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-9a0172368402-linux +// Flags: -m -n +// +var TITLE = "Labeled statements"; +LabelTest(0, 0); +function LabelTest(limit, expect) { + woo: for (var result = 0; limit<100; result++,limit++) { + if (result == limit) { + result = 'Error'; + } else "$0$00" || this ? TITLE : 1; + }; +} diff --git a/js/src/jit-test/tests/auto-regress/bug684281.js b/js/src/jit-test/tests/auto-regress/bug684281.js new file mode 100644 index 000000000..6612a8718 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug684281.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-64-fcca99426576-linux +// Flags: -m -n -a +// + +function printStatus (msg) {} +F = function () {}; +F.prototype = new Int32Array(1); +o = new F(); +function f2(o){ + with(this) + for(var x in o) + printStatus(o[x]); +} +f2([]); diff --git a/js/src/jit-test/tests/auto-regress/bug685472.js b/js/src/jit-test/tests/auto-regress/bug685472.js new file mode 100644 index 000000000..1a6384181 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug685472.js @@ -0,0 +1,12 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-b7d269a291b6-linux +// Flags: -m -n -a +// + +function Integer(value, exception) { + try {} catch (e) {} + new(value = this)(this.value); + Math.floor(({})[value.Math, this].abstract) +} +new Integer(3, false); diff --git a/js/src/jit-test/tests/auto-regress/bug686107.js b/js/src/jit-test/tests/auto-regress/bug686107.js new file mode 100644 index 000000000..9135cd6c1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug686107.js @@ -0,0 +1,15 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-d078623f7875-linux +// Flags: -m -n -a +// + +function testKeyTransitions() { + var i, key, result, message; + var array = []; + for (i = 0; i != 10; i++) { + key = (i < 3) ? 'pop' : (/\u009e\u0029/g ); + array[key](i); + } +} +testKeyTransitions(); diff --git a/js/src/jit-test/tests/auto-regress/bug686179.js b/js/src/jit-test/tests/auto-regress/bug686179.js new file mode 100644 index 000000000..9eb69e584 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug686179.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-b31b25125429-linux +// Flags: -m -n -a +// + +(function () { + assertEquals = function assertEquals(expected, found, name_opt) { }; + assertTrue = function assertTrue(value, name_opt) { }; +})(); +function f0() {} +function f1(x) {} +function test(f) { + assertTrue(null === (assertEquals).arguments); +} +test(f0); +test(f1); diff --git a/js/src/jit-test/tests/auto-regress/bug687099.js b/js/src/jit-test/tests/auto-regress/bug687099.js new file mode 100644 index 000000000..c013b72b9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug687099.js @@ -0,0 +1,30 @@ +// Binary: cache/js-dbg-64-94ceb173baed-linux +// Flags: -m -n -a +// + +gczeal(2); +function iso(d) { + return new Date(d).toISOString(); +} +function check(s, millis){ + description = "Date.parse('"+s+"') == '"+iso(millis)+"'"; +} +function dd(year, month, day, hour, minute, second, millis){ + return Date.UTC(year, month-1, day, hour, minute, second, millis); +} +function TZAtDate(d){ + return d.getTimezoneOffset() * 60000; +} +function TZInMonth(month){ + return TZAtDate(new Date(dd(2009,month,1,0,0,0,0))); +} +JulTZ = TZInMonth(7); +check("2009-07-23T19:53:21.001+12:00", dd(2009,7,23,7,53,21,1)); +check("2009-07-23T19:53:21+12:00", dd(2009,7,23,7,53,21,0)); +check("2009-07-23T19:53+12:00", dd(2009,7,23,7,53,0,0)); +check("2009-07T19:53:21.001", dd(2009,0Xe ,1,19,53,21,1)+JulTZ); +check("2009-07T19:53:21", dd(2009,7,1,19,53,21,0)+JulTZ); +check("2009-07T19:53", dd(2009,7,1,19,53,0,0)+JulTZ); +check("2009-07-23T19:53:21.001+12:00", dd(2009,7,23,7,53,21,1)); +check("2009-07-23T00:00:00.000-07:00", dd(2009,7,23,7,0,0,0)); +check("2009-07-23T24:00:00.000-07:00", dd(2009,7,24,7,0,0,0)); diff --git a/js/src/jit-test/tests/auto-regress/bug687102.js b/js/src/jit-test/tests/auto-regress/bug687102.js new file mode 100644 index 000000000..0612c332a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug687102.js @@ -0,0 +1,7 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-32-f3f5d8a8a473-linux +// Flags: +// +function caller(obj) {} +var pc = line2pc(caller, pc2line(caller, 0XeBebb ) + 2); diff --git a/js/src/jit-test/tests/auto-regress/bug687125.js b/js/src/jit-test/tests/auto-regress/bug687125.js new file mode 100644 index 000000000..c4811e926 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug687125.js @@ -0,0 +1,25 @@ +// Binary: cache/js-dbg-64-f3f5d8a8a473-linux +// Flags: -m -n +// + +function MakeDay( year, month, date ) { + date = ToInteger(date ); + var t = ( year < 1970 ) ? 1 : 0; + return ( (Math.floor(t/86400000)) + date - 1 ); +} +function MakeDate( day, time ) { + if ( day == Number.POSITIVE_INFINITY || day == Number.NEGATIVE_INFINITY ) { } +} +function ToInteger( t ) { + var sign = ( t < 0 ) ? -1 : 1; + return ( sign * Math.floor( Math.abs( t ) ) ); +} +var UTCDate = MyDateFromTime( Number("946684800000") ); +function MyDate() { + this.date = 0; +} +function MyDateFromTime( t ) { + var d = new MyDate(); + d.value = ToInteger( MakeDate( MakeDay( d.year, d.month, d.date ), d.time ) ); + var i = 0; while (Uint32Array && i < 10000) { ++i; if (0 == 100000) return; } +} diff --git a/js/src/jit-test/tests/auto-regress/bug687399.js b/js/src/jit-test/tests/auto-regress/bug687399.js new file mode 100644 index 000000000..4a6734d1a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug687399.js @@ -0,0 +1,30 @@ +// Binary: cache/js-dbg-64-06445f55f009-linux +// Flags: -m -n -a +// + +if (!this.emulatedJSON) { + emulatedJSON = function () { + function stringify(value, whitelist) { + var a, i, v; + switch (typeof value) { + case 'string': + if (!(value.propertyIsEnumerable('length'))) { + for (i = 0; i < l; i += 1) { + k = whitelist[i]; + if (typeof k === 'string') { + if (i %= 'not visited') {} + } + } + } + } + } + return { + stringify: stringify, + }; + }(); + var testPairs = [ ['{"five":5}'] ] + for (var i = 0; i < testPairs.length; i++) { + var pair = testPairs[i]; + var s = emulatedJSON.stringify(pair[1]) + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug688968.js b/js/src/jit-test/tests/auto-regress/bug688968.js new file mode 100644 index 000000000..0b1185d4c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug688968.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-fecae145d884-linux +// Flags: -m -n -a +// + +function foo(x) { + x === x--; +} +foo(1.2); diff --git a/js/src/jit-test/tests/auto-regress/bug688974.js b/js/src/jit-test/tests/auto-regress/bug688974.js new file mode 100644 index 000000000..0c88dc5bd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug688974.js @@ -0,0 +1,13 @@ +// Binary: cache/js-dbg-64-fecae145d884-linux +// Flags: -m -n +// + +gczeal(2); +Object.defineProperty(Object.prototype, "b", {set: function() {}}); +function C(a, b) { + this.a=a; + this.b=b; +} +var f = C.bind(0x2004, 2); +for (var i=0; i<10000; ++i) + new f; diff --git a/js/src/jit-test/tests/auto-regress/bug689892.js b/js/src/jit-test/tests/auto-regress/bug689892.js new file mode 100644 index 000000000..ad3fbc857 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug689892.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-32-7f4867717226-linux +// Flags: -m -n -a +// + +function foo2(x, n) { + var i = 0; + while (--n >= 0) { + x[i++] = 0; + } +} +foo2([1,0Xae ,3,4,5],('0123456')); diff --git a/js/src/jit-test/tests/auto-regress/bug690650.js b/js/src/jit-test/tests/auto-regress/bug690650.js new file mode 100644 index 000000000..24f5cbcbd --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug690650.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-32-44ef245b8706-linux +// Flags: -m -n -a +// +[].__proto__.__defineGetter__("", function() {}); +var tryCatch = " try{}catch(e){}"; +for (var i = 0; i < 13; ++i) { + tryCatch += tryCatch; +} +eval("\ + (function() {\ + for each(c in[0,0]){\ +" + tryCatch + "\ + print\ + }\ + })\ +")() diff --git a/js/src/jit-test/tests/auto-regress/bug690933.js b/js/src/jit-test/tests/auto-regress/bug690933.js new file mode 100644 index 000000000..cb5045afc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug690933.js @@ -0,0 +1,14 @@ +// |jit-test| slow; + +// Binary: cache/js-dbg-32-1463dc6308a8-linux +// Flags: +// + +var fe="vv"; +for (i=0; i<24; i++) + fe += fe; +var fu=new Function( + fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, + fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, fe, + "done" +); diff --git a/js/src/jit-test/tests/auto-regress/bug691595.js b/js/src/jit-test/tests/auto-regress/bug691595.js new file mode 100644 index 000000000..d62ee7cc7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug691595.js @@ -0,0 +1,20 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-acf3c1fb7c94-linux +// Flags: --ion-eager +// + +function k(f_arg) { + for (var i = 0; i < 10; ++i) { + f_arg( ) ; + } +} +function t() { + k(function (i) { actual ^ this | this; }); +} +var ans = 0; +for (var j = 0; j < 10; ++j) { + for (var i = 0; i < 10; ++i) { + ans += t(); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug692300.js b/js/src/jit-test/tests/auto-regress/bug692300.js new file mode 100644 index 000000000..67698ee08 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug692300.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-64-38a487da2def-linux +// Flags: +// + +var x = newGlobal().Date; +var OBJ = new MyObject( new x(0) ); +try { eval("OBJ.valueOf()"); } catch(exc1) {} +function MyObject( value ) { + this.valueOf = x.prototype.valueOf; +} diff --git a/js/src/jit-test/tests/auto-regress/bug692366.js b/js/src/jit-test/tests/auto-regress/bug692366.js new file mode 100644 index 000000000..4e8516d00 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug692366.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-32536d199fcf-linux +// Flags: +// +try { + Uint8Array.subarray(newGlobal()); +} catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug693144.js b/js/src/jit-test/tests/auto-regress/bug693144.js new file mode 100644 index 000000000..bf89fc55b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug693144.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-b4da2d439cbc-linux +// Flags: -m -n -a +// + +function f() { + var oa = []; + for (var i = 0; i < 8; ++i) { + var o = {}; + oa[(new Int32Array(ArrayBuffer.prototype).length)] = o; + } +} +f(); diff --git a/js/src/jit-test/tests/auto-regress/bug693971.js b/js/src/jit-test/tests/auto-regress/bug693971.js new file mode 100644 index 000000000..174a12f09 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug693971.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-07c668448519-linux +// Flags: -m -n +// + +function testContinue() { + for (i = 0; i < 100; ++i) { + if ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) + continue; + } + return 0; +} +assertEq(testContinue(), 0); diff --git a/js/src/jit-test/tests/auto-regress/bug694438.js b/js/src/jit-test/tests/auto-regress/bug694438.js new file mode 100644 index 000000000..aaca0c0d1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug694438.js @@ -0,0 +1,61 @@ +// Binary: cache/js-dbg-64-ae061e27e3df-linux +// Flags: -m -n +// + +var lfcode = new Array(); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("3"); +lfcode.push("b40eb3beb80c7cde2828a33bd779f7826e25287d.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("1"); +lfcode.push("02b39295c36bbe079e9dca0aca95d253d064a194.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("4"); +lfcode.push("6d3ccd7e95a67392260056fd31425aa671cb5c54.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("0"); +lfcode.push("0d88bd3fca079ce7b26f26e12511d3e36edb4202.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("4"); +lfcode.push("c26e5241caa1d0dad95a2202a57cdc48322e5917.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("3"); +lfcode.push("7eeb48e00f249e4a8ab82e7c70102725f3c88195.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("2"); +lfcode.push("7b61d02cc95bbc7309f749c5deb5d4709687214f.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +lfcode.push("1"); +lfcode.push("8eafe3c62c3ce1635548fc09c4434ef0259bcfff.js"); +lfcode.push("f7b783e07cd0e61b675319866b62c96b521d3c12.js"); +lfcode.push("29cff0b98e80f8b27367a56b3c752dedc59a01fd.js"); +lfcode.push("da39a3ee5e6b4b0d3255bfef95601890afd80709.js"); +var lfRunTypeId = -1; +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + switch (lfRunTypeId) { + case 4: eval("(function() { " + "" + " })();"); + } + } + } catch (lfVare) { } +} diff --git a/js/src/jit-test/tests/auto-regress/bug695290.js b/js/src/jit-test/tests/auto-regress/bug695290.js new file mode 100644 index 000000000..0dff9c33e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug695290.js @@ -0,0 +1,11 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-cf5da681d577-linux +// Flags: -m -n -a +// + +options("typeinfer"); +gczeal(2); +var g = newGlobal(); +gcparam("maxBytes", 22000); +let array = g.eval("new Array(1,2,3)"); diff --git a/js/src/jit-test/tests/auto-regress/bug696039.js b/js/src/jit-test/tests/auto-regress/bug696039.js new file mode 100644 index 000000000..a28e60d3e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug696039.js @@ -0,0 +1,21 @@ +// Binary: cache/js-dbg-32-67673422f7d2-linux +// Flags: -m -n -a +// + +gczeal(2); +var lfcode = new Array(); +lfcode.push(""); +lfcode.push(""); +while (lfcode.length > 0) { + var file = lfcode.shift(); + loadFile(file); +} +function loadFile(lfVarx) { + try { + eval("\ + Array.prototype[30] = 'B';\ + delete Array.prototype[30];\ + assertEquals('edcba', a.join(''));\ + "); + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/auto-regress/bug697255.js b/js/src/jit-test/tests/auto-regress/bug697255.js new file mode 100644 index 000000000..b9f0cae0d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug697255.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-32-6cd262091470-linux +// Flags: -j +// +a = evalcx("lazy"); +b = {} +b.__proto__ = a +a.__proto__ = String +for (var a = 0; a < 50; a++) { + try { + b + "" + } catch (e) {} +} diff --git a/js/src/jit-test/tests/auto-regress/bug698074.js b/js/src/jit-test/tests/auto-regress/bug698074.js new file mode 100644 index 000000000..fd0c95022 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug698074.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-32-b01eb1ba58ce-linux +// Flags: +// +a = (0).__proto__ +b = (0).__proto__ +b.__defineSetter__("valueOf", function() {}) +a + 8 diff --git a/js/src/jit-test/tests/auto-regress/bug698148.js b/js/src/jit-test/tests/auto-regress/bug698148.js new file mode 100644 index 000000000..b6feb657a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug698148.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-64-b01eb1ba58ce-linux +// Flags: +// + +expect = 'Test skipped.'; +function addPointImagedata(pointArray, n, col, row) { + pointArray[expect + 2] = 2; +} +function createMandelSet() { + points = new Array; + for (var idx = 0; idx < 1440000 ; ++idx) { + points[idx] = 0 + } + addPointImagedata(points, ({}, {}), 0,0) +} +createMandelSet(); diff --git a/js/src/jit-test/tests/auto-regress/bug698899.js b/js/src/jit-test/tests/auto-regress/bug698899.js new file mode 100644 index 000000000..644f45ec2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug698899.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-32-f951e9151626-linux +// Flags: -m -n +// +o = evalcx("lazy").__proto__ +gc() +try { + o.watch() +} catch (e) {} +o.constructor() diff --git a/js/src/jit-test/tests/auto-regress/bug699674.js b/js/src/jit-test/tests/auto-regress/bug699674.js new file mode 100644 index 000000000..826621349 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug699674.js @@ -0,0 +1,5 @@ +// Binary: cache/js-dbg-32-6dc7901db1d6-linux +// Flags: +// +Array(24) +for(v in(Array(2440598491))){} diff --git a/js/src/jit-test/tests/auto-regress/bug700127.js b/js/src/jit-test/tests/auto-regress/bug700127.js new file mode 100644 index 000000000..4ef82fb24 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug700127.js @@ -0,0 +1,17 @@ +// Binary: cache/js-dbg-64-921e1db5cf11-linux +// Flags: -m -n -a +// + +function addThis() {} +function Integer( value ) { + try { + checkValue( value ) + } catch (e) { } +} +function checkValue( value ) { + if ( addThis() != value || value ) + throw value='foo'; + return value; +} +Integer( 3 ); +Integer( NaN ); diff --git a/js/src/jit-test/tests/auto-regress/bug700295.js b/js/src/jit-test/tests/auto-regress/bug700295.js new file mode 100644 index 000000000..f92039923 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug700295.js @@ -0,0 +1,22 @@ +// Binary: cache/js-dbg-64-1210706b4576-linux +// Flags: +// +load(libdir + "immutable-prototype.js"); + +if (globalPrototypeChainIsMutable()) { + this.__proto__ = null; + Object.prototype.__proto__ = this; +} + +function exploreProperties(obj) { + var props = []; + for (var o = obj; o; o = Object.getPrototypeOf(o)) { + props = props.concat(Object.getOwnPropertyNames(o)); + } + for (var i = 0; i < props.length; ++i) { + var p = props[i]; + var v = obj[p]; + } +} +var c = [{}]; +exploreProperties(c); diff --git a/js/src/jit-test/tests/auto-regress/bug701248.js b/js/src/jit-test/tests/auto-regress/bug701248.js new file mode 100644 index 000000000..300f50186 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug701248.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-c60535115ea1-linux +// Flags: +// + +function F(x, y) { + var { j, y, p, a } = testSyntax("#1=<a>b</a>", true) = this; +} +var src = F.toSource(-1)+"\n"; diff --git a/js/src/jit-test/tests/auto-regress/bug701332.js b/js/src/jit-test/tests/auto-regress/bug701332.js new file mode 100644 index 000000000..ca40e15a6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug701332.js @@ -0,0 +1,15 @@ +// |jit-test| error:InternalError; slow; + +// Binary: cache/js-dbg-64-c60535115ea1-linux +// Flags: +// + +gczeal(2); +test(); +function test() { + function t(o, proplist) { + var props=proplist.split(/\s+/g); + }; + t({ bar: 123, baz: 123, quux: 123 }, 'bar baz quux'); + ( test(), this )(( "7.4.2-6-n" ) , actual, summary + ' : nonjit'); +} diff --git a/js/src/jit-test/tests/auto-regress/bug702003.js b/js/src/jit-test/tests/auto-regress/bug702003.js new file mode 100644 index 000000000..da30715dc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug702003.js @@ -0,0 +1,25 @@ +// Binary: cache/js-dbg-64-50c1bcb49c76-linux +// Flags: -m -n -a +// + +var lfcode = new Array(); +lfcode.push("try { \ + gczeal(2);\ + exitFunc ('test');\ + } catch(exc1) {}\ +"); +lfcode.push("var summary = 'Foo'; \ + var actual = 'No Crash';\ + var expect = 'No Crash';\ + test();\ + function test() {\ + try {\ + eval('(function(){ <x/>.(yield 4) })().next();');\ + }\ catch(ex) { 'Bar'; }\ + }\ +"); +while (true) { + var code = lfcode.shift(); + if (code == undefined) { break; } + evaluate(code); +} diff --git a/js/src/jit-test/tests/auto-regress/bug702915.js b/js/src/jit-test/tests/auto-regress/bug702915.js new file mode 100644 index 000000000..9829b1919 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug702915.js @@ -0,0 +1,85 @@ +// Binary: cache/js-dbg-64-d51bd1645a2f-linux +// Flags: -m -n -a +// +gczeal(4); +var callStack = new Array(); +var gTestcases = new Array(); +var gTc = gTestcases.length; +function TestCase(n, d, e, a) { + this.name = n; + this.description = d; + this.expect = e; + this.actual = a; + this.passed = getTestCaseResult(e, a); + this.reason = ''; + this.bugnumber = ''; + this.type = (typeof window == 'undefined' ? 'shell' : 'browser'); + gTestcases[gTc++] = this; +} +function enterFunc (funcName) { + try { throw foo; } catch(ex) {} +} +function getTestCaseResult(expected, actual) {} +function writeHeaderToLog( string ) {} +var lfcode = new Array(); +lfcode.push("\ + var code = ''; \ + code+=createCode((gczeal(2))); \ + function createCode(i) { \ + jstop+= + delete + i + \" string.';\"; \ + } \ +"); +lfcode.push("\ +var SECTION = '9.9-1'; \ +new TestCase( SECTION, '(Object(true)).__proto__', Boolean.prototype, (Object(true)).__proto__ ); \ +new TestCase( SECTION, '(Object(1)).__proto__', Number.prototype, (Object(1)).__proto__ ); \ +new TestCase( SECTION, '(Object(-1)).__proto__', Number.prototype, (Object(-1)).__proto__ ); \ +new TestCase( SECTION, '(Object(Number.MAX_VALUE)).__proto__', Number.prototype, (Object(Number.MAX_VALUE)).__proto__ ); \ +new TestCase( SECTION, '(Object(Number.MIN_VALUE)).__proto__', Number.prototype, (Object(Number.MIN_VALUE)).__proto__ ); \ +new TestCase( SECTION, '(Object(Number.POSITIVE_INFINITY)).__proto__', Number.prototype, (Object(Number.POSITIVE_INFINITY)).__proto__ ); \ +new TestCase( SECTION, '(Object(Number.NEGATIVE_INFINITY)).__proto__', Number.prototype, (Object(Number.NEGATIVE_INFINITY)).__proto__ ); \ +new TestCase( SECTION, '(Object(Number.NaN)).__proto__', Number.prototype, (Object(Number.NaN)).__proto__ ); \ +new TestCase( ) ; \ +new TestCase( SECTION, '(Object(\"\")).__proto__', String.prototype, (Object('')).__proto__ ); \ +new TestCase( SECTION, \"(Object('foo')).__proto__\", String.prototype, (Object('foo')).__proto__ ); \ +new TestCase( SECTION, \"Object( '' ).__proto__\", String.prototype, (Object(\"\")).__proto__ ); \ +new TestCase( SECTION, '(Object( new MyObject(true) )).toString()', '[object Object]', eval('(Object( new MyObject(true) )).toString()') ); \ +"); +lfcode.push("jsTestDriverEnd();"); +lfcode.push(""); +lfcode.push("\ + enterFunc ('test'); \ + Array.prototype[1] = 'bar'; \ + var a = []; \ + exitFunc ('test'); \ +"); +lfcode.push(""); +lfcode.push("\ + var VERSION = 'ECMA_1'; \ +var TITLE = 'Value Properties of the Math Object'; \ +writeHeaderToLog( SECTION + ' '+ TITLE); \ +new TestCase( '15.8.1.1', 'Math.E', \ + this . TITLE ); \ + 'typeof Math.E', \ +new TestCase( '15.8.1.2', \ + 'Math.LN10', \ + 'typeof Math.LN10', \ + typeof Math.LN10 ); \ +new TestCase( '15.8.1.3', \ + 'Math.LN2', \ + Math.LN2 ); \ +new TestCase( '15.8.1.3', \ + Math.LOG2E ); \ +new TestCase( '15.8.1.4', \ + Math.SQRT1_2); \ +new TestCase( '15.8.1.7', \ + typeof Math.SQRT2 ); \ +new TestCase( SECTION, \ + eval('var MATHPROPS=\"\";for( p in Math ){ MATHPROPS +=p; };MATHPROPS') ); \ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + try { + eval(file); + } catch(exc1) { print(exc1); }; +} diff --git a/js/src/jit-test/tests/auto-regress/bug704136.js b/js/src/jit-test/tests/auto-regress/bug704136.js new file mode 100644 index 000000000..c5e0b83e7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug704136.js @@ -0,0 +1,8 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-a335853be219-linux +// Flags: +// + +gczeal(4); +jsTestDriverEnd(); diff --git a/js/src/jit-test/tests/auto-regress/bug710192.js b/js/src/jit-test/tests/auto-regress/bug710192.js new file mode 100644 index 000000000..399eee384 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug710192.js @@ -0,0 +1,10 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-63bff373cb94-linux +// Flags: -m -n -a +// + +function f(a, b, c) { + arguments[('4294967295')] = 2; +} +assertEq(f(1), "1234"); diff --git a/js/src/jit-test/tests/auto-regress/bug713209.js b/js/src/jit-test/tests/auto-regress/bug713209.js new file mode 100644 index 000000000..f18ad4577 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug713209.js @@ -0,0 +1,24 @@ +// Binary: cache/js-dbg-32-c5b90ea7e475-linux +// Flags: -m -n -a +// +load(libdir + "immutable-prototype.js"); + +var save__proto__ = __proto__; +if (globalPrototypeChainIsMutable()) + __proto__ = save__proto__; + +function bar(x, y) { + return x + y; +} +function foo(x, y) { + var a = 0; + for (var i = 0; i < 1000; i++) { + a += (this.toString); + a += bar(x, y); + a = bar(x, (a)); + a += bar(x, y); + } + return a; +} +var q = foo(0, 1); +print(q.toSource()); diff --git a/js/src/jit-test/tests/auto-regress/bug713944.js b/js/src/jit-test/tests/auto-regress/bug713944.js new file mode 100644 index 000000000..36377b2f2 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug713944.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-64-7e28cce342a6-linux +// Flags: +// +function f() { + constructor = {} +} +Object.defineProperty(function() { + return {}.__proto__ +}(), "constructor", { + set: function() {} +}) +f() +Object.defineProperty({}.__proto__, "constructor", { + value: 3 +}) +f() diff --git a/js/src/jit-test/tests/auto-regress/bug715682.js b/js/src/jit-test/tests/auto-regress/bug715682.js new file mode 100644 index 000000000..191a95507 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug715682.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-10894668e37f-linux +// Flags: +// +({set"0"(l){}}) diff --git a/js/src/jit-test/tests/auto-regress/bug716512.js b/js/src/jit-test/tests/auto-regress/bug716512.js new file mode 100644 index 000000000..c773bdf42 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug716512.js @@ -0,0 +1,6 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-9a230265bad5-linux +// Flags: +// +gcparam("maxBytes", 22000); diff --git a/js/src/jit-test/tests/auto-regress/bug717249.js b/js/src/jit-test/tests/auto-regress/bug717249.js new file mode 100644 index 000000000..5dfb880b6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug717249.js @@ -0,0 +1,7 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-4de07a341aab-linux +// Flags: -m -n -a +// + +[].__proto__(); diff --git a/js/src/jit-test/tests/auto-regress/bug717251.js b/js/src/jit-test/tests/auto-regress/bug717251.js new file mode 100644 index 000000000..b3e569658 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug717251.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-64-4de07a341aab-linux +// Flags: -m -n -a +// +load(libdir + "immutable-prototype.js"); + +if (globalPrototypeChainIsMutable()) + this.__proto__ = []; + +var msPerDay = 86400000; +for ( var time = 0, year = 1969; year >= 0; year-- ) { + time -= TimeInYear(year); +} +function DaysInYear( y ) {} +function TimeInYear( y ) { + return ( DaysInYear(y) * msPerDay ); +} diff --git a/js/src/jit-test/tests/auto-regress/bug718347.js b/js/src/jit-test/tests/auto-regress/bug718347.js new file mode 100644 index 000000000..e8886a796 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug718347.js @@ -0,0 +1,8 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-49afabda6701-linux +// Flags: -m -n -a +// + +this.__proto__ = newGlobal(); +eval("(toLocaleString)();"); diff --git a/js/src/jit-test/tests/auto-regress/bug719686.js b/js/src/jit-test/tests/auto-regress/bug719686.js new file mode 100644 index 000000000..9641fef6b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug719686.js @@ -0,0 +1,32 @@ +// |jit-test| slow; + +// Binary: cache/js-dbg-32-e5e66f40c35b-linux +// Flags: +// + +gczeal(2); +function subset(list, size) { + if (size == 0 || !list.length) + return [list.slice(0, 0)]; + var result = []; + for (var i = 0, n = list.length; i < n; i++) { + var pick = list.slice(i, i+1); + var rest = list.slice(0, i).concat(list.slice(i+1)); + for each (var x in subset(rest, size-1)) + result.push(pick.concat(x)); + } + return result; +} +var bops = [ + ["=", "|=", "^=", "&=", "<<=", ">>=", ">>>=", "+=", "-=", "*=", "/=", "%="], + ]; +var aops = []; +for (var i = 0; i < bops.length; i++) { + for (var j = 0; j < bops[i].length; j++) { + var k = bops[i][j]; + aops.push(k); +} +for (i = 2; i < 5; i++) { + var sets = subset(aops, i); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug720380.js b/js/src/jit-test/tests/auto-regress/bug720380.js new file mode 100644 index 000000000..d673ab898 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug720380.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-42368fe44c8c-linux +// Flags: -m -n +// + +function MyObject( value ) { + this.toBoolean = (this[ this.Function = this ]++ ); +} +new MyObject(true); diff --git a/js/src/jit-test/tests/auto-regress/bug720396.js b/js/src/jit-test/tests/auto-regress/bug720396.js new file mode 100644 index 000000000..8244185a9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug720396.js @@ -0,0 +1,11 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-1962ca549264-linux +// Flags: +// + +var g = newGlobal(); +var dbg1 = new Debugger; +var gw1 = dbg1.addDebuggee(g); +var dbg2 = new Debugger; +var gw2 = dbg2.addDebuggee((gw1.__proto__)); diff --git a/js/src/jit-test/tests/auto-regress/bug721497.js b/js/src/jit-test/tests/auto-regress/bug721497.js new file mode 100644 index 000000000..55c028e35 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug721497.js @@ -0,0 +1,13 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-edf8075b0333-linux +// Flags: +// + +var g = newGlobal(); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + assertEq(dumpStack(), true); +}; +g.eval("function f(a, [b, c], {x: [y], z: w}, {q}) { debugger; }"); +g.eval("f(1, [2, 3], {x: [4], z: 5}, {q: 6});"); diff --git a/js/src/jit-test/tests/auto-regress/bug722021.js b/js/src/jit-test/tests/auto-regress/bug722021.js new file mode 100644 index 000000000..47a8bbc18 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug722021.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-8a59519e137e-linux +// Flags: -m -n -a +// + +var a = []; +for (let j = 0; j < 5; ++j) { + a.push(-2 in (a)); +} diff --git a/js/src/jit-test/tests/auto-regress/bug722023.js b/js/src/jit-test/tests/auto-regress/bug722023.js new file mode 100644 index 000000000..e58cd39e0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug722023.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-8a59519e137e-linux +// Flags: -m -n -a +// + +var obj = new Object(); +var index = [ (null ), 1073741824, 1073741825 ]; +for (var j in index) { + testProperty(index[j]); +} +function testProperty(i) { + actual = obj[String(i)]; +} diff --git a/js/src/jit-test/tests/auto-regress/bug722260.js b/js/src/jit-test/tests/auto-regress/bug722260.js new file mode 100644 index 000000000..d9777c29b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug722260.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-8a59519e137e-linux +// Flags: +// + +var m = new Map; +var key = -((/\u0024/ ).x); +var v = {}; +m.set(key,v); diff --git a/js/src/jit-test/tests/auto-regress/bug724875.js b/js/src/jit-test/tests/auto-regress/bug724875.js new file mode 100644 index 000000000..a6e20496c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug724875.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-c34398f961e7-linux +// Flags: --ion-eager +// + +var lfcode = new Array(); +lfcode.push("gczeal(4);"); +lfcode.push(""); +while (true) { + var file = lfcode.shift(); + if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + eval(lfVarx); +} diff --git a/js/src/jit-test/tests/auto-regress/bug726636.js b/js/src/jit-test/tests/auto-regress/bug726636.js new file mode 100644 index 000000000..595ed290e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug726636.js @@ -0,0 +1,10 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-64-4a9a6ffd1f21-linux +// Flags: +// +function jsTestDriverEnd() {} +this.__defineSetter__("x", function () {}); +x %= 5; +jsTestDriverEnd(); +mjitChunkLimit(); diff --git a/js/src/jit-test/tests/auto-regress/bug726799.js b/js/src/jit-test/tests/auto-regress/bug726799.js new file mode 100644 index 000000000..8311ce36b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug726799.js @@ -0,0 +1,20 @@ +// Binary: cache/js-dbg-32-ebafee0cea36-linux +// Flags: -m -n +// +function tryItOut(code) { + f = eval("(function(){" + code + "})") + for (e in f()) {} +} +tryItOut("\ + for each(x in[0,0,0,0,0,0,0]) {\ + function f(b) {\ + Object.defineProperty(b,\"\",({t:f}))\ + }\ + for each(d in[(1),String,String,String,String,(0),String,(1),String]) {\ + try{\ + f(d);\ + yield\ + }catch(e){}\ + }\ + }\ +") diff --git a/js/src/jit-test/tests/auto-regress/bug727330.js b/js/src/jit-test/tests/auto-regress/bug727330.js new file mode 100644 index 000000000..bfa453302 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug727330.js @@ -0,0 +1,9 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-ff51ddfdf5d1-linux +// Flags: +// +var a = []; +for (var i = 0; i < 200; ++i) a.push({}); +var p = new Proxy({}, {preventExtensions() { return false; }}); +Object.preventExtensions(p); diff --git a/js/src/jit-test/tests/auto-regress/bug728509.js b/js/src/jit-test/tests/auto-regress/bug728509.js new file mode 100644 index 000000000..102770aa5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug728509.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-32-78fde7e54d92-linux +// Flags: -m -n -a +// +function g(code) { + try { + f = eval("(function(){" + code + "})") + } catch (r) {} + f() + try { + evalcx("(function(){return" + code + "})()") + } catch (e) {} +} +g("") +g(" function(x,[]){NaN.x::c}()") diff --git a/js/src/jit-test/tests/auto-regress/bug729571.js b/js/src/jit-test/tests/auto-regress/bug729571.js new file mode 100644 index 000000000..449ce040f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug729571.js @@ -0,0 +1,42 @@ +// Binary: cache/js-dbg-64-ca97bbcd6b90-linux +// Flags: --ion-eager +// + +gczeal(4); +function TestCase(n, d, e, a) {} +TestCase.prototype.dump = function () {}; +TestCase.prototype.testFailed = (function TestCase_testFailed() { + }); + try { + try { } catch(ex1) { } + } catch(ex) { } + options.initvalues = {}; + var optionNames = options().split(','); + var optionsframe = {}; + try { + optionsClear(); + } catch(ex) { } +var lfcode = new Array(); +lfcode.push("\ + try { } catch (exception) { }\ + try { } catch (exception) { }\ + try { } catch (exception) { }\ + try { } catch (actual) { }\ + var props = {};\ + function test(which) {\ + var g = newGlobal();\ + function addDebugger(g, i) {\ + var dbg = Debugger(g);\ + dbg.onDebuggerStatement = function (frame) { };\ + }\ + for (var i = 0; i < 3; i++) {\ + addDebugger(g, i);\ + }\ + g.eval(\"debugger;\");\ +}\ +for (var j = 0; j < 3; j++) test(j);\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + try { evaluate(file); } catch (lfVare) { } +} diff --git a/js/src/jit-test/tests/auto-regress/bug729797.js b/js/src/jit-test/tests/auto-regress/bug729797.js new file mode 100644 index 000000000..4d5c4512b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug729797.js @@ -0,0 +1,15 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-5a04fd69aa09-linux +// Flags: --ion-eager +// + +var patterns = new Array(); +patterns[0] = ''; +test(); +function test() { + for (i in patterns) { + s = patterns[i]; + status =(test)(s); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug729886.js b/js/src/jit-test/tests/auto-regress/bug729886.js new file mode 100644 index 000000000..b17ac1e29 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug729886.js @@ -0,0 +1,12 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-opt-64-5a04fd69aa09-linux +// Flags: --ion-eager +// + +function deep1(x) { + if (0) { } + else i : dumpStack(); +} +for (var i = 0; 1; ++i) + deep1(i); diff --git a/js/src/jit-test/tests/auto-regress/bug730806.js b/js/src/jit-test/tests/auto-regress/bug730806.js new file mode 100644 index 000000000..4ceb5274e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug730806.js @@ -0,0 +1,60 @@ +// Binary: cache/js-opt-32-2dc40eb83023-linux +// Flags: -m -n -a +// +function toPrinted(value) + value = value.replace(/\\n/g, 'NL') + .replace(/\\r/g, 'CR') + .replace(/[^\x20-\x7E]+/g, escapeString); +function escapeString (str) +{ + var a, b, c, d; + var len = str.length; + var result = ""; + var digits = ["0", "1", "2", "3", "4", "5", "6", "7", + "8", "9", "A", "B", "C", "D", "E", "F"]; + for (var i=0; i<len; i++) + { + var ch = str.charCodeAt(i); + a = digits[ch & 0xf]; + if (ch) + { + c = digits[ch & 0xf]; + ch >>= 4; + d = digits[ch & 0xf]; + result += "\\u" + d + c + b + a; + } + } +} +function reportCompare (expected, actual, description) { +function test() { + try + { + } + catch(e) + { + } + } +} +try { +gczeal(2,4); +function setprop() { +} +} catch(exc1) {} +var trimMethods = ['trim', 'trimLeft', 'trimRight']; +var whitespace = [ + {s : '\u2028', t : 'LINE SEPARATOR'}, + ]; +for (var j = 0; j < trimMethods.length; ++j) +{ + var method = trimMethods[j]; + for (var i = 0; i < whitespace.length; ++i) + { + var v = whitespace[i].s; + var t = whitespace[i].t; + v = v + v + v; + str = v; + expected = ''; + actual = str[method](); + reportCompare(expected, actual, t + ':' + '"' + toPrinted(str) + '".' + method + '()'); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug732719.js b/js/src/jit-test/tests/auto-regress/bug732719.js new file mode 100644 index 000000000..d3521c787 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732719.js @@ -0,0 +1,24 @@ +// |jit-test| slow; error:InternalError + +// Binary: cache/js-dbg-32-343ec916dfd5-linux +// Flags: -m -n +// + +function TestCase(n, d, e, a) +TestCase.prototype.dump = function () {}; +function enterFunc (funcName) +function writeHeaderToLog( string ) {} +gczeal(2); +function f() {} +try { +var BUGNUMBER = 350621; +test(); +} catch(exc1) {} +function test() { + enterFunc ( summary = this, test(BUGNUMBER)); + function gen1() { } + function test_it(RUNS) { } +} +new TestCase (String([(1),'a22','a23','a24']), + String('a11\na22\na23\na24'.match(new RegExp('a..$','g')))); +test(); diff --git a/js/src/jit-test/tests/auto-regress/bug732852.js b/js/src/jit-test/tests/auto-regress/bug732852.js new file mode 100644 index 000000000..8936fa855 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732852.js @@ -0,0 +1,10 @@ +// |jit-test| error:SyntaxError + +// Binary: cache/js-dbg-64-1fd6c40d3852-linux +// Flags: --ion-eager +// + +var ary = ["\u001Cfoo", "\u001Dfoo", "\u001Efoo", "\u001Ffoo"]; +for (var i in ary) { + ary[Number(i)].search("var MYVAR='077';++MYVAR") +} diff --git a/js/src/jit-test/tests/auto-regress/bug732855.js b/js/src/jit-test/tests/auto-regress/bug732855.js new file mode 100644 index 000000000..62c66c305 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732855.js @@ -0,0 +1,69 @@ +// Binary: cache/js-dbg-64-1fd6c40d3852-linux +// Flags: --ion-eager +// +function TestCase(n, d, e, a) {} +var msPerDay = 86400000; +var msPerHour = 3600000; +var now = new Date(); +var TIME_NOW = now.valueOf(); +function DaysInYear( y ) { + if ( y % 4 != 0 ) { + return 365; + } + return 366; +} +function TimeInYear( y ) { + return ( DaysInYear(y) * msPerDay ); +} +function TimeFromYear( y ) { + return ( msPerDay * DayFromYear(y) ); +} +function DayFromYear( y ) { + return ( 365*(y-1970) + + Math.floor((y-1601)/400) ); +} +function InLeapYear( t ) { + if ( DaysInYear(YearFromTime(t)) == 365 ) { + return 0; + } + if ( DaysInYear(YearFromTime(t)) == 366 ) { + } +} +function YearFromTime( t ) { + var sign = ( t < 0 ) ? -1 : 1; + var year = ( sign < 0 ) ? 1969 : 1970; + for ( var timeToTimeZero = t; ; ) { + timeToTimeZero -= sign * TimeInYear(year) + if ( sign < 0 ) { + } else { + if ( sign * timeToTimeZero < 0 ) { + break; + } else { + year += sign; + } + } + } + return ( year ); +} +function WeekDay( t ) {} +function LocalTZA() {} +function LocalTime( t ) { + var dst_start = GetDSTStart(t); +} +function GetFirstSundayInMonth( t, m ) { + var leap = InLeapYear(t); +} +function GetDSTStart( t ) { + return (GetFirstSundayInMonth(t, 2) + 7*msPerDay + 2*msPerHour - LocalTZA()); +} +var SECTION = "15.9.5.12"; +addTestCase( TIME_NOW ); +function addTestCase( t ) { + var start = TimeFromYear(YearFromTime(t)); + var stop = TimeFromYear(YearFromTime(t) + 1); + for (var d = start; d < stop; d += msPerDay) { + new TestCase( SECTION, + WeekDay((LocalTime(d))), + (__lookupGetter__) ); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug732856.js b/js/src/jit-test/tests/auto-regress/bug732856.js new file mode 100644 index 000000000..e6a7d2a07 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732856.js @@ -0,0 +1,19 @@ +// Binary: cache/js-dbg-64-1fd6c40d3852-linux +// Flags: --ion-eager +// + +var cnName = 'name'; +var cnNameGetter = function() {this.nameGETS++; return this._name;}; +obj = (new (function ( ) { } ) ); +obj.__defineGetter__(cnName, cnNameGetter); +function lameFunc(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (obj.name) + (y >> 16) + (lsw >> 16); +} +function runSomeTimes(func, iters) { + for (var i = 0; i < iters; ++i) { + result = func(42, 42); + } +} +for (var i = 0; i < 11000; ++i) + runSomeTimes(lameFunc, 1); diff --git a/js/src/jit-test/tests/auto-regress/bug732857.js b/js/src/jit-test/tests/auto-regress/bug732857.js new file mode 100644 index 000000000..d78f3e3c7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732857.js @@ -0,0 +1,34 @@ +// Binary: cache/js-dbg-32-1fd6c40d3852-linux +// Flags: --ion-eager +// +load(libdir + "immutable-prototype.js"); + +function TestCase(n, d, e, a) {}; + +if (globalPrototypeChainIsMutable()) + this.__proto__ = []; + +var msPerDay = 86400000; +var TIME_1900 = -2208988800000; +function TimeFromYear( y ) { + return ( msPerDay * DayFromYear(y) ); +} +function DayFromYear( y ) { + return ( 365*(y-1970) + + Math.floor((y-1601)/400) ); +} +function YearFromTime( t ) { + var sign = ( t < 0 ) ? -1 : 1; + var year = ( sign < 0 ) ? 1969 : 1970; + return ( year ); +} +var SECTION = "15.9.5.10"; +addTestCase( TIME_1900 ); +function addTestCase( t ) { + var start = TimeFromYear(YearFromTime(t)); + var stop = TimeFromYear(YearFromTime(t) + 1); + for (var d = start; d < stop; d += msPerDay) { + new TestCase( SECTION, + (new Date( SECTION ? "Failed" : prototype += "'abc'.search(new RegExp('^'))") ).getDate() ); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug732861.js b/js/src/jit-test/tests/auto-regress/bug732861.js new file mode 100644 index 000000000..6ceed608b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug732861.js @@ -0,0 +1,12 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-1fd6c40d3852-linux +// Flags: --ion-eager +// + +j = 0; +out1: +for ((exception) = 0; ; j++) + if (j == 50) + break out1; +while (dbgeval("[]").proto ? g : 50) {} diff --git a/js/src/jit-test/tests/auto-regress/bug735313.js b/js/src/jit-test/tests/auto-regress/bug735313.js new file mode 100644 index 000000000..fe57887fc --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug735313.js @@ -0,0 +1,15 @@ +// |jit-test| slow; allow-oom; + +// Binary: cache/js-dbg-64-dfcb11712ec2-linux +// Flags: +// + +a=[]; +for (var i=0; i<10; i++) { + a[a.length] = a; +} +try { + for (var i=0; i<26; i++) { + a[a.length] = a.toString(); + } +} catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug735936.js b/js/src/jit-test/tests/auto-regress/bug735936.js new file mode 100644 index 000000000..a7f8db1ac --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug735936.js @@ -0,0 +1,8 @@ +// |jit-test| error: SyntaxError +// Binary: cache/js-dbg-32-7e713db43d8d-linux +// Flags: +// +f = (function() { + "use strict"; + [arguments] = eval() +}) diff --git a/js/src/jit-test/tests/auto-regress/bug736609.js b/js/src/jit-test/tests/auto-regress/bug736609.js new file mode 100644 index 000000000..fc7bc9c21 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug736609.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-32-c7ef262e3024-linux +// Flags: +// +try { + a = new ArrayBuffer(76); + b = new Uint32Array(a); + uneval() + c = new Uint8Array(a); + c.set(b) +} catch (e) {} diff --git a/js/src/jit-test/tests/auto-regress/bug737300.js b/js/src/jit-test/tests/auto-regress/bug737300.js new file mode 100644 index 000000000..ad5b02191 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug737300.js @@ -0,0 +1,21 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-b5b6e6aebb36-linux +// Flags: --ion-eager +// + +function loopy(p0) +{ + var r3 = p0; + var r4 = p0; + var r6 = p0; + var r7 = p0; + while (r2) { + while (r2) { + r5 = r6 & r1; + r3 = r4 & r3; + r2 = r7; + } + } +} +loopy(0); diff --git a/js/src/jit-test/tests/auto-regress/bug737737.js b/js/src/jit-test/tests/auto-regress/bug737737.js new file mode 100644 index 000000000..cf219d5b3 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug737737.js @@ -0,0 +1,36 @@ +// Binary: cache/js-dbg-32-e96d5b1f47b8-linux +// Flags: --ion-eager +// +function b(z) { + switch (z) { + default: + primarySandbox = newGlobal() + } + return function(f, code) { + try { + evalcx(code, primarySandbox) + } catch (e) {} + } +} +function a(code) { + gc(); + f = Function(code) + c(f, code) +} +c = b() +a("\ + f2 = (function() {\ + a0 + o2.m;\ + a2.shift()\ + });\ + a2 = new Array;\ + Object.defineProperty(a2, 0, {\ + get: f2\ + });\ + o2 = {};\ + a0 = [];\ + a2.shift();\ + var x;\ +") +a("a0 = x") +a("a2.shift()") diff --git a/js/src/jit-test/tests/auto-regress/bug739402.js b/js/src/jit-test/tests/auto-regress/bug739402.js new file mode 100644 index 000000000..d42de4e41 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug739402.js @@ -0,0 +1,142 @@ +// |jit-test| slow; + +// Binary: cache/js-dbg-32-be41973873db-linux +// Flags: --ion-eager +// +function MersenneTwister19937() { + N = 624; + var M = 397; + MATRIX_A = 567483615; + UPPER_MASK = 2147483648; + var LOWER_MASK = 767; + mt = Array(); + function unsigned32(n1) { + return n1 < 0 ? (n1 ^ UPPER_MASK) + UPPER_MASK : n1; + } + function addition32(n1, n2) { + return unsigned32(n1 + n2 & 4294967295); + } + function multiplication32(n1, n2) { + sum = 0; + for (i = 0; i < 32; ++i) { + if (n1 >> i & 1) { + sum = addition32(sum, unsigned32(n2 << i)); + } + } + return sum; + } + this.init_genrand = function() { + for (mti = 1; mti < N; mti++) { + mt[mti] = addition32(multiplication32(181433253, unsigned32(mt[mti - 1] ^ mt[mti - 1] >>> 30)), mti); + } + }; + this.genrand_int32 = function() { + mag01 = Array(0, MATRIX_A); + if (mti > N) { + for (kk = 0; kk < N - M; kk++) { + y = unsigned32(mt[kk] & UPPER_MASK | mt[kk + 1] & LOWER_MASK); + } + for (; kk < N; kk++) { + mt[kk] = unsigned32(mt[kk + (M - N)] ^ y >>> 1 ^ mag01[y & 1]); + } + mti = 0; + } + y = mt[mti++]; + return y; + }; +} +(function() { + var fuzzMT = new MersenneTwister19937; + fuzzSeed = 4; + fuzzMT.init_genrand(fuzzSeed); + rnd = function(n) { + var x = fuzzMT.genrand_int32() * 2.2e-10; + return Math.floor(x * n); + }; +}()); + +function rndElt(a) { + return a[rnd(a.length)]; +} +varBinderFor = ["", "t", ""]; +function forLoopHead(d, b, v, reps) { + var sInit = rndElt(varBinderFor) + v + "=0"; + var sCond = v + "<" + reps; + sNext = "++" + v; + return "for(" + sInit + ";" + sCond + ";" + sNext + ")"; +} +function makeBranchUnstableLoop(d, b) { + var reps = rnd(rnd(9)); + v = uniqueVarName(); + var mod = rnd(); + target = rnd(mod); + return "" + forLoopHead(d, b, v, reps) + "{" + "if(" + v + "%" + mod + "==" + target + "){" + makeStatement(d - 2, b) + "}" + "{" + makeStatement(d - 2) + "}" + "}"; +} +function weighted(wa) { + a = []; + for (var i = 0; i < wa.length; ++i) { + for (var j = 0; j < wa[i].w; ++j) { + a.push(wa[i].fun); + } + } + return a; +} +statementMakers = weighted([{ + w: 6, + fun: makeBranchUnstableLoop +}, {}]); +(function() { + builderStatementMakers = weighted([{ + w: 1, + fun: function() { + return "gc()"; + } + }, { + w: 10, + fun: function() {} + }]); + makeBuilderStatement = function() { + return rndElt(builderStatementMakers)(); + }; +}()); +function uniqueVarName() { + for (i = 0; i < 6; ++i) { + s = String.fromCharCode(97 + rnd(6)); + } + return s; +} +function makeLittleStatement(d) { + rnd(0); + if (rnd) { + rndElt(littleStatementMakers)(); + } +} +littleStatementMakers = [function() {}]; +function testOne() { + var code = makeOv(10); + tryItOut(code); +} +function makeStatement(d, b) { + if (rnd(0)) {} + if (rnd(2)) { + return makeBuilderStatement(); + } + d < 6 && rnd() == 0; + if (d < rnd(8)) { + return makeLittleStatement(); + } + return rndElt(statementMakers)(d, b); +} +function makeOv(d, B) { + if (rnd() == 0) {} + return "" + makeStatement(d, [""]); +} +function tryItOut(code) { + try { + f = Function(code); + f(); + } catch (r) {} +} +for (let aa = 0; aa < 9999; aa++) { + testOne(); +} diff --git a/js/src/jit-test/tests/auto-regress/bug739901.js b/js/src/jit-test/tests/auto-regress/bug739901.js new file mode 100644 index 000000000..9bb1e26fb --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug739901.js @@ -0,0 +1,20 @@ +// Binary: cache/js-dbg-64-940078281bbf-linux +// Flags: --ion-eager +// +function List(l) { + this.l = l; +} +function f(p) { + return g(p.l); +}; +function g(p) { + return !(p instanceof List) ? null : f(p.l); +}; +list = + new List(new List( + new List(new List( + new List(new List( + new List(new List(null)))))))) +for (let i = 0; i < 99999; i++) { + g(list); +} diff --git a/js/src/jit-test/tests/auto-regress/bug740509.js b/js/src/jit-test/tests/auto-regress/bug740509.js new file mode 100644 index 000000000..3d6014b9d --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug740509.js @@ -0,0 +1,81 @@ +// |jit-test| slow; + +// Binary: cache/js-dbg-64-fb23c30e3d60-linux +// Flags: -m -n -a +// +function TestCase(n, d, e, a) +TestCase.prototype.dump = function () { +} +var lfcode = new Array(); +lfcode.push("2"); +lfcode.push("var lfcode = new Array();\ +lfcode.push(\"gczeal(4,1);\");\ +while (true) {\ + var file = lfcode.shift(); if (file == ((0Xa ) . shift )) { break; }\ + eval(file);\ +}\ +"); +lfcode.push("function testJSON(str, expectSyntaxError)\ +"); +lfcode.push("1"); +lfcode.push("Number.prototype.toString = function() { return 3; };\ +assertEq(JSON.stringify({ 3: 3, 4: 4 }, [(this . abstract )]),\ + '{\"3\":3}');\ +"); +lfcode.push("var HoursPerDay = 24;\ +var MinutesPerHour = 60;\ +var SecondsPerMinute = 60;\ +var msPerSecond = 1000;\ +var msPerMinute = 60000;\ +var TZ_ADJUST = TZ_DIFF * msPerHour;\ +var PST_DIFF = TZ_DIFF - TZ_PST;\ +var PST_ADJUST = TZ_PST * msPerHour;\ +var TIME_0000 = (function ()\ + {\ +var TIME_1970 = 0;\ +var TIME_1900 = -2208988800000;\ +var UTC_FEB_29_2000 = TIME_2000 + 31*msPerDay + 28*msPerDay;\ +var UTC_JAN_1_2005 = TIME_2000 + TimeInYear(2000) + TimeInYear(2001) +\ + TimeInYear(2002) + TimeInYear(2003) + TimeInYear(2004);\ +var TIME_NOW = now.valueOf();\ +function getTimeZoneDiff()\ +{\ + return -((new Date(2000, 1, 1)).getTimezoneOffset())/60;\ +function adjustResultArray(ResultArray, msMode)\ + ResultArray[UTC_HOURS] = HourFromTime(t);\ + ResultArray[UTC_DATE] = DateFromTime(t);\ + ResultArray[UTC_MONTH] = MonthFromTime(t);\ + ResultArray[UTC_YEAR] = YearFromTime(t);\ +function DaysInYear( y ) {\ + return \"ERROR: DaysInYear(\" + y + \") case not covered\";\ +function DayNumber( t ) {\ +function TimeWithinDay( t ) {\ +function YearNumber( t ) {\ +function TimeFromYear( y ) {\ +function InLeapYear( t ) {\ + return \"ERROR: InLeapYear(\"+ t + \") case not covered\";\ + for ( var timeToTimeZero = t; ; ) {\ + return \"ERROR: MonthFromTime(\"+t+\") not known\";\ +function DayWithinYear( t ) {\ + return( Day(t) - DayFromYear(YearFromTime(t)));\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + } else if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } else { + switch (lfRunTypeId) { + case 1: eval(lfVarx); break; + case 2: new Function(lfVarx)(); break; + } + } + } catch (lfVare) { } +} diff --git a/js/src/jit-test/tests/auto-regress/bug740654.js b/js/src/jit-test/tests/auto-regress/bug740654.js new file mode 100644 index 000000000..5b2d151ba --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug740654.js @@ -0,0 +1,13 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-32-92fe907ddac8-linux +// Flags: -m -n +// +o = {} +o.valueOf = function() { + for (var p in undefined) { + a = new Function; + } + +o; +}; ++o; diff --git a/js/src/jit-test/tests/auto-regress/bug741199.js b/js/src/jit-test/tests/auto-regress/bug741199.js new file mode 100644 index 000000000..6205bfcfa --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug741199.js @@ -0,0 +1,9 @@ +// Binary: cache/js-dbg-32-e96d5b1f47b8-linux +// Flags: --ion-eager +// + +var a = new Array(1000 * 100); +var i = a.length; +while (i-- != 0) {} +gc(); +(({ }).break--); diff --git a/js/src/jit-test/tests/auto-regress/bug743071.js b/js/src/jit-test/tests/auto-regress/bug743071.js new file mode 100644 index 000000000..0c5e80d3c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug743071.js @@ -0,0 +1,51 @@ +// Binary: cache/js-dbg-64-a9a18824b4c1-linux +// Flags: --ion-eager +// + +{ + try + { + try + { + } + catch(ex1) + { + } + } + catch(ex) + { + } +} +function optionsClear() { + var optionNames = options().split(','); + for (var i = 0; i < optionNames.length; i++) + { + var optionName = optionNames[i]; + if (optionName && + optionName != "methodjit_always") + { + options(optionName); + } + } +} +{ + optionsClear(); + { + } +} +function test() { + for ( gTc=0; gTc < gTestcases.length; gTc++ ) { + try + { + } + catch(e) + { + } + } +} +try { +var g = newGlobal(); +g.eval("(" + function () { + dbg = new Debugger(debuggeeGlobal); + } + ")();"); +} catch(exc0) {} diff --git a/js/src/jit-test/tests/auto-regress/bug743094.js b/js/src/jit-test/tests/auto-regress/bug743094.js new file mode 100644 index 000000000..0cb15d64c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug743094.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-32-a9a18824b4c1-linux +// Flags: --ion-eager +// + +var i = 0; + +gczeal(2); +function test() { + if (i++ > 2500) + return "function"; + var res = typeof (new test("1")) != 'function'; + return res ? "function" : "string"; +} + +test(); diff --git a/js/src/jit-test/tests/auto-regress/bug743096.js b/js/src/jit-test/tests/auto-regress/bug743096.js new file mode 100644 index 000000000..81661ea6e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug743096.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-64-a9a18824b4c1-linux +// Flags: --ion-eager +// + +try { +function f() { + var obj = { + p0:0, p1:1, p2:2, p3:3, p4:4, p5:5, p6:6, p7:7, p8:8, p9:9, + p10:0, p11:1, set:2, p13:3, p14:4, p15:5, p16:6, p17:7, p18:8, p19:9, + with : function() { return 42; } + }; +} + actual = f(); +} catch(exc1) {} diff --git a/js/src/jit-test/tests/auto-regress/bug743876.js b/js/src/jit-test/tests/auto-regress/bug743876.js new file mode 100644 index 000000000..2dd81faef --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug743876.js @@ -0,0 +1,35 @@ +// Binary: cache/js-dbg-64-434f50e70815-linux +// Flags: -m -n -a +// + +var lfcode = new Array(); +lfcode.push("3"); +lfcode.push("\ +evaluate(\"\");\ +function slice(a, b) {\ + return slice(index, ++(ArrayBuffer));\ +}\ +"); +lfcode.push("0"); +lfcode.push("var arr = [0, 1, 2, 3, 4];\ +function replacer() {\ + assertEq(arguments.length, 2);\ + var key = arguments[0], value = arguments[1];\ + return value;\ +}\ +assertEq(JSON.stringify(arr, replacer), '[0,1,2,3,4]');\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + if (!isNaN(lfVarx)) { + lfRunTypeId = parseInt(lfVarx); + } else { + switch (lfRunTypeId) { + case 0: evaluate(lfVarx); break; + case 3: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break; + } + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug745452.js b/js/src/jit-test/tests/auto-regress/bug745452.js new file mode 100644 index 000000000..ae61d1681 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug745452.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-64-55e7efcc1946-linux +// Flags: +// + +var o = Object.preventExtensions(new ArrayBuffer); +try { (function () { o.__proto__ = ({ __proto__: o, indexArray: ["abc"] }); })(); } catch(exc) {} +uneval(this); diff --git a/js/src/jit-test/tests/auto-regress/bug746103.js b/js/src/jit-test/tests/auto-regress/bug746103.js new file mode 100644 index 000000000..75a34319b --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug746103.js @@ -0,0 +1,15 @@ +// |jit-test| slow; error:InternalError + +// Binary: cache/js-dbg-64-c61e7c3a232a-linux +// Flags: -m -n -a +// + +gczeal(2); +function testCallProtoMethod() { + function X() { + this.valueOf = new testCallProtoMethod( "return this.value" ); + } + X.prototype.getName = function () { return "X"; } + var a = [new X, new X, new getName, new new this, new Y]; +} +testCallProtoMethod(); diff --git a/js/src/jit-test/tests/auto-regress/bug746376.js b/js/src/jit-test/tests/auto-regress/bug746376.js new file mode 100644 index 000000000..7cbde055c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug746376.js @@ -0,0 +1,65 @@ +// Binary: cache/js-dbg-64-67bf9a4a1f77-linux +// Flags: --ion-eager +// +var callStack = new Array(); +var gTestcases = new Array(); +var gTc = gTestcases.length; +function TestCase(n, d, e, a) { + this.expect = e; + this.actual = a; + this.passed = getTestCaseResult(e, a); + this.reason = ''; + this.bugnumber = typeof(BUGNUMER) != 'undefined' ? BUGNUMBER : ''; + this.type = (typeof window == 'undefined' ? 'shell' : 'browser'); + gTestcases[gTc++] = this; +} +function reportCompare (expected, actual, description) { + var output = ""; + if (typeof description == "undefined") + if (expected != actual) + printStatus ("Expected value '" + toPrinted(expected) + + "' matched actual value '" + toPrinted(actual) + "'"); + var testcase = new TestCase("unknown-test-name", description, expected, actual); + testcase.reason = output; + if (testcase.passed) { } + return testcase.passed; +} +function enterFunc (funcName) { + var lastFunc = callStack.pop(); + reportCompare(funcName, lastFunc, "Test driver failure wrong exit function "); +} +function getTestCaseResult(expected, actual) {} +var lfcode = new Array(); +lfcode.push("\ +var summary = 'decompilation of \"let with with\" ';\ +var actual = '';\ +var expect = '';\ +test();\ +function test() {\ + enterFunc ('test');\ + gczeal(2);\ + for (let q = 0; q < 50; ++q) {\ + new Function('for (var i = 0; i < 5; ++i) { } ')();\ + var w = 'r'.match(/r/);\ + new Function('for (var j = 0; j < 1; ++j) { } ')();\ + }\ + reportCompare(expect, actual, summary);\ +}\ +"); +delete Debugger; +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + } else { + evaluate(lfVarx); + } + } catch (lfVare) { + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug746377.js b/js/src/jit-test/tests/auto-regress/bug746377.js new file mode 100644 index 000000000..ba65b84a6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug746377.js @@ -0,0 +1,14 @@ +// |jit-test| error:InternalError + +// Binary: cache/js-dbg-64-67bf9a4a1f77-linux +// Flags: --ion-eager +// + +var actual = ''; +test(); +function test() +{ + a = {x: 1}; + b = {__proto__: a}; + print(actual += test(1,2,3,4)); +} diff --git a/js/src/jit-test/tests/auto-regress/bug746397.js b/js/src/jit-test/tests/auto-regress/bug746397.js new file mode 100644 index 000000000..d915ca7bb --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug746397.js @@ -0,0 +1,10 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-67bf9a4a1f77-linux +// Flags: --ion-eager +// + +(function () { + var a = ['x', 'y']; + obj.watch(a[+("0")], counter); +})(); diff --git a/js/src/jit-test/tests/auto-regress/bug748119.js b/js/src/jit-test/tests/auto-regress/bug748119.js new file mode 100644 index 000000000..759db8cb1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug748119.js @@ -0,0 +1,95 @@ +// Binary: cache/js-dbg-32-17af008937e3-linux +// Flags: -m -n -a +// +var lfcode = new Array(); +lfcode.push("\ +var gTestcases = new Array();\ +var gTc = gTestcases.length;\ +function TestCase(n, d, e, a) {\ + this.passed = getTestCaseResult(e, a);\ + this.bugnumber = typeof(BUGNUMER) != 'undefined' ? BUGNUMBER : '';\ + gTestcases[gTc++] = this;\ +}\ +for (var i=0; i<len; i++) {}\ +function reportCompare (expected, actual, description) {\ + var testcase = new TestCase(\"unknown-test-name\", description, expected, actual);\ + if (testcase.passed)\ + printStatus (\"Expected match to '\" + toPrinted(expectedRegExp) + \"' matched actual value '\" + toPrinted(actual) + \"'\");\ +}\ +function getTestCaseResult(expected, actual)\ +function stopTest() {}\ +"); +lfcode.push("\ +var UBound = 0;\ +var TEST_PASSED = 'SyntaxError';\ +var TEST_FAILED = 'Generated an error, but NOT a SyntaxError!';\ +var statusitems = [];\ +var actualvalues = [];\ +var expectedvalues = [];\ +testThis(' /a**/ ');\ +testThis(' /a***/ ');\ +testThis(' /a++/ ');\ +testThis(' /a+++/ ');\ +testThis(' /a???/ ');\ +testThis(' /a????/ ');\ +testThis(' /+a/ ');\ +testThis(' /++a/ ');\ +testThis(' /?a/ ');\ +testThis(' /??a/ ');\ +testThis(' /x{1}{1}/ ');\ +testThis(' /x{1,}{1}/ ');\ +testThis(' /x{1,2}{1}/ ');\ +testThis(' /x{1}{1,}/ ');\ +testThis(' /x{1,}{1,}/ ');\ +testThis(' /x{1,2}{1,}/ ');\ +testThis(' /x{1}{1,2}/ ');\ +testThis(' /x{1,}{1,2}/ ');\ +function testThis(sInvalidSyntax) {\ + try {\ + eval(sInvalidSyntax);\ + } catch(e) {\ + actual = TEST_PASSED;\ + }\ +}\ +function checkThis(sAllowedSyntax) {}\ +reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);\ +exitFunc ('test');\ +"); +lfcode.push("gczeal(4);"); +lfcode.push("\ +var MSG_PATTERN = '\\nregexp = ';\ +var MSG_STRING = '\\nstring = ';\ +var MSG_EXPECT = '\\nExpect: ';\ +var MSG_ACTUAL = '\\nActual: ';\ +var TYPE_STRING = typeof 'abc';\ +function testRegExp(statuses, patterns, strings, actualmatches, expectedmatches)\ + lExpect = expectedmatch.length;\ + lActual = actualmatch.length;\ + var expected = formatArray(expectedmatch);\ + reportCompare(expected, actual, state + ERR_MATCH + CHAR_NL );\ +function getState(status, pattern, string) {\ + var delim = CHAR_COMMA + CHAR_SPACE;\ +"); +lfcode.push("\ +var gTestcases = new Array;\ +function TestCase(n, d, e, a) {}\ +function toPrinted(value) value=value.replace(/\\\\n/g, 'NL').replace(/[^\\x20-\\x7E]+/g, escapeString);\ +"); +lfcode.push("\ +var summary = 'Regression test for bug 385393';\ +var expect = 'No Crash';\ + reportCompare(expect, actual, summary);\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + switch (lfRunTypeId) { } + } else { + evaluate(lfVarx); + } + } catch (lfVare) { } +} diff --git a/js/src/jit-test/tests/auto-regress/bug754712.js b/js/src/jit-test/tests/auto-regress/bug754712.js new file mode 100644 index 000000000..4d811cf21 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug754712.js @@ -0,0 +1,47 @@ +// Binary: cache/js-dbg-64-e8de64e7e9fe-linux +// Flags: --ion-eager +// +function printStatus (msg) {} +function printBugNumber (num) {} +function reportCompare (expected, actual, description) { + printStatus ("Expected value '" + toPrinted(expected) + "' matched actual value '" + toPrinted(actual) + "'"); +} +try { + reportCompare(expectCompile, actualCompile, summary + ': compile actual'); +} catch(ex) { } +var lfcode = new Array(); +lfcode.push("\ +var bar = {\ + b: 2,\ +};\ +var results = [];\ +for each (let [key, value] in Iterator(bar))\ + results.push(key + \":\" + (results(isXMLName(), \"ok\")));\ +var expect = \"a:1;b:2\";\ +"); +lfcode.push("\ +var BUGNUMBER = 244619;\ +var summary = 'Don\\'t Crash';\ +var actual = 'Crash';\ +function f1()\ + eval.call((enterFunc ('test')), \"var a = 'vodka'\");\ +gczeal(4);\ +reportCompare(expect, actual, summary);\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + switch (lfRunTypeId) { } + } else { + evaluate(lfVarx); + } + } catch (lfVare) { + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug754719.js b/js/src/jit-test/tests/auto-regress/bug754719.js new file mode 100644 index 000000000..4c822d53c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug754719.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-64-e8de64e7e9fe-linux +// Flags: +// + +function TestCase(n, d, e, a) {} +(function( ) { + for (var i = 0; i < 64; ++i) { + switch (~~(TestCase) % 3) {} + } +})(); diff --git a/js/src/jit-test/tests/auto-regress/bug755639.js b/js/src/jit-test/tests/auto-regress/bug755639.js new file mode 100644 index 000000000..dc376f69e --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug755639.js @@ -0,0 +1,34 @@ +// Binary: cache/js-dbg-64-bfc259be3fa2-linux +// Flags: -m -n -a +// + +if (typeof gcPreserveCode != "function") { + function gcPreserveCode() {} +} + +if (typeof gcslice != "function") { + function gcslice() {} +} + +function f(t) +{ + for (var i = 0; i < 1; ++i) { + if (typeof(t) != "string") { + } + } +} +function m(d) +{ + if (d == 0) + return ""; + f(m(d - 1)); +} +m(1); +gcPreserveCode(); +try { + mjitChunkLimit(1); +} catch(exc1) {} +gcslice(1); +m(1); +gc(); +m(2); diff --git a/js/src/jit-test/tests/auto-regress/bug755750.js b/js/src/jit-test/tests/auto-regress/bug755750.js new file mode 100644 index 000000000..9fb667609 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug755750.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-32-00c7a320165b-linux +// Flags: -m -n +// + +test(); +function test() { + schedulegc(100); + var o = { __proto__: function(){} }; + for (var j = 0; j < 30000; ++j) { try { o.call(3); } catch (e) { } } +} diff --git a/js/src/jit-test/tests/auto-regress/bug756236.js b/js/src/jit-test/tests/auto-regress/bug756236.js new file mode 100644 index 000000000..b25859b69 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug756236.js @@ -0,0 +1,14 @@ +// Binary: cache/js-dbg-64-14735b4dbccc-linux +// Flags: --ion-eager +// + +gczeal(4); +function startTest() {} +function TestCase(n, d, e, a) + dump = (function () {}); + if (typeof document != "object" || !document.location.href.match(/jsreftest.html/)) {} +function writeHeaderToLog( string ) {} +var SECTION = "11.4.5"; +new TestCase( SECTION, "var MYVAR= void 0; --MYVAR", NaN, eval("var MYVAR=void 0; --MYVAR") ); +new TestCase( SECTION, "var MYVAR=0;--MYVAR;MYVAR", -1, eval("var MYVAR=0;--MYVAR;MYVAR") ); +new TestCase( SECTION, "var MYVAR=0;--MYVAR;MYVAR", -1, eval("var MYVAR=0;--MYVAR;MYVAR") ); diff --git a/js/src/jit-test/tests/auto-regress/bug757428.js b/js/src/jit-test/tests/auto-regress/bug757428.js new file mode 100644 index 000000000..b45f97860 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug757428.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-d80602d38aa8-linux +// Flags: --ion-eager +// + +function f(o) { + var prop = "arguments"; + f[prop] = f[prop]; +} +for(var i=0; i > -10; i-- ) { + f(f / 16); +} diff --git a/js/src/jit-test/tests/auto-regress/bug758164.js b/js/src/jit-test/tests/auto-regress/bug758164.js new file mode 100644 index 000000000..fa94c520a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug758164.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-407632130d1b-linux +// Flags: +// + +gc(); +evaluate("gcslice(1);"); diff --git a/js/src/jit-test/tests/auto-regress/bug759719.js b/js/src/jit-test/tests/auto-regress/bug759719.js new file mode 100644 index 000000000..816d0c122 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug759719.js @@ -0,0 +1,81 @@ +// Binary: cache/js-dbg-64-e8a025a7101b-linux +// Flags: -m -n +// +var SECTION = ""; +function AddTestCase( description, expect, actual ) {} +function TestCase(n, d, e, a) {} +TestCase.prototype.dump = function () {}; +function printStatus (msg) { + msg = msg.toString(); + var lines = msg.split ("\n"); +} +function printBugNumber (num) {} +function optionsInit() {} +function optionsClear() {} + var optionsframe = {}; + try { + optionsClear(); + for (var optionName in options.initvalues) { } + } catch(ex) { + optionsInit(); + if (typeof window == 'undefined' && typeof print == 'function') + try { + gTestcases[gTc].passed = writeTestCaseResult( + gTestcases[gTc].description +" = "+ gTestcases[gTc].actual ); + } catch(e) { + if (typeof document != "object" || !document.location.href.match(/jsreftest.html/)) {} + } + } + code = "(function(x){ if(x) return x; })"; +gczeal(2); +for (var loopa2 = 0; loopa2 < 13; loopa2++) { + [, , , , , , ][(loopa2.loopa2)] &= (/\u0042[\u0061]\\u0026/ ); +} +this.summary = false; +printStatus (summary); +try {} catch(e) {} +var TIME_0000 = (function () { })(); +function getTimeZoneDiff() {} +new TestCase( SECTION, Array.prototype.reverse.length ); +new TestCase( SECTION, eval("delete Array.prototype.reverse.length; Array.prototype.reverse.length") ); +var S = "var A = new Array( true,false )"; +eval(S); +var R = Reverse(A); +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") ); +CheckItems( R, A ); +CheckItems( R, A ); +eval(S); +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") ); +CheckItems( R, A ); +var S = "var A = new Array(); A[8] = 'hi', A[3] = 'yo'"; +eval(S); +var R = Reverse(A); +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") ); +CheckItems( R, A ); +var OBJECT_OBJECT = new Object(); +var FUNCTION_OBJECT = new Function( 'return this' ); +var BOOLEAN_OBJECT = new Boolean; +var DATE_OBJECT = new Date(0); +var STRING_OBJECT = new String('howdy'); +var NUMBER_OBJECT = new Number(Math.PI); +var ARRAY_OBJECT= new Array(1000); +var args = "null, void 0, Math.pow(2,32), 1.234e-32, OBJECT_OBJECT, BOOLEAN_OBJECT, FUNCTION_OBJECT, DATE_OBJECT, STRING_OBJECT,"+ + "ARRAY_OBJECT, NUMBER_OBJECT, Math, true, false, 123, '90210'"; +var S = "var A = new Array("+args+")"; +eval(S); +var R = Reverse(A); +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") ); +CheckItems( R, A ); +var limit = 1000; +for (var i = 0; i < limit; i++ ) { + args += i +""; +} +function CheckItems( R, A ) { + for ( var i = 0; i < R.length; i++ ) { + new TestCase( ( code ) [i] ); + } +} +function Object_1( value ) {} +function Reverse( array ) { + return array; +} diff --git a/js/src/jit-test/tests/auto-regress/bug761864.js b/js/src/jit-test/tests/auto-regress/bug761864.js new file mode 100644 index 000000000..c6f0c7044 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug761864.js @@ -0,0 +1,58 @@ +// Binary: cache/js-dbg-32-cf4face65451-linux +// Flags: -m -n +// +function printStatus (msg) { + var lines = msg.split (""); +} +function printBugNumber (num) { + var digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; +} +var lfcode = new Array(); +lfcode.push("gczeal(4);"); +lfcode.push("jsTestDriverEnd();"); +lfcode.push(""); +lfcode.push("var BUGNUMBER = \"(none)\";\ +var summary = \"gen.close(); gen.throw(ex) throws ex forever\";\ +var actual, expect;\ +printBugNumber(BUGNUMBER);\ +printStatus(summary);\ +function gen() {\ + var x = 5, y = 7;\ + yield z;\ +}\ +var failed = false;\ +var it = gen();\ +try {\ + it.close();\ + var doThrow = true;\ + var thrown = \"foobar\";\ + try { } catch (e) { }\ + try { } catch (e) { }\ + throw \"it.throw(\\\"\" + thrown + \"\\\") failed\";\ + var stopPassed = false;\ + try { } catch (e) {\ + if (\"1234\")\ + stopPassed = true;\ + }\ +} catch (e) {}\ +"); +var lfRunTypeId = -1; +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + } else { + switch (lfRunTypeId) { + default: evaluate(lfVarx); + } + } + } catch (lfVare) { + print(lfVare); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug762324.js b/js/src/jit-test/tests/auto-regress/bug762324.js new file mode 100644 index 000000000..ed5dd5f62 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug762324.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-f918d74f736c-linux +// Flags: +// +(function(){ + try { + Function("function d(e= Pron((function hy() {return {d: function() { vum =pln(+ 'Lte'); return {get: function() { thr; }, set: function() { thr; }}; }, g: function(){ (yum + 'LE');}, has: function() { (yum + '')},Own: f}; })(x), ((function sing(xg) { ; xg :vc; })([, nen(true),l, n, null, l, nan(true), nen(true),ull,ull,lean(true), ean(), nan(true), nun(true),an(true), nen(true),lean(true), n(true),ull,ull,an(true), nuean(), nan(true), null, ll, ll, ean(), nan(true), nen(true),lean(true), ean(), nl, n(true), ean(), n, nu, nen(true),lean(true), ll, ean(), nan(true), nuean(), nll, ean(true), nan(true), nun(true),(true), ean(true), nan(true), nen(true),n(true),an(true), nen(true),l, null,lean(true), n(true),an(true), nen(true),l, null,lean(true), ll, ean(true), nan(true), nuean(), null, n, ean(), null,lean(true), ean(), null], 0)), ((\"y\")))['ww']){/*jjj*/}gc();") + } catch (e) {} +})() diff --git a/js/src/jit-test/tests/auto-regress/bug763039.js b/js/src/jit-test/tests/auto-regress/bug763039.js new file mode 100644 index 000000000..dcd8df564 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug763039.js @@ -0,0 +1,69 @@ +// Binary: cache/js-dbg-32-5cfb73435e06-linux +// Flags: --ion-eager +// +var actual = ''; +function TestCase(n, d, e, a) { + this.reason = ''; +} +function inSection(x) {} +function reportCompare (expected, actual, description) { + var testcase = new TestCase("unknown-test-name", description, expected, actual); + testcase.reason = output; +} +var lfcode = new Array(); +lfcode.push("4"); +lfcode.push("function START(summary) {\ +}\ +function TEST(section, expected, actual) {\ + return reportCompare(expected, actual, inSection(section) + SUMMARY);\ +}\ +var expect = (1);\ +TEST(1,1 << this < assertEq++ < this, actual);\ +"); +lfcode.push("\ +gczeal(4);\ +data >>>= RunSingleBenchmark(data);\ +"); +lfcode.push("4"); +lfcode.push("\ +var BUGNUMBER = 345855;\ +var summary = 'Blank yield expressions are not syntax errors';\ +test();\ +function test() {\ + try {\ + eval('(function() {x = 12 + yield;})');\ + } catch(ex) {}\ + try { eval('(function() {x = 12 + yield 42})'); } catch(ex) {\ + status = inSection(4);\ + }\ + try {\ + eval('(function() {x = 12 + (yield);})');\ + } catch(ex) { }\ + try {\ + eval('(function () {foo((yield))})');\ + } catch(ex) { }\ + try {\ + eval('(function() {x = 12 + (yield 42)})');\ + } catch(ex) { }\ + reportCompare(expect, actual, summary + ': function() {x = 12 + (yield 42)}');\ +}\ +"); +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + loadFile(file); +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) == ".js") { + } else if (!isNaN(lfVarx)) { + lfRunTypeId = lfVarx; + } else { + switch (lfRunTypeId) { + case 1: eval(read(lfVarx)); break; + default: evaluate(lfVarx); + } + } + } catch (lfVare) { + print(lfVare); + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug763989.js b/js/src/jit-test/tests/auto-regress/bug763989.js new file mode 100644 index 000000000..042df9f86 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug763989.js @@ -0,0 +1,47 @@ +// Binary: cache/js-dbg-32-4bcbb63b89c3-linux +// Flags: --ion-eager +// +var summary = ''; +function reportFailure (msg) {} +function toPrinted(value) { + value = value.replace(/\n/g, 'NL') +} +function reportCompare (expected, actual, description) { + var output = ""; + output += "Expected value '" + toPrinted(expected) + + "', Actual value '" + toPrinted(actual) + "' "; + reportFailure (description + " : " + output); +} +var lfcode = new Array(); +lfcode.push("\ + expect = actual = 'No Exception';\ + reportCompare(expect, actual, summary);\ +"); +lfcode.push("\ +function reportFailure (section, msg)\ + msg = inSection(section)+\"\"+msg;\ +"); +lfcode.push("\ +try {\ + for (var i in expect) \ + reportCompare(expect[i], actual[i], getStatus(i));\ +} catch(exc1) {}\ +function getStatus(i) {}\ +"); +lfcode.push("gczeal(2,(9));"); +lfcode.push("evaluate(\"reportCompare(expect, actual, summary);\");"); + gcPreserveCode() +while (true) { + var file = lfcode.shift(); if (file == undefined) { break; } + if (file == "evaluate") { + } else { + loadFile(file); + } +} +function loadFile(lfVarx) { + try { + if (lfVarx.substr(-3) != ".js") { + evaluate(lfVarx); + } + } catch (lfVare) {} +} diff --git a/js/src/jit-test/tests/auto-regress/bug765055.js b/js/src/jit-test/tests/auto-regress/bug765055.js new file mode 100644 index 000000000..557d37e5c --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug765055.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-32-85e31a4bdd41-linux +// Flags: +// + +function test( d = 1, a = this, ... f) { + function f() {} +} diff --git a/js/src/jit-test/tests/auto-regress/bug765483.js b/js/src/jit-test/tests/auto-regress/bug765483.js new file mode 100644 index 000000000..2028b8000 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug765483.js @@ -0,0 +1,15 @@ +// |jit-test| error:ReferenceError; + +// Binary: cache/js-dbg-64-de23a9fc29db-linux +// Flags: --ion-eager +// + +load(libdir + "evalInFrame.js"); + +var obj1 = {}, obj2 = {}; +obj2['b'+i] = 0; +for (var k in obj2) { + (function g() { evalInFrame(1, "assertStackIs(['eval-code', f, 'bound(f)', 'global-code'])", true); })(); +} +for (var i = 0; i != array.length; ++i) + array[i](); diff --git a/js/src/jit-test/tests/auto-regress/bug766065.js b/js/src/jit-test/tests/auto-regress/bug766065.js new file mode 100644 index 000000000..bfb323f78 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug766065.js @@ -0,0 +1,13 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-32-19bfe36cace8-linux +// Flags: -m -n -a +// + +function testApplyCallHelper(f) { + for (var i = 0; i < 10; ++i) dumpStack.apply(this,[0,1]); +} +function testApplyCall() { + var r = testApplyCallHelper(function (a0,a1,a2,a3,a4,a5,a6,a7) { x = [a0,a1,a2,a3,a4,a5,a6,a7]; }); +} +testApplyCall(); diff --git a/js/src/jit-test/tests/auto-regress/bug767679.js b/js/src/jit-test/tests/auto-regress/bug767679.js new file mode 100644 index 000000000..b33669456 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug767679.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-32-05a756967f25-linux +// Flags: --ion-eager +// +eval("\ + \"use strict\";\ + a();\ + function a() {\ + print\ + }\ +") diff --git a/js/src/jit-test/tests/auto-regress/bug769192.js b/js/src/jit-test/tests/auto-regress/bug769192.js new file mode 100644 index 000000000..531e37912 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug769192.js @@ -0,0 +1,6 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-bf8f2961d0cc-linux +// Flags: +// +Object.watch.call(new Uint8ClampedArray, "length", function() {}); diff --git a/js/src/jit-test/tests/auto-regress/bug770713.js b/js/src/jit-test/tests/auto-regress/bug770713.js new file mode 100644 index 000000000..cdaf5a02a --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug770713.js @@ -0,0 +1,21 @@ +// Binary: cache/js-dbg-32-b39f4007be5a-linux +// Flags: -m -n -a +// + +gczeal(4); +var a = ['a','test string',456,9.34,new String("string object"),[],['h','i','j','k']]; +var b = [1,2,3,4,5,6,7,8,9,0]; +exhaustiveSliceTest("exhaustive slice test 1", a); +function mySlice(a, from, to) { + var returnArray = []; + try { } catch ( [ x ] ) { } finally { } + return returnArray; +} +function exhaustiveSliceTest(testname, a) { + var x = 0; + for (y = (2 + a.length); y >= -(2 + a.length); y--) { + var c = mySlice(a,x,y); + if (String(b) != String(c)) + " expected result: " + String(c) + "\n"; + } +} diff --git a/js/src/jit-test/tests/auto-regress/bug771027.js b/js/src/jit-test/tests/auto-regress/bug771027.js new file mode 100644 index 000000000..d9038ad85 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug771027.js @@ -0,0 +1,9 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-32-b6aa44d8f11f-linux +// Flags: +// + +Array.prototype.iterator = (function() { { while(0) { function Uint8ClampedArray() { } } } }); +var s = new Set(["testing", "testing", 123]); +assertEq(s.size(), 2); diff --git a/js/src/jit-test/tests/auto-regress/bug771157.js b/js/src/jit-test/tests/auto-regress/bug771157.js new file mode 100644 index 000000000..af283fea1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug771157.js @@ -0,0 +1,30 @@ +// Binary: cache/js-dbg-64-9cf3ea112635-linux +// Flags: --ion-eager +// + +var callStack = new Array(); +function TestCase(n, d, e, a) { + this.expect = e; + this.actual = a; + this.passed = getTestCaseResult(e, a); + dump(+ this.path + ' ' + 'reason: ' + toPrinted(this.reason)+ '\n'); +}; +function reportCompare (expected, actual, description) { + var testcase = new TestCase("unknown-test-name", description, expected, actual); +} +function enterFunc (funcName) { + callStack.push(funcName); + var lastFunc = callStack.pop(); + reportCompare(funcName, lastFunc, "Test driver failure wrong exit function "); +} +try { +var summary = 'String static methods'; +var actual = ''; +expect = '2'; +reportCompare(expect, actual, summary + " String.toUpperCase(new Boolean(true))"); +} catch(exc0) {} +try { +function TestCase(n, d, e, a) {} +enterFunc ('test'); +reportCompare(expect, actual, summary); +} catch(exc2) {} diff --git a/js/src/jit-test/tests/auto-regress/bug771946.js b/js/src/jit-test/tests/auto-regress/bug771946.js new file mode 100644 index 000000000..3cfb590e1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug771946.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-221f1a184f67-linux +// Flags: +// +new Date().setFullYear(Math.cos(1)) diff --git a/js/src/jit-test/tests/auto-regress/bug778557.js b/js/src/jit-test/tests/auto-regress/bug778557.js new file mode 100644 index 000000000..0537be6c1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug778557.js @@ -0,0 +1,7 @@ +// Binary: cache/js-dbg-64-90828ac18dcf-linux +// Flags: +// +x = Set; +eval("function y()(Iterator)", this); +x.__iterator__ = y; +new Iterator(x) diff --git a/js/src/jit-test/tests/auto-regress/bug779390.js b/js/src/jit-test/tests/auto-regress/bug779390.js new file mode 100644 index 000000000..9b8525722 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug779390.js @@ -0,0 +1,15 @@ +// Binary: cache/js-dbg-64-b46621aba6fd-linux +// Flags: --ion-eager +// + +function TestCase(n, d, e, a) { + this.passed = getTestCaseResult(e, a); +} +function getTestCaseResult(expected, actual) {} +try { +for (var i = 0; i < bomchars.length; i++) + try {} catch(ex) {} +} catch(exc0) {} +["a"].map(function(s) {gczeal(4);})[0] +new TestCase(); +new TestCase("", "", 5e-324, i); diff --git a/js/src/jit-test/tests/auto-regress/bug779818.js b/js/src/jit-test/tests/auto-regress/bug779818.js new file mode 100644 index 000000000..717f91af3 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug779818.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-2169bca0c9a5-linux +// Flags: --ion-eager +// + +var SECTION = "lexical-015"; +(function() { + for (var a = 0; a < 9; a++) { + if (SECTION[a]) { + while (arguments[a]) break; + } + } +})() diff --git a/js/src/jit-test/tests/auto-regress/bug779850.js b/js/src/jit-test/tests/auto-regress/bug779850.js new file mode 100644 index 000000000..329c008f8 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug779850.js @@ -0,0 +1,9 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-074fb996dfd7-linux +// Flags: +// + +(function() { + for each(let Math in []) {} +}).floor(2147483649) diff --git a/js/src/jit-test/tests/auto-regress/bug780003.js b/js/src/jit-test/tests/auto-regress/bug780003.js new file mode 100644 index 000000000..414429ec0 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug780003.js @@ -0,0 +1,6 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-9f3dc298e25b-linux +// Flags: --ion-eager +// +for(a in b){} diff --git a/js/src/jit-test/tests/auto-regress/bug781364.js b/js/src/jit-test/tests/auto-regress/bug781364.js new file mode 100644 index 000000000..99a944145 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug781364.js @@ -0,0 +1,34 @@ +// Binary: cache/js-dbg-64-21b4797e4cb3-linux +// Flags: -m -a --ion-eager +// +k = m +function h() { + switch (true) { + default: + x = newGlobal('') + } + return function(f, code) { + try { + evalcx(code, x) + } catch (e) {} + } +} +function m() { + f() +} +function g(code) { + f = new Function(code); + k(f, code) +} +g("k=h()") +g("\ + a='';\ + Object.defineProperty(this,\"b\",{get:function(){a=this.d()}});\ + Object.defineProperty(this,\"c\",{get:function(){b}});\ + d=2;\ + b\ +"); +g("b"); +g("b"); +g("for(v of c);"); +g("a=eval(\"function f(){}\");b") diff --git a/js/src/jit-test/tests/auto-regress/bug781855.js b/js/src/jit-test/tests/auto-regress/bug781855.js new file mode 100644 index 000000000..d061f8520 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug781855.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-32-b5ae446888f5-linux +// Flags: -m -n -a +// + +var Constr = function( ... property) {}; +Constr.prototype = []; +var c = new Constr(); +c.push(5); +gc(); +function enterFunc() {} +evaluate('enterFunc (c.length);'); diff --git a/js/src/jit-test/tests/auto-regress/bug782083.js b/js/src/jit-test/tests/auto-regress/bug782083.js new file mode 100644 index 000000000..b6cb9a4e7 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug782083.js @@ -0,0 +1,16 @@ +// Binary: cache/js-dbg-32-f1764bf06b29-linux +// Flags: --ion-eager +// + +gcPreserveCode(); +function r() {} +gczeal(2); +evaluate(""); +evaluate("\ +function randomFloat () {\ + if (r < 0.25)\ + fac = 10000000;\ +}\ +for (var i = 0; i < 2000; i++)\ + randomFloat();\ +"); diff --git a/js/src/jit-test/tests/auto-regress/bug782129.js b/js/src/jit-test/tests/auto-regress/bug782129.js new file mode 100644 index 000000000..44a543cd9 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug782129.js @@ -0,0 +1,24 @@ +// Binary: cache/js-dbg-32-f1764bf06b29-linux +// Flags: --ion-eager +// + +var callStack = new Array(); +function enterFunc (funcName) { + funcName += "()"; + callStack.push(funcName); +} +function exitFunc (funcName) { + var lastFunc = callStack.pop(); + funcName += "()"; + if (lastFunc != funcName) + print(); +} +try { + test(); +} catch(exc1) {} +function test() { + enterFunc ('test'); + test(); +} +for (var l = 0; l < 50000; l++) + exitFunc ('test'); diff --git a/js/src/jit-test/tests/auto-regress/bug783421.js b/js/src/jit-test/tests/auto-regress/bug783421.js new file mode 100644 index 000000000..920a78f97 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug783421.js @@ -0,0 +1,30 @@ +// Binary: cache/js-dbg-64-50e4ff05741e-linux +// Flags: -m -n -a +// +gc() +var p = n +function m() { + return function(f, code, t) { + try { + evalcx(code, newGlobal()) + } catch (e) {} + } +} +function n() { + f() +} +function h(code) { + f = Function(code) + p(f, code, true) +} +h("\ + p=m();\ + gcPreserveCode();\ + gcslice(8);\ +") +h("\"\"") +h("") +h("gc()") +h("") +h("") +h("gczeal(4,2)") diff --git a/js/src/jit-test/tests/auto-regress/bug785089.js b/js/src/jit-test/tests/auto-regress/bug785089.js new file mode 100644 index 000000000..50e2bfcf5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug785089.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-198ca6edd0ae-linux +// Flags: +// +odeURIL:(function(){}) diff --git a/js/src/jit-test/tests/auto-regress/bug785305.js b/js/src/jit-test/tests/auto-regress/bug785305.js new file mode 100644 index 000000000..4beba0d98 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug785305.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-29ca472bf2d2-linux +// Flags: +// +Reflect.parse("\ + function l(x = (function() {})) {\ + function x() {}\ + }\ +") diff --git a/js/src/jit-test/tests/auto-regress/bug785576.js b/js/src/jit-test/tests/auto-regress/bug785576.js new file mode 100644 index 000000000..ffd0563a1 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug785576.js @@ -0,0 +1,11 @@ +// Binary: cache/js-dbg-64-29ca472bf2d2-linux +// Flags: -m -n -a +// +sandbox = newGlobal('') +evalcx("x=[]", sandbox) +evalcx("\ + x[0] = this;\ + Object.defineProperty(x, 0, {})\ +", sandbox) +gc() +evalcx("x.shift()", sandbox) diff --git a/js/src/jit-test/tests/auto-regress/bug785776.js b/js/src/jit-test/tests/auto-regress/bug785776.js new file mode 100644 index 000000000..2bab1bfd5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug785776.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-e08a67884b9b-linux +// Flags: -m -n -a +// +load(libdir + 'asserts.js'); +// has no @@iterator property +assertThrowsInstanceOf(() => {function f([x]){}f(DataView.prototype)}, TypeError); diff --git a/js/src/jit-test/tests/auto-regress/bug790921.js b/js/src/jit-test/tests/auto-regress/bug790921.js new file mode 100644 index 000000000..bb679546f --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug790921.js @@ -0,0 +1,14 @@ +// |jit-test| slow; +// Binary: cache/js-dbg-64-fdfaef738a00-linux +// Flags: --ion-eager +// + +evaluate("\ +gcparam(\"maxBytes\", gcparam(\"gcBytes\") + 4 );\n\ +test();\n\ +function test() {\n\ + function flatten(arr)\n\ + actual = flatten([1, [2], 3]);\ +}\n\ +"); +try {} catch (lfVare) {} diff --git a/js/src/jit-test/tests/auto-regress/bug795937.js b/js/src/jit-test/tests/auto-regress/bug795937.js new file mode 100644 index 000000000..b681d15ff --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug795937.js @@ -0,0 +1,6 @@ +// Binary: cache/js-dbg-64-895f66c4eada-linux +// Flags: +// + +var g = newGlobal(); +new Proxy(g, {}); diff --git a/js/src/jit-test/tests/auto-regress/bug797493.js b/js/src/jit-test/tests/auto-regress/bug797493.js new file mode 100644 index 000000000..b3aaa88b5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug797493.js @@ -0,0 +1,15 @@ +// |jit-test| error:ReferenceError + +// Binary: cache/js-dbg-64-13fd49ef7786-linux +// Flags: +// + +var g = newGlobal(); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function handleDebugger(frame) { + frame.onPop = function handlePop(c) { + poppedFrames.indexOf(this) + } +}; +g.eval("function g() { for (var i = 0; i < 10; i++) { debugger; yield i; } }"); +assertEq(g.eval("var t = 0; for (j in g()) t += j; t;"), 45); diff --git a/js/src/jit-test/tests/auto-regress/bug800878.js b/js/src/jit-test/tests/auto-regress/bug800878.js new file mode 100644 index 000000000..ce6aabd58 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug800878.js @@ -0,0 +1,13 @@ +// |jit-test| error:Error + +// Binary: cache/js-dbg-32-1301a72b1c39-linux +// Flags: --ion-eager +// + +load(libdir + "evalInFrame.js"); + +[1,2,3,4,(':'),6,7,8].forEach( + function(x) { + assertEq(evalInFrame(0, ('^')), x); + } +); diff --git a/js/src/jit-test/tests/auto-regress/bug811606.js b/js/src/jit-test/tests/auto-regress/bug811606.js new file mode 100644 index 000000000..809958279 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug811606.js @@ -0,0 +1,4 @@ +// Binary: cache/js-dbg-64-4e9567eeb09e-linux +// Flags: +// +for each(e in [].some) {} diff --git a/js/src/jit-test/tests/auto-regress/bug811616.js b/js/src/jit-test/tests/auto-regress/bug811616.js new file mode 100644 index 000000000..e02754e27 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug811616.js @@ -0,0 +1,6 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-4e9567eeb09e-linux +// Flags: --ion-eager +// +"".replace(RegExp(), Array.reduce) diff --git a/js/src/jit-test/tests/auto-regress/bug812235.js b/js/src/jit-test/tests/auto-regress/bug812235.js new file mode 100644 index 000000000..e4a355321 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug812235.js @@ -0,0 +1,10 @@ +// Binary: cache/js-dbg-64-a37525d304d9-linux +// Flags: --ion-eager +// +gc() +schedulegc(this) +gcslice(3) +function f() { + this["x"] = this["x"] = {} +} +new f() diff --git a/js/src/jit-test/tests/auto-regress/bug813029.js b/js/src/jit-test/tests/auto-regress/bug813029.js new file mode 100644 index 000000000..34e2145f6 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug813029.js @@ -0,0 +1,12 @@ +// Binary: cache/js-dbg-64-4fddb9923ef0-linux +// Flags: --ion-eager +// + +function printBugNumber (num) { + BUGNUMBER = num; +} +gcslice(1) +schedulegc(this); +gcslice(2); +var BUGNUMBER = ("one"); +printBugNumber(); diff --git a/js/src/jit-test/tests/auto-regress/bug829795.js b/js/src/jit-test/tests/auto-regress/bug829795.js new file mode 100644 index 000000000..ecbd56449 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug829795.js @@ -0,0 +1,10 @@ +// |jit-test| error:TypeError + +// Binary: cache/js-dbg-64-44dcffe8792b-linux +// Flags: -a +// +try { + x = []; + Array.prototype.forEach() +} catch (e) {} +x.forEach() diff --git a/js/src/jit-test/tests/auto-regress/bug829813.js b/js/src/jit-test/tests/auto-regress/bug829813.js new file mode 100644 index 000000000..18a5d21d8 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug829813.js @@ -0,0 +1,8 @@ +// Binary: cache/js-dbg-64-44dcffe8792b-linux +// Flags: +// +for (x in [0]) { + (function() { + return Object.propertyIsEnumerable + })().call([0], x) +} diff --git a/js/src/jit-test/tests/auto-regress/bug909441.js b/js/src/jit-test/tests/auto-regress/bug909441.js new file mode 100644 index 000000000..fc6ba5ba5 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug909441.js @@ -0,0 +1,19 @@ +// |jit-test| error: too much recursion +function f(code) { + try { + g = Function(code) + } catch (e) {} + g() +} +f("\ + Object.defineProperty(this,\"x\",{\ + get: function(){\ + evaluate(\"Array(x)\",{\ + catchTermination:(function(){})\ + })\ + }\ + })\ +"); +f("x"); +f(")"); +f("x"); diff --git a/js/src/jit-test/tests/auto-regress/bug912379.js b/js/src/jit-test/tests/auto-regress/bug912379.js new file mode 100644 index 000000000..fd0ae9b33 --- /dev/null +++ b/js/src/jit-test/tests/auto-regress/bug912379.js @@ -0,0 +1,12 @@ +s = newGlobal(); +evalcx("\ + try { \ + throw StopIteration;\ + } catch(a) {\ + x = a;\ + } \ + new Proxy(x, {});\ +", s); +evalcx("\ + n = x;\ +", s); |