v8/test/simdjs/harness-adapt.js
bbudge 6113058427 Expose SIMD.Float32x4 type to Javascript.
This CL exposes the constructor function, defines type related
information, and implements value type semantics.
It also refactors test/mjsunit/samevalue.js to test SameValue and SameValueZero.

TEST=test/mjsunit/harmony/simd.js, test/cctest/test-simd.cc

LOG=Y
BUG=v8:4124

Committed: https://crrev.com/e5ed3bee99807c502fa7d7a367ec401e16d3f773
Cr-Commit-Position: refs/heads/master@{#29689}

Review URL: https://codereview.chromium.org/1219943002

Cr-Commit-Position: refs/heads/master@{#29712}
2015-07-16 19:43:32 +00:00

35 lines
902 B
JavaScript

// Copyright 2015 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.
(function() {
"use strict";
var _oldLoad = load;
// Filter load paths in the ecmascript_simd tests that
// assume the test is run with a current working directory
// set to the directory containing the test.
load = function(filename) {
// Decide if this is the compliance test or the benchmarks.
if (filename === 'ecmascript_simd.js' ||
filename === 'ecmascript_simd_tests.js') {
_oldLoad('test/simdjs/data/src/' + filename);
} else {
_oldLoad('test/simdjs/data/src/benchmarks/' + filename);
}
};
// TODO(bbudge): Drop when polyfill is not needed.
load('ecmascript_simd.js');
load('base.js');
})();
// ecmascript_simd_tests logs errors to the console.
var console = {
log: function(x) { print(x); },
};