Commit b69b24a2 authored by petermarshall's avatar petermarshall Committed by Commit bot

[Test] Update all SixSpeed tests to run in separate processes.

BUG=v8:5922

Review-Url: https://codereview.chromium.org/2674873002
Cr-Commit-Position: refs/heads/master@{#42954}
parent aea3ce3d
...@@ -10,30 +10,36 @@ ...@@ -10,30 +10,36 @@
"tests": [ "tests": [
{ {
"name": "Array pattern destructuring", "name": "Array pattern destructuring",
"path": ["SixSpeed/array_destructuring"], "path": ["SixSpeed"],
"main": "run.js",
"resources": [
"run.js",
"array_destructuring.js"
],
"results_regexp": "^%s\\(Score\\): (.+)$", "results_regexp": "^%s\\(Score\\): (.+)$",
"tests": [ "tests": [
{"name": "ArrayDestructuring-ES5"}, {
{"name": "ArrayDestructuring-ES6"} "name": "ES5",
"main": "run.js",
"test_flags": ["array_destructuring/es5"]
},
{
"name": "ES6",
"main": "run.js",
"test_flags": ["array_destructuring/es6"]
}
] ]
}, },
{ {
"name": "Computed property names in object literals", "name": "Computed property names in object literals",
"path": ["SixSpeed/object_literals"], "path": ["SixSpeed"],
"main": "run.js",
"resources": [
"run.js",
"object_literals.js"
],
"results_regexp": "^%s\\(Score\\): (.+)$", "results_regexp": "^%s\\(Score\\): (.+)$",
"tests": [ "tests": [
{"name": "ObjectLiterals-ES5"}, {
{"name": "ObjectLiterals-ES6"} "name": "ES5",
"main": "run.js",
"test_flags": ["object_literals/es5"]
},
{
"name": "ES6",
"main": "run.js",
"test_flags": ["object_literals/es6"]
}
] ]
}, },
{ {
...@@ -52,39 +58,46 @@ ...@@ -52,39 +58,46 @@
}, },
{ {
"name": "Spread", "name": "Spread",
"path": ["SixSpeed/spread"], "path": ["SixSpeed"],
"main": "run.js",
"resources": [
"run.js",
"spread.js"
],
"results_regexp": "^%s\\(Score\\): (.+)$", "results_regexp": "^%s\\(Score\\): (.+)$",
"tests": [ "tests": [
{"name": "Spread-ES5"}, {
{"name": "Spread-Traceur"}, "name": "ES5",
{"name": "Spread-ES6"} "main": "run.js",
"test_flags": ["spread/es5"]
},
{
"name": "Babel",
"main": "run.js",
"test_flags": ["spread/babel"]
},
{
"name": "ES6",
"main": "run.js",
"test_flags": ["spread/es6"]
}
] ]
}, },
{ {
"name": "SuperSpread", "name": "SuperSpread",
"path": ["SixSpeed/super_spread"], "path": ["SixSpeed"],
"flags": ["--future"], "flags": ["--future"],
"results_regexp": "^%s\\(Score\\): (.+)$", "results_regexp": "^%s\\(Score\\): (.+)$",
"tests": [ "tests": [
{ {
"name": "ES5", "name": "ES5",
"main": "run.js", "main": "run.js",
"test_flags": ["es5"] "test_flags": ["super_spread/es5"]
}, },
{ {
"name": "Babel", "name": "Babel",
"main": "run.js", "main": "run.js",
"test_flags": ["babel"] "test_flags": ["super_spread/babel"]
}, },
{ {
"name": "ES6", "name": "ES6",
"main": "run.js", "main": "run.js",
"test_flags": ["es6"] "test_flags": ["super_spread/es6"]
} }
] ]
} }
......
// Copyright 2016 the V8 project authors. All rights reserved. // Copyright 2017 the V8 project authors. All rights reserved.
// 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.
// This benchmark is based on the six-speed benchmark build output. // This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/> // Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('ES5', [1000], [
new BenchmarkSuite('ArrayDestructuring-ES5', [1000], [
new Benchmark('ES5', false, false, 0, ES5), new Benchmark('ES5', false, false, 0, ES5),
]); ]);
new BenchmarkSuite('ArrayDestructuring-ES6', [1000], [
new Benchmark('ES6', false, false, 0, ES6),
]);
// ----------------------------------------------------------------------------
// Benchmark: ES5
// ----------------------------------------------------------------------------
function ES5() { function ES5() {
"use strict"; "use strict";
var data = [1, 2, 3]; var data = [1, 2, 3];
var c = data[0]; var c = data[0];
return c; return c;
} }
// ----------------------------------------------------------------------------
// Benchmark: ES6
// ----------------------------------------------------------------------------
function ES6() {
"use strict";
var data = [1, 2, 3];
var [c] = data;
return c;
}
// Copyright 2017 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.
// This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('ES6', [1000], [
new Benchmark('ES6', false, false, 0, ES6),
]);
function ES6() {
"use strict";
var data = [1, 2, 3];
var [c] = data;
return c;
}
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
load('../../base.js');
load('array_destructuring.js');
var success = true;
function PrintResult(name, result) {
print(name + '(Score): ' + result);
}
function PrintError(name, error) {
PrintResult(name, error);
success = false;
}
BenchmarkSuite.config.doWarmup = undefined;
BenchmarkSuite.config.doDeterministic = undefined;
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
NotifyError: PrintError });
// Copyright 2017 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.
// This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('ES5', [1000], [
new Benchmark('ES5', false, false, 0, ES5),
]);
function ES5() {
"use strict";
var name = 'foo';
var ret = {};
ret[name] = 'bar';
return ret;
}
// Copyright 2016 the V8 project authors. All rights reserved. // Copyright 2017 the V8 project authors. All rights reserved.
// 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.
// This benchmark is based on the six-speed benchmark build output. // This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/> // Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('ES6', [1000], [
new BenchmarkSuite('ObjectLiterals-ES5', [1000], [
new Benchmark('ES5', false, false, 0, ES5),
]);
new BenchmarkSuite('ObjectLiterals-ES6', [1000], [
new Benchmark('ES6', false, false, 0, ES6), new Benchmark('ES6', false, false, 0, ES6),
]); ]);
// ----------------------------------------------------------------------------
// Benchmark: ES5
// ----------------------------------------------------------------------------
function ES5() {
"use strict";
var name = 'foo';
var ret = {};
ret[name] = 'bar';
return ret;
}
// ----------------------------------------------------------------------------
// Benchmark: ES6
// ----------------------------------------------------------------------------
function ES6() { function ES6() {
"use strict"; "use strict";
var name = 'foo'; var name = 'foo';
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
load('../../base.js');
load('object_literals.js');
var success = true;
function PrintResult(name, result) {
print(name + '(Score): ' + result);
}
function PrintError(name, error) {
PrintResult(name, error);
success = false;
}
BenchmarkSuite.config.doWarmup = undefined;
BenchmarkSuite.config.doDeterministic = undefined;
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
NotifyError: PrintError });
...@@ -2,7 +2,7 @@ ...@@ -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.
load('../../base.js'); load('../base.js');
load(arguments[0] + '.js'); load(arguments[0] + '.js');
var success = true; var success = true;
......
// Copyright 2017 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.
// This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('Babel', [1000], [
new Benchmark('Babel', false, false, 0, Babel),
]);
function Babel() {
"use strict";
return Math.max.apply(Math, [1, 2, 3]);
}
// Copyright 2017 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.
// This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('ES5', [1000], [
new Benchmark('ES5', false, false, 0, ES5),
]);
function ES5() {
"use strict";
return Math.max.apply(Math, [1, 2, 3]);
}
// Copyright 2017 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.
// This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('ES6', [1000], [
new Benchmark('ES6', false, false, 0, ES6),
]);
function ES6() {
"use strict";
return Math.max(...[1, 2, 3]);
}
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
load('../../base.js');
load('spread.js');
var success = true;
function PrintResult(name, result) {
print(name + '(Score): ' + result);
}
function PrintError(name, error) {
PrintResult(name, error);
success = false;
}
BenchmarkSuite.config.doWarmup = undefined;
BenchmarkSuite.config.doDeterministic = undefined;
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
NotifyError: PrintError });
// Copyright 2016 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.
// This benchmark is based on the six-speed benchmark build output.
// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
new BenchmarkSuite('Spread-ES5', [1000], [
new Benchmark('ES5', false, false, 0, ES5),
]);
new BenchmarkSuite('Spread-Traceur', [1000], [
new Benchmark('Traceur', false, false, 0, Traceur),
]);
new BenchmarkSuite('Spread-ES6', [1000], [
new Benchmark('ES6', false, false, 0, ES6),
]);
// ----------------------------------------------------------------------------
// Benchmark: ES5
// ----------------------------------------------------------------------------
function ES5() {
"use strict";
return Math.max.apply(Math, [1,2,3]);
}
// ----------------------------------------------------------------------------
// Benchmark: Traceur
// ----------------------------------------------------------------------------
function checkObjectCoercible(v) {
"use strict";
if (v === null || v === undefined) {
throw new $TypeError('Value cannot be converted to an Object');
}
return v;
}
function spread() {
"use strict";
var rv = [],
j = 0,
iterResult;
for (var i = 0; i < arguments.length; i++) {
var valueToSpread = checkObjectCoercible(arguments[i]);
if (typeof valueToSpread[Symbol.iterator] !== 'function') {
throw new TypeError('Cannot spread non-iterable object.');
}
var iter = valueToSpread[Symbol.iterator]();
while (!(iterResult = iter.next()).done) {
rv[j++] = iterResult.value;
}
}
return rv;
}
function Traceur() {
"use strict";
var $__0;
return ($__0 = Math).max.apply($__0, spread([1, 2, 3]));
}
// ----------------------------------------------------------------------------
// Benchmark: ES6
// ----------------------------------------------------------------------------
function ES6() {
"use strict";
return Math.max(...[1,2,3]);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment