Commit 35ecaabc authored by Maya Lekova's avatar Maya Lekova Committed by Commit Bot

Revert "[wasm] Add tests for SIMD JS-API errors"

This reverts commit f47706a7.

Reason for revert: Breaks V8 Linux bot - https://ci.chromium.org/p/v8/builders/ci/V8%20Linux/34070

Original change's description:
> [wasm] Add tests for SIMD JS-API errors
> 
> Change-Id: I7fc2eb95f9a2d1ea45bc84543a05c84e32bb6d31
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1838924
> Reviewed-by: Zhi An Ng <zhin@chromium.org>
> Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64098}

TBR=gdeepti@chromium.org,ahaas@chromium.org,zhin@chromium.org

Change-Id: I6640ba207e30200e6846a16cab0bd522cabf3108
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1839651Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64099}
parent f47706a7
// Copyright 2019 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: --experimental-wasm-simd
load("test/mjsunit/wasm/wasm-module-builder.js");
(function S128InSignatureThrows() {
print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addMemory(1, 1, true);
builder.addFunction('foo', kSig_s_i)
.addBody([
kExprGetLocal, 0,
kSimdPrefix,
kExprI32x4Splat])
.exportFunc()
const instance = builder.instantiate();
assertThrows(() => instance.exports.foo(33), TypeError);
})();
(function S128ParamInSignatureThrows() {
print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addMemory(1, 1, true);
builder.addFunction('foo', kSig_i_s)
.addBody([
kExprGetLocal, 0,
kSimdPrefix,
kExprI32x4ExtractLane, 1])
.exportFunc();
const instance = builder.instantiate();
assertThrows(() => instance.exports.invalid_foo(10), TypeError);
})();
(function ImportS128Return() {
print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addImport('', 'f', makeSig([], [kWasmS128]));
builder.addFunction('foo', kSig_v_v)
.addBody([kExprCallFunction, 0, kExprDrop])
.exportFunc();
const instance = builder.instantiate({'': {f: _ => 1}});
assertThrows(() => instance.exports.foo(), TypeError);
})();
(function S128ImportThrows() {
print(arguments.callee.name);
let builder = new WasmModuleBuilder();
let sig_index = builder.addType(kSig_i_i);
let sig_s128_index = builder.addType(kSig_i_s);
let index = builder.addImport('', 'func', sig_s128_index);
builder.addFunction('foo', sig_index)
.addBody([
kExprGetLocal, 0,
kSimdPrefix,
kExprI32x4Splat,
kExprCallFunction, index])
.exportFunc();
const instance = builder.instantiate({'': {func: _ => {}}});
assertThrows(() => instance.exports.foo(14), TypeError);
})();
(function TestS128GlobalConstructor() {
assertThrows(() => new WebAssembly.Global({value: 'i128'}), TypeError);
})();
......@@ -162,8 +162,6 @@ let kSig_r_v = makeSig([], [kWasmAnyRef]);
let kSig_a_v = makeSig([], [kWasmAnyFunc]);
let kSig_a_i = makeSig([kWasmI32], [kWasmAnyFunc]);
let kSig_e_v = makeSig([], [kWasmExnRef]);
let kSig_s_i = makeSig([kWasmI32], [kWasmS128]);
let kSig_i_s = makeSig([kWasmS128], [kWasmI32]);
function makeSig(params, results) {
return {params: params, results: results};
......@@ -468,8 +466,6 @@ let kExprI64AtomicCompareExchange32U = 0x4e;
// Simd opcodes.
let kExprF32x4Min = 0x9e;
let kExprI32x4Splat = 0x0c
let kExprI32x4ExtractLane = 0x0d;
// Compilation hint constants.
let kCompilationHintStrategyDefault = 0x00;
......
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