diff --git a/implementation-contributed/curation_logs/javascriptcore.json b/implementation-contributed/curation_logs/javascriptcore.json index 76fda8a3c642072628abc042eafcf8127392a678..89a1559e81d52712d30109efbc7dfdd2769fb502 100644 --- a/implementation-contributed/curation_logs/javascriptcore.json +++ b/implementation-contributed/curation_logs/javascriptcore.json @@ -1,6 +1,6 @@ { - "sourceRevisionAtLastExport": "e7f9d46220", - "targetRevisionAtLastExport": "0210918f1e", + "sourceRevisionAtLastExport": "60ed1be8cd", + "targetRevisionAtLastExport": "31e654a339", "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-bitwise-xor-jit.js b/implementation-contributed/javascriptcore/stress/big-int-bitwise-xor-jit.js new file mode 100644 index 0000000000000000000000000000000000000000..3c3934b77cf13ff9dcb8eaeb14910bb6dcc916a0 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/big-int-bitwise-xor-jit.js @@ -0,0 +1,25 @@ +//@ runBigIntEnabled + +let assert = { + sameValue: function(i, e) { + if (i !== e) + throw new Error(m); + } +} + +function bigIntBitXor(a, b) { + return (a ^ b) ^ (a ^ 0b11n); + +} +noInline(bigIntBitXor); + +for (let i = 0; i < 10000; i++) { + let r = bigIntBitXor(0b11n, 0b1010n); + assert.sameValue(r, 0b1001n); +} + +for (let i = 0; i < 10000; i++) { + let r = bigIntBitXor(0xfffafafaf19281fefafeafebcn, 0b1010n); + assert.sameValue(r, 0b1001n); +} + diff --git a/implementation-contributed/javascriptcore/stress/big-int-bitwise-xor-memory-stress.js b/implementation-contributed/javascriptcore/stress/big-int-bitwise-xor-memory-stress.js new file mode 100644 index 0000000000000000000000000000000000000000..636ad2716a2a5b351ad6c60e45e7b29a22e90e58 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/big-int-bitwise-xor-memory-stress.js @@ -0,0 +1,14 @@ +//@ runBigIntEnabled + +function assert(a) { + if (!a) + throw new Error("Bad assertion"); +} + +let a = 0b11n; +for (let i = 0; i < 1000000; i++) { + a ^= 0b01n; +} + +assert(a === 0b11n); + diff --git a/implementation-contributed/javascriptcore/stress/big-int-bitwise-xor-untyped.js b/implementation-contributed/javascriptcore/stress/big-int-bitwise-xor-untyped.js new file mode 100644 index 0000000000000000000000000000000000000000..934e099be7532cc9e74c827b4c5baa6a66e7891f --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/big-int-bitwise-xor-untyped.js @@ -0,0 +1,26 @@ +//@ runBigIntEnabled + +function assert(v, e) { + if (v !== e) + throw new Error("Expected value: " + e + " but got: " + v) +} + +function bigIntOperations(a, b) { + let c = a ^ b; + return a ^ c; +} +noInline(bigIntOperations); + +c = 0; +let o = { valueOf: function () { + c++; + return 0b1111n; +}}; + +for (let i = 0; i < 100000; i++) { + let out = bigIntOperations(o, 0b1010n); + assert(out, 0b1010n); +} + +assert(c, 200000); +