summaryrefslogtreecommitdiffstats
path: root/js/src/tests/js1_8/regress
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /js/src/tests/js1_8/regress
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/js1_8/regress')
-rw-r--r--js/src/tests/js1_8/regress/browser.js0
-rw-r--r--js/src/tests/js1_8/regress/regress-366941.js74
-rw-r--r--js/src/tests/js1_8/regress/regress-384412.js98
-rw-r--r--js/src/tests/js1_8/regress/regress-384758.js36
-rw-r--r--js/src/tests/js1_8/regress/regress-404734.js31
-rw-r--r--js/src/tests/js1_8/regress/regress-427798.js58
-rw-r--r--js/src/tests/js1_8/regress/regress-433279-01.js28
-rw-r--r--js/src/tests/js1_8/regress/regress-433279-02.js33
-rw-r--r--js/src/tests/js1_8/regress/regress-433279-03.js33
-rw-r--r--js/src/tests/js1_8/regress/regress-442333-01.js38
-rw-r--r--js/src/tests/js1_8/regress/regress-452491.js29
-rw-r--r--js/src/tests/js1_8/regress/regress-455981-01.js36
-rw-r--r--js/src/tests/js1_8/regress/regress-455981-02.js36
-rw-r--r--js/src/tests/js1_8/regress/regress-457065-01.js32
-rw-r--r--js/src/tests/js1_8/regress/regress-457065-02.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-458076.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-459185.js34
-rw-r--r--js/src/tests/js1_8/regress/regress-459186.js34
-rw-r--r--js/src/tests/js1_8/regress/regress-459389.js118
-rw-r--r--js/src/tests/js1_8/regress/regress-461930.js31
-rw-r--r--js/src/tests/js1_8/regress/regress-461932.js31
-rw-r--r--js/src/tests/js1_8/regress/regress-463334-01.js31
-rw-r--r--js/src/tests/js1_8/regress/regress-463334-02.js33
-rw-r--r--js/src/tests/js1_8/regress/regress-464096.js32
-rw-r--r--js/src/tests/js1_8/regress/regress-464418.js46
-rw-r--r--js/src/tests/js1_8/regress/regress-464978.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465220.js43
-rw-r--r--js/src/tests/js1_8/regress/regress-465234.js33
-rw-r--r--js/src/tests/js1_8/regress/regress-465239.js33
-rw-r--r--js/src/tests/js1_8/regress/regress-465241.js33
-rw-r--r--js/src/tests/js1_8/regress/regress-465249.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465261.js34
-rw-r--r--js/src/tests/js1_8/regress/regress-465308.js31
-rw-r--r--js/src/tests/js1_8/regress/regress-465454.js31
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-01.js32
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-02.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-03.js29
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-04.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-05.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-06.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-07.js38
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-08.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-09.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-10.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-11.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465460-12.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465483.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-465567-01.js29
-rw-r--r--js/src/tests/js1_8/regress/regress-465567-02.js25
-rw-r--r--js/src/tests/js1_8/regress/regress-465688.js28
-rw-r--r--js/src/tests/js1_8/regress/regress-466128.js31
-rw-r--r--js/src/tests/js1_8/regress/regress-466787.js33
-rw-r--r--js/src/tests/js1_8/regress/regress-467495-01.js28
-rw-r--r--js/src/tests/js1_8/regress/regress-467495-02.js34
-rw-r--r--js/src/tests/js1_8/regress/regress-467495-03.js47
-rw-r--r--js/src/tests/js1_8/regress/regress-467495-04.js42
-rw-r--r--js/src/tests/js1_8/regress/regress-467495-05.js31
-rw-r--r--js/src/tests/js1_8/regress/regress-467495-06.js44
-rw-r--r--js/src/tests/js1_8/regress/regress-468711.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-469547.js34
-rw-r--r--js/src/tests/js1_8/regress/regress-469625-02.js35
-rw-r--r--js/src/tests/js1_8/regress/regress-469625-03.js42
-rw-r--r--js/src/tests/js1_8/regress/regress-471373.js43
-rw-r--r--js/src/tests/js1_8/regress/regress-471660.js37
-rw-r--r--js/src/tests/js1_8/regress/regress-474769.js35
-rw-r--r--js/src/tests/js1_8/regress/regress-474771.js41
-rw-r--r--js/src/tests/js1_8/regress/regress-474935.js40
-rw-r--r--js/src/tests/js1_8/regress/regress-476655.js39
-rw-r--r--js/src/tests/js1_8/regress/regress-477234.js48
-rw-r--r--js/src/tests/js1_8/regress/regress-477581.js35
-rw-r--r--js/src/tests/js1_8/regress/regress-478205.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-479353.js23
-rw-r--r--js/src/tests/js1_8/regress/regress-479740.js36
-rw-r--r--js/src/tests/js1_8/regress/regress-481800.js30
-rw-r--r--js/src/tests/js1_8/regress/regress-483749.js25
-rw-r--r--js/src/tests/js1_8/regress/regress-499524.js50
-rw-r--r--js/src/tests/js1_8/regress/regress-532491.js37
-rw-r--r--js/src/tests/js1_8/regress/shell.js0
78 files changed, 2771 insertions, 0 deletions
diff --git a/js/src/tests/js1_8/regress/browser.js b/js/src/tests/js1_8/regress/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/js1_8/regress/browser.js
diff --git a/js/src/tests/js1_8/regress/regress-366941.js b/js/src/tests/js1_8/regress/regress-366941.js
new file mode 100644
index 000000000..bca3933d4
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-366941.js
@@ -0,0 +1,74 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributor: Robert Sayre
+ */
+
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 366941;
+var summary = 'Destructuring enumerations, iterations';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ var list1 = [[1,2],[3,4],[5,6]];
+ var list2 = [[1,2,3],[4,5,6],[7,8,9]];
+
+ expect = '1,2;3,4;5,6;';
+ actual = '';
+
+ for each (var [foo, bar] in list1) {
+ actual += foo + "," + bar + ";";
+ }
+
+ reportCompare(expect, actual, summary + ': 1');
+
+ expect = '1,2,3;4,5,6;7,8,9;';
+ actual = '';
+ for each (var [foo, bar, baz] in list2) {
+ actual += foo + "," + bar + "," + baz + ";";
+ }
+
+ reportCompare(expect, actual, summary + ': 2');
+
+ function gen(list) {
+ for each (var test in list) {
+ yield test;
+ }
+ }
+
+ var iter1 = gen(list1);
+
+ expect = '1,2;3,4;5,6;';
+ actual = '';
+
+ for (var [foo, bar] in iter1) {
+ actual += foo + "," + bar + ";";
+ }
+
+ reportCompare(expect, actual, summary + ': 3');
+
+ var iter2 = gen(list2);
+ expect = '1,2,3;4,5,6;7,8,9;';
+ actual = '';
+
+ for (var [foo, bar, baz] in iter2) {
+ actual += foo + "," + bar + "," + baz + ";";
+ }
+
+ reportCompare(expect, actual, summary + ': 4');
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-384412.js b/js/src/tests/js1_8/regress/regress-384412.js
new file mode 100644
index 000000000..55cbdf9c0
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-384412.js
@@ -0,0 +1,98 @@
+// |reftest| skip-if(!xulRuntime.shell)
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 384412;
+var summary = 'Exercise frame handling code';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+/*
+ * Generators
+ */
+
+/* Generator yields properly */
+ f = (function(n) { for (var i = 0; i != n; i++) yield i });
+ g = f(3);
+ expect(0, g.next());
+ expect(1, g.next());
+ expect(2, g.next());
+ s = "no exception";
+ try { g.next(); } catch (e) { s = e + ""; }
+ expect("[object StopIteration]", s);
+
+/* Generator yields properly in finally */
+ f = (function(n) {
+ try {
+ for (var i = 0; i != n; i++)
+ yield i;
+ } finally {
+ yield "finally";
+ }
+ });
+
+ g = f(3);
+ expect(0, g.next());
+ expect(1, g.next());
+ expect(2, g.next());
+ expect("finally", g.next());
+
+/* Generator throws when closed with yield in finally */
+ g = f(3);
+ expect(0, g.next());
+ s = "no exception";
+ try { g.close(); } catch (e) { s = e + ""; };
+ expect("TypeError: yield from closing generator " + f.toSource(), s);
+
+
+/*
+ * Calls that have been replaced with js_PushFrame() &c...
+ */
+ f = (function() { return arguments[(arguments.length - 1) / 2]; });
+ expect(2, f(1, 2, 3));
+ expect(2, f.call(null, 1, 2, 3));
+ expect(2, f.apply(null, [1, 2, 3]));
+ expect("a1c", "abc".replace("b", f));
+ s = "no exception";
+ try {
+ "abc".replace("b", (function() { throw "hello" }));
+ } catch (e) {
+ s = e + "";
+ }
+ expect("hello", s);
+ expect(6, [1, 2, 3].reduce(function(a, b) { return a + b; }));
+ s = "no exception";
+ try {
+ [1, 2, 3].reduce(function(a, b) { if (b == 2) throw "hello"; });
+ } catch (e) {
+ s = e + "";
+ }
+ expect("hello", s);
+
+ print("End of Tests");
+
+/*
+ * Utility functions
+ */
+ function expect(a, b) {
+ print('expect: ' + a + ', actual: ' + b);
+ reportCompare(a, b, summary);
+ }
+
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-384758.js b/js/src/tests/js1_8/regress/regress-384758.js
new file mode 100644
index 000000000..fa8771b42
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-384758.js
@@ -0,0 +1,36 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 384758;
+var summary = 'Statement can not follow expression closure with out intervening ;';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 'SyntaxError: missing ; before statement';
+ try
+ {
+ eval('(function() { if(t) function x() foo() bar(); })');
+ }
+ catch(ex)
+ {
+ actual = ex + '';
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-404734.js b/js/src/tests/js1_8/regress/regress-404734.js
new file mode 100644
index 000000000..399c097c3
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-404734.js
@@ -0,0 +1,31 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 404734;
+var summary = 'Object destructuring shorthand';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ var o = {p: 42, q: true};
+ var {p, q} = o;
+
+ expect = '42,true';
+ actual = p + ',' + q;
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-427798.js b/js/src/tests/js1_8/regress/regress-427798.js
new file mode 100644
index 000000000..b6ae35045
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-427798.js
@@ -0,0 +1,58 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 427798;
+var summary = 'js_PutBlockObject is slow';
+var actual = 'Good result';
+var expect = 'Good result';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ function f(N)
+ {
+ for (var i = 0; i != N; ++i) {
+ var f, g;
+ {
+ let j = i + 1;
+ f = function() { j += 2; return j; }
+ if (f() != i + 3)
+ throw "Bad result";
+ }
+ if (f() != i + 5)
+ throw "Bad result";
+ {
+ let j = i + 1, k = i + 2;
+ f = function() { j += 2; k++; return j + k; }
+ if (f() != i + i + 6)
+ throw "Bad result";
+ }
+ if (f() != i + i + 9)
+ throw "Bad result";
+ }
+ }
+
+ try
+ {
+ f(20*1000);
+ }
+ catch(ex)
+ {
+ actual = ex + '';
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-433279-01.js b/js/src/tests/js1_8/regress/regress-433279-01.js
new file mode 100644
index 000000000..d3bbbb595
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-433279-01.js
@@ -0,0 +1,28 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 433279;
+var summary = 'Do not assert: pn != tc->parseContext->nodeList';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ var { sin, PI } = Math; sin(PI / 2);
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-433279-02.js b/js/src/tests/js1_8/regress/regress-433279-02.js
new file mode 100644
index 000000000..4fdf9f9a9
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-433279-02.js
@@ -0,0 +1,33 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 433279;
+var summary = 'Do not assert: pn != tc->parseContext->nodeList';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ try
+ {
+ eval('var {a} = b; c(d + 1);');
+ }
+ catch(ex)
+ {
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-433279-03.js b/js/src/tests/js1_8/regress/regress-433279-03.js
new file mode 100644
index 000000000..2b4b9ef35
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-433279-03.js
@@ -0,0 +1,33 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 433279;
+var summary = 'Do not assert: pn != tc->parseContext->nodeList';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ try
+ {
+ eval('({a}) = b; with({}) { for(let y in z) { } }');
+ }
+ catch(ex)
+ {
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-442333-01.js b/js/src/tests/js1_8/regress/regress-442333-01.js
new file mode 100644
index 000000000..4434da76e
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-442333-01.js
@@ -0,0 +1,38 @@
+// |reftest| skip
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 442333;
+var summary = 'Remove eval\'s optional second argument';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 'ReferenceError: a is not defined';
+ var o = {a : 1};
+
+ try
+ {
+ eval('a', o);
+ }
+ catch(ex)
+ {
+ actual = ex + '';
+ }
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-452491.js b/js/src/tests/js1_8/regress/regress-452491.js
new file mode 100644
index 000000000..13d569865
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-452491.js
@@ -0,0 +1,29 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 452491;
+var summary = 'Do not crash with JIT: with new';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (var j=0;j<5;++j) (new (function(q) q)).a;
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-455981-01.js b/js/src/tests/js1_8/regress/regress-455981-01.js
new file mode 100644
index 000000000..06c3ea368
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-455981-01.js
@@ -0,0 +1,36 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 455981;
+var summary = 'Do not assert: entry->localKind == JSLOCAL_ARG';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 'SyntaxError: duplicate argument names not allowed in this context';
+
+ try
+ {
+ eval('(function ({a, b, c, d, e, f, g, h, q}, q) { })');
+ }
+ catch(ex)
+ {
+ actual = ex + '';
+ }
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-455981-02.js b/js/src/tests/js1_8/regress/regress-455981-02.js
new file mode 100644
index 000000000..e91086475
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-455981-02.js
@@ -0,0 +1,36 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 455981;
+var summary = 'Do not assert: entry->localKind == JSLOCAL_ARG';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 'SyntaxError: duplicate argument names not allowed in this context';
+
+ try
+ {
+ eval('(function ({a: {b: bb, c: cc, d: dd}, m: [x, n, o, p]}, x) {});');
+ }
+ catch(ex)
+ {
+ actual = ex + '';
+ }
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-457065-01.js b/js/src/tests/js1_8/regress/regress-457065-01.js
new file mode 100644
index 000000000..62f379179
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-457065-01.js
@@ -0,0 +1,32 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 457065;
+var summary = 'Do not assert: !fp->callee || fp->thisp == fp->argv[-1].toObjectOrNull()';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ var e = eval;
+ for (var a in this) { }
+ (function() { eval("this; for (let b in [0,1,2]) { }"); })();
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-457065-02.js b/js/src/tests/js1_8/regress/regress-457065-02.js
new file mode 100644
index 000000000..2b97ff225
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-457065-02.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 457065;
+var summary = 'Do not assert: !fp->callee || fp->thisp == fp->argv[-1].toObjectOrNull()';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ (function(){ eval('this'); (function(){ for(let y in [0,1,2]) 6;})(); })();
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-458076.js b/js/src/tests/js1_8/regress/regress-458076.js
new file mode 100644
index 000000000..c2b7ab7a6
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-458076.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 458076;
+var summary = 'Do not assert with JIT: !lhs->isQuad() && !rhs->isQuad()';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (let j = 0; j < 3; ++j) { true == 0; }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-459185.js b/js/src/tests/js1_8/regress/regress-459185.js
new file mode 100644
index 000000000..fd31d462d
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-459185.js
@@ -0,0 +1,34 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 459185;
+var summary = 'Do not assert: pn->pn_arity == PN_BINARY';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ try
+ {
+ for (var {a: []} in []) { }
+ }
+ catch(ex)
+ {
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-459186.js b/js/src/tests/js1_8/regress/regress-459186.js
new file mode 100644
index 000000000..0aeda8ede
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-459186.js
@@ -0,0 +1,34 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 459186;
+var summary = 'Do not crash in CheckDestructuring';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ try
+ {
+ for (var [,{y}] in []) {}
+ }
+ catch(ex)
+ {
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-459389.js b/js/src/tests/js1_8/regress/regress-459389.js
new file mode 100644
index 000000000..9f84d9250
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-459389.js
@@ -0,0 +1,118 @@
+/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 459389;
+var summary = 'Do not crash with JIT';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+printStatus (summary);
+
+print('mmmm, food!');
+
+
+var SNI = {};
+SNI.MetaData={};
+SNI.MetaData.Parameter=function()
+{
+var parameters={};
+this.addParameter=function(key,value)
+{
+parameters[key]=[];
+parameters[key].push(value);
+};
+this.getParameter=function(key,separator){
+if(!parameters[key])
+{
+return;
+}
+return parameters[key].join(separator);
+};
+this.getKeys=function()
+{
+return parameters;
+};
+};
+SNI.MetaData.Manager=function(){
+var m=new SNI.MetaData.Parameter();
+this.getParameter=m.getParameter;
+};
+var MetaDataManager=SNI.MetaData.Manager;
+SNI.Ads={ };
+SNI.Ads.Url=function(){
+var p=new SNI.MetaData.Parameter();
+this.addParameter=p.addParameter;
+this.getParameter=p.getParameter;
+};
+function Ad() {
+var url=new SNI.Ads.Url();
+this.addParameter=url.addParameter;
+this.getParameter=url.getParameter;
+}
+function DartAd()
+AdUrl.prototype=new Ad();
+function AdUrl() { }
+function AdRestriction() {
+var p=new SNI.MetaData.Parameter();
+this.addParameter=p.addParameter;
+this.getParameter=p.getParameter;
+this.getKeys=p.getKeys;
+}
+function AdRestrictionManager(){
+this.restriction=[];
+this.isActive=isActive;
+this.isMatch=isMatch;
+this.startMatch=startMatch;
+function isActive(ad,mdm){
+var value=false;
+for(var i=0;i<this.restriction.length;i++)
+{
+adRestriction=this.restriction[i];
+value=this.startMatch(ad,mdm,adRestriction);
+}
+}
+function startMatch(ad,mdm,adRestriction){
+for(var key in adRestriction.getKeys()){
+var restrictions=adRestriction.getParameter(key,',');
+var value=mdm.getParameter(key,'');
+match=this.isMatch(value,restrictions);
+if(!match){
+value=ad.getParameter(key,'')
+match=this.isMatch(value,restrictions);
+}
+}
+}
+function isMatch(value,restrictions){
+var match=false;
+if(value)
+{
+splitValue=value.split('');
+for(var x=0;x<splitValue.length;x++){
+for(var a;a<restrictions.length;a++){ }
+}
+}
+return match;
+}
+}
+var adRestrictionManager = new AdRestrictionManager();
+var restrictionLeader6 = new AdRestriction();
+restrictionLeader6.addParameter("", "");
+adRestrictionManager.restriction.push(restrictionLeader6);
+var restrictionLeader7 = new AdRestriction();
+restrictionLeader7.addParameter("", "");
+adRestrictionManager.restriction.push(restrictionLeader7);
+function FoodAd(adtype)
+{
+ ad=new DartAd()
+ ad.addParameter("",adtype)
+ adRestrictionManager.isActive(ad, mdManager)
+}
+var mdManager = new MetaDataManager() ;
+ FoodAd('P')
+
+
+reportCompare(expect, actual, summary);
diff --git a/js/src/tests/js1_8/regress/regress-461930.js b/js/src/tests/js1_8/regress/regress-461930.js
new file mode 100644
index 000000000..80626f2f9
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-461930.js
@@ -0,0 +1,31 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 461930;
+var summary = 'TM: Do not assert: count == _stats.pages';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ function gen() { for (let j = 0; j < 4; ++j) { yield 1; yield 2; gc(); } }
+ for (let i in gen()) { }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-461932.js b/js/src/tests/js1_8/regress/regress-461932.js
new file mode 100644
index 000000000..5456fbd83
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-461932.js
@@ -0,0 +1,31 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 461932;
+var summary = 'TM: Do not crash in nanojit::LIns::isop';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ function gen() { for (var j = 0; j < 4; ++j) { NaN; yield 3; } }
+ for (let i in gen()) { }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-463334-01.js b/js/src/tests/js1_8/regress/regress-463334-01.js
new file mode 100644
index 000000000..e30ee9560
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-463334-01.js
@@ -0,0 +1,31 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 463334;
+var summary = 'TM: Do not crash in isPromoteInt';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ u = 3;
+ for (let i in (function() { for (var j=0;j<4;++j) { void u; yield; } })());
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-463334-02.js b/js/src/tests/js1_8/regress/regress-463334-02.js
new file mode 100644
index 000000000..b0ccafd39
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-463334-02.js
@@ -0,0 +1,33 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 463334;
+var summary = 'TM: Do not crash in isPromoteInt';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (let i in
+ (function() { for (let j = 0; j < 4; ++j) with({t: NaN}) yield; })())
+ {
+ }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-464096.js b/js/src/tests/js1_8/regress/regress-464096.js
new file mode 100644
index 000000000..8e699ebb6
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-464096.js
@@ -0,0 +1,32 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 464096;
+var summary = 'TM: Do not assert: tm->recoveryDoublePoolPtr > tm->recoveryDoublePool';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (let f in [1,1]);
+ Object.prototype.__defineGetter__('x', function() gc());
+ (function() { for each (let j in [1,1,1,1,1]) { var y = .2; } })();
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-464418.js b/js/src/tests/js1_8/regress/regress-464418.js
new file mode 100644
index 000000000..f05564006
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-464418.js
@@ -0,0 +1,46 @@
+// |reftest| skip-if(Android)
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 464418;
+var summary = 'Do not assert: fp->slots + fp->script->nfixed + ' +
+ 'js_ReconstructStackDepth(cx, fp->script, fp->regs->pc) == fp->regs->sp';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ if (typeof gczeal == 'function')
+ {
+ 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) { } ")();
+ }
+
+
+ if (typeof gczeal == 'function')
+ {
+ gczeal(0);
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-464978.js b/js/src/tests/js1_8/regress/regress-464978.js
new file mode 100644
index 000000000..6f7001a98
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-464978.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 464978;
+var summary = 'Do not hang with [] + null';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (let j = 0; j < 2; ++j) { [] + null; }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465220.js b/js/src/tests/js1_8/regress/regress-465220.js
new file mode 100644
index 000000000..ca4154fe6
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465220.js
@@ -0,0 +1,43 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465220;
+var summary = 'Do not assert: anti-nesting';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 'TypeError: can\'t convert o to primitive type';
+
+
+ try
+ {
+ var o = {toString: function()(i > 2) ? this : "foo"};
+ var s = "";
+ for (var i = 0; i < 5; i++)
+ s += o + o;
+ print(s);
+ actual = 'No Exception';
+ }
+ catch(ex)
+ {
+ actual = 'TypeError: can\'t convert o to primitive type';
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465234.js b/js/src/tests/js1_8/regress/regress-465234.js
new file mode 100644
index 000000000..2cf8f3781
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465234.js
@@ -0,0 +1,33 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465234;
+var summary = '"" <= null';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = true;
+ actual = true;
+
+
+ for (let j = 0; j < 5; ++j) actual = actual && ("" <= null);
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465239.js b/js/src/tests/js1_8/regress/regress-465239.js
new file mode 100644
index 000000000..8a012d691
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465239.js
@@ -0,0 +1,33 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465239;
+var summary = '"1e+81" ^ 3';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = '3,3,3,3,3,';
+ actual = '';
+
+
+ for (let j = 0; j < 5; ++j) actual += ("1e+81" ^ 3) + ',';
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465241.js b/js/src/tests/js1_8/regress/regress-465241.js
new file mode 100644
index 000000000..e756c8739
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465241.js
@@ -0,0 +1,33 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465241;
+var summary = '"0" in [3]';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = true;
+ actual = true;
+
+
+ for (let j = 0; j < 5; ++j) actual = actual && ("0" in [3]);
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465249.js b/js/src/tests/js1_8/regress/regress-465249.js
new file mode 100644
index 000000000..f3c61fd07
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465249.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465249;
+var summary = 'Do not assert: (m != JSVAL_INT) || isInt32(*vp)';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ eval("for (let j = 0; j < 5; ++j) { (0x50505050) + (0x50505050); }");
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465261.js b/js/src/tests/js1_8/regress/regress-465261.js
new file mode 100644
index 000000000..b9aac8bde
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465261.js
@@ -0,0 +1,34 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465261;
+var summary = 'TM: Do not assert: ';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (let z = 0; z < 2; ++z) {
+ for each (let x in [0, true, (void 0), 0, (void 0)]) {
+ if(x){}
+ }
+ };
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465308.js b/js/src/tests/js1_8/regress/regress-465308.js
new file mode 100644
index 000000000..7346532cb
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465308.js
@@ -0,0 +1,31 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465308;
+var summary = '((0x60000009) * 0x60000009))';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = '-1073741824,-1073741824,-1073741824,-1073741824,-1073741824,';
+
+ for (let j=0;j<5;++j)
+ print(actual += "" + (0 | ((0x60000009) * 0x60000009)) + ',');
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465454.js b/js/src/tests/js1_8/regress/regress-465454.js
new file mode 100644
index 000000000..648639753
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465454.js
@@ -0,0 +1,31 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465454;
+var summary = 'TM: do not crash with type-unstable loop';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for each (let b in [(-1/0), new String(''), new String(''), null, (-1/0),
+ (-1/0), new String(''), new String(''), null]) '' + b;
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-01.js b/js/src/tests/js1_8/regress/regress-465460-01.js
new file mode 100644
index 000000000..2a21de495
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-01.js
@@ -0,0 +1,32 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = '11111';
+
+
+ (function(d) { for (let j = 0; j < 5; ++j) { actual += ('' + d); } })({valueOf: function()1});
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-02.js b/js/src/tests/js1_8/regress/regress-465460-02.js
new file mode 100644
index 000000000..9ba0431a7
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-02.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for each (let c in [null, null, null, {}]) { }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-03.js b/js/src/tests/js1_8/regress/regress-465460-03.js
new file mode 100644
index 000000000..a2e69b9ec
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-03.js
@@ -0,0 +1,29 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ for each (let j in [null, 2, 3]) { }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-04.js b/js/src/tests/js1_8/regress/regress-465460-04.js
new file mode 100644
index 000000000..d470e8ac4
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-04.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (var j = 0; j < 3; ++j) { 1 & new Date; }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-05.js b/js/src/tests/js1_8/regress/regress-465460-05.js
new file mode 100644
index 000000000..a8f06e3f8
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-05.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (var j = 0; j < 3; ++j) { 1 & Date; }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-06.js b/js/src/tests/js1_8/regress/regress-465460-06.js
new file mode 100644
index 000000000..ed0b80e18
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-06.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for each (let x in [1, {}, 1, null, 1, {}, 1, null, 1]) { }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-07.js b/js/src/tests/js1_8/regress/regress-465460-07.js
new file mode 100644
index 000000000..46a4005a6
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-07.js
@@ -0,0 +1,38 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = actual = 'pass';
+
+ try
+ {
+ e = {}; for (j=0;j<3;++j) { 3 | e; } "PASS";
+ }
+ catch(ex)
+ {
+ actual = ex + '';
+ }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-08.js b/js/src/tests/js1_8/regress/regress-465460-08.js
new file mode 100644
index 000000000..0fded4b00
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-08.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for each (let _ in [{}, {}, null, null, null, null]) { }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-09.js b/js/src/tests/js1_8/regress/regress-465460-09.js
new file mode 100644
index 000000000..6ccc5e8c7
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-09.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (let i in (function() { for (var j = 0; j < 3; ++j) yield; })()) { }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-10.js b/js/src/tests/js1_8/regress/regress-465460-10.js
new file mode 100644
index 000000000..0b3a49bcd
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-10.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (let i = 0; i < 2; ++i) { ({}) + 3; }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-11.js b/js/src/tests/js1_8/regress/regress-465460-11.js
new file mode 100644
index 000000000..656188beb
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-11.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (let d=0;d<2;++d) for (let a=0;a<1;++a) "" + (d && function(){});
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465460-12.js b/js/src/tests/js1_8/regress/regress-465460-12.js
new file mode 100644
index 000000000..2e0be80e8
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465460-12.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465460;
+var summary = 'TM: valueOf in a loop: do not assert';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (var j = 0; j < 2; ++j) { if (null > "") { } }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465483.js b/js/src/tests/js1_8/regress/regress-465483.js
new file mode 100644
index 000000000..39378a510
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465483.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465483;
+var summary = 'Type instability leads to undefined being added as a string instead of as a number';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 'NaN';
+
+ for each (i in [4, 'a', 'b', (void 0)]) print(actual = '' + (i + i));
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-465567-01.js b/js/src/tests/js1_8/regress/regress-465567-01.js
new file mode 100644
index 000000000..862c2abe4
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465567-01.js
@@ -0,0 +1,29 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465567;
+var summary = 'TM: Weirdness with var, let, multiple assignments';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+printStatus (summary);
+
+expect = '99999';
+
+
+for (let j = 0; j < 5; ++j) {
+ var e;
+ e = 9;
+ print(actual += '' + e);
+ e = 47;
+ if (e & 0) {
+ let e;
+ }
+}
+
+
+reportCompare(expect, actual, summary);
diff --git a/js/src/tests/js1_8/regress/regress-465567-02.js b/js/src/tests/js1_8/regress/regress-465567-02.js
new file mode 100644
index 000000000..a1ba74db5
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465567-02.js
@@ -0,0 +1,25 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465567;
+var summary = 'TM: Do not assert: JSVAL_TAG(v) == JSVAL_OBJECT';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+printStatus (summary);
+
+
+try
+{
+ eval("for each (e in ['', true, 1, true, 1]) { e = null; if (0) { let e; var e; } }");
+}
+catch(ex)
+{
+}
+
+
+reportCompare(expect, actual, summary);
diff --git a/js/src/tests/js1_8/regress/regress-465688.js b/js/src/tests/js1_8/regress/regress-465688.js
new file mode 100644
index 000000000..9df47f983
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-465688.js
@@ -0,0 +1,28 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 465688;
+var summary = 'Do not assert: (m != JSVAL_INT) || isInt32(*vp),';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ for each (let d in [-0x80000000, -0x80000000]) - -d;
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-466128.js b/js/src/tests/js1_8/regress/regress-466128.js
new file mode 100644
index 000000000..a17097141
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-466128.js
@@ -0,0 +1,31 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 466128;
+var summary = 'Do not assert: !ti->stackTypeMap.matches(ti_other->stackTypeMap)';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ for (let a = 0; a < 3; ++a) {
+ for each (let b in [1, 2, "three", 4, 5, 6, 7, 8]) {
+ }
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-466787.js b/js/src/tests/js1_8/regress/regress-466787.js
new file mode 100644
index 000000000..f5bbb67ec
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-466787.js
@@ -0,0 +1,33 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 466787;
+var summary = 'TM: new Number() should stay a number during recording';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = '4444';
+
+
+ for (let j = 0; j < 4; ++j) { for each (let one in [new Number(1)]) {
+ print(actual += '' + (3 + one)); } }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-467495-01.js b/js/src/tests/js1_8/regress/regress-467495-01.js
new file mode 100644
index 000000000..2f6014c28
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-467495-01.js
@@ -0,0 +1,28 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 467495;
+var summary = 'Do not crash @ js_Interpret';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ (function() { x = 0; function x() 4; var x; const y = 1; })();
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-467495-02.js b/js/src/tests/js1_8/regress/regress-467495-02.js
new file mode 100644
index 000000000..0496d5441
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-467495-02.js
@@ -0,0 +1,34 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 467495;
+var summary = 'Do not crash @ js_Interpret';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ try
+ {
+ eval("(function(){const y = 1; function x() '' let functional, x})();");
+ }
+ catch(ex)
+ {
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-467495-03.js b/js/src/tests/js1_8/regress/regress-467495-03.js
new file mode 100644
index 000000000..2d4560c0f
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-467495-03.js
@@ -0,0 +1,47 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 467495;
+var summary = 'TCF_FUN_CLOSURE_VS_VAR is necessary';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ function f(x)
+ {
+ actual = '';
+ var g;
+ print(actual += typeof g + ',');
+
+ if (x)
+ function g(){};
+
+ print(actual += g);
+ }
+
+ expect = 'undefined,undefined';
+ f(0);
+
+ reportCompare(expect, actual, summary + ': f(0): ');
+
+ expect = 'undefined,function g(){}';
+
+ f(1);
+
+ reportCompare(expect, actual, summary + ': f(1): ');
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-467495-04.js b/js/src/tests/js1_8/regress/regress-467495-04.js
new file mode 100644
index 000000000..bb77c5a3b
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-467495-04.js
@@ -0,0 +1,42 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 467495;
+var summary = 'TCF_FUN_CLOSURE_VS_VAR is necessary';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ function g() {
+ if (1)
+ function x() {};
+ var x;
+ const y = 1;
+ }
+
+ try
+ {
+ g();
+ }
+ catch(ex)
+ {
+ actual = ex + '';
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-467495-05.js b/js/src/tests/js1_8/regress/regress-467495-05.js
new file mode 100644
index 000000000..505fb6bd6
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-467495-05.js
@@ -0,0 +1,31 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 467495;
+var summary = 'TCF_FUN_CLOSURE_VS_VAR is necessary';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 'function x() {}';
+
+ function g(x) { if (1) function x() {} return x; }
+ print(actual = g(1) + '');
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-467495-06.js b/js/src/tests/js1_8/regress/regress-467495-06.js
new file mode 100644
index 000000000..d8bc81c83
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-467495-06.js
@@ -0,0 +1,44 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 467495;
+var summary = 'TCF_FUN_CLOSURE_VS_VAR is necessary';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ function f(x)
+ {
+ var y = 1;
+ if (Math)
+ function x() { }
+ if (Math)
+ function y() { }
+ return [x, y];
+ }
+
+ var r = f(0);
+
+ if (typeof(r[0]) != "function")
+ actual += "Bad r[0]";
+
+ if (typeof(r[1]) != "function")
+ throw "Bad r[1]";
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-468711.js b/js/src/tests/js1_8/regress/regress-468711.js
new file mode 100644
index 000000000..f5ff88a18
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-468711.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 468711;
+var summary = 'TM: Do not assert: !JS_ON_TRACE(cx)';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ (5).toString(); for each (let b in [3, this]) { b.toString(); }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-469547.js b/js/src/tests/js1_8/regress/regress-469547.js
new file mode 100644
index 000000000..32d96114d
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-469547.js
@@ -0,0 +1,34 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 469547;
+var summary = 'Do not crash with: for each (let [,] in [[], [], null]) {}';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ try
+ {
+ for each (let [,] in [[], [], null]) {}
+ }
+ catch(ex)
+ {
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-469625-02.js b/js/src/tests/js1_8/regress/regress-469625-02.js
new file mode 100644
index 000000000..47ded9027
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-469625-02.js
@@ -0,0 +1,35 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributor: Jason Orendorff
+ */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 469625;
+var summary = 'group assignment with rhs containing holes';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 'y';
+
+ Array.prototype[1] = 'y';
+ var [x, y, z] = ['x', , 'z'];
+
+ actual = y;
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-469625-03.js b/js/src/tests/js1_8/regress/regress-469625-03.js
new file mode 100644
index 000000000..1e2d46cba
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-469625-03.js
@@ -0,0 +1,42 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributor: Jason Orendorff
+ */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 469625;
+var summary = 'Do not assert: script->objectsOffset != 0';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ function f(x) {
+ var [a, b, [c0, c1]] = [x, x, x];
+ }
+
+ expect = `TypeError: (intermediate value)[Symbol.iterator](...).next(...).value is null`;
+ actual = 'No Error';
+ try
+ {
+ f(null);
+ }
+ catch(ex)
+ {
+ actual = ex + '';
+ }
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-471373.js b/js/src/tests/js1_8/regress/regress-471373.js
new file mode 100644
index 000000000..15753b698
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-471373.js
@@ -0,0 +1,43 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 471373;
+var summary = 'TM: do not assert: (size_t)(regs.pc - script->code) < script->length';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ if (typeof window == 'undefined')
+ {
+ expectExitCode(5);
+ }
+
+
+ function g() {
+ var x = {};
+ for (var b = 0; b < 2; ++b) {
+ yield x;
+ for (var c = 0; c < 10;++c) {
+ x.r = x;
+ }
+ }
+ }
+ for (let y in g()) { }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-471660.js b/js/src/tests/js1_8/regress/regress-471660.js
new file mode 100644
index 000000000..1d219ee9d
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-471660.js
@@ -0,0 +1,37 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 471660;
+var summary = 'TM: Do not assert: !(fp->flags & JSFRAME_POP_BLOCKS)';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ y = {"a":1};
+
+ for (var w = 0; w < 5; ++w) {
+
+ { let y; do break ; while (true); }
+ for each (let x in [{}, function(){}]) {y}
+
+ }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-474769.js b/js/src/tests/js1_8/regress/regress-474769.js
new file mode 100644
index 000000000..c423b9b3b
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-474769.js
@@ -0,0 +1,35 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 474769;
+var summary = 'TM: nested for each type-unstable loops';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 1;
+
+
+ for each (b in [1, 1, 1, 1.5, 1, 1]) {
+ (function() { for each (let h in [0, 0, 1.4, ""]) {} })();
+ }
+ actual = b;
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-474771.js b/js/src/tests/js1_8/regress/regress-474771.js
new file mode 100644
index 000000000..a5085426b
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-474771.js
@@ -0,0 +1,41 @@
+// |reftest| skip-if(Android)
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 474771;
+var summary = 'gczeal, prototype mangling, for..in';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 'PASS';
+ if (typeof gczeal == 'function')
+ {
+ gczeal(2);
+ }
+
+ Object.prototype.q = 3;
+ for each (let x in [6, 7]) { } print(actual = "PASS");
+
+ if (typeof gczeal == 'function')
+ {
+ gczeal(0);
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-474935.js b/js/src/tests/js1_8/regress/regress-474935.js
new file mode 100644
index 000000000..118e14ff2
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-474935.js
@@ -0,0 +1,40 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 474935;
+var summary = 'Do not assert: !ti->typeMap.matches(ti_other->typeMap)';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ var a = ["", 0, 0, 0, 0, 0, "", "", 0, "", 0, ""];
+ var i = 0;
+ var g = 0;
+ for each (let e in a) {
+ "" + [e];
+ if (i == 3 || i == 7) {
+ for each (g in [1]) {
+ }
+ }
+ ++i;
+ }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-476655.js b/js/src/tests/js1_8/regress/regress-476655.js
new file mode 100644
index 000000000..b1c2fb561
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-476655.js
@@ -0,0 +1,39 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 476655;
+var summary = 'Do not assert: depth <= (size_t) (fp->regs->sp - StackBase(fp))';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ try
+ {
+ eval(
+ "for(let y in ['', '']) try {for(let y in ['', '']) ( /x/g ); } finally {" +
+ "with({}){} } this.zzz.zzz"
+
+ );
+ }
+ catch(ex)
+ {
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-477234.js b/js/src/tests/js1_8/regress/regress-477234.js
new file mode 100644
index 000000000..d10fb198f
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-477234.js
@@ -0,0 +1,48 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 477234;
+var summary = 'Do not assert: v != JSVAL_ERROR_COOKIE';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for (iters = 0; iters < 11500; ++iters) {
+ for each (let x in ['', '', '']){}
+ eval("Object.defineProperty(__proto__, 'x', " +
+ "{" +
+ " enumerable: true, configurable: true," +
+ " get: function(){}" +
+ "});");
+ var a = uneval;
+ delete uneval;
+ uneval = a;
+ var b = toSource;
+ delete toSource;
+ toSource = b;
+ var c = toString;
+ delete toString;
+ toString = c;
+ }
+
+
+ delete __proto__.x;
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-477581.js b/js/src/tests/js1_8/regress/regress-477581.js
new file mode 100644
index 000000000..2720f82fc
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-477581.js
@@ -0,0 +1,35 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributor: Jason Orendorff
+ */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 477581;
+var summary = 'Do not assert: !regs.sp[-2].isPrimitive()';
+var actual = '';
+var expect = '';
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ function g() { yield 2; }
+ var iterables = [[1], [], [], [], g()];
+ for (let i = 0; i < iterables.length; i++)
+ for each (let j in iterables[i])
+ ;
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-478205.js b/js/src/tests/js1_8/regress/regress-478205.js
new file mode 100644
index 000000000..71d980579
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-478205.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 478205;
+var summary = 'Do not assert: p->isQuad()';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for each (let x in ['', '']) { switch([]) {} }
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-479353.js b/js/src/tests/js1_8/regress/regress-479353.js
new file mode 100644
index 000000000..0345f175c
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-479353.js
@@ -0,0 +1,23 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 479353;
+var summary = 'Do not assert: (uint32_t)(index_) < atoms_->length';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+printStatus (summary);
+
+function f(code)
+{
+ (eval("(function(){" + code + "});"))();
+}
+x = {};
+f("y = this;");
+f("x, y; for each (let x in [arguments]) {}");
+
+reportCompare(expect, actual, summary);
diff --git a/js/src/tests/js1_8/regress/regress-479740.js b/js/src/tests/js1_8/regress/regress-479740.js
new file mode 100644
index 000000000..bcbeaff03
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-479740.js
@@ -0,0 +1,36 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 479740;
+var summary = 'TM: Do not crash @ TraceRecorder::test_property_cache';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+printStatus (summary);
+
+
+try
+{
+ eval(
+ ' function f() {' +
+ ' for ( foobar in (function() {' +
+ ' for (var x = 0; x < 2; ++x) {' +
+ ' if (x % 2 == 1) { yield (this.z.z) = function(){} }' +
+ ' eval("this", false);' +
+ ' }' +
+ ' })());' +
+ ' function(){}' +
+ ' }' +
+ ' f();'
+ );
+}
+catch(ex)
+{
+}
+
+
+reportCompare(expect, actual, summary);
diff --git a/js/src/tests/js1_8/regress/regress-481800.js b/js/src/tests/js1_8/regress/regress-481800.js
new file mode 100644
index 000000000..7a27e8b7f
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-481800.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 481800;
+var summary = 'TM: Do not assert: (!lhs->isQuad() && !rhs->isQuad()) || (lhs->isQuad() && rhs->isQuad())';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+
+ for each (let x in ['', 0, 0, eval]) { y = x } ( function(){} );
+
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/regress-483749.js b/js/src/tests/js1_8/regress/regress-483749.js
new file mode 100644
index 000000000..74563ce89
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-483749.js
@@ -0,0 +1,25 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 483749;
+var summary = 'Do not assert: !js_IsActiveWithOrBlock(cx, fp->scopeChain, 0)';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+printStatus (summary);
+
+
+for each (let x in ['']) {
+ for (var b = 0; b < 5; ++b) {
+ if (b % 5 == 3) {
+ with([]) this;
+ }
+ }
+}
+
+
+reportCompare(expect, actual, summary);
diff --git a/js/src/tests/js1_8/regress/regress-499524.js b/js/src/tests/js1_8/regress/regress-499524.js
new file mode 100644
index 000000000..2b996eda2
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-499524.js
@@ -0,0 +1,50 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function isSyntaxError(code) {
+ try {
+ eval(code);
+ return false;
+ } catch (exception) {
+ if (SyntaxError.prototype.isPrototypeOf(exception))
+ return true;
+ throw exception;
+ };
+};
+
+/*
+ * Duplicate parameter names must be tolerated (as per ES3), unless
+ * the parameter list uses destructuring, in which case we claim the
+ * user has opted in to a modicum of sanity, and we forbid duplicate
+ * parameter names.
+ */
+assertEq(isSyntaxError("function f(x,x){}"), false);
+
+assertEq(isSyntaxError("function f(x,[x]){})"), true);
+assertEq(isSyntaxError("function f(x,{y:x}){})"), true);
+assertEq(isSyntaxError("function f(x,{x}){})"), true);
+
+assertEq(isSyntaxError("function f([x],x){})"), true);
+assertEq(isSyntaxError("function f({y:x},x){})"), true);
+assertEq(isSyntaxError("function f({x},x){})"), true);
+
+assertEq(isSyntaxError("function f([x,x]){}"), true);
+assertEq(isSyntaxError("function f({x,x}){}"), true);
+assertEq(isSyntaxError("function f({y:x,z:x}){}"), true);
+
+assertEq(isSyntaxError("function f(x,x,[y]){}"), true);
+assertEq(isSyntaxError("function f(x,x,{y}){}"), true);
+assertEq(isSyntaxError("function f([y],x,x){}"), true);
+assertEq(isSyntaxError("function f({y},x,x){}"), true);
+
+assertEq(isSyntaxError("function f(a,b,c,d,e,f,g,h,b,[y]){}"), true);
+assertEq(isSyntaxError("function f([y],a,b,c,d,e,f,g,h,a){}"), true);
+assertEq(isSyntaxError("function f([a],b,c,d,e,f,g,h,i,a){}"), true);
+assertEq(isSyntaxError("function f(a,b,c,d,e,f,g,h,i,[a]){}"), true);
+assertEq(isSyntaxError("function f(a,b,c,d,e,f,g,h,i,[a]){}"), true);
+
+reportCompare(true, true);
diff --git a/js/src/tests/js1_8/regress/regress-532491.js b/js/src/tests/js1_8/regress/regress-532491.js
new file mode 100644
index 000000000..b05876327
--- /dev/null
+++ b/js/src/tests/js1_8/regress/regress-532491.js
@@ -0,0 +1,37 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 466128;
+var summary = 'Do not assert: staticLevel == script->staticLevel, at ../jsobj.cpp';
+var actual = '';
+var expect = '';
+
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ function f(foo) {
+ if (a % 2 == 1) {
+ try {
+ eval(foo);
+ } catch(e) {}
+ }
+ }
+ a = 1;
+ f("eval(\"x\")");
+ f("x");
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8/regress/shell.js b/js/src/tests/js1_8/regress/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/js1_8/regress/shell.js