From de9e5de9533a697e4cb2e03ff74cfbfe698f1e88 Mon Sep 17 00:00:00 2001 From: test262-automation Date: Mon, 10 Dec 2018 19:17:47 +0000 Subject: [PATCH] [javascriptcore-test262-automation] Updated curation log with latest revision sha's from export and changed files. sourceRevisionAtLastExport: 205489c4f0 targetRevisionAtLastExport: cab19d71a6 --- .../curation_logs/javascriptcore.json | 4 +- .../stress/big-int-branch-usage.js | 23 +++++++ .../stress/big-int-logical-and.js | 20 ++++++ .../stress/big-int-logical-not.js | 20 ++++++ .../stress/big-int-logical-or.js | 20 ++++++ .../stress/big-wasm-memory-grow-no-max.js | 69 +++++++++++-------- .../stress/big-wasm-memory-grow.js | 69 +++++++++++-------- .../javascriptcore/stress/big-wasm-memory.js | 65 +++++++++-------- .../javascriptcore/stress/regress-192386.js | 12 ++++ .../javascriptcore/stress/regress-192441.js | 12 ++++ 10 files changed, 227 insertions(+), 87 deletions(-) create mode 100644 implementation-contributed/javascriptcore/stress/big-int-branch-usage.js create mode 100644 implementation-contributed/javascriptcore/stress/big-int-logical-and.js create mode 100644 implementation-contributed/javascriptcore/stress/big-int-logical-not.js create mode 100644 implementation-contributed/javascriptcore/stress/big-int-logical-or.js create mode 100644 implementation-contributed/javascriptcore/stress/regress-192386.js create mode 100644 implementation-contributed/javascriptcore/stress/regress-192441.js diff --git a/implementation-contributed/curation_logs/javascriptcore.json b/implementation-contributed/curation_logs/javascriptcore.json index face9658cd..27203617a9 100644 --- a/implementation-contributed/curation_logs/javascriptcore.json +++ b/implementation-contributed/curation_logs/javascriptcore.json @@ -1,6 +1,6 @@ { - "sourceRevisionAtLastExport": "205489c4f0", - "targetRevisionAtLastExport": "cab19d71a6", + "sourceRevisionAtLastExport": "2b233fa3c0", + "targetRevisionAtLastExport": "8e3c6d0484", "curatedFiles": { "/stress/Number-isNaN-basics.js": "DELETED_IN_TARGET", "/stress/Object_static_methods_Object.getOwnPropertyDescriptors-proxy.js": "DELETED_IN_TARGET", diff --git a/implementation-contributed/javascriptcore/stress/big-int-branch-usage.js b/implementation-contributed/javascriptcore/stress/big-int-branch-usage.js new file mode 100644 index 0000000000..fa6125f0db --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/big-int-branch-usage.js @@ -0,0 +1,23 @@ +//@ runBigIntEnabled + +function assert(a, e) { + if (a !== e) { + throw new Error("Bad!"); + } +} + +function branchTest(a) { + if (a) + return a; + else + return false; +} +noInline(branchTest); + +for (let i = 0; i < 100000; i++) { + assert(branchTest(10n), 10n); + assert(branchTest(1n), 1n); + assert(branchTest(0n), false); + assert(branchTest(-1n), -1n); +} + diff --git a/implementation-contributed/javascriptcore/stress/big-int-logical-and.js b/implementation-contributed/javascriptcore/stress/big-int-logical-and.js new file mode 100644 index 0000000000..619b866ea8 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/big-int-logical-and.js @@ -0,0 +1,20 @@ +//@ runBigIntEnabled + +function assert(a, e) { + if (a !== e) { + throw new Error("Bad!"); + } +} + +function logicalAnd(a, b) { + return a && b; +} +noInline(logicalAnd); + +for (let i = 0; i < 100000; i++) { + assert(logicalAnd(1n, 10n), 10n); + assert(logicalAnd(1n, 1n), 1n); + assert(logicalAnd(1n, 0n), 0n); + assert(logicalAnd(1n, -1n), -1n); +} + diff --git a/implementation-contributed/javascriptcore/stress/big-int-logical-not.js b/implementation-contributed/javascriptcore/stress/big-int-logical-not.js new file mode 100644 index 0000000000..af28a72b1c --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/big-int-logical-not.js @@ -0,0 +1,20 @@ +//@ runBigIntEnabled + +function assert(a, e) { + if (a !== e) { + throw new Error("Bad!"); + } +} + +function logicalNot(a) { + return !a; +} +noInline(logicalNot); + +for (let i = 0; i < 100000; i++) { + assert(logicalNot(10n), false); + assert(logicalNot(1n), false); + assert(logicalNot(0n), true); + assert(logicalNot(-1n), false); +} + diff --git a/implementation-contributed/javascriptcore/stress/big-int-logical-or.js b/implementation-contributed/javascriptcore/stress/big-int-logical-or.js new file mode 100644 index 0000000000..36a2d34456 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/big-int-logical-or.js @@ -0,0 +1,20 @@ +//@ runBigIntEnabled + +function assert(a, e) { + if (a !== e) { + throw new Error("Bad!"); + } +} + +function logicalOr(a, b) { + return a || b; +} +noInline(logicalOr); + +for (let i = 0; i < 100000; i++) { + assert(logicalOr(10n, "abc"), 10n); + assert(logicalOr(1n, "abc"), 1n); + assert(logicalOr(0n, "abc"), "abc"); + assert(logicalOr(-1n, "abc"), -1n); +} + diff --git a/implementation-contributed/javascriptcore/stress/big-wasm-memory-grow-no-max.js b/implementation-contributed/javascriptcore/stress/big-wasm-memory-grow-no-max.js index 66d12c8c2e..5b80dca182 100644 --- a/implementation-contributed/javascriptcore/stress/big-wasm-memory-grow-no-max.js +++ b/implementation-contributed/javascriptcore/stress/big-wasm-memory-grow-no-max.js @@ -1,34 +1,45 @@ //@ skip if $memoryLimited -let bigArray = new Array(0x7000000); -bigArray[0] = 1.1; -bigArray[1] = 1.2; -function foo(array) { - var index = array.length; - if (index >= bigArray.length || (index - 0x1ffdc01) < 0) +function test() { + + // We don't support WebAssembly everywhere, so check for its existance before doing anything else. + if (!this.WebAssembly) return; - return bigArray[index - 0x1ffdc01]; + + let bigArray = new Array(0x7000000); + bigArray[0] = 1.1; + bigArray[1] = 1.2; + + function foo(array) { + var index = array.length; + if (index >= bigArray.length || (index - 0x1ffdc01) < 0) + return; + return bigArray[index - 0x1ffdc01]; + } + + noInline(foo); + + var okArray = new Uint8Array(0x1ffdc02); + + for (var i = 0; i < 10000; ++i) + foo(okArray); + + var ok = false; + try { + var memory = new WebAssembly.Memory({ initial: 0x1000 }); + memory.grow(0x7000); + var result = foo(new Uint8Array(memory.buffer)); + if (result !== void 0) + throw "Error: bad result at end: " + result; + ok = true; + } catch (e) { + if (e.toString() != "Error: Out of memory") + throw e; + } + + if (ok) + throw "Error: did not throw error"; + } -noInline(foo); - -var okArray = new Uint8Array(0x1ffdc02); - -for (var i = 0; i < 10000; ++i) - foo(okArray); - -var ok = false; -try { - var memory = new WebAssembly.Memory({ initial: 0x1000 }); - memory.grow(0x7000); - var result = foo(new Uint8Array(memory.buffer)); - if (result !== void 0) - throw "Error: bad result at end: " + result; - ok = true; -} catch (e) { - if (e.toString() != "Error: Out of memory") - throw e; -} - -if (ok) - throw "Error: did not throw error"; +test(); diff --git a/implementation-contributed/javascriptcore/stress/big-wasm-memory-grow.js b/implementation-contributed/javascriptcore/stress/big-wasm-memory-grow.js index 418557a47a..0e43577332 100644 --- a/implementation-contributed/javascriptcore/stress/big-wasm-memory-grow.js +++ b/implementation-contributed/javascriptcore/stress/big-wasm-memory-grow.js @@ -1,34 +1,45 @@ //@ skip if $memoryLimited -let bigArray = new Array(0x7000000); -bigArray[0] = 1.1; -bigArray[1] = 1.2; -function foo(array) { - var index = array.length; - if (index >= bigArray.length || (index - 0x1ffdc01) < 0) +function test() { + + // We don't support WebAssembly everywhere, so check for its existance before doing anything else. + if (!this.WebAssembly) return; - return bigArray[index - 0x1ffdc01]; + + let bigArray = new Array(0x7000000); + bigArray[0] = 1.1; + bigArray[1] = 1.2; + + function foo(array) { + var index = array.length; + if (index >= bigArray.length || (index - 0x1ffdc01) < 0) + return; + return bigArray[index - 0x1ffdc01]; + } + + noInline(foo); + + var okArray = new Uint8Array(0x1ffdc02); + + for (var i = 0; i < 10000; ++i) + foo(okArray); + + var ok = false; + try { + var memory = new WebAssembly.Memory({ initial: 0x1000, maximum: 0x8000 }); + memory.grow(0x7000); + var result = foo(new Uint8Array(memory.buffer)); + if (result !== void 0) + throw "Error: bad result at end: " + result; + ok = true; + } catch (e) { + if (e.toString() != "Error: Out of memory") + throw e; + } + + if (ok) + throw "Error: did not throw error"; + } -noInline(foo); - -var okArray = new Uint8Array(0x1ffdc02); - -for (var i = 0; i < 10000; ++i) - foo(okArray); - -var ok = false; -try { - var memory = new WebAssembly.Memory({ initial: 0x1000, maximum: 0x8000 }); - memory.grow(0x7000); - var result = foo(new Uint8Array(memory.buffer)); - if (result !== void 0) - throw "Error: bad result at end: " + result; - ok = true; -} catch (e) { - if (e.toString() != "Error: Out of memory") - throw e; -} - -if (ok) - throw "Error: did not throw error"; +test(); diff --git a/implementation-contributed/javascriptcore/stress/big-wasm-memory.js b/implementation-contributed/javascriptcore/stress/big-wasm-memory.js index d4deda4d38..1afad7aedc 100644 --- a/implementation-contributed/javascriptcore/stress/big-wasm-memory.js +++ b/implementation-contributed/javascriptcore/stress/big-wasm-memory.js @@ -1,32 +1,43 @@ //@ skip if $memoryLimited -let bigArray = new Array(0x7000000); -bigArray[0] = 1.1; -bigArray[1] = 1.2; -function foo(array) { - var index = array.length; - if (index >= bigArray.length || (index - 0x1ffdc01) < 0) +function test() { + + // We don't support WebAssembly everywhere, so check for its existance before doing anything else. + if (!this.WebAssembly) return; - return bigArray[index - 0x1ffdc01]; + + let bigArray = new Array(0x7000000); + bigArray[0] = 1.1; + bigArray[1] = 1.2; + + function foo(array) { + var index = array.length; + if (index >= bigArray.length || (index - 0x1ffdc01) < 0) + return; + return bigArray[index - 0x1ffdc01]; + } + + noInline(foo); + + var okArray = new Uint8Array(0x1ffdc02); + + for (var i = 0; i < 10000; ++i) + foo(okArray); + + var ok = false; + try { + var result = foo(new Uint8Array(new WebAssembly.Memory({ initial: 0x8000, maximum: 0x8000 }).buffer)); + if (result !== void 0) + throw "Error: bad result at end: " + result; + ok = true; + } catch (e) { + if (e.toString() != "Error: Out of memory") + throw e; + } + + if (ok) + throw "Error: did not throw error"; + } -noInline(foo); - -var okArray = new Uint8Array(0x1ffdc02); - -for (var i = 0; i < 10000; ++i) - foo(okArray); - -var ok = false; -try { - var result = foo(new Uint8Array(new WebAssembly.Memory({ initial: 0x8000, maximum: 0x8000 }).buffer)); - if (result !== void 0) - throw "Error: bad result at end: " + result; - ok = true; -} catch (e) { - if (e.toString() != "Error: Out of memory") - throw e; -} - -if (ok) - throw "Error: did not throw error"; +test(); diff --git a/implementation-contributed/javascriptcore/stress/regress-192386.js b/implementation-contributed/javascriptcore/stress/regress-192386.js new file mode 100644 index 0000000000..26276e053e --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/regress-192386.js @@ -0,0 +1,12 @@ +//@ requireOptions("--jitPolicyScale=0") + +function foo(x) { + try { + new x(); + } catch { + } +} + +foo(function() {}); +for (let i = 0; i < 10000; ++i) + foo(() => undefined); diff --git a/implementation-contributed/javascriptcore/stress/regress-192441.js b/implementation-contributed/javascriptcore/stress/regress-192441.js new file mode 100644 index 0000000000..e56d11a4d2 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/regress-192441.js @@ -0,0 +1,12 @@ +//@ requireOptions("--jitPolicyScale=0") + +// This test passes if it does not crash. + +let x = {} +let enUS = ['en', 'US'].join('-') +for (let i=0; i<100; i++) { + Intl.NumberFormat(enUS) +} +for (let i=0; i<10000; i++) { + x[enUS] +};