Commit 227493b1 authored by Sven Sauleau's avatar Sven Sauleau Committed by Commit Bot

[wasm] split bigint.js test

This CL splits a specific test out the bigint.js test suite in order to
be, eventually, ignored by the wasm-bigint proposal 32-bit support CL.

Change-Id: I8ab673abfb53bac95952b11716fe4f29a4a7feaa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543352
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60510}
parent 24151a91
......@@ -1015,6 +1015,7 @@
# TODO(ssauleau): implement BigInt<>Wasm conversion for other arch -
# crbug.com/v8/7741
'wasm/bigint': [SKIP],
'wasm/bigint-i64-to-imported-js-func': [SKIP],
}], # arch in [arm, android_arm, android_ia32, ia32, ppc, s390, s390x, mipsel, mips]
##############################################################################
......
// 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-bigint
load("test/mjsunit/wasm/wasm-module-builder.js");
(function TestWasmI64ToJSBigIntImportedFunc() {
var builder = new WasmModuleBuilder();
var a_index = builder
.addImport("a", "a", kSig_l_l) // i64 -> i64
builder
.addFunction("fn", kSig_l_v) // () -> i64
.addBody([
kExprI64Const, 0x7,
kExprCallFunction, a_index
])
.exportFunc();
a_was_called = false;
var module = builder.instantiate({
a: {
a(param) {
assertEquals(typeof param, "bigint");
assertEquals(param, 7n);
a_was_called = true;
return 12n;
},
}
});
assertEquals(module.exports.fn(), 12n);
assertTrue(a_was_called);
})();
......@@ -22,38 +22,6 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
assertEquals(module.exports.fn(), 3n);
})();
(function TestWasmI64ToJSBigIntImportedFunc() {
var builder = new WasmModuleBuilder();
var a_index = builder
.addImport("a", "a", kSig_l_l) // i64 -> i64
builder
.addFunction("fn", kSig_l_v) // () -> i64
.addBody([
kExprI64Const, 0x7,
kExprCallFunction, a_index
])
.exportFunc();
a_was_called = false;
var module = builder.instantiate({
a: {
a(param) {
assertEquals(typeof param, "bigint");
assertEquals(param, 7n);
a_was_called = true;
return 12n;
},
}
});
assertEquals(module.exports.fn(), 12n);
assertTrue(a_was_called);
})();
(function TestJSBigIntToWasmI64Global() {
var builder = new WasmModuleBuilder();
......
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