Break some slow running tests into smaller bits so they don't time out.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2016 19:11:05 +0000 (19:11 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2016 19:11:05 +0000 (19:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=162743

Reviewed by Keith Miller.

The following tests have shown to be slow running:
    op_div.js
    op_lshift.js
    op_mod.js
    op_mul.js
    op_rshift.js
    op_sub.js
    op_urshift

These tests auto-generate permutations of values to apply to binary operations.
They also test the operations with 3 permutations of value types:
    1. VarVar - both operands variables
    2. VarConst - variable operand 1, constant / literal operand 2
    3. ConstVar - constant / literal operand 1, variable operand 2

We can prevent these tests from timing out by breaking each up to only run 1 of
the 3 permutations of value types.

* stress/op_div-ConstVar.js: Added.
* stress/op_div-VarConst.js: Added.
* stress/op_div-VarVar.js: Copied from JSTests/stress/op_div.js.
(o1.valueOf): Deleted.
* stress/op_div.js: Removed.
* stress/op_lshift-ConstVar.js: Added.
* stress/op_lshift-VarConst.js: Added.
* stress/op_lshift-VarVar.js: Copied from JSTests/stress/op_lshift.js.
(o1.valueOf): Deleted.
* stress/op_lshift.js: Removed.
* stress/op_mod-ConstVar.js: Added.
* stress/op_mod-VarConst.js: Added.
* stress/op_mod-VarVar.js: Copied from JSTests/stress/op_mod.js.
(o1.valueOf): Deleted.
* stress/op_mod.js: Removed.
* stress/op_mul-ConstVar.js: Added.
* stress/op_mul-VarConst.js: Added.
* stress/op_mul-VarVar.js: Copied from JSTests/stress/op_mul.js.
(o1.valueOf): Deleted.
* stress/op_mul.js: Removed.
* stress/op_rshift-ConstVar.js: Added.
* stress/op_rshift-VarConst.js: Added.
* stress/op_rshift-VarVar.js: Copied from JSTests/stress/op_rshift.js.
(o1.valueOf): Deleted.
* stress/op_rshift.js: Removed.
* stress/op_sub-ConstVar.js: Added.
* stress/op_sub-VarConst.js: Added.
* stress/op_sub-VarVar.js: Copied from JSTests/stress/op_sub.js.
(o1.valueOf): Deleted.
* stress/op_sub.js: Removed.
* stress/op_urshift-ConstVar.js: Added.
* stress/op_urshift-VarConst.js: Added.
* stress/op_urshift-VarVar.js: Copied from JSTests/stress/op_urshift.js.
(o1.valueOf): Deleted.
* stress/op_urshift.js: Removed.
* stress/resources/binary-op-values.js: Added.
(o1.valueOf):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206600 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
JSTests/ChangeLog
JSTests/stress/op_div-ConstVar.js [new file with mode: 0644]
JSTests/stress/op_div-VarConst.js [new file with mode: 0644]
JSTests/stress/op_div-VarVar.js [new file with mode: 0644]
JSTests/stress/op_div.js [deleted file]
JSTests/stress/op_lshift-ConstVar.js [new file with mode: 0644]
JSTests/stress/op_lshift-VarConst.js [new file with mode: 0644]
JSTests/stress/op_lshift-VarVar.js [new file with mode: 0644]
JSTests/stress/op_mod-ConstVar.js [new file with mode: 0644]
JSTests/stress/op_mod-VarConst.js [new file with mode: 0644]
JSTests/stress/op_mod-VarVar.js [new file with mode: 0644]
JSTests/stress/op_mod.js [deleted file]
JSTests/stress/op_mul-ConstVar.js [new file with mode: 0644]
JSTests/stress/op_mul-VarConst.js [new file with mode: 0644]
JSTests/stress/op_mul-VarVar.js [new file with mode: 0644]
JSTests/stress/op_mul.js [deleted file]
JSTests/stress/op_rshift-ConstVar.js [new file with mode: 0644]
JSTests/stress/op_rshift-VarConst.js [new file with mode: 0644]
JSTests/stress/op_rshift-VarVar.js [new file with mode: 0644]
JSTests/stress/op_rshift.js [deleted file]
JSTests/stress/op_sub-ConstVar.js [new file with mode: 0644]
JSTests/stress/op_sub-VarConst.js [new file with mode: 0644]
JSTests/stress/op_sub-VarVar.js [new file with mode: 0644]
JSTests/stress/op_sub.js [deleted file]
JSTests/stress/op_urshift-ConstVar.js [new file with mode: 0644]
JSTests/stress/op_urshift-VarConst.js [new file with mode: 0644]
JSTests/stress/op_urshift-VarVar.js [new file with mode: 0644]
JSTests/stress/op_urshift.js [deleted file]
JSTests/stress/resources/binary-op-values.js [moved from JSTests/stress/op_lshift.js with 60% similarity]

index 62dd53e..8fb8045 100644 (file)
@@ -1,3 +1,66 @@
+2016-09-29  Mark Lam  <mark.lam@apple.com>
+
+        Break some slow running tests into smaller bits so they don't time out.
+        https://bugs.webkit.org/show_bug.cgi?id=162743
+
+        Reviewed by Keith Miller.
+
+        The following tests have shown to be slow running:
+            op_div.js
+            op_lshift.js
+            op_mod.js
+            op_mul.js
+            op_rshift.js
+            op_sub.js
+            op_urshift
+
+        These tests auto-generate permutations of values to apply to binary operations.
+        They also test the operations with 3 permutations of value types:
+            1. VarVar - both operands variables
+            2. VarConst - variable operand 1, constant / literal operand 2
+            3. ConstVar - constant / literal operand 1, variable operand 2
+
+        We can prevent these tests from timing out by breaking each up to only run 1 of
+        the 3 permutations of value types.
+
+        * stress/op_div-ConstVar.js: Added.
+        * stress/op_div-VarConst.js: Added.
+        * stress/op_div-VarVar.js: Copied from JSTests/stress/op_div.js.
+        (o1.valueOf): Deleted.
+        * stress/op_div.js: Removed.
+        * stress/op_lshift-ConstVar.js: Added.
+        * stress/op_lshift-VarConst.js: Added.
+        * stress/op_lshift-VarVar.js: Copied from JSTests/stress/op_lshift.js.
+        (o1.valueOf): Deleted.
+        * stress/op_lshift.js: Removed.
+        * stress/op_mod-ConstVar.js: Added.
+        * stress/op_mod-VarConst.js: Added.
+        * stress/op_mod-VarVar.js: Copied from JSTests/stress/op_mod.js.
+        (o1.valueOf): Deleted.
+        * stress/op_mod.js: Removed.
+        * stress/op_mul-ConstVar.js: Added.
+        * stress/op_mul-VarConst.js: Added.
+        * stress/op_mul-VarVar.js: Copied from JSTests/stress/op_mul.js.
+        (o1.valueOf): Deleted.
+        * stress/op_mul.js: Removed.
+        * stress/op_rshift-ConstVar.js: Added.
+        * stress/op_rshift-VarConst.js: Added.
+        * stress/op_rshift-VarVar.js: Copied from JSTests/stress/op_rshift.js.
+        (o1.valueOf): Deleted.
+        * stress/op_rshift.js: Removed.
+        * stress/op_sub-ConstVar.js: Added.
+        * stress/op_sub-VarConst.js: Added.
+        * stress/op_sub-VarVar.js: Copied from JSTests/stress/op_sub.js.
+        (o1.valueOf): Deleted.
+        * stress/op_sub.js: Removed.
+        * stress/op_urshift-ConstVar.js: Added.
+        * stress/op_urshift-VarConst.js: Added.
+        * stress/op_urshift-VarVar.js: Copied from JSTests/stress/op_urshift.js.
+        (o1.valueOf): Deleted.
+        * stress/op_urshift.js: Removed.
+        * stress/resources/binary-op-values.js: Added.
+        (o1.valueOf):
+
 2016-09-29  Joseph Pecoraro  <pecoraro@apple.com>
 
         test262: class and function names should be inferred in assignment
diff --git a/JSTests/stress/op_div-ConstVar.js b/JSTests/stress/op_div-ConstVar.js
new file mode 100644 (file)
index 0000000..f1bd0bc
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "div";
+var op = "/";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "ConstVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_div-VarConst.js b/JSTests/stress/op_div-VarConst.js
new file mode 100644 (file)
index 0000000..04ccb0e
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "div";
+var op = "/";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarConst", values, values);
+
+run();
diff --git a/JSTests/stress/op_div-VarVar.js b/JSTests/stress/op_div-VarVar.js
new file mode 100644 (file)
index 0000000..e187efc
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "div";
+var op = "/";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_div.js b/JSTests/stress/op_div.js
deleted file mode 100644 (file)
index a8086df..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-//@ runFTLNoCJIT
-
-// If all goes well, this test module will terminate silently. If not, it will print
-// errors. See binary-op-test.js for debugging options if needed.
-
-load("./resources/binary-op-test.js");
-
-//============================================================================
-// Test configuration data:
-
-var opName = "div";
-var op = "/";
-
-var o1 = {
-    valueOf: function() { return 10; }
-};
-
-var posInfinity = 1 / 0;
-var negInfinity = -1 / 0;
-
-var values = [
-    'o1',
-    'null',
-    'undefined',
-    'true',
-    'false',
-
-    'NaN',
-    'posInfinity',
-    'negInfinity',
-    '100.2', // Some random small double value.
-    '-100.2',
-    '54294967296.2923', // Some random large double value.
-    '-54294967296.2923',
-
-    '0',
-    '-0',
-    '1',
-    '-1',
-    '0x3fff',
-    '-0x3fff',
-    '0x7fff',
-    '-0x7fff',
-    '0x10000',
-    '-0x10000',
-    '0x7fffffff',
-    '-0x7fffffff',
-    '0x100000000',
-    '-0x100000000',
-
-    '"abc"',
-    '"0"',
-    '"-0"',
-    '"1"',
-    '"-1"',
-    '"0x3fff"',
-    '"-0x3fff"',
-    '"0x7fff"',
-    '"-0x7fff"',
-    '"0x10000"',
-    '"-0x10000"',
-    '"0x7fffffff"',
-    '"-0x7fffffff"',
-    '"0x100000000"',
-    '"-0x100000000"',
-];
-
-tests = [];
-generateBinaryTests(tests, opName, op, "VarVar", values, values);
-generateBinaryTests(tests, opName, op, "VarConst", values, values);
-generateBinaryTests(tests, opName, op, "ConstVar", values, values);
-
-run();
diff --git a/JSTests/stress/op_lshift-ConstVar.js b/JSTests/stress/op_lshift-ConstVar.js
new file mode 100644 (file)
index 0000000..c0b3994
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "lshift";
+var op = "<<";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "ConstVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_lshift-VarConst.js b/JSTests/stress/op_lshift-VarConst.js
new file mode 100644 (file)
index 0000000..0e32ba6
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "lshift";
+var op = "<<";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarConst", values, values);
+
+run();
diff --git a/JSTests/stress/op_lshift-VarVar.js b/JSTests/stress/op_lshift-VarVar.js
new file mode 100644 (file)
index 0000000..87349b8
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "lshift";
+var op = "<<";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_mod-ConstVar.js b/JSTests/stress/op_mod-ConstVar.js
new file mode 100644 (file)
index 0000000..3903b0a
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "mod";
+var op = "%";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "ConstVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_mod-VarConst.js b/JSTests/stress/op_mod-VarConst.js
new file mode 100644 (file)
index 0000000..9b50078
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "mod";
+var op = "%";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarConst", values, values);
+
+run();
diff --git a/JSTests/stress/op_mod-VarVar.js b/JSTests/stress/op_mod-VarVar.js
new file mode 100644 (file)
index 0000000..531253d
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "mod";
+var op = "%";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_mod.js b/JSTests/stress/op_mod.js
deleted file mode 100644 (file)
index 666ac71..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-//@ runFTLNoCJIT
-
-// If all goes well, this test module will terminate silently. If not, it will print
-// errors. See binary-op-test.js for debugging options if needed.
-
-load("./resources/binary-op-test.js");
-
-//============================================================================
-// Test configuration data:
-
-var opName = "mod";
-var op = "%";
-
-var o1 = {
-    valueOf: function() { return 10; }
-};
-
-var posInfinity = 1 / 0;
-var negInfinity = -1 / 0;
-
-var values = [
-    'o1',
-    'null',
-    'undefined',
-    'true',
-    'false',
-
-    'NaN',
-    'posInfinity',
-    'negInfinity',
-    '100.2', // Some random small double value.
-    '-100.2',
-    '54294967296.2923', // Some random large double value.
-    '-54294967296.2923',
-
-    '0',
-    '-0',
-    '1',
-    '-1',
-    '0x3fff',
-    '-0x3fff',
-    '0x7fff',
-    '-0x7fff',
-    '0x10000',
-    '-0x10000',
-    '0x7ffffff',
-    '-0x7ffffff',
-    '0x100000000',
-    '-0x100000000',
-
-    '"abc"',
-    '"0"',
-    '"-0"',
-    '"1"',
-    '"-1"',
-    '"0x3fff"',
-    '"-0x3fff"',
-    '"0x7fff"',
-    '"-0x7fff"',
-    '"0x10000"',
-    '"-0x10000"',
-    '"0x7ffffff"',
-    '"-0x7ffffff"',
-    '"0x100000000"',
-    '"-0x100000000"',
-];
-
-tests = [];
-generateBinaryTests(tests, opName, op, "VarVar", values, values);
-generateBinaryTests(tests, opName, op, "VarConst", values, values);
-generateBinaryTests(tests, opName, op, "ConstVar", values, values);
-
-run();
diff --git a/JSTests/stress/op_mul-ConstVar.js b/JSTests/stress/op_mul-ConstVar.js
new file mode 100644 (file)
index 0000000..c7fc287
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "mul";
+var op = "*";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "ConstVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_mul-VarConst.js b/JSTests/stress/op_mul-VarConst.js
new file mode 100644 (file)
index 0000000..74b10e7
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "mul";
+var op = "*";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarConst", values, values);
+
+run();
diff --git a/JSTests/stress/op_mul-VarVar.js b/JSTests/stress/op_mul-VarVar.js
new file mode 100644 (file)
index 0000000..27bfcda
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "mul";
+var op = "*";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_mul.js b/JSTests/stress/op_mul.js
deleted file mode 100644 (file)
index a7babad..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-//@ runFTLNoCJIT
-
-// If all goes well, this test module will terminate silently. If not, it will print
-// errors. See binary-op-test.js for debugging options if needed.
-
-load("./resources/binary-op-test.js");
-
-//============================================================================
-// Test configuration data:
-
-var opName = "mul";
-var op = "*";
-
-var o1 = {
-    valueOf: function() { return 10; }
-};
-
-var posInfinity = 1 / 0;
-var negInfinity = -1 / 0;
-
-var values = [
-    'o1',
-    'null',
-    'undefined',
-    'true',
-    'false',
-
-    'NaN',
-    'posInfinity',
-    'negInfinity',
-    '100.2', // Some random small double value.
-    '-100.2',
-    '54294967296.2923', // Some random large double value.
-    '-54294967296.2923',
-
-    '0',
-    '-0',
-    '1',
-    '-1',
-    '0x3fff',
-    '-0x3fff',
-    '0x7fff',
-    '-0x7fff',
-    '0x10000',
-    '-0x10000',
-    '0x7fffffff',
-    '-0x7fffffff',
-    '0x100000000',
-    '-0x100000000',
-
-    '"abc"',
-    '"0"',
-    '"-0"',
-    '"1"',
-    '"-1"',
-    '"0x3fff"',
-    '"-0x3fff"',
-    '"0x7fff"',
-    '"-0x7fff"',
-    '"0x10000"',
-    '"-0x10000"',
-    '"0x7fffffff"',
-    '"-0x7fffffff"',
-    '"0x100000000"',
-    '"-0x100000000"',
-];
-
-tests = [];
-generateBinaryTests(tests, opName, op, "VarVar", values, values);
-generateBinaryTests(tests, opName, op, "VarConst", values, values);
-generateBinaryTests(tests, opName, op, "ConstVar", values, values);
-
-run();
diff --git a/JSTests/stress/op_rshift-ConstVar.js b/JSTests/stress/op_rshift-ConstVar.js
new file mode 100644 (file)
index 0000000..f059931
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "rshift";
+var op = ">>";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "ConstVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_rshift-VarConst.js b/JSTests/stress/op_rshift-VarConst.js
new file mode 100644 (file)
index 0000000..100cd9b
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "rshift";
+var op = ">>";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarConst", values, values);
+
+run();
diff --git a/JSTests/stress/op_rshift-VarVar.js b/JSTests/stress/op_rshift-VarVar.js
new file mode 100644 (file)
index 0000000..116660d
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "rshift";
+var op = ">>";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_rshift.js b/JSTests/stress/op_rshift.js
deleted file mode 100644 (file)
index 678c85b..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-//@ runFTLNoCJIT
-
-// If all goes well, this test module will terminate silently. If not, it will print
-// errors. See binary-op-test.js for debugging options if needed.
-
-load("./resources/binary-op-test.js");
-
-//============================================================================
-// Test configuration data:
-
-var opName = "rshift";
-var op = ">>";
-
-var o1 = {
-    valueOf: function() { return 10; }
-};
-
-var posInfinity = 1 / 0;
-var negInfinity = -1 / 0;
-
-var values = [
-    'o1',
-    'null',
-    'undefined',
-    'true',
-    'false',
-
-    'NaN',
-    'posInfinity',
-    'negInfinity',
-    '100.2', // Some random small double value.
-    '-100.2',
-    '2147483647.5', // Value that will get truncated down to 0x7fffffff.
-    '-2147483647.5',
-    '54294967296.2923', // Some random large double value.
-    '-54294967296.2923',
-
-    '0',
-    '-0',
-    '1',
-    '-1',
-    '5',
-    '-5',
-    '31',
-    '-31',
-    '32',
-    '-32',
-    '0x3fff',
-    '-0x3fff',
-    '0x7fff',
-    '-0x7fff',
-    '0x10000',
-    '-0x10000',
-    '0x7fffffff',
-    '-0x7fffffff',
-    '0x100000000',
-    '-0x100000000',
-
-    '"abc"',
-    '"0"',
-    '"-0"',
-    '"1"',
-    '"-1"',
-    '"5"',
-    '"-5"',
-    '"31"',
-    '"-31"',
-    '"32"',
-    '"-32"',
-    '"0x3fff"',
-    '"-0x3fff"',
-];
-
-tests = [];
-generateBinaryTests(tests, opName, op, "VarVar", values, values);
-generateBinaryTests(tests, opName, op, "VarConst", values, values);
-generateBinaryTests(tests, opName, op, "ConstVar", values, values);
-
-run();
diff --git a/JSTests/stress/op_sub-ConstVar.js b/JSTests/stress/op_sub-ConstVar.js
new file mode 100644 (file)
index 0000000..75bbd5b
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "sub";
+var op = "-";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "ConstVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_sub-VarConst.js b/JSTests/stress/op_sub-VarConst.js
new file mode 100644 (file)
index 0000000..a61190a
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "sub";
+var op = "-";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarConst", values, values);
+
+run();
diff --git a/JSTests/stress/op_sub-VarVar.js b/JSTests/stress/op_sub-VarVar.js
new file mode 100644 (file)
index 0000000..629e80b
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "sub";
+var op = "-";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_sub.js b/JSTests/stress/op_sub.js
deleted file mode 100644 (file)
index cbcc41c..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-//@ runFTLNoCJIT
-
-// If all goes well, this test module will terminate silently. If not, it will print
-// errors. See binary-op-test.js for debugging options if needed.
-
-load("./resources/binary-op-test.js");
-
-//============================================================================
-// Test configuration data:
-
-var opName = "sub";
-var op = "-";
-
-var o1 = {
-    valueOf: function() { return 10; }
-};
-
-var posInfinity = 1 / 0;
-var negInfinity = -1 / 0;
-
-var values = [
-    'o1',
-    'null',
-    'undefined',
-    'true',
-    'false',
-
-    'NaN',
-    'posInfinity',
-    'negInfinity',
-    '100.2', // Some random small double value.
-    '-100.2',
-    '54294967296.2923', // Some random large double value.
-    '-54294967296.2923',
-
-    '0',
-    '-0',
-    '1',
-    '-1',
-    '0x3fff',
-    '-0x3fff',
-    '0x7fff',
-    '-0x7fff',
-    '0x10000',
-    '-0x10000',
-    '0x7ffffff',
-    '-0x7ffffff',
-    '0x100000000',
-    '-0x100000000',
-
-    '"abc"',
-    '"0"',
-    '"-0"',
-    '"1"',
-    '"-1"',
-    '"0x3fff"',
-    '"-0x3fff"',
-    '"0x7fff"',
-    '"-0x7fff"',
-    '"0x10000"',
-    '"-0x10000"',
-    '"0x7ffffff"',
-    '"-0x7ffffff"',
-    '"0x100000000"',
-    '"-0x100000000"',
-];
-
-tests = [];
-generateBinaryTests(tests, opName, op, "VarVar", values, values);
-generateBinaryTests(tests, opName, op, "VarConst", values, values);
-generateBinaryTests(tests, opName, op, "ConstVar", values, values);
-
-run();
diff --git a/JSTests/stress/op_urshift-ConstVar.js b/JSTests/stress/op_urshift-ConstVar.js
new file mode 100644 (file)
index 0000000..fdee0be
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "urshift";
+var op = ">>>";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "ConstVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_urshift-VarConst.js b/JSTests/stress/op_urshift-VarConst.js
new file mode 100644 (file)
index 0000000..8b4aced
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "urshift";
+var op = ">>>";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarConst", values, values);
+
+run();
diff --git a/JSTests/stress/op_urshift-VarVar.js b/JSTests/stress/op_urshift-VarVar.js
new file mode 100644 (file)
index 0000000..cb14aed
--- /dev/null
@@ -0,0 +1,19 @@
+//@ runFTLNoCJIT
+
+// If all goes well, this test module will terminate silently. If not, it will print
+// errors. See binary-op-test.js for debugging options if needed.
+
+load("./resources/binary-op-test.js");
+
+//============================================================================
+// Test configuration data:
+
+var opName = "urshift";
+var op = ">>>";
+
+load("./resources/binary-op-values.js");
+
+tests = [];
+generateBinaryTests(tests, opName, op, "VarVar", values, values);
+
+run();
diff --git a/JSTests/stress/op_urshift.js b/JSTests/stress/op_urshift.js
deleted file mode 100644 (file)
index 6d0888e..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-//@ runFTLNoCJIT
-
-// If all goes well, this test module will terminate silently. If not, it will print
-// errors. See binary-op-test.js for debugging options if needed.
-
-load("./resources/binary-op-test.js");
-
-//============================================================================
-// Test configuration data:
-
-var opName = "urshift";
-var op = ">>>";
-
-var o1 = {
-    valueOf: function() { return 10; }
-};
-
-var posInfinity = 1 / 0;
-var negInfinity = -1 / 0;
-
-var values = [
-    'o1',
-    'null',
-    'undefined',
-    'true',
-    'false',
-
-    'NaN',
-    'posInfinity',
-    'negInfinity',
-    '100.2', // Some random small double value.
-    '-100.2',
-    '2147483647.5', // Value that will get truncated down to 0x7fffffff.
-    '-2147483647.5',
-    '54294967296.2923', // Some random large double value.
-    '-54294967296.2923',
-
-    '0',
-    '-0',
-    '1',
-    '-1',
-    '5',
-    '-5',
-    '31',
-    '-31',
-    '32',
-    '-32',
-    '0x3fff',
-    '-0x3fff',
-    '0x7fff',
-    '-0x7fff',
-    '0x10000',
-    '-0x10000',
-    '0x7fffffff',
-    '-0x7fffffff',
-    '0x100000000',
-    '-0x100000000',
-
-    '"abc"',
-    '"0"',
-    '"-0"',
-    '"1"',
-    '"-1"',
-    '"5"',
-    '"-5"',
-    '"31"',
-    '"-31"',
-    '"32"',
-    '"-32"',
-    '"0x3fff"',
-    '"-0x3fff"',
-];
-
-tests = [];
-generateBinaryTests(tests, opName, op, "VarVar", values, values);
-generateBinaryTests(tests, opName, op, "VarConst", values, values);
-generateBinaryTests(tests, opName, op, "ConstVar", values, values);
-
-run();
similarity index 60%
rename from JSTests/stress/op_lshift.js
rename to JSTests/stress/resources/binary-op-values.js
index e0935df..c9c35e3 100644 (file)
@@ -1,15 +1,4 @@
-//@ runFTLNoCJIT
-
-// If all goes well, this test module will terminate silently. If not, it will print
-// errors. See binary-op-test.js for debugging options if needed.
-
-load("./resources/binary-op-test.js");
-
-//============================================================================
-// Test configuration data:
-
-var opName = "lshift";
-var op = "<<";
+// This file provides values that may be interesting for testing binary operations.
 
 var o1 = {
     valueOf: function() { return 10; }
@@ -30,7 +19,7 @@ var values = [
     'negInfinity',
     '100.2', // Some random small double value.
     '-100.2',
-    '2147483647.5', // Value that will get truncated down to 0x7fffffff.
+    '2147483647.5', // Value that will get truncated down to 0x7fffffff (by shift ops).
     '-2147483647.5',
     '54294967296.2923', // Some random large double value.
     '-54294967296.2923',
@@ -51,6 +40,8 @@ var values = [
     '-0x7fff',
     '0x10000',
     '-0x10000',
+    '0x7ffffff',
+    '-0x7ffffff',
     '0x7fffffff',
     '-0x7fffffff',
     '0x100000000',
@@ -69,11 +60,14 @@ var values = [
     '"-32"',
     '"0x3fff"',
     '"-0x3fff"',
+    '"0x7fff"',
+    '"-0x7fff"',
+    '"0x10000"',
+    '"-0x10000"',
+    '"0x7ffffff"',
+    '"-0x7ffffff"',
+    '"0x7fffffff"',
+    '"-0x7fffffff"',
+    '"0x100000000"',
+    '"-0x100000000"',
 ];
-
-tests = [];
-generateBinaryTests(tests, opName, op, "VarVar", values, values);
-generateBinaryTests(tests, opName, op, "VarConst", values, values);
-generateBinaryTests(tests, opName, op, "ConstVar", values, values);
-
-run();