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"; |