summaryrefslogtreecommitdiff
path: root/test/binaryen.js/simd.js
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2020-01-15 01:00:08 +0100
committerAlon Zakai <azakai@google.com>2020-01-14 16:00:08 -0800
commit5ca79a71b2a2379083093d4d9136b2ae4095dfe8 (patch)
tree80263fb09290b896362a36d3ae062ee6cb64fb8c /test/binaryen.js/simd.js
parenta43b533b0778a1daf47178a3d3d9e559f3d390ed (diff)
downloadbinaryen-5ca79a71b2a2379083093d4d9136b2ae4095dfe8.tar.gz
binaryen-5ca79a71b2a2379083093d4d9136b2ae4095dfe8.tar.bz2
binaryen-5ca79a71b2a2379083093d4d9136b2ae4095dfe8.zip
Align binaryen.js with the npm package (#2551)
Binaryen.js now uses binaryen (was Binaryen) as its global name to align with the npm package. Also fixes issues with emitting and testing both the JS and Wasm builds.
Diffstat (limited to 'test/binaryen.js/simd.js')
-rw-r--r--test/binaryen.js/simd.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/binaryen.js/simd.js b/test/binaryen.js/simd.js
index 68785f9d7..347bb8682 100644
--- a/test/binaryen.js/simd.js
+++ b/test/binaryen.js/simd.js
@@ -1,9 +1,5 @@
-function test() {
- var module = new Binaryen.Module();
+var module = new binaryen.Module();
- var expr = module.v128.const([1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0]);
- var info = Binaryen.getExpressionInfo(expr);
- console.log("v128.const i8x16 0x" + info.value.map(b => b.toString(16)).join(" 0x"));
-}
-
-Binaryen.ready.then(test);
+var expr = module.v128.const([1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0]);
+var info = binaryen.getExpressionInfo(expr);
+console.log("v128.const i8x16 0x" + info.value.map(b => b.toString(16)).join(" 0x"));