summaryrefslogtreecommitdiff
path: root/test/wasm2js/excess_fallthrough.2asm.js.opt
diff options
context:
space:
mode:
Diffstat (limited to 'test/wasm2js/excess_fallthrough.2asm.js.opt')
-rw-r--r--test/wasm2js/excess_fallthrough.2asm.js.opt9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/wasm2js/excess_fallthrough.2asm.js.opt b/test/wasm2js/excess_fallthrough.2asm.js.opt
index cebc82e03..de165ddf5 100644
--- a/test/wasm2js/excess_fallthrough.2asm.js.opt
+++ b/test/wasm2js/excess_fallthrough.2asm.js.opt
@@ -1,4 +1,6 @@
+function wasm2js_trap() { throw new Error('abort'); }
+
function asmFunc(importObject) {
var env = importObject.env || importObject;
var Math_imul = Math.imul;
@@ -11,12 +13,11 @@ function asmFunc(importObject) {
var Math_ceil = Math.ceil;
var Math_trunc = Math.trunc;
var Math_sqrt = Math.sqrt;
- var abort = env.abort;
var nan = NaN;
var infinity = Infinity;
function foo($0) {
$0 = $0 | 0;
- abort();
+ wasm2js_trap();
}
return {
@@ -24,6 +25,6 @@ function asmFunc(importObject) {
};
}
-var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
- });
+var retasmFunc = asmFunc({
+});
export var foo = retasmFunc.foo;