Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: test/mjsunit/wasm/default-func-call.js

Issue 2049513003: [wasm] Support undefined indirect table entries, behind a flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed static casting and formatting. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/mjsunit/wasm/wasm-constants.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/default-func-call.js
diff --git a/test/mjsunit/wasm/indirect-calls.js b/test/mjsunit/wasm/default-func-call.js
similarity index 78%
copy from test/mjsunit/wasm/indirect-calls.js
copy to test/mjsunit/wasm/default-func-call.js
index 1e87c6f8230fd862b49acfeddbe0bcfe491285d0..14567d3844595ee896ea58c0a4b2b7f50abe2628 100644
--- a/test/mjsunit/wasm/indirect-calls.js
+++ b/test/mjsunit/wasm/default-func-call.js
@@ -1,8 +1,10 @@
// 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.
// Flags: --expose-wasm
+// Flags: --wasm-jit-prototype
load("test/mjsunit/wasm/wasm-constants.js");
load("test/mjsunit/wasm/wasm-module-builder.js");
@@ -11,6 +13,7 @@ var module = (function () {
var builder = new WasmModuleBuilder();
var sig_index = builder.addType(kSig_i_ii);
+ builder.addPadFunctionTable(512);
builder.addImport("add", sig_index);
builder.addFunction("add", sig_index)
.addBody([
@@ -46,4 +49,8 @@ assertEquals(5, module.exports.main(1, 12, 7));
assertEquals(19, module.exports.main(0, 12, 7));
assertTraps(kTrapFuncSigMismatch, "module.exports.main(2, 12, 33)");
-assertTraps(kTrapFuncInvalid, "module.exports.main(3, 12, 33)");
+assertTraps(kTrapFuncSigMismatch, "module.exports.main(4, 12, 33)");
+assertTraps(kTrapFuncSigMismatch, "module.exports.main(511, 12, 33)");
+assertTraps(kTrapFuncInvalid, "module.exports.main(512, 12, 33)");
+assertTraps(kTrapFuncInvalid, "module.exports.main(1025, 12, 33)");
+assertTraps(kTrapFuncInvalid, "module.exports.main(-1, 12, 33)");
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/mjsunit/wasm/wasm-constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698