diff --git a/implementation-contributed/javascriptcore/stress/op_add.js b/implementation-contributed/javascriptcore/stress/op_add.js new file mode 100644 index 0000000000000000000000000000000000000000..65679b43aec5939a642ca82ea09510227df19ddc --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_add.js @@ -0,0 +1,66 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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 = "add"; +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"', +]; + +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/implementation-contributed/javascriptcore/stress/op_bitand.js b/implementation-contributed/javascriptcore/stress/op_bitand.js new file mode 100644 index 0000000000000000000000000000000000000000..1bc61a00eb42fe4751fd1a637847a949728fc6c3 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_bitand.js @@ -0,0 +1,72 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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 = "bitand"; +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', + '0xa5a5a5a5', + '0x100000000', + '-0x100000000', + + '"abc"', + '"0"', + '"-0"', + '"1"', + '"-1"', + '"0x7fffffff"', + '"-0x7fffffff"', + '"0xa5a5a5a5"', + '"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/implementation-contributed/javascriptcore/stress/op_bitor.js b/implementation-contributed/javascriptcore/stress/op_bitor.js new file mode 100644 index 0000000000000000000000000000000000000000..685e2362412fc63a869fa174aa1bf51cb4780494 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_bitor.js @@ -0,0 +1,72 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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 = "bitor"; +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', + '0xa5a5a5a5', + '0x100000000', + '-0x100000000', + + '"abc"', + '"0"', + '"-0"', + '"1"', + '"-1"', + '"0x7fffffff"', + '"-0x7fffffff"', + '"0xa5a5a5a5"', + '"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/implementation-contributed/javascriptcore/stress/op_bitxor.js b/implementation-contributed/javascriptcore/stress/op_bitxor.js new file mode 100644 index 0000000000000000000000000000000000000000..e05fa5d78a8e683a52a8845e98ead66915836eb8 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_bitxor.js @@ -0,0 +1,72 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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 = "bitxor"; +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', + '0xa5a5a5a5', + '0x100000000', + '-0x100000000', + + '"abc"', + '"0"', + '"-0"', + '"1"', + '"-1"', + '"0x7fffffff"', + '"-0x7fffffff"', + '"0xa5a5a5a5"', + '"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/implementation-contributed/javascriptcore/stress/op_lshift-ConstVar.js b/implementation-contributed/javascriptcore/stress/op_lshift-ConstVar.js new file mode 100644 index 0000000000000000000000000000000000000000..0feac842b0f605555db74065f2c0456b54def540 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_lshift-ConstVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_lshift-VarConst.js b/implementation-contributed/javascriptcore/stress/op_lshift-VarConst.js new file mode 100644 index 0000000000000000000000000000000000000000..3345eee26b489d657f85341ae6d063b482846ca0 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_lshift-VarConst.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_lshift-VarVar.js b/implementation-contributed/javascriptcore/stress/op_lshift-VarVar.js new file mode 100644 index 0000000000000000000000000000000000000000..5c20cc3b79d9718e617e363044fe29e1e5d9e997 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_lshift-VarVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_mod-ConstVar.js b/implementation-contributed/javascriptcore/stress/op_mod-ConstVar.js new file mode 100644 index 0000000000000000000000000000000000000000..f7d439f82abf2d5aaad55bb5e309a3f61c84ee0a --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_mod-ConstVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ runFTLNoCJIT("--timeoutMultiplier=1.5") + +// 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/implementation-contributed/javascriptcore/stress/op_mod-VarConst.js b/implementation-contributed/javascriptcore/stress/op_mod-VarConst.js new file mode 100644 index 0000000000000000000000000000000000000000..97bdcf26faf3802569dbd7bf05667bd244cb5087 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_mod-VarConst.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ runFTLNoCJIT("--timeoutMultiplier=1.5") + +// 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/implementation-contributed/javascriptcore/stress/op_mod-VarVar.js b/implementation-contributed/javascriptcore/stress/op_mod-VarVar.js new file mode 100644 index 0000000000000000000000000000000000000000..4d321700f883cfcc4abaa789661a068f7d44b619 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_mod-VarVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ runFTLNoCJIT("--timeoutMultiplier=1.5") + +// 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/implementation-contributed/javascriptcore/stress/op_mul-ConstVar.js b/implementation-contributed/javascriptcore/stress/op_mul-ConstVar.js new file mode 100644 index 0000000000000000000000000000000000000000..934926afb91f1580bee9bc4a3aec4e52dbef828f --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_mul-ConstVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_mul-VarConst.js b/implementation-contributed/javascriptcore/stress/op_mul-VarConst.js new file mode 100644 index 0000000000000000000000000000000000000000..e7c617bfd170167282bef712af66cbca671d6b73 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_mul-VarConst.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_mul-VarVar.js b/implementation-contributed/javascriptcore/stress/op_mul-VarVar.js new file mode 100644 index 0000000000000000000000000000000000000000..ec1225bca2bb7fe2282442e1700144a70f7ccab1 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_mul-VarVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_rshift-ConstVar.js b/implementation-contributed/javascriptcore/stress/op_rshift-ConstVar.js new file mode 100644 index 0000000000000000000000000000000000000000..b6d65bccd713a6d24dd097518f1c69ed4f78efbb --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_rshift-ConstVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_rshift-VarConst.js b/implementation-contributed/javascriptcore/stress/op_rshift-VarConst.js new file mode 100644 index 0000000000000000000000000000000000000000..ab46fcdb3476b02db6127577ac22333f3d233486 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_rshift-VarConst.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_rshift-VarVar.js b/implementation-contributed/javascriptcore/stress/op_rshift-VarVar.js new file mode 100644 index 0000000000000000000000000000000000000000..02c5b4112bd363c850edc4d13d74e366234bfb7b --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_rshift-VarVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_sub-ConstVar.js b/implementation-contributed/javascriptcore/stress/op_sub-ConstVar.js new file mode 100644 index 0000000000000000000000000000000000000000..9e94c2b0ce62770c9797e2e562c836010fe746ca --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_sub-ConstVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_sub-VarConst.js b/implementation-contributed/javascriptcore/stress/op_sub-VarConst.js new file mode 100644 index 0000000000000000000000000000000000000000..5223846d688b18663f01d7d9b1d605aac2d18a90 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_sub-VarConst.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_sub-VarVar.js b/implementation-contributed/javascriptcore/stress/op_sub-VarVar.js new file mode 100644 index 0000000000000000000000000000000000000000..e8bbc154005114230ab04cc1fb1f6cfd0928ec23 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_sub-VarVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_urshift-ConstVar.js b/implementation-contributed/javascriptcore/stress/op_urshift-ConstVar.js new file mode 100644 index 0000000000000000000000000000000000000000..82312fe5c862ce0c5aeab7b1340ccf35259d3b87 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_urshift-ConstVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_urshift-VarConst.js b/implementation-contributed/javascriptcore/stress/op_urshift-VarConst.js new file mode 100644 index 0000000000000000000000000000000000000000..491153b43adea5c69d31d7ad567af208b8ff1140 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_urshift-VarConst.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/op_urshift-VarVar.js b/implementation-contributed/javascriptcore/stress/op_urshift-VarVar.js new file mode 100644 index 0000000000000000000000000000000000000000..5b6f5cb739e84a70413a97c997421cba91f07c04 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/op_urshift-VarVar.js @@ -0,0 +1,22 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ 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/implementation-contributed/javascriptcore/stress/spread-forward-call-varargs-stack-overflow.js b/implementation-contributed/javascriptcore/stress/spread-forward-call-varargs-stack-overflow.js new file mode 100644 index 0000000000000000000000000000000000000000..ec1339b5cac544753146d51c7e3e54f9719088d3 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/spread-forward-call-varargs-stack-overflow.js @@ -0,0 +1,61 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "arm" +//@ skip if $architecture == "x86" +function assert(b) { + if (!b) + throw new Error("Bad assertion"); +} +noInline(assert); + +function identity(a) { return a; } +noInline(identity); + +function bar(...args) { + return args; +} +noInline(bar); + +function foo(a, ...args) { + let arg = identity(a); + try { + let r = bar(...args, ...args); + return r; + } catch(e) { + return arg; + } +} +noInline(foo); + +for (let i = 0; i < 40000; i++) { + let args = []; + for (let i = 0; i < 400; i++) { + args.push(i); + } + + let o = {}; + let r = foo(o, ...args); + let i = 0; + for (let arg of args) { + assert(r[i] === arg); + i++; + } + for (let arg of args) { + assert(r[i] === arg); + i++; + } +} + +for (let i = 0; i < 20; i++) { + let threw = false; + let o = {}; + let args = []; + let argCount = maxArguments() * (2/3); + argCount = argCount | 0; + for (let i = 0; i < argCount; i++) { + args.push(i); + } + + let r = foo(o, ...args); + assert(r === o); +} diff --git a/implementation-contributed/javascriptcore/stress/value-to-boolean.js b/implementation-contributed/javascriptcore/stress/value-to-boolean.js new file mode 100644 index 0000000000000000000000000000000000000000..f1c0a74530771702c2da11b86cd13c0101683373 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/value-to-boolean.js @@ -0,0 +1,70 @@ +// FIXME: unskip when this is solved +// https://bugs.webkit.org/show_bug.cgi?id=191163 +//@ skip if $architecture == "mips" or $architecture == "arm" +//@ if $buildType == "release" then runDefault else skip end + +function assert(b) { + if (!b) + throw new Error("Bad assertion") +} +noInline(assert); + +let tests = [ + [true, true], + [false, false], + ["", false], + ["" + "" + "", false], + ["foo", true], + ["foo" + "bar", true], + [{}, true], + [Symbol(), true], + [undefined, false], + [null, false], + [0, false], + [-0, false], + [+0, false], + [NaN, false], + [10, true], + [10.2012, true], + [function() { }, true], + [new String("foo"), true], + [new String(""), true], + [new String, true] +]; + +function test1(c) { + return !!c; +} +noInline(test1); + +function test2(c) { + if (c) + return true; + return false; +} +noInline(test2); + +function test3(c) { + if (!c) + return false; + return true; +} +noInline(test3); + +let testFunctions = [test1, test2, test3]; + +for (let testFunction of testFunctions) { + for (let i = 0; i < 10000; i++) { + let item = tests[i % tests.length]; + assert(testFunction(item[0]) === item[1]); + } +} + +let masquerader = makeMasquerader(); +for (let testFunction of testFunctions) { + for (let i = 0; i < 10000; i++) { + for (let i = 0; i < 10000; i++) { + assert(testFunction(masquerader) === false); + } + } +}