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

Unified Diff: test/mjsunit/wasm/asm-wasm.js

Issue 2348383003: [wasm] Support asm.js modules with a single function. (Closed)
Patch Set: fix Created 4 years, 3 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/asmjs/asm-wasm-builder.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/asm-wasm.js
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js
index a580c5c7e94a2f0ef804c6477857e9333aaa86f2..f316e6837f7273533f93393bde0d525b7c537ee8 100644
--- a/test/mjsunit/wasm/asm-wasm.js
+++ b/test/mjsunit/wasm/asm-wasm.js
@@ -1581,3 +1581,16 @@ function TestLoopsWithUnsigned() {
}
assertWasm(323, TestLoopsWithUnsigned);
+
+
+function TestSingleFunctionModule() {
+ "use asm";
+ function add(a, b) {
+ a = a | 0;
+ b = b | 0;
+ return (a + b) | 0;
+ }
+ return add;
+}
+
+assertEquals(7, TestSingleFunctionModule()(3, 4));
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698