mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
[v8-test262-automation] Changes from https://github.com/v8/v8.git at sha 44b1b245 on Sat Dec 15 2018 19:17:33 GMT+0000 (Coordinated Universal Time)
This commit is contained in:
parent
bf6b753dd7
commit
468a67ade5
@ -29,9 +29,6 @@
|
|||||||
[ALWAYS, {
|
[ALWAYS, {
|
||||||
# TODO(jochen): The following test is flaky.
|
# TODO(jochen): The following test is flaky.
|
||||||
'overrides/caching': [PASS, FAIL],
|
'overrides/caching': [PASS, FAIL],
|
||||||
|
|
||||||
# https://crbug.com/v8/8469
|
|
||||||
'regress-8469': [FAIL],
|
|
||||||
}], # ALWAYS
|
}], # ALWAYS
|
||||||
|
|
||||||
['variant == no_wasm_traps', {
|
['variant == no_wasm_traps', {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// 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
|
// Files: test/mjsunit/code-coverage-utils.js
|
||||||
|
|
||||||
// Test code coverage without explicitly activating it upfront.
|
// Test code coverage without explicitly activating it upfront.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// 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
|
// Flags: --no-opt
|
||||||
// Files: test/mjsunit/code-coverage-utils.js
|
// Files: test/mjsunit/code-coverage-utils.js
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --allow-natives-syntax --no-always-opt --opt
|
// Flags: --allow-natives-syntax --no-always-opt --opt
|
||||||
|
// Flags: --no-stress-flush-bytecode
|
||||||
// Files: test/mjsunit/code-coverage-utils.js
|
// Files: test/mjsunit/code-coverage-utils.js
|
||||||
|
|
||||||
if (isNeverOptimizeLiteMode()) {
|
if (isNeverOptimizeLiteMode()) {
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// 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
|
// Files: test/mjsunit/code-coverage-utils.js
|
||||||
|
|
||||||
%DebugToggleBlockCoverage(true);
|
%DebugToggleBlockCoverage(true);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// 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
|
// Flags: --no-stress-incremental-marking
|
||||||
// Files: test/mjsunit/code-coverage-utils.js
|
// Files: test/mjsunit/code-coverage-utils.js
|
||||||
|
|
||||||
|
@ -173,14 +173,14 @@ assertUnoptimized(readFloat64);
|
|||||||
assertUnoptimized(readUint8);
|
assertUnoptimized(readUint8);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// TurboFan neutered buffer deopts.
|
// TurboFan detached buffer deopts.
|
||||||
(function() {
|
(function() {
|
||||||
function readInt8Handled(offset) {
|
function readInt8Handled(offset) {
|
||||||
try { return dataview.getInt8(offset); } catch (e) { return e; }
|
try { return dataview.getInt8(offset); } catch (e) { return e; }
|
||||||
}
|
}
|
||||||
warmup(readInt8Handled);
|
warmup(readInt8Handled);
|
||||||
assertOptimized(readInt8Handled);
|
assertOptimized(readInt8Handled);
|
||||||
%ArrayBufferNeuter(buffer);
|
%ArrayBufferDetach(buffer);
|
||||||
assertInstanceof(readInt8Handled(0), TypeError);
|
assertInstanceof(readInt8Handled(0), TypeError);
|
||||||
assertUnoptimized(readInt8Handled);
|
assertUnoptimized(readInt8Handled);
|
||||||
})();
|
})();
|
||||||
|
@ -11,13 +11,13 @@ function Baseline() {
|
|||||||
assertEquals(0, it.next().value);
|
assertEquals(0, it.next().value);
|
||||||
assertEquals(1, it.next().value);
|
assertEquals(1, it.next().value);
|
||||||
assertEquals(2, it.next().value);
|
assertEquals(2, it.next().value);
|
||||||
%ArrayBufferNeuter(array.buffer);
|
%ArrayBufferDetach(array.buffer);
|
||||||
it.next();
|
it.next();
|
||||||
};
|
};
|
||||||
%NeverOptimizeFunction(Baseline);
|
%NeverOptimizeFunction(Baseline);
|
||||||
|
|
||||||
assertThrows(Baseline, TypeError,
|
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) {
|
function Turbo(count = 10000) {
|
||||||
let array = Array(10000);
|
let array = Array(10000);
|
||||||
@ -32,7 +32,7 @@ function Turbo(count = 10000) {
|
|||||||
for (let i = 0; i < count; ++i) {
|
for (let i = 0; i < count; ++i) {
|
||||||
let result = it.next();
|
let result = it.next();
|
||||||
if (result.value === 255) {
|
if (result.value === 255) {
|
||||||
%ArrayBufferNeuter(array.buffer);
|
%ArrayBufferDetach(array.buffer);
|
||||||
}
|
}
|
||||||
sum += result.value;
|
sum += result.value;
|
||||||
}
|
}
|
||||||
@ -44,4 +44,4 @@ Turbo(10);
|
|||||||
%OptimizeFunctionOnNextCall(Turbo);
|
%OptimizeFunctionOnNextCall(Turbo);
|
||||||
|
|
||||||
assertThrows(Turbo, TypeError,
|
assertThrows(Turbo, TypeError,
|
||||||
"Cannot perform Array Iterator.prototype.next on a detached ArrayBuffer");
|
"Cannot perform Array Iterator.prototype.next on a neutered ArrayBuffer");
|
||||||
|
@ -217,7 +217,7 @@ let tests = {
|
|||||||
|
|
||||||
// Throw when detached
|
// Throw when detached
|
||||||
let clone = new array.constructor(array);
|
let clone = new array.constructor(array);
|
||||||
%ArrayBufferNeuter(clone.buffer);
|
%ArrayBufferDetach(clone.buffer);
|
||||||
assertThrows(() => sum(clone), TypeError);
|
assertThrows(() => sum(clone), TypeError);
|
||||||
|
|
||||||
// Clear the slate for the next iteration.
|
// Clear the slate for the next iteration.
|
||||||
|
@ -8,7 +8,7 @@ var buf = new ArrayBuffer(0x10000);
|
|||||||
var arr = new Uint8Array(buf).fill(55);
|
var arr = new Uint8Array(buf).fill(55);
|
||||||
var tmp = {};
|
var tmp = {};
|
||||||
tmp[Symbol.toPrimitive] = function () {
|
tmp[Symbol.toPrimitive] = function () {
|
||||||
%ArrayBufferNeuter(arr.buffer);
|
%ArrayBufferDetach(arr.buffer);
|
||||||
return 50;
|
return 50;
|
||||||
}
|
}
|
||||||
arr.copyWithin(tmp);
|
arr.copyWithin(tmp);
|
||||||
|
@ -232,13 +232,13 @@ CheckEachTypedArray(function parametersNotCalledIfDetached(constructor) {
|
|||||||
var tmp = {
|
var tmp = {
|
||||||
[Symbol.toPrimitive]() {
|
[Symbol.toPrimitive]() {
|
||||||
assertUnreachable("Parameter should not be processed when " +
|
assertUnreachable("Parameter should not be processed when " +
|
||||||
"array.[[ViewedArrayBuffer]] is neutered.");
|
"array.[[ViewedArrayBuffer]] is detached.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.copyWithin(tmp, tmp, tmp), TypeError);
|
||||||
assertEquals(0, array.length, "array.[[ViewedArrayBuffer]] is detached");
|
assertEquals(0, array.length, "array.[[ViewedArrayBuffer]] is detached");
|
||||||
|
@ -15,7 +15,7 @@ var typedArrayConstructors = [
|
|||||||
Float32Array,
|
Float32Array,
|
||||||
Float64Array];
|
Float64Array];
|
||||||
|
|
||||||
function CheckTypedArrayIsNeutered(array) {
|
function CheckTypedArrayIsDetached(array) {
|
||||||
assertEquals(0, array.byteLength);
|
assertEquals(0, array.byteLength);
|
||||||
assertEquals(0, array.byteOffset);
|
assertEquals(0, array.byteOffset);
|
||||||
assertEquals(0, array.length);
|
assertEquals(0, array.length);
|
||||||
@ -81,21 +81,21 @@ function TestTypedArrayForEach(constructor) {
|
|||||||
CheckWrapping(3.14, Number);
|
CheckWrapping(3.14, Number);
|
||||||
CheckWrapping({}, Object);
|
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
|
// still make .forEach() finish, and the array should keep being
|
||||||
// empty after neutering it.
|
// empty after detaching it.
|
||||||
count = 0;
|
count = 0;
|
||||||
a = new constructor(3);
|
a = new constructor(3);
|
||||||
result = a.every(function (n, index, array) {
|
result = a.every(function (n, index, array) {
|
||||||
assertFalse(array[index] === undefined); // don't get here if neutered
|
assertFalse(array[index] === undefined); // don't get here if detached
|
||||||
if (count > 0) %ArrayBufferNeuter(array.buffer);
|
if (count > 0) %ArrayBufferDetach(array.buffer);
|
||||||
array[index] = n + 1;
|
array[index] = n + 1;
|
||||||
count++;
|
count++;
|
||||||
return count > 1 ? array[index] === undefined : true;
|
return count > 1 ? array[index] === undefined : true;
|
||||||
});
|
});
|
||||||
assertEquals(2, count);
|
assertEquals(2, count);
|
||||||
assertEquals(true, result);
|
assertEquals(true, result);
|
||||||
CheckTypedArrayIsNeutered(a);
|
CheckTypedArrayIsDetached(a);
|
||||||
assertEquals(undefined, a[0]);
|
assertEquals(undefined, a[0]);
|
||||||
|
|
||||||
// Calling array.buffer midway can change the backing store.
|
// Calling array.buffer midway can change the backing store.
|
||||||
@ -161,7 +161,7 @@ function TestTypedArrayForEach(constructor) {
|
|||||||
|
|
||||||
// Detached Operation
|
// Detached Operation
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.every(() => true), TypeError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,12 +74,12 @@ for (var constructor of typedArrayConstructors) {
|
|||||||
var tmp = {
|
var tmp = {
|
||||||
[Symbol.toPrimitive]() {
|
[Symbol.toPrimitive]() {
|
||||||
assertUnreachable("Parameter should not be processed when " +
|
assertUnreachable("Parameter should not be processed when " +
|
||||||
"array.[[ViewedArrayBuffer]] is neutered.");
|
"array.[[ViewedArrayBuffer]] is detached.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.fill(tmp), TypeError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ function TestTypedArrayFilter(constructor) {
|
|||||||
// Throw type error if source array is detached while executing a callback
|
// Throw type error if source array is detached while executing a callback
|
||||||
let ta1 = new constructor(10);
|
let ta1 = new constructor(10);
|
||||||
assertThrows(() =>
|
assertThrows(() =>
|
||||||
ta1.filter(() => %ArrayBufferNeuter(ta1.buffer))
|
ta1.filter(() => %ArrayBufferDetach(ta1.buffer))
|
||||||
, TypeError);
|
, TypeError);
|
||||||
|
|
||||||
// A new typed array should be created after finishing callbacks
|
// A new typed array should be created after finishing callbacks
|
||||||
|
@ -190,13 +190,13 @@ assertEquals(x, 4);
|
|||||||
var tmp = {
|
var tmp = {
|
||||||
[Symbol.toPrimitive]() {
|
[Symbol.toPrimitive]() {
|
||||||
assertUnreachable("Parameter should not be processed when " +
|
assertUnreachable("Parameter should not be processed when " +
|
||||||
"array.[[ViewedArrayBuffer]] is neutered.");
|
"array.[[ViewedArrayBuffer]] is detached.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.find(tmp), TypeError);
|
||||||
}
|
}
|
||||||
|
@ -190,11 +190,11 @@ assertEquals(x, 4);
|
|||||||
var tmp = {
|
var tmp = {
|
||||||
[Symbol.toPrimitive]() {
|
[Symbol.toPrimitive]() {
|
||||||
assertUnreachable("Parameter should not be processed when " +
|
assertUnreachable("Parameter should not be processed when " +
|
||||||
"array.[[ViewedArrayBuffer]] is neutered.");
|
"array.[[ViewedArrayBuffer]] is detached.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.findIndex(tmp), TypeError);
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ var typedArrayConstructors = [
|
|||||||
Float32Array,
|
Float32Array,
|
||||||
Float64Array];
|
Float64Array];
|
||||||
|
|
||||||
function CheckTypedArrayIsNeutered(array) {
|
function CheckTypedArrayIsDetached(array) {
|
||||||
assertEquals(0, array.byteLength);
|
assertEquals(0, array.byteLength);
|
||||||
assertEquals(0, array.byteOffset);
|
assertEquals(0, array.byteOffset);
|
||||||
assertEquals(0, array.length);
|
assertEquals(0, array.length);
|
||||||
@ -84,7 +84,7 @@ function TestTypedArrayForEach(constructor) {
|
|||||||
assertEquals(43, a[0]);
|
assertEquals(43, a[0]);
|
||||||
assertEquals(42, a[1]);
|
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
|
// still make .forEach() finish, but exiting early due to the missing
|
||||||
// elements, and the array should keep being empty after detaching it.
|
// elements, and the array should keep being empty after detaching it.
|
||||||
// TODO(dehrenberg): According to the ES6 spec, accessing or testing
|
// TODO(dehrenberg): According to the ES6 spec, accessing or testing
|
||||||
@ -94,12 +94,12 @@ function TestTypedArrayForEach(constructor) {
|
|||||||
a = new constructor(3);
|
a = new constructor(3);
|
||||||
count = 0;
|
count = 0;
|
||||||
a.forEach(function (n, index, array) {
|
a.forEach(function (n, index, array) {
|
||||||
if (count > 0) %ArrayBufferNeuter(array.buffer);
|
if (count > 0) %ArrayBufferDetach(array.buffer);
|
||||||
array[index] = n + 1;
|
array[index] = n + 1;
|
||||||
count++;
|
count++;
|
||||||
});
|
});
|
||||||
assertEquals(2, count);
|
assertEquals(2, count);
|
||||||
CheckTypedArrayIsNeutered(a);
|
CheckTypedArrayIsDetached(a);
|
||||||
assertEquals(undefined, a[0]);
|
assertEquals(undefined, a[0]);
|
||||||
|
|
||||||
// The method must work for typed arrays created from ArrayBuffer.
|
// The method must work for typed arrays created from ArrayBuffer.
|
||||||
@ -150,7 +150,7 @@ function TestTypedArrayForEach(constructor) {
|
|||||||
|
|
||||||
// Detached Operation
|
// Detached Operation
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.forEach(() => true), TypeError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,6 @@ var typedArrayConstructors = [
|
|||||||
|
|
||||||
for (constructor of typedArrayConstructors) {
|
for (constructor of typedArrayConstructors) {
|
||||||
var ta = new constructor(10);
|
var ta = new constructor(10);
|
||||||
%ArrayBufferNeuter(ta.buffer);
|
%ArrayBufferDetach(ta.buffer);
|
||||||
assertThrows(() => constructor.from(ta), TypeError);
|
assertThrows(() => constructor.from(ta), TypeError);
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ for (var constructor of typedArrayConstructors) {
|
|||||||
|
|
||||||
let ta2 = new constructor(3).fill(1);
|
let ta2 = new constructor(3).fill(1);
|
||||||
Object.defineProperty(ta2, "length", {get: function() {
|
Object.defineProperty(ta2, "length", {get: function() {
|
||||||
%ArrayBufferNeuter(ta2.buffer);
|
%ArrayBufferDetach(ta2.buffer);
|
||||||
return 6;
|
return 6;
|
||||||
}});
|
}});
|
||||||
assertArrayLikeEquals(constructor.from(ta2), [d, d, d, d, d, d], constructor);
|
assertArrayLikeEquals(constructor.from(ta2), [d, d, d, d, d, d], constructor);
|
||||||
|
@ -19,7 +19,7 @@ var typedArrayConstructors = [
|
|||||||
var tmp = {
|
var tmp = {
|
||||||
[Symbol.toPrimitive]() {
|
[Symbol.toPrimitive]() {
|
||||||
assertUnreachable("Parameter should not be processed when " +
|
assertUnreachable("Parameter should not be processed when " +
|
||||||
"array.[[ViewedArrayBuffer]] is neutered.");
|
"array.[[ViewedArrayBuffer]] is detached.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -65,7 +65,7 @@ for (var constructor of typedArrayConstructors) {
|
|||||||
|
|
||||||
// Detached Operation
|
// Detached Operation
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.indexOf(tmp), TypeError);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
@ -107,6 +107,6 @@ for (var constructor of typedArrayConstructors) {
|
|||||||
|
|
||||||
// Detached Operation
|
// Detached Operation
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.lastIndexOf(tmp), TypeError);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ for (var constructor of typedArrayConstructors) {
|
|||||||
|
|
||||||
// Detached Operation
|
// Detached Operation
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.filter(() => false), TypeError);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ for (var constructor of typedArrayConstructors) {
|
|||||||
|
|
||||||
// Detached Operation
|
// Detached Operation
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.map((v) => v), TypeError);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ for (var constructor of typedArrayConstructors) {
|
|||||||
|
|
||||||
// Detached Operation
|
// Detached Operation
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.some((v) => false), TypeError);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ function TestTypedArrayMap(constructor) {
|
|||||||
new DetachingArray(5).map(function(v,i,a){
|
new DetachingArray(5).map(function(v,i,a){
|
||||||
print(i);
|
print(i);
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
%ArrayBufferNeuter(target.buffer);
|
%ArrayBufferDetach(target.buffer);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, TypeError);
|
}, TypeError);
|
||||||
|
@ -57,7 +57,7 @@ for (var constructor of arrayConstructors) {
|
|||||||
// Detached Operation
|
// Detached Operation
|
||||||
if (constructor != ArrayMaker) {
|
if (constructor != ArrayMaker) {
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
||||||
%ArrayBufferNeuter(array.buffer);
|
%ArrayBufferDetach(array.buffer);
|
||||||
assertThrows(() => array.reverse(), TypeError);
|
assertThrows(() => array.reverse(), TypeError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,12 +73,12 @@ for (var constructor of typedArrayConstructors) {
|
|||||||
var tmp = {
|
var tmp = {
|
||||||
[Symbol.toPrimitive]() {
|
[Symbol.toPrimitive]() {
|
||||||
assertUnreachable("Parameter should not be processed when " +
|
assertUnreachable("Parameter should not be processed when " +
|
||||||
"array.[[ViewedArrayBuffer]] is neutered.");
|
"array.[[ViewedArrayBuffer]] is detached.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
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);
|
assertThrows(() => array.slice(tmp, tmp), TypeError);
|
||||||
|
|
||||||
// Check that the species array must be a typed array
|
// Check that the species array must be a typed array
|
||||||
|
@ -65,7 +65,7 @@ for (var constructor of typedArrayConstructors) {
|
|||||||
|
|
||||||
// Detached Operation
|
// Detached Operation
|
||||||
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
|
||||||
%ArrayBufferNeuter(array.buffer);
|
%ArrayBufferDetach(array.buffer);
|
||||||
assertThrows(() => array.sort(), TypeError);
|
assertThrows(() => array.sort(), TypeError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ for (var constructor of typedArrayConstructors) {
|
|||||||
|
|
||||||
// Detached Operation
|
// Detached Operation
|
||||||
var array = new constructor([1, 2, 3]);
|
var array = new constructor([1, 2, 3]);
|
||||||
%ArrayBufferNeuter(array.buffer);
|
%ArrayBufferDetach(array.buffer);
|
||||||
assertThrows(() => array.join(), TypeError);
|
assertThrows(() => array.join(), TypeError);
|
||||||
assertThrows(() => array.toLocalString(), TypeError);
|
assertThrows(() => array.toLocalString(), TypeError);
|
||||||
assertThrows(() => array.toString(), TypeError);
|
assertThrows(() => array.toString(), TypeError);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Flags: --harmony-weak-refs --expose-gc --noincremental-marking
|
// Flags: --harmony-weak-refs --expose-gc --noincremental-marking
|
||||||
|
// Flags: --no-stress-flush-bytecode
|
||||||
|
|
||||||
let cleanup0_call_count = 0;
|
let cleanup0_call_count = 0;
|
||||||
let cleanup0_weak_cell_count = 0;
|
let cleanup0_weak_cell_count = 0;
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
// Flags: --allow-natives-syntax
|
// Flags: --allow-natives-syntax
|
||||||
|
|
||||||
var ab = new ArrayBuffer(100);
|
var ab = new ArrayBuffer(100);
|
||||||
%ArrayBufferNeuter(ab);
|
%ArrayBufferDetach(ab);
|
||||||
%ArrayBufferNeuter(ab);
|
%ArrayBufferDetach(ab);
|
||||||
|
@ -8,7 +8,7 @@ var buffer1 = new ArrayBuffer(100 * 1024);
|
|||||||
|
|
||||||
assertThrows(function() {
|
assertThrows(function() {
|
||||||
var array1 = new Uint8Array(buffer1, {valueOf : function() {
|
var array1 = new Uint8Array(buffer1, {valueOf : function() {
|
||||||
%ArrayBufferNeuter(buffer1);
|
%ArrayBufferDetach(buffer1);
|
||||||
return 0;
|
return 0;
|
||||||
}});
|
}});
|
||||||
}, TypeError);
|
}, TypeError);
|
||||||
@ -17,7 +17,7 @@ var buffer2 = new ArrayBuffer(100 * 1024);
|
|||||||
|
|
||||||
assertThrows(function() {
|
assertThrows(function() {
|
||||||
var array2 = new Uint8Array(buffer2, 0, {valueOf : function() {
|
var array2 = new Uint8Array(buffer2, 0, {valueOf : function() {
|
||||||
%ArrayBufferNeuter(buffer2);
|
%ArrayBufferDetach(buffer2);
|
||||||
return 100 * 1024;
|
return 100 * 1024;
|
||||||
}});
|
}});
|
||||||
}, TypeError);
|
}, TypeError);
|
||||||
@ -30,7 +30,7 @@ assertThrows(() =>
|
|||||||
return 0;
|
return 0;
|
||||||
}}, {valueOf : function() {
|
}}, {valueOf : function() {
|
||||||
convertedLength = true;
|
convertedLength = true;
|
||||||
%ArrayBufferNeuter(buffer1);
|
%ArrayBufferDetach(buffer1);
|
||||||
return 0;
|
return 0;
|
||||||
}}), TypeError);
|
}}), TypeError);
|
||||||
assertTrue(convertedOffset);
|
assertTrue(convertedOffset);
|
||||||
@ -38,7 +38,7 @@ assertTrue(convertedLength);
|
|||||||
|
|
||||||
var buffer3 = new ArrayBuffer(100 * 1024 * 1024);
|
var buffer3 = new ArrayBuffer(100 * 1024 * 1024);
|
||||||
var dataView1 = new DataView(buffer3, {valueOf : function() {
|
var dataView1 = new DataView(buffer3, {valueOf : function() {
|
||||||
%ArrayBufferNeuter(buffer3);
|
%ArrayBufferDetach(buffer3);
|
||||||
return 0;
|
return 0;
|
||||||
}});
|
}});
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ assertEquals(0, dataView1.byteLength);
|
|||||||
var buffer4 = new ArrayBuffer(100 * 1024);
|
var buffer4 = new ArrayBuffer(100 * 1024);
|
||||||
assertThrows(function() {
|
assertThrows(function() {
|
||||||
var dataView2 = new DataView(buffer4, 0, {valueOf : function() {
|
var dataView2 = new DataView(buffer4, 0, {valueOf : function() {
|
||||||
%ArrayBufferNeuter(buffer4);
|
%ArrayBufferDetach(buffer4);
|
||||||
return 100 * 1024 * 1024;
|
return 100 * 1024 * 1024;
|
||||||
}});
|
}});
|
||||||
}, RangeError);
|
}, RangeError);
|
||||||
@ -56,7 +56,7 @@ assertThrows(function() {
|
|||||||
var buffer5 = new ArrayBuffer(100 * 1024);
|
var buffer5 = new ArrayBuffer(100 * 1024);
|
||||||
assertThrows(function() {
|
assertThrows(function() {
|
||||||
buffer5.slice({valueOf : function() {
|
buffer5.slice({valueOf : function() {
|
||||||
%ArrayBufferNeuter(buffer5);
|
%ArrayBufferDetach(buffer5);
|
||||||
return 0;
|
return 0;
|
||||||
}}, 100 * 1024 * 1024);
|
}}, 100 * 1024 * 1024);
|
||||||
}, TypeError);
|
}, TypeError);
|
||||||
@ -65,7 +65,7 @@ assertThrows(function() {
|
|||||||
var buffer7 = new ArrayBuffer(100 * 1024 * 1024);
|
var buffer7 = new ArrayBuffer(100 * 1024 * 1024);
|
||||||
assertThrows(function() {
|
assertThrows(function() {
|
||||||
buffer7.slice(0, {valueOf : function() {
|
buffer7.slice(0, {valueOf : function() {
|
||||||
%ArrayBufferNeuter(buffer7);
|
%ArrayBufferDetach(buffer7);
|
||||||
return 100 * 1024 * 1024;
|
return 100 * 1024 * 1024;
|
||||||
}});
|
}});
|
||||||
}, TypeError);
|
}, TypeError);
|
||||||
@ -74,7 +74,7 @@ var buffer9 = new ArrayBuffer(1024);
|
|||||||
var array9 = new Uint8Array(buffer9);
|
var array9 = new Uint8Array(buffer9);
|
||||||
assertThrows(() =>
|
assertThrows(() =>
|
||||||
array9.subarray({valueOf : function() {
|
array9.subarray({valueOf : function() {
|
||||||
%ArrayBufferNeuter(buffer9);
|
%ArrayBufferDetach(buffer9);
|
||||||
return 0;
|
return 0;
|
||||||
}}, 1024), TypeError);
|
}}, 1024), TypeError);
|
||||||
assertEquals(0, array9.length);
|
assertEquals(0, array9.length);
|
||||||
@ -83,7 +83,7 @@ var buffer11 = new ArrayBuffer(1024);
|
|||||||
var array11 = new Uint8Array(buffer11);
|
var array11 = new Uint8Array(buffer11);
|
||||||
assertThrows(() =>
|
assertThrows(() =>
|
||||||
array11.subarray(0, {valueOf : function() {
|
array11.subarray(0, {valueOf : function() {
|
||||||
%ArrayBufferNeuter(buffer11);
|
%ArrayBufferDetach(buffer11);
|
||||||
return 1024;
|
return 1024;
|
||||||
}}), TypeError);
|
}}), TypeError);
|
||||||
assertEquals(0, array11.length);
|
assertEquals(0, array11.length);
|
||||||
|
@ -4,19 +4,19 @@
|
|||||||
|
|
||||||
// Flags: --allow-natives-syntax
|
// Flags: --allow-natives-syntax
|
||||||
|
|
||||||
// Neutered source
|
// Detached source
|
||||||
var ab = new ArrayBuffer(10);
|
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);
|
assertThrows(() => ab.slice(0), TypeError);
|
||||||
|
|
||||||
// Neutered target
|
// Detached target
|
||||||
class NeuteredArrayBuffer extends ArrayBuffer {
|
class DetachedArrayBuffer extends ArrayBuffer {
|
||||||
constructor(...args) {
|
constructor(...args) {
|
||||||
super(...args);
|
super(...args);
|
||||||
%ArrayBufferNeuter(this);
|
%ArrayBufferDetach(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var ab2 = new ArrayBuffer(10);
|
var ab2 = new ArrayBuffer(10);
|
||||||
ab2.constructor = NeuteredArrayBuffer;
|
ab2.constructor = DetachedArrayBuffer;
|
||||||
assertThrows(() => ab2.slice(0), TypeError);
|
assertThrows(() => ab2.slice(0), TypeError);
|
||||||
|
@ -4,10 +4,7 @@
|
|||||||
|
|
||||||
// Environment Variables: LC_ALL=pt-BR.UTF8
|
// Environment Variables: LC_ALL=pt-BR.UTF8
|
||||||
|
|
||||||
// The data files packaged with d8 currently have Brazillian Portuguese
|
|
||||||
// DateTimeFormat but not Collation
|
|
||||||
|
|
||||||
if (this.Intl) {
|
if (this.Intl) {
|
||||||
assertEquals('pt', Intl.Collator().resolvedOptions().locale);
|
assertEquals('pt-BR', Intl.Collator().resolvedOptions().locale);
|
||||||
assertEquals('pt-BR', Intl.DateTimeFormat().resolvedOptions().locale);
|
assertEquals('pt-BR', Intl.DateTimeFormat().resolvedOptions().locale);
|
||||||
}
|
}
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
// Flags: --allow-natives-syntax
|
// Flags: --allow-natives-syntax
|
||||||
|
|
||||||
var a = new Uint8Array(1024*1024);
|
var a = new Uint8Array(1024*1024);
|
||||||
%ArrayBufferNeuter(a.buffer);
|
%ArrayBufferDetach(a.buffer);
|
||||||
assertThrows(() => new Uint8Array(a));
|
assertThrows(() => new Uint8Array(a));
|
||||||
|
@ -8,7 +8,7 @@ var buffer = new ArrayBuffer(1024 * 1024);
|
|||||||
buffer.constructor = {
|
buffer.constructor = {
|
||||||
[Symbol.species]: new Proxy(function() {}, {
|
[Symbol.species]: new Proxy(function() {}, {
|
||||||
get: _ => {
|
get: _ => {
|
||||||
%ArrayBufferNeuter(buffer);
|
%ArrayBufferDetach(buffer);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
@ -8,7 +8,7 @@ delete Float64Array.prototype.__proto__[Symbol.iterator];
|
|||||||
|
|
||||||
let a = new Float64Array(9);
|
let a = new Float64Array(9);
|
||||||
Object.defineProperty(a, "length", {
|
Object.defineProperty(a, "length", {
|
||||||
get: function () { %ArrayBufferNeuter(a.buffer); return 6; }
|
get: function () { %ArrayBufferDetach(a.buffer); return 6; }
|
||||||
});
|
});
|
||||||
|
|
||||||
Float64Array.from(a);
|
Float64Array.from(a);
|
||||||
|
@ -7,7 +7,7 @@ var buffer = new ArrayBuffer(0x100);
|
|||||||
var array = new Uint8Array(buffer).fill(55);
|
var array = new Uint8Array(buffer).fill(55);
|
||||||
var tmp = {};
|
var tmp = {};
|
||||||
tmp[Symbol.toPrimitive] = function () {
|
tmp[Symbol.toPrimitive] = function () {
|
||||||
%ArrayBufferNeuter(array.buffer)
|
%ArrayBufferDetach(array.buffer)
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ buffer = new ArrayBuffer(0x100);
|
|||||||
array = new Uint8Array(buffer).fill(55);
|
array = new Uint8Array(buffer).fill(55);
|
||||||
tmp = {};
|
tmp = {};
|
||||||
tmp[Symbol.toPrimitive] = function () {
|
tmp[Symbol.toPrimitive] = function () {
|
||||||
%ArrayBufferNeuter(array.buffer)
|
%ArrayBufferDetach(array.buffer)
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ buffer = new ArrayBuffer(0x100);
|
|||||||
array = new Uint8Array(buffer).fill(55);
|
array = new Uint8Array(buffer).fill(55);
|
||||||
tmp = {};
|
tmp = {};
|
||||||
tmp[Symbol.toPrimitive] = function () {
|
tmp[Symbol.toPrimitive] = function () {
|
||||||
%ArrayBufferNeuter(array.buffer)
|
%ArrayBufferDetach(array.buffer)
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
assertEquals(true, Array.prototype.includes.call(array, undefined, tmp));
|
assertEquals(true, Array.prototype.includes.call(array, undefined, tmp));
|
||||||
|
@ -8,7 +8,7 @@ for (var i = 0; i < 3; i++) {
|
|||||||
var array = new BigInt64Array(200);
|
var array = new BigInt64Array(200);
|
||||||
|
|
||||||
function evil_callback() {
|
function evil_callback() {
|
||||||
%ArrayBufferNeuter(array.buffer);
|
%ArrayBufferDetach(array.buffer);
|
||||||
gc();
|
gc();
|
||||||
return 1094795585n;
|
return 1094795585n;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
var v17 = {};
|
var v17 = 42;
|
||||||
var v32 = {};
|
var v32 = { initial: 1 };
|
||||||
v39 = new WebAssembly.Memory(v32);
|
v39 = new WebAssembly.Memory(v32);
|
||||||
v49 = v39.grow(v17);
|
v49 = v39.grow(v17);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
load('test/mjsunit/wasm/wasm-constants.js');
|
load('test/mjsunit/wasm/wasm-constants.js');
|
||||||
load('test/mjsunit/wasm/wasm-module-builder.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();
|
let builder = new WasmModuleBuilder();
|
||||||
builder.addImportedMemory("mod", "imported_mem");
|
builder.addImportedMemory("mod", "imported_mem");
|
||||||
builder.addFunction('mem_size', kSig_i_v)
|
builder.addFunction('mem_size', kSig_i_v)
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
(new Int8Array((new WebAssembly.Memory({})).buffer)).buffer;
|
(new Int8Array((new WebAssembly.Memory({initial: 0})).buffer)).buffer;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// 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.
|
// Test the SameValue and SameValueZero internal methods.
|
||||||
|
|
||||||
var obj1 = {x: 10, y: 11, z: "test"};
|
var obj1 = {x: 10, y: 11, z: "test"};
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
function $DETACHBUFFER(buffer) {
|
function $DETACHBUFFER(buffer) {
|
||||||
%ArrayBufferNeuter(buffer);
|
%ArrayBufferDetach(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
$262.detachArrayBuffer = $DETACHBUFFER;
|
$262.detachArrayBuffer = $DETACHBUFFER;
|
||||||
|
@ -87,15 +87,23 @@ class VariantsGenerator(testsuite.VariantsGenerator):
|
|||||||
def gen(self, test):
|
def gen(self, test):
|
||||||
flags_set = self._get_flags_set(test)
|
flags_set = self._get_flags_set(test)
|
||||||
test_record = test.test_record
|
test_record = test.test_record
|
||||||
|
|
||||||
|
# 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)):
|
for n, variant in enumerate(self._get_variants(test)):
|
||||||
flags = flags_set[variant][0]
|
flags = flags_set[variant][0]
|
||||||
if 'noStrict' in test_record:
|
if 'noStrict' in test_record:
|
||||||
yield (variant, flags, str(n))
|
yield (variant, flags, str(n) + phase_var)
|
||||||
elif 'onlyStrict' in test_record:
|
elif 'onlyStrict' in test_record:
|
||||||
yield (variant, flags + ['--use-strict'], 'strict-%d' % n)
|
yield (variant, flags + ['--use-strict'], 'strict-%d' % n + phase_var)
|
||||||
else:
|
else:
|
||||||
yield (variant, flags, str(n))
|
yield (variant, flags, str(n))
|
||||||
yield (variant, flags + ['--use-strict'], 'strict-%d' % n)
|
yield (variant, flags + ['--use-strict'], 'strict-%d' % n + phase_var)
|
||||||
|
|
||||||
|
|
||||||
class TestSuite(testsuite.TestSuite):
|
class TestSuite(testsuite.TestSuite):
|
||||||
@ -169,13 +177,34 @@ class TestCase(testcase.D8TestCase):
|
|||||||
.get('type', None)
|
.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):
|
def _get_files_params(self):
|
||||||
return (
|
return (
|
||||||
list(self.suite.harness) +
|
list(self.suite.harness) +
|
||||||
([os.path.join(self.suite.root, "harness-agent.js")]
|
([os.path.join(self.suite.root, "harness-agent.js")]
|
||||||
if self.path.startswith('built-ins/Atomics') else []) +
|
if self.path.startswith('built-ins/Atomics') else []) +
|
||||||
([os.path.join(self.suite.root, "harness-adapt-donotevaluate.js")]
|
([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() +
|
self._get_includes() +
|
||||||
(["--module"] if "module" in self.test_record else []) +
|
(["--module"] if "module" in self.test_record else []) +
|
||||||
[self._get_source_path()]
|
[self._get_source_path()]
|
||||||
@ -213,7 +242,12 @@ class TestCase(testcase.D8TestCase):
|
|||||||
def output_proc(self):
|
def output_proc(self):
|
||||||
if self._expected_exception is not None:
|
if self._expected_exception is not None:
|
||||||
return test262.ExceptionOutProc(self.expected_outcomes,
|
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:
|
if self.expected_outcomes == outproc.OUTCOMES_PASS:
|
||||||
return test262.PASS_NO_EXCEPTION
|
return test262.PASS_NO_EXCEPTION
|
||||||
return test262.NoExceptionOutProc(self.expected_outcomes)
|
return test262.NoExceptionOutProc(self.expected_outcomes)
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
[ALWAYS, {
|
[ALWAYS, {
|
||||||
# https://bugs.chromium.org/p/v8/issues/detail?id=8319
|
# https://bugs.chromium.org/p/v8/issues/detail?id=8319
|
||||||
'memory/grow': [FAIL],
|
'memory/grow': [FAIL],
|
||||||
'memory/constructor': [FAIL],
|
|
||||||
'table/grow': [FAIL],
|
'table/grow': [FAIL],
|
||||||
'table/constructor': [FAIL],
|
|
||||||
'table/get-set': [FAIL],
|
'table/get-set': [FAIL],
|
||||||
'module/customSections': [FAIL],
|
'module/customSections': [FAIL],
|
||||||
'global/constructor': [FAIL],
|
'global/constructor': [FAIL],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user