Merge pull request #1924 from test262-automation/v8-test262-automation-export-39b32c6df6

Import test changes from V8
This commit is contained in:
Leo Balter 2018-11-07 10:14:27 -05:00 committed by GitHub
commit d9d9839c95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 131 additions and 1443 deletions

View File

@ -1,5 +1,5 @@
{
"sourceRevisionAtLastExport": "c88994f8",
"targetRevisionAtLastExport": "39b32c6df6",
"sourceRevisionAtLastExport": "ab445f8b",
"targetRevisionAtLastExport": "29615d7fbf",
"curatedFiles": {}
}

View File

@ -0,0 +1,6 @@
// 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.
x = new Intl.DateTimeFormat("en-u-foo-x-u");
assertEquals('en', x.resolvedOptions().locale);

View File

@ -0,0 +1,11 @@
// 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.
const n = 130000;
{
let x = new Set();
for (let i = 0; i < n; ++i) x.add(i);
let a = Array.from(x);
}

View File

@ -774,6 +774,8 @@
'regress/regress-91008': [PASS, SLOW],
'harmony/regexp-property-lu-ui': [PASS, SLOW],
'whitespaces': [PASS, SLOW],
'wasm/atomics-stress': [PASS, SLOW],
'wasm/atomics64-stress': [PASS, SLOW],
}], # 'simulator_run and (arch == ppc or arch == ppc64 or arch == s390 or arch == s390x)'
##############################################################################

View File

@ -0,0 +1,24 @@
// 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.
const magic0 = 2396;
const magic1 = 1972;
// Fill xs with float arrays.
const xs = [];
for (let j = 0; j < magic0; ++j) {
xs[j] = [j + 0.1];
}
// Sort, but trim the array at some point.
let cmp_calls = 0;
xs.sort((lhs, rhs) => {
lhs = lhs || [0];
rhs = rhs || [0];
if (cmp_calls++ == magic1) xs.length = 1;
return lhs[0] - rhs[0];
});
// The final shape of the array is unspecified since the comparison function is
// inconsistent.

View File

@ -0,0 +1,14 @@
// 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 f(a) {
return (a >>> 1073741824) + -3;
}
assertEquals(-3, f(0));
assertEquals(-2, f(1));
%OptimizeFunctionOnNextCall(f);
assertEquals(4294967291, f(-2));

View File

@ -0,0 +1,13 @@
// 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.
// Test that spread can create arrays in large object space.
const n = 130000;
{
let x = new Array(n);
for (let i = 0; i < n; ++i) x[i] = i;
let a = [...x];
}

View File

@ -0,0 +1,17 @@
// 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.
// Test that spread can create arrays in large object space.
const n = 130000;
{
let x = new Map();
for (let i = 0; i < n; ++i) x.set(i, String(i));
let a = [...x.values()];
}{
let x = new Map();
for (let i = 0; i < n; ++i) x.set(i, String(i));
let a = [...x.keys()];
}

View File

@ -0,0 +1,21 @@
// 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.
// Test that spread can create arrays in large object space.
const n = 130000;
{
let x = new Set();
for (let i = 0; i < n; ++i) x.add(i);
let a = [...x];
}{
let x = new Set();
for (let i = 0; i < n; ++i) x.add(i);
let a = [...x.values()];
}{
let x = new Set();
for (let i = 0; i < n; ++i) x.add(i);
let a = [...x.keys()];
}

View File

@ -0,0 +1,13 @@
// 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.
// Test that spread can create arrays in large object space.
const n = 130000;
{
let x = new Array(n);
for (let i = 0; i < n; ++i) x[i] = i;
let a = [...String(x)];
}

View File

@ -1,54 +0,0 @@
// 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.
// Test that spread can create arrays in large object space.
const n = 130000;
// Array
{
let x = new Array(n);
for (let i = 0; i < n; ++i) x[i] = i;
let a = [...x];
}
// String
{
let x = new Array(n);
for (let i = 0; i < n; ++i) x[i] = i;
let a = [...String(x)];
}
// Set
{
let x = new Set();
for (let i = 0; i < n; ++i) x.add(i);
let a = [...x];
}{
let x = new Set();
for (let i = 0; i < n; ++i) x.add(i);
let a = [...x.values()];
}{
let x = new Set();
for (let i = 0; i < n; ++i) x.add(i);
let a = [...x.keys()];
}
// Map
{
let x = new Map();
for (let i = 0; i < n; ++i) x.set(i, String(i));
let a = [...x.values()];
}{
let x = new Map();
for (let i = 0; i < n; ++i) x.set(i, String(i));
let a = [...x.keys()];
}
// Array.from
{
let x = new Set();
for (let i = 0; i < n; ++i) x.add(i);
let a = Array.from(x);
}

View File

@ -75,14 +75,14 @@ function testClassInstantiation() {
// ReferenceError: FAIL is not defined
// at thrower
// at X.<instance_fields_initializer>
// at X.<instance_members_initializer>
// at new X
// at testClassInstantiation
// at testTrace
testTrace(
"during class instantiation",
testClassInstantiation,
["thrower", "X.<instance_fields_initializer>", "new X"],
["thrower", "X.<instance_members_initializer>", "new X"],
["anonymous"]
);
@ -98,14 +98,14 @@ function testClassInstantiationWithSuper() {
// ReferenceError: FAIL is not defined
// at thrower
// at X.<instance_fields_initializer>
// at X.<instance_members_initializer>
// at new X
// at testClassInstantiation
// at testTrace
testTrace(
"during class instantiation with super",
testClassInstantiationWithSuper,
["thrower", "X.<instance_fields_initializer>", "new X"],
["thrower", "X.<instance_members_initializer>", "new X"],
["Base", "anonymous"]
);
@ -124,14 +124,14 @@ function testClassInstantiationWithSuper2() {
// ReferenceError: FAIL is not defined
// at thrower
// at X.<instance_fields_initializer>
// at X.<instance_members_initializer>
// at new X
// at testClassInstantiation
// at testTrace
testTrace(
"during class instantiation with super2",
testClassInstantiationWithSuper2,
["thrower", "X.<instance_fields_initializer>", "new X"],
["thrower", "X.<instance_members_initializer>", "new X"],
["Base", "anonymous"]
);
@ -151,7 +151,7 @@ function testClassInstantiationWithSuper3() {
// ReferenceError: FAIL is not defined
// at thrower
// at X.<instance_fields_initializer>
// at X.<instance_members_initializer>
// at new Base
// at new X
// at testClassInstantiationWithSuper3
@ -159,7 +159,7 @@ function testClassInstantiationWithSuper3() {
testTrace(
"during class instantiation with super3",
testClassInstantiationWithSuper3,
["thrower", "X.<instance_fields_initializer>", "new Base", "new X"],
["thrower", "X.<instance_members_initializer>", "new Base", "new X"],
["anonymous"]
);

File diff suppressed because it is too large Load Diff