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

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: 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
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 68%
copy from test/mjsunit/wasm/indirect-calls.js
copy to test/mjsunit/wasm/default-func-call.js
index 80bee412e028541e3b54ba7a175a512cb8293e77..1cf519e9a324f8aaaab4d71ef9eb32e21fec9ab2 100644
--- a/test/mjsunit/wasm/indirect-calls.js
+++ b/test/mjsunit/wasm/default-func-call.js
@@ -3,6 +3,7 @@
// 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");
@@ -42,8 +43,12 @@ assertFalse(module === 0);
assertEquals("object", typeof module.exports);
assertEquals("function", typeof module.exports.main);
-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)");
+// Check that the appropriate trap is generated
+assertTraps(kTrapFuncInvalid, "module.exports.main(-1,15,16)");
+assertTraps(kTrapFuncInvalid, "module.exports.main(100000,15,16)");
+assertTraps(kTrapFuncInvalid, "module.exports.main(512,15,16)");
+assertTraps(kTrapFuncInvalid, "module.exports.main(513,15,16)");
+assertTraps(kTrapDefaultFuncCall, "module.exports.main(511,15,16)");
+assertTraps(kTrapDefaultFuncCall, "module.exports.main(4,15,16)");
+assertTraps(kTrapDefaultFuncCall, "module.exports.main(3,15,16)");
+assertTraps(kTrapFuncSigMismatch, "module.exports.main(2,15,16)");

Powered by Google App Engine
This is Rietveld 408576698