summaryrefslogtreecommitdiff
path: root/test/binaryen.js/stackir.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/binaryen.js/stackir.js')
-rw-r--r--test/binaryen.js/stackir.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/binaryen.js/stackir.js b/test/binaryen.js/stackir.js
index 929fbaa0e..324a99abe 100644
--- a/test/binaryen.js/stackir.js
+++ b/test/binaryen.js/stackir.js
@@ -20,13 +20,18 @@ var wast = `
)
)
`;
-console.log("=== input wast ===" + wast);
-var module = Binaryen.parseText(wast);
-assert(module.validate());
+function test() {
+ console.log("=== input wast ===" + wast);
-console.log("=== default ===");
-console.log(module.emitStackIR());
+ var module = Binaryen.parseText(wast);
+ assert(module.validate());
-console.log("=== optimize ==="); // should omit the second block
-console.log(module.emitStackIR(true));
+ console.log("=== default ===");
+ console.log(module.emitStackIR());
+
+ console.log("=== optimize ==="); // should omit the second block
+ console.log(module.emitStackIR(true));
+}
+
+Binaryen.ready.then(test);