From 711a22c65f28029ae0ca2d31a0cd6f8be9b953c7 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Apr 2019 14:46:42 -0700 Subject: wasm2js: get rid of some non-flat code assumptions (#2036) We run flatten there, which lets us simplify things a lot. Turns out that for assertions we didn't run it, which is why we still needed the old non-flat code paths. This adds flatten there and removes that old code and assumptions. --- test/wasm2js.asserts.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test/wasm2js.asserts.js') diff --git a/test/wasm2js.asserts.js b/test/wasm2js.asserts.js index 3ab4b1d08..3f0fb6709 100644 --- a/test/wasm2js.asserts.js +++ b/test/wasm2js.asserts.js @@ -79,10 +79,8 @@ function asmFunc0(global, env, buffer) { const memasmFunc0 = new ArrayBuffer(65536); const retasmFunc0 = asmFunc0({Math,Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,NaN,Infinity}, {abort:function() { throw new Error('abort'); }},memasmFunc0); function check1() { - var wasm2js_i32$0 = 0; retasmFunc0.empty(); - wasm2js_i32$0 = 1; - return wasm2js_i32$0 | 0; + return 1 | 0; } if (!check1()) throw 'assertion failed: ( assert_return ( call empty ) )'; -- cgit v1.2.3