Skip to content
Snippets Groups Projects
Unverified Commit d9d9839c authored by Leo Balter's avatar Leo Balter Committed by GitHub
Browse files

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

Import test changes from V8
parents 25da3441 a2d52d91
No related branches found
No related tags found
No related merge requests found
Showing
with 131 additions and 1389 deletions
{
"sourceRevisionAtLastExport": "c88994f8",
"targetRevisionAtLastExport": "39b32c6df6",
"sourceRevisionAtLastExport": "ab445f8b",
"targetRevisionAtLastExport": "29615d7fbf",
"curatedFiles": {}
}
\ No newline at end of file
// 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);
// 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);
}
......@@ -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)'
##############################################################################
......
// 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.
// 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));
// 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];
}
// 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()];
}
......@@ -6,21 +6,6 @@
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);
......@@ -34,21 +19,3 @@ const n = 130000;
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);
}
// 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)];
}
......@@ -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"]
);
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment