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

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

Issue 1697423003: Support blocks in asm->wasm global section. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge Created 4 years, 10 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/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 6abf59c583541f028f17de022838d986d200b1f9..31a1dc5b84e70ee86e8ceb0b414e28ba2f829654 100644
--- a/test/mjsunit/wasm/asm-wasm.js
+++ b/test/mjsunit/wasm/asm-wasm.js
@@ -1222,6 +1222,26 @@ TestForeignVariables();
})();
+(function TestGlobalBlock() {
+ function Module(stdlib, foreign, buffer) {
+ "use asm";
+
+ var x = foreign.x | 0, y = foreign.y | 0;
+
+ function test() {
+ return (x + y) | 0;
+ }
+
+ return {test: test};
+ }
+
+ var m = _WASMEXP_.instantiateModuleFromAsm(
+ Module.toString(), { x: 4, y: 11 });
+ m.__init__();
+ assertEquals(15, m.test());
+})();
+
+
(function TestComma() {
function CommaModule() {
"use asm";
« no previous file with comments | « src/wasm/asm-wasm-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698