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

Unified Diff: test/mjsunit/wasm/calls.js

Issue 1899753004: [wasm] Wasm functions with int64 parameters can now be called from JS. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@to-tagged-from-tagged
Patch Set: Created 4 years, 8 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/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/calls.js
diff --git a/test/mjsunit/wasm/calls.js b/test/mjsunit/wasm/calls.js
index 11cc92a8ec37befc0200edc63e38215736a87273..9f65ab95a98aca890e0919ed66d815208b6e33a4 100644
--- a/test/mjsunit/wasm/calls.js
+++ b/test/mjsunit/wasm/calls.js
@@ -41,6 +41,28 @@ function assertFunction(module, func) {
return exp;
}
+(function I64SubTest() {
+
+ var builder = new WasmModuleBuilder();
+
+ builder.addMemory(1, 1, true);
+ builder.addFunction("sub", [kAstI64, kAstI64, kAstI64])
+ .addBody([
+ kExprI64Sub, // --
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1]) // --
+ .exportFunc()
+
+ var module = builder.instantiate();
+ assertModule(module, kPageSize);
+
+ // Check the properties of the sub function.
+ var sub = assertFunction(module, "sub");
+ assertEquals(-55, sub(33, 88));
+ assertEquals(-55555, sub(33333, 88888));
+ assertEquals(-5555555, sub(3333333, 8888888));
+})();
+
(function SubTest() {
var builder = new WasmModuleBuilder();
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698