diff --git a/implementation-contributed/v8/intl/intl.status b/implementation-contributed/v8/intl/intl.status index 3841b287dcbb1f4df47eb275f0a1d93e0f594663..471b1184c58555be60d984438beab715f69810c0 100644 --- a/implementation-contributed/v8/intl/intl.status +++ b/implementation-contributed/v8/intl/intl.status @@ -29,9 +29,6 @@ [ALWAYS, { # TODO(jochen): The following test is flaky. 'overrides/caching': [PASS, FAIL], - - # https://crbug.com/v8/8469 - 'regress-8469': [FAIL], }], # ALWAYS ['variant == no_wasm_traps', { diff --git a/implementation-contributed/v8/mjsunit/code-coverage-ad-hoc.js b/implementation-contributed/v8/mjsunit/code-coverage-ad-hoc.js index 75f513c09952b1a358d19fe42246a7bbfcf7b9c1..184c7d52b7c6bf1e0c9f204b2a49c3aeaba1b59c 100644 --- a/implementation-contributed/v8/mjsunit/code-coverage-ad-hoc.js +++ b/implementation-contributed/v8/mjsunit/code-coverage-ad-hoc.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --allow-natives-syntax --no-always-opt +// Flags: --allow-natives-syntax --no-always-opt --no-stress-flush-bytecode // Files: test/mjsunit/code-coverage-utils.js // Test code coverage without explicitly activating it upfront. diff --git a/implementation-contributed/v8/mjsunit/code-coverage-block-noopt.js b/implementation-contributed/v8/mjsunit/code-coverage-block-noopt.js index ef68e0394d1e23604114ed93a4965fb35a871b39..9865e6ee27b633a12e7e34ad0f6d64a739d35f27 100644 --- a/implementation-contributed/v8/mjsunit/code-coverage-block-noopt.js +++ b/implementation-contributed/v8/mjsunit/code-coverage-block-noopt.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --allow-natives-syntax --no-always-opt +// Flags: --allow-natives-syntax --no-always-opt --no-stress-flush-bytecode // Flags: --no-opt // Files: test/mjsunit/code-coverage-utils.js diff --git a/implementation-contributed/v8/mjsunit/code-coverage-block-opt.js b/implementation-contributed/v8/mjsunit/code-coverage-block-opt.js index 3031e8913a63e53ce21cd38689b8faa6b123f3ae..bd721d52f177a18e882886e9a3318588682fc64e 100644 --- a/implementation-contributed/v8/mjsunit/code-coverage-block-opt.js +++ b/implementation-contributed/v8/mjsunit/code-coverage-block-opt.js @@ -3,6 +3,7 @@ // found in the LICENSE file. // Flags: --allow-natives-syntax --no-always-opt --opt +// Flags: --no-stress-flush-bytecode // Files: test/mjsunit/code-coverage-utils.js if (isNeverOptimizeLiteMode()) { diff --git a/implementation-contributed/v8/mjsunit/code-coverage-class-fields.js b/implementation-contributed/v8/mjsunit/code-coverage-class-fields.js index a91c25824fed32e3d4ca29b048cc23309b9073e1..8db45d142b8e7d0492bbf59af9cc71fdac1dc469 100644 --- a/implementation-contributed/v8/mjsunit/code-coverage-class-fields.js +++ b/implementation-contributed/v8/mjsunit/code-coverage-class-fields.js @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --allow-natives-syntax --no-always-opt --harmony-public-fields --harmony-static-fields +// Flags: --allow-natives-syntax --no-always-opt --harmony-public-fields +// Flags: --harmony-static-fields --no-stress-flush-bytecode // Files: test/mjsunit/code-coverage-utils.js %DebugToggleBlockCoverage(true); diff --git a/implementation-contributed/v8/mjsunit/code-coverage-precise.js b/implementation-contributed/v8/mjsunit/code-coverage-precise.js index c5569cf01098382c86051fe13e47d4ec8eb2c3e8..2593ed64a09f3fd4d33bf6c80d1a398d01402db8 100644 --- a/implementation-contributed/v8/mjsunit/code-coverage-precise.js +++ b/implementation-contributed/v8/mjsunit/code-coverage-precise.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --allow-natives-syntax --no-always-opt +// Flags: --allow-natives-syntax --no-always-opt --no-stress-flush-bytecode // Flags: --no-stress-incremental-marking // Files: test/mjsunit/code-coverage-utils.js diff --git a/implementation-contributed/v8/mjsunit/compiler/dataview-get.js b/implementation-contributed/v8/mjsunit/compiler/dataview-get.js index 78c6bdf4ac9c17d845eb8bd377f981bc58467293..09094399df69ee2b1dca916f81691cb5e8ecf812 100644 --- a/implementation-contributed/v8/mjsunit/compiler/dataview-get.js +++ b/implementation-contributed/v8/mjsunit/compiler/dataview-get.js @@ -173,14 +173,14 @@ assertUnoptimized(readFloat64); assertUnoptimized(readUint8); })(); -// TurboFan neutered buffer deopts. +// TurboFan detached buffer deopts. (function() { function readInt8Handled(offset) { try { return dataview.getInt8(offset); } catch (e) { return e; } } warmup(readInt8Handled); assertOptimized(readInt8Handled); - %ArrayBufferNeuter(buffer); + %ArrayBufferDetach(buffer); assertInstanceof(readInt8Handled(0), TypeError); assertUnoptimized(readInt8Handled); })(); diff --git a/implementation-contributed/v8/mjsunit/es6/array-iterator-detached.js b/implementation-contributed/v8/mjsunit/es6/array-iterator-detached.js index e9a940191b300a0dc02b27df020f76a8a26f0527..2a92ee4ff9da2a6d2112615825b692750dcfcebf 100644 --- a/implementation-contributed/v8/mjsunit/es6/array-iterator-detached.js +++ b/implementation-contributed/v8/mjsunit/es6/array-iterator-detached.js @@ -11,13 +11,13 @@ function Baseline() { assertEquals(0, it.next().value); assertEquals(1, it.next().value); assertEquals(2, it.next().value); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); it.next(); }; %NeverOptimizeFunction(Baseline); assertThrows(Baseline, TypeError, - "Cannot perform Array Iterator.prototype.next on a detached ArrayBuffer"); + "Cannot perform Array Iterator.prototype.next on a neutered ArrayBuffer"); function Turbo(count = 10000) { let array = Array(10000); @@ -32,7 +32,7 @@ function Turbo(count = 10000) { for (let i = 0; i < count; ++i) { let result = it.next(); if (result.value === 255) { - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); } sum += result.value; } @@ -44,4 +44,4 @@ Turbo(10); %OptimizeFunctionOnNextCall(Turbo); assertThrows(Turbo, TypeError, - "Cannot perform Array Iterator.prototype.next on a detached ArrayBuffer"); + "Cannot perform Array Iterator.prototype.next on a neutered ArrayBuffer"); diff --git a/implementation-contributed/v8/mjsunit/es6/array-iterator-turbo.js b/implementation-contributed/v8/mjsunit/es6/array-iterator-turbo.js index 489a53dbc73298168c867210fc625d1a43d460c7..7dcdbe10fa2258b72a9f4319bacf0adf78d696e9 100644 --- a/implementation-contributed/v8/mjsunit/es6/array-iterator-turbo.js +++ b/implementation-contributed/v8/mjsunit/es6/array-iterator-turbo.js @@ -217,7 +217,7 @@ let tests = { // Throw when detached let clone = new array.constructor(array); - %ArrayBufferNeuter(clone.buffer); + %ArrayBufferDetach(clone.buffer); assertThrows(() => sum(clone), TypeError); // Clear the slate for the next iteration. diff --git a/implementation-contributed/v8/mjsunit/es6/regress/regress-5929-1.js b/implementation-contributed/v8/mjsunit/es6/regress/regress-5929-1.js index 94e143fa775ae02811237be62e1eb7b539ef2604..5f361f3a78295955be1dd09981a4ba4f54a8b71c 100644 --- a/implementation-contributed/v8/mjsunit/es6/regress/regress-5929-1.js +++ b/implementation-contributed/v8/mjsunit/es6/regress/regress-5929-1.js @@ -8,7 +8,7 @@ var buf = new ArrayBuffer(0x10000); var arr = new Uint8Array(buf).fill(55); var tmp = {}; tmp[Symbol.toPrimitive] = function () { - %ArrayBufferNeuter(arr.buffer); + %ArrayBufferDetach(arr.buffer); return 50; } arr.copyWithin(tmp); diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-copywithin.js b/implementation-contributed/v8/mjsunit/es6/typedarray-copywithin.js index c52a38625b03b707f95249874273e158068417d0..e60c88f6e71d7d62874f9eef4738e3df999b281f 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-copywithin.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-copywithin.js @@ -232,13 +232,13 @@ CheckEachTypedArray(function parametersNotCalledIfDetached(constructor) { var tmp = { [Symbol.toPrimitive]() { assertUnreachable("Parameter should not be processed when " + - "array.[[ViewedArrayBuffer]] is neutered."); + "array.[[ViewedArrayBuffer]] is detached."); return 0; } }; var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.copyWithin(tmp, tmp, tmp), TypeError); assertEquals(0, array.length, "array.[[ViewedArrayBuffer]] is detached"); diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-every.js b/implementation-contributed/v8/mjsunit/es6/typedarray-every.js index 968078988feabf5234f104988e1b4c1d82f0bba6..feb7cc90cc9c4f8c29bb0eb33e292ed401d97735 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-every.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-every.js @@ -15,7 +15,7 @@ var typedArrayConstructors = [ Float32Array, Float64Array]; -function CheckTypedArrayIsNeutered(array) { +function CheckTypedArrayIsDetached(array) { assertEquals(0, array.byteLength); assertEquals(0, array.byteOffset); assertEquals(0, array.length); @@ -81,21 +81,21 @@ function TestTypedArrayForEach(constructor) { CheckWrapping(3.14, Number); CheckWrapping({}, Object); - // Neutering the buffer backing the typed array mid-way should + // Detaching the buffer backing the typed array mid-way should // still make .forEach() finish, and the array should keep being - // empty after neutering it. + // empty after detaching it. count = 0; a = new constructor(3); result = a.every(function (n, index, array) { - assertFalse(array[index] === undefined); // don't get here if neutered - if (count > 0) %ArrayBufferNeuter(array.buffer); + assertFalse(array[index] === undefined); // don't get here if detached + if (count > 0) %ArrayBufferDetach(array.buffer); array[index] = n + 1; count++; return count > 1 ? array[index] === undefined : true; }); assertEquals(2, count); assertEquals(true, result); - CheckTypedArrayIsNeutered(a); + CheckTypedArrayIsDetached(a); assertEquals(undefined, a[0]); // Calling array.buffer midway can change the backing store. @@ -161,7 +161,7 @@ function TestTypedArrayForEach(constructor) { // Detached Operation var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.every(() => true), TypeError); } diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-fill.js b/implementation-contributed/v8/mjsunit/es6/typedarray-fill.js index 9ed220373bedda1255b935fb513abed9e325bc82..791b214734a16d3b3f29da0d33f8c90d54995c52 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-fill.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-fill.js @@ -74,12 +74,12 @@ for (var constructor of typedArrayConstructors) { var tmp = { [Symbol.toPrimitive]() { assertUnreachable("Parameter should not be processed when " + - "array.[[ViewedArrayBuffer]] is neutered."); + "array.[[ViewedArrayBuffer]] is detached."); return 0; } }; var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.fill(tmp), TypeError); } diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-filter.js b/implementation-contributed/v8/mjsunit/es6/typedarray-filter.js index 0f25c362ec92fa2c788b3be81f3cd9561cbec2ae..077016a26c03f2baeb0559c040d41284c79c1c34 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-filter.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-filter.js @@ -21,7 +21,7 @@ function TestTypedArrayFilter(constructor) { // Throw type error if source array is detached while executing a callback let ta1 = new constructor(10); assertThrows(() => - ta1.filter(() => %ArrayBufferNeuter(ta1.buffer)) + ta1.filter(() => %ArrayBufferDetach(ta1.buffer)) , TypeError); // A new typed array should be created after finishing callbacks diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-find.js b/implementation-contributed/v8/mjsunit/es6/typedarray-find.js index 6f646e5c80eab65ca335ab06c03a24ca0b3fa295..f33e4c5cb95c12293b73c0b96ea146d0fc1859ff 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-find.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-find.js @@ -190,13 +190,13 @@ assertEquals(x, 4); var tmp = { [Symbol.toPrimitive]() { assertUnreachable("Parameter should not be processed when " + - "array.[[ViewedArrayBuffer]] is neutered."); + "array.[[ViewedArrayBuffer]] is detached."); return 0; } }; var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); -%ArrayBufferNeuter(array.buffer); +%ArrayBufferDetach(array.buffer); assertThrows(() => array.find(tmp), TypeError); } diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-findindex.js b/implementation-contributed/v8/mjsunit/es6/typedarray-findindex.js index 7447395e771741cd51219291970dc7e6e665fc40..e31e17401a2e70d3918d9258ff927560e125dd05 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-findindex.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-findindex.js @@ -190,11 +190,11 @@ assertEquals(x, 4); var tmp = { [Symbol.toPrimitive]() { assertUnreachable("Parameter should not be processed when " + - "array.[[ViewedArrayBuffer]] is neutered."); + "array.[[ViewedArrayBuffer]] is detached."); return 0; } }; var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.findIndex(tmp), TypeError); } diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-foreach.js b/implementation-contributed/v8/mjsunit/es6/typedarray-foreach.js index 252706a9b58310fcc642606f9098e208055ec142..81c212046a4d33aa3368b693fb93466df1cae370 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-foreach.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-foreach.js @@ -15,7 +15,7 @@ var typedArrayConstructors = [ Float32Array, Float64Array]; -function CheckTypedArrayIsNeutered(array) { +function CheckTypedArrayIsDetached(array) { assertEquals(0, array.byteLength); assertEquals(0, array.byteOffset); assertEquals(0, array.length); @@ -84,7 +84,7 @@ function TestTypedArrayForEach(constructor) { assertEquals(43, a[0]); assertEquals(42, a[1]); - // Neutering the buffer backing the typed array mid-way should + // Detaching the buffer backing the typed array mid-way should // still make .forEach() finish, but exiting early due to the missing // elements, and the array should keep being empty after detaching it. // TODO(dehrenberg): According to the ES6 spec, accessing or testing @@ -94,12 +94,12 @@ function TestTypedArrayForEach(constructor) { a = new constructor(3); count = 0; a.forEach(function (n, index, array) { - if (count > 0) %ArrayBufferNeuter(array.buffer); + if (count > 0) %ArrayBufferDetach(array.buffer); array[index] = n + 1; count++; }); assertEquals(2, count); - CheckTypedArrayIsNeutered(a); + CheckTypedArrayIsDetached(a); assertEquals(undefined, a[0]); // The method must work for typed arrays created from ArrayBuffer. @@ -150,7 +150,7 @@ function TestTypedArrayForEach(constructor) { // Detached Operation var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.forEach(() => true), TypeError); } diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-from-detached-typedarray.js b/implementation-contributed/v8/mjsunit/es6/typedarray-from-detached-typedarray.js index b34f06e91ff516777ef13f32b084675b20332906..6850571bc481194f0e9e8e7c47b62b8399aa2a93 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-from-detached-typedarray.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-from-detached-typedarray.js @@ -18,6 +18,6 @@ var typedArrayConstructors = [ for (constructor of typedArrayConstructors) { var ta = new constructor(10); - %ArrayBufferNeuter(ta.buffer); + %ArrayBufferDetach(ta.buffer); assertThrows(() => constructor.from(ta), TypeError); } diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-from.js b/implementation-contributed/v8/mjsunit/es6/typedarray-from.js index 81576582498448e04103a8c191b627cf7864645a..4bc17ca2600367d7a173da36d1d0ffc72cfe93c9 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-from.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-from.js @@ -208,7 +208,7 @@ for (var constructor of typedArrayConstructors) { let ta2 = new constructor(3).fill(1); Object.defineProperty(ta2, "length", {get: function() { - %ArrayBufferNeuter(ta2.buffer); + %ArrayBufferDetach(ta2.buffer); return 6; }}); assertArrayLikeEquals(constructor.from(ta2), [d, d, d, d, d, d], constructor); diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-indexing.js b/implementation-contributed/v8/mjsunit/es6/typedarray-indexing.js index d12a1570c2215153f42cb6340530b4fe3e1eb969..cb88068d76cc93f43360ccb779c97ae81ab1e1e4 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-indexing.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-indexing.js @@ -19,7 +19,7 @@ var typedArrayConstructors = [ var tmp = { [Symbol.toPrimitive]() { assertUnreachable("Parameter should not be processed when " + - "array.[[ViewedArrayBuffer]] is neutered."); + "array.[[ViewedArrayBuffer]] is detached."); return 0; } }; @@ -65,7 +65,7 @@ for (var constructor of typedArrayConstructors) { // Detached Operation var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.indexOf(tmp), TypeError); // ---------------------------------------------------------------------- @@ -107,6 +107,6 @@ for (var constructor of typedArrayConstructors) { // Detached Operation var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.lastIndexOf(tmp), TypeError); } diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-iteration.js b/implementation-contributed/v8/mjsunit/es6/typedarray-iteration.js index b423ed0f045fe873028371659d787b8053a1bfdc..30b09ab08a0dfc3b5780efee22cf69dec9fd4e89 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-iteration.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-iteration.js @@ -82,7 +82,7 @@ for (var constructor of typedArrayConstructors) { // Detached Operation var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.filter(() => false), TypeError); })(); @@ -140,7 +140,7 @@ for (var constructor of typedArrayConstructors) { // Detached Operation var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.map((v) => v), TypeError); })(); @@ -204,7 +204,7 @@ for (var constructor of typedArrayConstructors) { // Detached Operation var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.some((v) => false), TypeError); })(); diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-map.js b/implementation-contributed/v8/mjsunit/es6/typedarray-map.js index 54b535fd30c553a96151953a6eabb7b74b659f39..e8d97879b61ed73cd991b0a8943fdb7a9588a130 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-map.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-map.js @@ -37,7 +37,7 @@ function TestTypedArrayMap(constructor) { new DetachingArray(5).map(function(v,i,a){ print(i); if (i == 1) { - %ArrayBufferNeuter(target.buffer); + %ArrayBufferDetach(target.buffer); } }) }, TypeError); diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-reverse.js b/implementation-contributed/v8/mjsunit/es6/typedarray-reverse.js index bfeb227c5c4128050d702a7434d0d044076e150f..d7133718c3586e39c78e8f557203efa18f394f22 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-reverse.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-reverse.js @@ -57,7 +57,7 @@ for (var constructor of arrayConstructors) { // Detached Operation if (constructor != ArrayMaker) { var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.reverse(), TypeError); } } diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-slice.js b/implementation-contributed/v8/mjsunit/es6/typedarray-slice.js index 2f40fe54253e8fdd05abfd7660520c41690e8e5a..bd89f86e740803142b3f6fa99ff5079c9eca7bdf 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-slice.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-slice.js @@ -73,12 +73,12 @@ for (var constructor of typedArrayConstructors) { var tmp = { [Symbol.toPrimitive]() { assertUnreachable("Parameter should not be processed when " + - "array.[[ViewedArrayBuffer]] is neutered."); + "array.[[ViewedArrayBuffer]] is detached."); return 0; } }; var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.slice(tmp, tmp), TypeError); // Check that the species array must be a typed array diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-sort.js b/implementation-contributed/v8/mjsunit/es6/typedarray-sort.js index e2618ade6b0797520438c5e99046fdae3107722d..c5c4ff079a292f4647e5db5610b2725b769ff224 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-sort.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-sort.js @@ -65,7 +65,7 @@ for (var constructor of typedArrayConstructors) { // Detached Operation var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.sort(), TypeError); } diff --git a/implementation-contributed/v8/mjsunit/es6/typedarray-tostring.js b/implementation-contributed/v8/mjsunit/es6/typedarray-tostring.js index a1fa9c7665c46a393e6db7eabb3ac301e0b143a4..16c6319b7af5a0f012838ed5400075d830f7d624 100644 --- a/implementation-contributed/v8/mjsunit/es6/typedarray-tostring.js +++ b/implementation-contributed/v8/mjsunit/es6/typedarray-tostring.js @@ -101,7 +101,7 @@ for (var constructor of typedArrayConstructors) { // Detached Operation var array = new constructor([1, 2, 3]); - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); assertThrows(() => array.join(), TypeError); assertThrows(() => array.toLocalString(), TypeError); assertThrows(() => array.toString(), TypeError); diff --git a/implementation-contributed/v8/mjsunit/harmony/weakrefs/factory-scheduled-for-cleanup-multiple-times.js b/implementation-contributed/v8/mjsunit/harmony/weakrefs/factory-scheduled-for-cleanup-multiple-times.js index 49ccdf330da4513478bde0e7a260e3b45a09c8ea..2f3915478ef0062b5e460468afaec44f3e516792 100644 --- a/implementation-contributed/v8/mjsunit/harmony/weakrefs/factory-scheduled-for-cleanup-multiple-times.js +++ b/implementation-contributed/v8/mjsunit/harmony/weakrefs/factory-scheduled-for-cleanup-multiple-times.js @@ -3,6 +3,7 @@ // found in the LICENSE file. // Flags: --harmony-weak-refs --expose-gc --noincremental-marking +// Flags: --no-stress-flush-bytecode let cleanup0_call_count = 0; let cleanup0_weak_cell_count = 0; diff --git a/implementation-contributed/v8/mjsunit/neuter-twice.js b/implementation-contributed/v8/mjsunit/neuter-twice.js index 3501cee4330f966c1eeaf6f5b7ebdc6418f2bcec..1bf0fa9405650bee1742b87bd8e26898bc074cec 100644 --- a/implementation-contributed/v8/mjsunit/neuter-twice.js +++ b/implementation-contributed/v8/mjsunit/neuter-twice.js @@ -5,5 +5,5 @@ // Flags: --allow-natives-syntax var ab = new ArrayBuffer(100); -%ArrayBufferNeuter(ab); -%ArrayBufferNeuter(ab); +%ArrayBufferDetach(ab); +%ArrayBufferDetach(ab); diff --git a/implementation-contributed/v8/mjsunit/regress/regress-353004.js b/implementation-contributed/v8/mjsunit/regress/regress-353004.js index fe19354d8b8463adb6be746d7126e756a2a72158..f5430c6df4b1575253553a10d156f4ae5811f8e4 100644 --- a/implementation-contributed/v8/mjsunit/regress/regress-353004.js +++ b/implementation-contributed/v8/mjsunit/regress/regress-353004.js @@ -8,7 +8,7 @@ var buffer1 = new ArrayBuffer(100 * 1024); assertThrows(function() { var array1 = new Uint8Array(buffer1, {valueOf : function() { - %ArrayBufferNeuter(buffer1); + %ArrayBufferDetach(buffer1); return 0; }}); }, TypeError); @@ -17,7 +17,7 @@ var buffer2 = new ArrayBuffer(100 * 1024); assertThrows(function() { var array2 = new Uint8Array(buffer2, 0, {valueOf : function() { - %ArrayBufferNeuter(buffer2); + %ArrayBufferDetach(buffer2); return 100 * 1024; }}); }, TypeError); @@ -30,7 +30,7 @@ assertThrows(() => return 0; }}, {valueOf : function() { convertedLength = true; - %ArrayBufferNeuter(buffer1); + %ArrayBufferDetach(buffer1); return 0; }}), TypeError); assertTrue(convertedOffset); @@ -38,7 +38,7 @@ assertTrue(convertedLength); var buffer3 = new ArrayBuffer(100 * 1024 * 1024); var dataView1 = new DataView(buffer3, {valueOf : function() { - %ArrayBufferNeuter(buffer3); + %ArrayBufferDetach(buffer3); return 0; }}); @@ -47,7 +47,7 @@ assertEquals(0, dataView1.byteLength); var buffer4 = new ArrayBuffer(100 * 1024); assertThrows(function() { var dataView2 = new DataView(buffer4, 0, {valueOf : function() { - %ArrayBufferNeuter(buffer4); + %ArrayBufferDetach(buffer4); return 100 * 1024 * 1024; }}); }, RangeError); @@ -56,7 +56,7 @@ assertThrows(function() { var buffer5 = new ArrayBuffer(100 * 1024); assertThrows(function() { buffer5.slice({valueOf : function() { - %ArrayBufferNeuter(buffer5); + %ArrayBufferDetach(buffer5); return 0; }}, 100 * 1024 * 1024); }, TypeError); @@ -65,7 +65,7 @@ assertThrows(function() { var buffer7 = new ArrayBuffer(100 * 1024 * 1024); assertThrows(function() { buffer7.slice(0, {valueOf : function() { - %ArrayBufferNeuter(buffer7); + %ArrayBufferDetach(buffer7); return 100 * 1024 * 1024; }}); }, TypeError); @@ -74,7 +74,7 @@ var buffer9 = new ArrayBuffer(1024); var array9 = new Uint8Array(buffer9); assertThrows(() => array9.subarray({valueOf : function() { - %ArrayBufferNeuter(buffer9); + %ArrayBufferDetach(buffer9); return 0; }}, 1024), TypeError); assertEquals(0, array9.length); @@ -83,7 +83,7 @@ var buffer11 = new ArrayBuffer(1024); var array11 = new Uint8Array(buffer11); assertThrows(() => array11.subarray(0, {valueOf : function() { - %ArrayBufferNeuter(buffer11); + %ArrayBufferDetach(buffer11); return 1024; }}), TypeError); assertEquals(0, array11.length); diff --git a/implementation-contributed/v8/mjsunit/regress/regress-4964.js b/implementation-contributed/v8/mjsunit/regress/regress-4964.js index d834708667d35f0c3e9c5a9de014f60742492d50..ad259dca5409dc45977d55995755ccc4ff11f699 100644 --- a/implementation-contributed/v8/mjsunit/regress/regress-4964.js +++ b/implementation-contributed/v8/mjsunit/regress/regress-4964.js @@ -4,19 +4,19 @@ // Flags: --allow-natives-syntax -// Neutered source +// Detached source var ab = new ArrayBuffer(10); -ab.constructor = { get [Symbol.species]() { %ArrayBufferNeuter(ab); return ArrayBuffer; } }; +ab.constructor = { get [Symbol.species]() { %ArrayBufferDetach(ab); return ArrayBuffer; } }; assertThrows(() => ab.slice(0), TypeError); -// Neutered target -class NeuteredArrayBuffer extends ArrayBuffer { +// Detached target +class DetachedArrayBuffer extends ArrayBuffer { constructor(...args) { super(...args); - %ArrayBufferNeuter(this); + %ArrayBufferDetach(this); } } var ab2 = new ArrayBuffer(10); -ab2.constructor = NeuteredArrayBuffer; +ab2.constructor = DetachedArrayBuffer; assertThrows(() => ab2.slice(0), TypeError); diff --git a/implementation-contributed/v8/mjsunit/regress/regress-6288.js b/implementation-contributed/v8/mjsunit/regress/regress-6288.js index 5f550c31c8b72d021fcc1148a5c738c0e0d0dd4b..96499d9378f85c5f92e22fbd814a7f9083626e88 100644 --- a/implementation-contributed/v8/mjsunit/regress/regress-6288.js +++ b/implementation-contributed/v8/mjsunit/regress/regress-6288.js @@ -4,10 +4,7 @@ // Environment Variables: LC_ALL=pt-BR.UTF8 -// The data files packaged with d8 currently have Brazillian Portuguese -// DateTimeFormat but not Collation - if (this.Intl) { - assertEquals('pt', Intl.Collator().resolvedOptions().locale); + assertEquals('pt-BR', Intl.Collator().resolvedOptions().locale); assertEquals('pt-BR', Intl.DateTimeFormat().resolvedOptions().locale); } diff --git a/implementation-contributed/v8/mjsunit/regress/regress-707410.js b/implementation-contributed/v8/mjsunit/regress/regress-707410.js index a6a0aa52bbf06c7229cbfaa7b76fdfe89781aa02..cc3f58cdb5fd05726f472ab1744c2cfe250d535a 100644 --- a/implementation-contributed/v8/mjsunit/regress/regress-707410.js +++ b/implementation-contributed/v8/mjsunit/regress/regress-707410.js @@ -5,5 +5,5 @@ // Flags: --allow-natives-syntax var a = new Uint8Array(1024*1024); -%ArrayBufferNeuter(a.buffer); +%ArrayBufferDetach(a.buffer); assertThrows(() => new Uint8Array(a)); diff --git a/implementation-contributed/v8/mjsunit/regress/regress-840106.js b/implementation-contributed/v8/mjsunit/regress/regress-840106.js index b49464dce5223ad035b76dd3f656e435958c032e..568ab7547927a587db6f892e806b40d77e7b8eb9 100644 --- a/implementation-contributed/v8/mjsunit/regress/regress-840106.js +++ b/implementation-contributed/v8/mjsunit/regress/regress-840106.js @@ -8,7 +8,7 @@ var buffer = new ArrayBuffer(1024 * 1024); buffer.constructor = { [Symbol.species]: new Proxy(function() {}, { get: _ => { - %ArrayBufferNeuter(buffer); + %ArrayBufferDetach(buffer); } }) }; diff --git a/implementation-contributed/v8/mjsunit/regress/regress-904707.js b/implementation-contributed/v8/mjsunit/regress/regress-904707.js index 8ff8c3a0f2a347720cea8ea026feda6db465c3ef..fdf89c2b55c142aecfd8190ab85b7fb203370e43 100644 --- a/implementation-contributed/v8/mjsunit/regress/regress-904707.js +++ b/implementation-contributed/v8/mjsunit/regress/regress-904707.js @@ -8,7 +8,7 @@ delete Float64Array.prototype.__proto__[Symbol.iterator]; let a = new Float64Array(9); Object.defineProperty(a, "length", { - get: function () { %ArrayBufferNeuter(a.buffer); return 6; } + get: function () { %ArrayBufferDetach(a.buffer); return 6; } }); Float64Array.from(a); diff --git a/implementation-contributed/v8/mjsunit/regress/regress-crbug-691323.js b/implementation-contributed/v8/mjsunit/regress/regress-crbug-691323.js index d786875d76851e9993a485fa68b914c52e9cdb6a..5002ceaf206ae1053e509fb7ef961207b1ad9e5a 100644 --- a/implementation-contributed/v8/mjsunit/regress/regress-crbug-691323.js +++ b/implementation-contributed/v8/mjsunit/regress/regress-crbug-691323.js @@ -7,7 +7,7 @@ var buffer = new ArrayBuffer(0x100); var array = new Uint8Array(buffer).fill(55); var tmp = {}; tmp[Symbol.toPrimitive] = function () { - %ArrayBufferNeuter(array.buffer) + %ArrayBufferDetach(array.buffer) return 0; }; @@ -18,7 +18,7 @@ buffer = new ArrayBuffer(0x100); array = new Uint8Array(buffer).fill(55); tmp = {}; tmp[Symbol.toPrimitive] = function () { - %ArrayBufferNeuter(array.buffer) + %ArrayBufferDetach(array.buffer) return 0; }; @@ -29,7 +29,7 @@ buffer = new ArrayBuffer(0x100); array = new Uint8Array(buffer).fill(55); tmp = {}; tmp[Symbol.toPrimitive] = function () { - %ArrayBufferNeuter(array.buffer) + %ArrayBufferDetach(array.buffer) return 0; }; assertEquals(true, Array.prototype.includes.call(array, undefined, tmp)); diff --git a/implementation-contributed/v8/mjsunit/regress/regress-crbug-867776.js b/implementation-contributed/v8/mjsunit/regress/regress-crbug-867776.js index f108f2acc463ce5bf005122866d3d068c86549db..76d2121640950c523a770b4c9954327f9effa264 100644 --- a/implementation-contributed/v8/mjsunit/regress/regress-crbug-867776.js +++ b/implementation-contributed/v8/mjsunit/regress/regress-crbug-867776.js @@ -8,7 +8,7 @@ for (var i = 0; i < 3; i++) { var array = new BigInt64Array(200); function evil_callback() { - %ArrayBufferNeuter(array.buffer); + %ArrayBufferDetach(array.buffer); gc(); return 1094795585n; } diff --git a/implementation-contributed/v8/mjsunit/regress/wasm/regress-680938.js b/implementation-contributed/v8/mjsunit/regress/wasm/regress-680938.js index 75c8a457bbd57b08118fd5bce70e9aad2d466f64..5471f60a71b3cee2eed8a1031b69fde6a973de5d 100644 --- a/implementation-contributed/v8/mjsunit/regress/wasm/regress-680938.js +++ b/implementation-contributed/v8/mjsunit/regress/wasm/regress-680938.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -var v17 = {}; -var v32 = {}; +var v17 = 42; +var v32 = { initial: 1 }; v39 = new WebAssembly.Memory(v32); v49 = v39.grow(v17); diff --git a/implementation-contributed/v8/mjsunit/regress/wasm/regress-736584.js b/implementation-contributed/v8/mjsunit/regress/wasm/regress-736584.js index 39f03c1072c9399429c834f582d480ecd8b47887..033732f368240f8f358cb91577808042c785b73a 100644 --- a/implementation-contributed/v8/mjsunit/regress/wasm/regress-736584.js +++ b/implementation-contributed/v8/mjsunit/regress/wasm/regress-736584.js @@ -7,7 +7,7 @@ load('test/mjsunit/wasm/wasm-constants.js'); load('test/mjsunit/wasm/wasm-module-builder.js'); -let mem = new WebAssembly.Memory({}); +let mem = new WebAssembly.Memory({initial: 0}); let builder = new WasmModuleBuilder(); builder.addImportedMemory("mod", "imported_mem"); builder.addFunction('mem_size', kSig_i_v) diff --git a/implementation-contributed/v8/mjsunit/regress/wasm/regress-816226.js b/implementation-contributed/v8/mjsunit/regress/wasm/regress-816226.js index a9cb71557009ec43c7eb19b6b1f754af0458ac73..1fca02fe82779472f4777149e84eaa24fd97e9ff 100644 --- a/implementation-contributed/v8/mjsunit/regress/wasm/regress-816226.js +++ b/implementation-contributed/v8/mjsunit/regress/wasm/regress-816226.js @@ -2,4 +2,4 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(new Int8Array((new WebAssembly.Memory({})).buffer)).buffer; +(new Int8Array((new WebAssembly.Memory({initial: 0})).buffer)).buffer; diff --git a/implementation-contributed/v8/mjsunit/samevalue.js b/implementation-contributed/v8/mjsunit/samevalue.js index 1e5384d73d5fa642e4d525b8a1367485f107bb4f..30cce35bcceb168bbc9a23975604d126ab4f05e0 100644 --- a/implementation-contributed/v8/mjsunit/samevalue.js +++ b/implementation-contributed/v8/mjsunit/samevalue.js @@ -26,7 +26,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --expose-natives-as natives --allow-natives-syntax +// Flags: --allow-natives-syntax // Test the SameValue and SameValueZero internal methods. var obj1 = {x: 10, y: 11, z: "test"}; diff --git a/implementation-contributed/v8/test262/detachArrayBuffer.js b/implementation-contributed/v8/test262/detachArrayBuffer.js index 959773b5ca1d66f4d57d1f3ea304d9a6c80d74bd..d9ca415c2bf0981554beee1b94d9595183501e8b 100644 --- a/implementation-contributed/v8/test262/detachArrayBuffer.js +++ b/implementation-contributed/v8/test262/detachArrayBuffer.js @@ -3,7 +3,7 @@ // found in the LICENSE file. function $DETACHBUFFER(buffer) { - %ArrayBufferNeuter(buffer); + %ArrayBufferDetach(buffer); } $262.detachArrayBuffer = $DETACHBUFFER; diff --git a/implementation-contributed/v8/test262/testcfg.py b/implementation-contributed/v8/test262/testcfg.py index 9052aab12fa8d3c20fbeae4bb4dd88c8a6b1925b..02e4dcd8b6e2c7a7c5196d4046e534a48d888f20 100644 --- a/implementation-contributed/v8/test262/testcfg.py +++ b/implementation-contributed/v8/test262/testcfg.py @@ -87,15 +87,23 @@ class VariantsGenerator(testsuite.VariantsGenerator): def gen(self, test): flags_set = self._get_flags_set(test) test_record = test.test_record - for n, variant in enumerate(self._get_variants(test)): - flags = flags_set[variant][0] - if 'noStrict' in test_record: - yield (variant, flags, str(n)) - elif 'onlyStrict' in test_record: - yield (variant, flags + ['--use-strict'], 'strict-%d' % n) - else: - yield (variant, flags, str(n)) - yield (variant, flags + ['--use-strict'], 'strict-%d' % n) + + # Add a reverse test ensuring that FAIL_PHASE_ONLY is only used for tests + # that actually fail to throw an exception at wrong phase. + phase_variants = [''] + if test.fail_phase_only: + phase_variants.append('-fail-phase-reverse') + + for phase_var in phase_variants: + for n, variant in enumerate(self._get_variants(test)): + flags = flags_set[variant][0] + if 'noStrict' in test_record: + yield (variant, flags, str(n) + phase_var) + elif 'onlyStrict' in test_record: + yield (variant, flags + ['--use-strict'], 'strict-%d' % n + phase_var) + else: + yield (variant, flags, str(n)) + yield (variant, flags + ['--use-strict'], 'strict-%d' % n + phase_var) class TestSuite(testsuite.TestSuite): @@ -169,13 +177,34 @@ class TestCase(testcase.D8TestCase): .get('type', None) ) + # We disallow combining FAIL_PHASE_ONLY with any other fail outcome types. + # Outcome parsing logic in the base class converts all outcomes specified in + # the status file into either FAIL, CRASH or PASS, thus we do not need to + # handle FAIL_OK, FAIL_SLOPPY and various other outcomes. + if self.fail_phase_only: + assert ( + statusfile.FAIL not in self.expected_outcomes and + statusfile.CRASH not in self.expected_outcomes), self.name + + @property + def fail_phase_only(self): + # The FAIL_PHASE_ONLY is defined in tools/testrunner/local/statusfile.py and + # can be used in status files to mark tests that throw an exception at wrong + # phase, e.g. SyntaxError is thrown at execution phase instead of parsing + # phase. See https://crbug.com/v8/8467 for more details. + return statusfile.FAIL_PHASE_ONLY in self._statusfile_outcomes + + @property + def _fail_phase_reverse(self): + return 'fail-phase-reverse' in self.procid + def _get_files_params(self): return ( list(self.suite.harness) + ([os.path.join(self.suite.root, "harness-agent.js")] if self.path.startswith('built-ins/Atomics') else []) + ([os.path.join(self.suite.root, "harness-adapt-donotevaluate.js")] - if self.fail_phase_only else []) + + if self.fail_phase_only and not self._fail_phase_reverse else []) + self._get_includes() + (["--module"] if "module" in self.test_record else []) + [self._get_source_path()] @@ -213,7 +242,12 @@ class TestCase(testcase.D8TestCase): def output_proc(self): if self._expected_exception is not None: return test262.ExceptionOutProc(self.expected_outcomes, - self._expected_exception) + self._expected_exception, + self._fail_phase_reverse) + else: + # We only support fail phase reverse on tests that expect an exception. + assert not self._fail_phase_reverse + if self.expected_outcomes == outproc.OUTCOMES_PASS: return test262.PASS_NO_EXCEPTION return test262.NoExceptionOutProc(self.expected_outcomes) diff --git a/implementation-contributed/v8/wasm-js/wasm-js.status b/implementation-contributed/v8/wasm-js/wasm-js.status index fe74ca47f54e8515035a9ee41e90564e0e845573..4593a73c6e720fa7d290fb96a93243cfcbfbfc5f 100644 --- a/implementation-contributed/v8/wasm-js/wasm-js.status +++ b/implementation-contributed/v8/wasm-js/wasm-js.status @@ -6,9 +6,7 @@ [ALWAYS, { # https://bugs.chromium.org/p/v8/issues/detail?id=8319 'memory/grow': [FAIL], - 'memory/constructor': [FAIL], 'table/grow': [FAIL], - 'table/constructor': [FAIL], 'table/get-set': [FAIL], 'module/customSections': [FAIL], 'global/constructor': [FAIL],