diff options
27 files changed, 35 insertions, 35 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index c6fca0256..3c847809f 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -698,15 +698,15 @@ struct PrintSExpression : public Visitor<PrintSExpression> { visitImport(child.get()); o << maybeNewLine; } - if (curr->table.exists) { - visitTable(&curr->table); // Prints its own newlines - } - visitMemory(&curr->memory); for (auto& child : curr->globals) { doIndent(o, indent); visitGlobal(child.get()); o << maybeNewLine; } + if (curr->table.exists) { + visitTable(&curr->table); // Prints its own newlines + } + visitMemory(&curr->memory); for (auto& child : curr->exports) { doIndent(o, indent); visitExport(child.get()); diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm index 4d3147862..5ac3b57bb 100644 --- a/test/emcc_O2_hello_world.fromasm +++ b/test/emcc_O2_hello_world.fromasm @@ -28,13 +28,13 @@ (import "env" "table" (table 18 18 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) - (data (i32.const 1024) "emcc_O2_hello_world.asm.js") (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import)) (global $__THREW__ (mut i32) (i32.const 0)) (global $threwValue (mut i32) (i32.const 0)) (global $tempRet0 (mut i32) (i32.const 0)) + (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) + (data (i32.const 1024) "emcc_O2_hello_world.asm.js") (export "_free" (func $_free)) (export "_main" (func $_main)) (export "_memset" (func $_memset)) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise index 8ab35a567..901414958 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise +++ b/test/emcc_O2_hello_world.fromasm.imprecise @@ -27,12 +27,12 @@ (import "env" "table" (table 18 18 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import)) (global $__THREW__ (mut i32) (i32.const 0)) (global $threwValue (mut i32) (i32.const 0)) (global $tempRet0 (mut i32) (i32.const 0)) + (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (export "_free" (func $_free)) (export "_main" (func $_main)) (export "_memset" (func $_memset)) diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts index 7bc59938d..f973ac7d1 100644 --- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts @@ -31,7 +31,6 @@ (import "env" "table" (table 18 18 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import)) (global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import)) @@ -62,6 +61,7 @@ (global $tempRet8 (mut i32) (i32.const 0)) (global $tempRet9 (mut i32) (i32.const 0)) (global $tempFloat (mut f64) (f64.const 0)) + (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (export "_free" (func $_free)) (export "_main" (func $_main)) (export "_memset" (func $_memset)) diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts index 050d0b3f9..80801ea2d 100644 --- a/test/emcc_O2_hello_world.fromasm.no-opts +++ b/test/emcc_O2_hello_world.fromasm.no-opts @@ -32,7 +32,6 @@ (import "env" "table" (table 18 18 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import)) (global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import)) @@ -63,6 +62,7 @@ (global $tempRet8 (mut i32) (i32.const 0)) (global $tempRet9 (mut i32) (i32.const 0)) (global $tempFloat (mut f64) (f64.const 0)) + (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2) (export "_free" (func $_free)) (export "_main" (func $_main)) (export "_memset" (func $_memset)) diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 85d980069..1971f0c3b 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -37,14 +37,14 @@ (import "env" "table" (table 18 18 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) - (data (i32.const 1024) "emcc_hello_world.asm.js") (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import)) (global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import)) (global $__THREW__ (mut i32) (i32.const 0)) (global $threwValue (mut i32) (i32.const 0)) (global $tempRet0 (mut i32) (i32.const 0)) + (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) + (data (i32.const 1024) "emcc_hello_world.asm.js") (export "_i64Subtract" (func $_i64Subtract)) (export "_free" (func $_free)) (export "_main" (func $_main)) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 65bd295bc..4b429163d 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -31,13 +31,13 @@ (import "env" "table" (table 18 18 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import)) (global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import)) (global $__THREW__ (mut i32) (i32.const 0)) (global $threwValue (mut i32) (i32.const 0)) (global $tempRet0 (mut i32) (i32.const 0)) + (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (export "_i64Subtract" (func $_i64Subtract)) (export "_free" (func $_free)) (export "_main" (func $_main)) diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index a805b78ae..9488b62c2 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -35,7 +35,6 @@ (import "env" "table" (table 18 18 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import)) (global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import)) @@ -67,6 +66,7 @@ (global $tempRet8 (mut i32) (i32.const 0)) (global $tempRet9 (mut i32) (i32.const 0)) (global $tempFloat (mut f64) (f64.const 0)) + (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (export "_i64Subtract" (func $_i64Subtract)) (export "_free" (func $_free)) (export "_main" (func $_main)) diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 22c1ee5c7..e12ecdb96 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -41,7 +41,6 @@ (import "env" "table" (table 18 18 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import)) (global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import)) @@ -73,6 +72,7 @@ (global $tempRet8 (mut i32) (i32.const 0)) (global $tempRet9 (mut i32) (i32.const 0)) (global $tempFloat (mut f64) (f64.const 0)) + (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (export "_i64Subtract" (func $_i64Subtract)) (export "_free" (func $_free)) (export "_main" (func $_main)) diff --git a/test/i64-setTempRet0.fromasm b/test/i64-setTempRet0.fromasm index c0fe551c8..48337119c 100644 --- a/test/i64-setTempRet0.fromasm +++ b/test/i64-setTempRet0.fromasm @@ -7,8 +7,8 @@ (import "env" "table" (table 0 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (data (get_global $memoryBase) "i64-setTempRet0.asm.js") (global $tempRet0 (mut i32) (i32.const 0)) + (data (get_global $memoryBase) "i64-setTempRet0.asm.js") (export "illegalResult" (func $legalstub$illegalResult)) (export "imports" (func $imports)) (func $illegalResult (result i64) diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index cfe303d34..d6800684d 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -24,13 +24,13 @@ (import "env" "table" (table 8 8 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) - (data (get_global $memoryBase) "memorygrowth.asm.js") (global $r (mut i32) (get_global $r$asm2wasm$import)) (global $s (mut i32) (get_global $s$asm2wasm$import)) (global $v (mut i32) (i32.const 0)) (global $w (mut i32) (i32.const 0)) (global $K (mut i32) (i32.const 0)) + (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) + (data (get_global $memoryBase) "memorygrowth.asm.js") (export "_free" (func $fb)) (export "_main" (func $Na)) (export "_pthread_self" (func $ib)) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index c1f308b20..d0f3405d5 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -23,12 +23,12 @@ (import "env" "table" (table 8 8 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (global $r (mut i32) (get_global $r$asm2wasm$import)) (global $s (mut i32) (get_global $s$asm2wasm$import)) (global $v (mut i32) (i32.const 0)) (global $w (mut i32) (i32.const 0)) (global $K (mut i32) (i32.const 0)) + (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (export "_free" (func $fb)) (export "_main" (func $Na)) (export "_pthread_self" (func $ib)) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index 26108171f..2d65caa7d 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -27,7 +27,6 @@ (import "env" "table" (table 8 8 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (global $r (mut i32) (get_global $r$asm2wasm$import)) (global $s (mut i32) (get_global $s$asm2wasm$import)) (global $t (mut i32) (get_global $t$asm2wasm$import)) @@ -58,6 +57,7 @@ (global $S (mut i32) (i32.const 0)) (global $T (mut i32) (i32.const 0)) (global $za (mut f64) (f64.const 0)) + (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (export "_free" (func $fb)) (export "_main" (func $Na)) (export "_pthread_self" (func $ib)) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index ef9478371..a27f419ae 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -28,7 +28,6 @@ (import "env" "table" (table 8 8 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (global $r (mut i32) (get_global $r$asm2wasm$import)) (global $s (mut i32) (get_global $s$asm2wasm$import)) (global $t (mut i32) (get_global $t$asm2wasm$import)) @@ -59,6 +58,7 @@ (global $S (mut i32) (i32.const 0)) (global $T (mut i32) (i32.const 0)) (global $za (mut f64) (f64.const 0)) + (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (export "_free" (func $fb)) (export "_main" (func $Na)) (export "_pthread_self" (func $ib)) diff --git a/test/min.fromasm b/test/min.fromasm index 4287f6259..8f4ccbf4b 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -3,8 +3,8 @@ (import "env" "table" (table 0 0 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (data (get_global $memoryBase) "min.asm.js") (global $M (mut i32) (i32.const 0)) + (data (get_global $memoryBase) "min.asm.js") (export "floats" (func $legalstub$floats)) (export "getTempRet0" (func $ub)) (export "neg" (func $legalstub$neg)) diff --git a/test/passes/dce.txt b/test/passes/dce.txt index feb0715b7..71b46bd94 100644 --- a/test/passes/dce.txt +++ b/test/passes/dce.txt @@ -3,10 +3,10 @@ (type $1 (func)) (type $2 (func (result i32))) (type $3 (func (param i32) (result i32))) + (global $x (mut i32) (i32.const 0)) (table 1 1 anyfunc) (elem (i32.const 0) $call-me) (memory $0 10) - (global $x (mut i32) (i32.const 0)) (func $call-me (type $ii) (param $0 i32) (param $1 i32) (nop) ) diff --git a/test/passes/print-call-graph.txt b/test/passes/print-call-graph.txt index b12b95828..6e4af209c 100644 --- a/test/passes/print-call-graph.txt +++ b/test/passes/print-call-graph.txt @@ -141,8 +141,6 @@ digraph call { (import "env" "table" (table 9 9 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (i32.const 0) $b0 $___stdio_close $b1 $___stdout_write $___stdio_seek $___stdio_write $b2 $_cleanup_387 $b3) - (data (get_global $memoryBase) "\05\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\b0\04\00\00\00\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\ff\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04") (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import)) (global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import)) @@ -166,6 +164,8 @@ digraph call { (global $tempRet0 (mut i32) (i32.const 0)) (global $tempFloat (mut f32) (f32.const 0)) (global $f0 (mut f32) (f32.const 0)) + (elem (i32.const 0) $b0 $___stdio_close $b1 $___stdout_write $___stdio_seek $___stdio_write $b2 $_cleanup_387 $b3) + (data (get_global $memoryBase) "\05\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\b0\04\00\00\00\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\ff\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04") (export "_fflush" (func $_fflush)) (export "_main" (func $_main)) (export "_pthread_self" (func $_pthread_self)) diff --git a/test/passes/remove-unused-module-elements.txt b/test/passes/remove-unused-module-elements.txt index 8b8fd3601..4627cce5f 100644 --- a/test/passes/remove-unused-module-elements.txt +++ b/test/passes/remove-unused-module-elements.txt @@ -54,10 +54,10 @@ (type $2 (func)) (import "env" "imported" (global $imported i32)) (import "env" "_puts" (func $_puts (param i32) (result i32))) - (memory $0 0) (global $int (mut i32) (get_global $imported)) (global $set (mut i32) (i32.const 100)) (global $exp_glob i32 (i32.const 600)) + (memory $0 0) (export "one" (func $one)) (export "three" (func $three)) (export "exp_glob" (global $exp_glob)) diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt index e89321f74..bc3cbfda3 100644 --- a/test/passes/vacuum.txt +++ b/test/passes/vacuum.txt @@ -6,8 +6,8 @@ (type $4 (func (param i32 f64 i32 i32))) (type $FUNCSIG$i (func (result i32))) (import "env" "int" (func $int (result i32))) - (memory $0 256 256) (global $Int i32 (i32.const 0)) + (memory $0 256 256) (func $b (type $0) (nop) ) diff --git a/test/unit.fromasm b/test/unit.fromasm index e18bfd16a..4f7b2c6a9 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -22,12 +22,12 @@ (import "env" "table" (table 24 24 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $fr $cneg $fr $fr $fr $fr $fr $fr $vi $vi $vi $vi $vi $vi $vi $vi) - (data (get_global $memoryBase) "unit.asm.js") (global $Int (mut i32) (i32.const 0)) (global $Double (mut f64) (f64.const 0)) (global $n (mut i32) (get_global $n$asm2wasm$import)) (global $exportedNumber i32 (i32.const 42)) + (elem (get_global $tableBase) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $fr $cneg $fr $fr $fr $fr $fr $fr $vi $vi $vi $vi $vi $vi $vi $vi) + (data (get_global $memoryBase) "unit.asm.js") (export "big_negative" (func $big_negative)) (export "pick" (func $big_negative)) (export "doubleCompares" (func $doubleCompares)) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 2ec8b82ff..caa8e4f33 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -18,11 +18,11 @@ (import "env" "table" (table 24 24 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $fr $cneg $fr $fr $fr $fr $fr $fr $vi $vi $vi $vi $vi $vi $vi $vi) (global $Int (mut i32) (i32.const 0)) (global $Double (mut f64) (f64.const 0)) (global $n (mut i32) (get_global $n$asm2wasm$import)) (global $exportedNumber i32 (i32.const 42)) + (elem (get_global $tableBase) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $fr $cneg $fr $fr $fr $fr $fr $fr $vi $vi $vi $vi $vi $vi $vi $vi) (export "big_negative" (func $big_negative)) (export "pick" (func $big_negative)) (export "doubleCompares" (func $doubleCompares)) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index fe2e7edbd..0dbdd7b50 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -22,7 +22,6 @@ (import "env" "table" (table 24 24 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi) (global $t (mut f64) (get_global $t$asm2wasm$import)) (global $u (mut f64) (get_global $u$asm2wasm$import)) (global $Int (mut i32) (i32.const 0)) @@ -31,6 +30,7 @@ (global $n (mut i32) (get_global $n$asm2wasm$import)) (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $exportedNumber i32 (i32.const 42)) + (elem (get_global $tableBase) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi) (export "big_negative" (func $big_negative)) (export "pick" (func $exportMe)) (export "doubleCompares" (func $doubleCompares)) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 960ee6c5f..af5daebe0 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -26,7 +26,6 @@ (import "env" "table" (table 24 24 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi) (global $t (mut f64) (get_global $t$asm2wasm$import)) (global $u (mut f64) (get_global $u$asm2wasm$import)) (global $Int (mut i32) (i32.const 0)) @@ -35,6 +34,7 @@ (global $n (mut i32) (get_global $n$asm2wasm$import)) (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $exportedNumber i32 (i32.const 42)) + (elem (get_global $tableBase) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi) (export "big_negative" (func $big_negative)) (export "pick" (func $exportMe)) (export "doubleCompares" (func $doubleCompares)) diff --git a/test/wasm-only.fromasm b/test/wasm-only.fromasm index ae8bddbbc..86c9cfad9 100644 --- a/test/wasm-only.fromasm +++ b/test/wasm-only.fromasm @@ -18,9 +18,9 @@ (import "env" "table" (table 3 3 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) + (global $tempRet0 (mut i32) (i32.const 0)) (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64) (data (get_global $memoryBase) "wasm-only.asm.js") - (global $tempRet0 (mut i32) (i32.const 0)) (export "test64" (func $test64)) (export "illegalParam" (func $legalstub$illegalParam)) (export "illegalResult" (func $legalstub$result)) diff --git a/test/wasm-only.fromasm.imprecise b/test/wasm-only.fromasm.imprecise index a6c5b3f50..227ab430d 100644 --- a/test/wasm-only.fromasm.imprecise +++ b/test/wasm-only.fromasm.imprecise @@ -18,8 +18,8 @@ (import "env" "table" (table 3 3 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64) (global $tempRet0 (mut i32) (i32.const 0)) + (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64) (export "test64" (func $test64)) (export "illegalParam" (func $legalstub$illegalParam)) (export "illegalResult" (func $legalstub$result)) diff --git a/test/wasm-only.fromasm.imprecise.no-opts b/test/wasm-only.fromasm.imprecise.no-opts index d718ccc24..2f891e715 100644 --- a/test/wasm-only.fromasm.imprecise.no-opts +++ b/test/wasm-only.fromasm.imprecise.no-opts @@ -18,8 +18,8 @@ (import "env" "table" (table 3 3 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64) (global $tempRet0 (mut i32) (i32.const 0)) + (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64) (export "test64" (func $test64)) (export "illegalParam" (func $legalstub$illegalParam)) (export "illegalResult" (func $legalstub$illegalResult)) diff --git a/test/wasm-only.fromasm.no-opts b/test/wasm-only.fromasm.no-opts index e208f870f..e8e2785d5 100644 --- a/test/wasm-only.fromasm.no-opts +++ b/test/wasm-only.fromasm.no-opts @@ -18,8 +18,8 @@ (import "env" "table" (table 3 3 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64) (global $tempRet0 (mut i32) (i32.const 0)) + (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64) (export "test64" (func $test64)) (export "illegalParam" (func $legalstub$illegalParam)) (export "illegalResult" (func $legalstub$illegalResult)) |