Commit 29b65c39 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

Gracefully fail BigInt TypedArray.p.sort benchmarks.

'ref' builds might not yet have BigInt support. Instead of crashing
when the benchmark file is loaded, the benchmark now fails during
setup.

R=jgruber@chromium.org

Bug: chromium:834654
Change-Id: I2c03aeba4b6af947061504c369b5228d7b344307
Reviewed-on: https://chromium-review.googlesource.com/1019100
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52685}
parent 0da7ec58
......@@ -17,9 +17,12 @@ let typedArrayFloatConstructors = [
{name: "Float64", ctor: Float64Array},
];
// "ref" builds might not yet have BigInt support, so the benchmark fails
// gracefully during setup (the constructor will be undefined), instead of
// a hard fail when this file is loaded.
let typedArrayBigIntConstructors = [
{name: "BigUint64", ctor: BigUint64Array},
{name: "BigInt64", ctor: BigInt64Array}
{name: "BigUint64", ctor: this["BigUint64Array"]},
{name: "BigInt64", ctor: this["BigInt64Array"]}
];
function CreateBenchmarks(constructors, comparefns = []) {
......
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