diff --git a/implementation-contributed/curation_logs/v8.json b/implementation-contributed/curation_logs/v8.json index 3ec0cd6c40ccda2c3b7cc22678154e6171dd7f26..bb680392c1b6cedec8e9662b81e9e233aa1079a6 100644 --- a/implementation-contributed/curation_logs/v8.json +++ b/implementation-contributed/curation_logs/v8.json @@ -1,5 +1,5 @@ { - "sourceRevisionAtLastExport": "3a8c8082", - "targetRevisionAtLastExport": "9166165df7", + "sourceRevisionAtLastExport": "f09bec92", + "targetRevisionAtLastExport": "bb9647dd4b", "curatedFiles": {} } \ No newline at end of file diff --git a/implementation-contributed/v8/intl/regress-903566.js b/implementation-contributed/v8/intl/regress-903566.js new file mode 100644 index 0000000000000000000000000000000000000000..9346fa63a8c60d2f08138acc9b075255e1cbae63 --- /dev/null +++ b/implementation-contributed/v8/intl/regress-903566.js @@ -0,0 +1,32 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Flags: --allow-natives-syntax + +assertDoesNotThrow(()=>(new Intl.ListFormat()).format()); +// Intl.getCanonicalLocales() will create a HOLEY_ELEMENTS array +assertDoesNotThrow(()=>(new Intl.ListFormat()).format(Intl.getCanonicalLocales())); +assertDoesNotThrow(()=>(new Intl.ListFormat()).format(Intl.getCanonicalLocales(["en","fr"]))); + +let arr = ["a","b","c"]; + +// Test under no HasHoleyElements(); +assertFalse(%HasHoleyElements(arr)); +assertDoesNotThrow(()=>(new Intl.ListFormat()).format(arr)); +for (var i = 0; i < 10000; i++) { + arr.push("xx"); +} +assertFalse(%HasHoleyElements(arr)); +assertDoesNotThrow(()=>(new Intl.ListFormat()).format(arr)); + +// Test under HasHoleyElements(); +arr[arr.length + 10] = "x"; +assertTrue(%HasHoleyElements(arr)); +assertFalse(%HasDictionaryElements(arr)); +assertThrows(()=>(new Intl.ListFormat()).format(arr), TypeError); + +// Test it work under HasDictionaryElements(); +arr = ["a","b","c"]; +arr[arr.length + 100000] = "x"; +assertTrue(%HasDictionaryElements(arr)); +assertThrows(()=>(new Intl.ListFormat()).format(arr), TypeError); diff --git a/implementation-contributed/v8/mjsunit/compiler/instance-of-overridden-has-instance.js b/implementation-contributed/v8/mjsunit/compiler/instance-of-overridden-has-instance.js new file mode 100644 index 0000000000000000000000000000000000000000..49c8899e693b5238b85650be003574e133237319 --- /dev/null +++ b/implementation-contributed/v8/mjsunit/compiler/instance-of-overridden-has-instance.js @@ -0,0 +1,106 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --allow-natives-syntax + +(function NonConstHasInstance() { + var C = { + [Symbol.hasInstance] : () => true + }; + + function f() { + return {} instanceof C; + } + + assertTrue(f()); + assertTrue(f()); + %OptimizeFunctionOnNextCall(f); + assertTrue(f()); + C[Symbol.hasInstance] = () => false; + assertFalse(f()); +})(); + +(function NumberHasInstance() { + var C = { + [Symbol.hasInstance] : 0.1 + }; + + function f(b, C) { + if (b) return {} instanceof C; + return false; + } + + function g(b) { + return f(b, C); + } + + assertFalse(f(true, Number)); + assertFalse(f(true, Number)); + assertFalse(g(false)); + assertFalse(g(false)); + %OptimizeFunctionOnNextCall(g); + assertThrows(() => g(true)); +})(); + +(function NonFunctionHasInstance() { + var C = { + [Symbol.hasInstance] : {} + }; + + function f(b, C) { + if (b) return {} instanceof C; + return false; + } + + function g(b) { + return f(b, C); + } + + assertFalse(f(true, Number)); + assertFalse(f(true, Number)); + assertFalse(g(false)); + assertFalse(g(false)); + %OptimizeFunctionOnNextCall(g); + assertThrows(() => g(true)); +})(); + +(function NonConstHasInstanceProto() { + var B = { + [Symbol.hasInstance]() { return true; } + }; + + var C = { __proto__ : B }; + + function f() { + return {} instanceof C; + } + + assertTrue(f()); + assertTrue(f()); + %OptimizeFunctionOnNextCall(f); + assertTrue(f()); + B[Symbol.hasInstance] = () => { return false; }; + assertFalse(f()); +})(); + +(function HasInstanceOverwriteOnProto() { + var A = { + [Symbol.hasInstance] : () => false + } + + var B = { __proto__ : A }; + + var C = { __proto__ : B }; + + function f() { + return {} instanceof C; + } + + assertFalse(f()); + assertFalse(f()); + %OptimizeFunctionOnNextCall(f); + assertFalse(f()); + B[Symbol.hasInstance] = () => { return true; }; + assertTrue(f()); +})(); diff --git a/implementation-contributed/v8/mjsunit/harmony/bigint/misc.js b/implementation-contributed/v8/mjsunit/harmony/bigint/misc.js new file mode 100644 index 0000000000000000000000000000000000000000..1a115473537f60087c365c97482c95cbf5adfebe --- /dev/null +++ b/implementation-contributed/v8/mjsunit/harmony/bigint/misc.js @@ -0,0 +1,8 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Create BigInt in large object space for which MakeImmutable reduces the +// length. +const x = 2n ** (2n ** 22n); +assertEquals(1n, x - (x - 1n)); diff --git a/implementation-contributed/v8/mjsunit/regress/regress-905587.js b/implementation-contributed/v8/mjsunit/regress/regress-905587.js new file mode 100644 index 0000000000000000000000000000000000000000..297846d02b9f339bf063fe6eba6b85a032cfe90f --- /dev/null +++ b/implementation-contributed/v8/mjsunit/regress/regress-905587.js @@ -0,0 +1,5 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +assertThrows("function test() { '\\u`''\\u' }", SyntaxError) diff --git a/implementation-contributed/v8/mjsunit/regress/regress-905907.js b/implementation-contributed/v8/mjsunit/regress/regress-905907.js new file mode 100644 index 0000000000000000000000000000000000000000..06bbb51f56c3031504b29875b8b78cac3d927584 --- /dev/null +++ b/implementation-contributed/v8/mjsunit/regress/regress-905907.js @@ -0,0 +1,10 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +var g = function f(a = 3) { + var context_allocated = undefined; + function inner() { f(); f(context_allocated) }; + inner(); +}; +assertThrows("g()", RangeError); diff --git a/implementation-contributed/v8/mjsunit/regress/regress-crbug-905457.js b/implementation-contributed/v8/mjsunit/regress/regress-crbug-905457.js new file mode 100644 index 0000000000000000000000000000000000000000..3a97a8752033e76dd8312441d73e9eaca304e43c --- /dev/null +++ b/implementation-contributed/v8/mjsunit/regress/regress-crbug-905457.js @@ -0,0 +1,49 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --allow-natives-syntax + +(function() { + function foo(x) { + return Math.abs(Math.min(+x, 0)); + } + + assertEquals(NaN, foo()); + assertEquals(NaN, foo()); + %OptimizeFunctionOnNextCall(foo); + assertEquals(NaN, foo()); +})(); + +(function() { + function foo(x) { + return Math.abs(Math.min(-x, 0)); + } + + assertEquals(NaN, foo()); + assertEquals(NaN, foo()); + %OptimizeFunctionOnNextCall(foo); + assertEquals(NaN, foo()); +})(); + +(function() { + function foo(x) { + return Math.abs(Math.max(0, +x)); + } + + assertEquals(NaN, foo()); + assertEquals(NaN, foo()); + %OptimizeFunctionOnNextCall(foo); + assertEquals(NaN, foo()); +})(); + +(function() { + function foo(x) { + return Math.abs(Math.max(0, -x)); + } + + assertEquals(NaN, foo()); + assertEquals(NaN, foo()); + %OptimizeFunctionOnNextCall(foo); + assertEquals(NaN, foo()); +})(); diff --git a/implementation-contributed/v8/mjsunit/regress/wasm/regress-894307.js b/implementation-contributed/v8/mjsunit/regress/wasm/regress-894307.js new file mode 100644 index 0000000000000000000000000000000000000000..5aef9eba862b58268b0e50c9e1dbec0640aa1193 --- /dev/null +++ b/implementation-contributed/v8/mjsunit/regress/wasm/regress-894307.js @@ -0,0 +1,16 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +load('test/mjsunit/wasm/wasm-constants.js'); +load('test/mjsunit/wasm/wasm-module-builder.js'); + +const builder = new WasmModuleBuilder(); +const sig = makeSig([kWasmI32, kWasmI64, kWasmI64], [kWasmI64]); +builder.addFunction(undefined, sig) + .addBody([ + kExprGetLocal, 2, + kExprGetLocal, 1, + kExprI64Shl, +]); +builder.instantiate(); diff --git a/implementation-contributed/v8/test262/test262.status b/implementation-contributed/v8/test262/test262.status index 93c8cec7bd24a40f9c424fb03af8a0eaca1bf3ca..708542fcbb3bc7d507fbfe897ebadde396b9bfa8 100644 --- a/implementation-contributed/v8/test262/test262.status +++ b/implementation-contributed/v8/test262/test262.status @@ -328,6 +328,62 @@ 'language/literals/regexp/invalid-optional-negative-lookbehind': [FAIL], 'language/literals/regexp/invalid-range-lookbehind': [FAIL], 'language/literals/regexp/invalid-range-negative-lookbehind': [FAIL], + 'language/literals/regexp/named-groups/invalid-dangling-groupname': [FAIL], + 'language/literals/regexp/named-groups/invalid-dangling-groupname-2': [FAIL], + 'language/literals/regexp/named-groups/invalid-dangling-groupname-2-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-dangling-groupname-3': [FAIL], + 'language/literals/regexp/named-groups/invalid-dangling-groupname-3-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-dangling-groupname-4': [FAIL], + 'language/literals/regexp/named-groups/invalid-dangling-groupname-4-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-dangling-groupname-5': [FAIL], + 'language/literals/regexp/named-groups/invalid-dangling-groupname-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-dangling-groupname-without-group-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-duplicate-groupspecifier': [FAIL], + 'language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2': [FAIL], + 'language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-2-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-duplicate-groupspecifier-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-empty-groupspecifier': [FAIL], + 'language/literals/regexp/named-groups/invalid-empty-groupspecifier-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-identity-escape-in-capture-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-2': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-2-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-3': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-3-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-4': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-5': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-6': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-2-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-3-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-incomplete-groupname-without-group-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-continue-groupspecifier-4-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-2-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-3': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-5-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-6': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-7': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-8-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-9-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-numeric-groupspecifier': [FAIL], + 'language/literals/regexp/named-groups/invalid-numeric-groupspecifier-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier': [FAIL], + 'language/literals/regexp/named-groups/invalid-punctuator-starting-groupspecifier-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier': [FAIL], + 'language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier-u': [FAIL], + 'language/literals/regexp/named-groups/invalid-u-escape-in-groupspecifier': [FAIL], + 'language/literals/regexp/named-groups/invalid-u-escape-in-groupspecifier-2': [FAIL], + 'language/literals/regexp/named-groups/invalid-unterminated-groupspecifier': [FAIL], + 'language/literals/regexp/named-groups/invalid-unterminated-groupspecifier-u': [FAIL], 'language/literals/regexp/u-dec-esc': [FAIL], 'language/literals/regexp/u-invalid-class-escape': [FAIL], 'language/literals/regexp/u-invalid-extended-pattern-char': [FAIL],