From 5ca79a71b2a2379083093d4d9136b2ae4095dfe8 Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Wed, 15 Jan 2020 01:00:08 +0100 Subject: 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. --- test/binaryen.js/simd.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'test/binaryen.js/simd.js') 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")); -- cgit v1.2.3