diff options
author | Daniel Wirtz <dcode@dcode.io> | 2020-09-30 00:15:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-30 00:15:33 +0200 |
commit | 67a96ae60085366b59d64bc997c9e6525c247e27 (patch) | |
tree | 76338e649b18b572c5ad184641c029b16344f0f2 /test | |
parent | 7d673ce83206349159a68fe683bc7da02dcdaf98 (diff) | |
download | binaryen-67a96ae60085366b59d64bc997c9e6525c247e27.tar.gz binaryen-67a96ae60085366b59d64bc997c9e6525c247e27.tar.bz2 binaryen-67a96ae60085366b59d64bc997c9e6525c247e27.zip |
Fix applying default / unify SExpr and Wasm builder names (#3179)
SExpressionWasmBuilder was not applying default memory and table import names on the memory and table, unlike on functions, globals and events, where it applies them. Also aligns default import names to use the same shorter forms as in binary parsing.
Diffstat (limited to 'test')
36 files changed, 50 insertions, 50 deletions
diff --git a/test/empty_imported_table.wast.from-wast b/test/empty_imported_table.wast.from-wast index bf5f0f26e..29a9780b1 100644 --- a/test/empty_imported_table.wast.from-wast +++ b/test/empty_imported_table.wast.from-wast @@ -1,4 +1,4 @@ (module - (import "env" "table" (table $0 0 0 funcref)) + (import "env" "table" (table $timport$0 0 0 funcref)) (memory $0 0) ) diff --git a/test/empty_imported_table.wast.fromBinary b/test/empty_imported_table.wast.fromBinary index 66ee9078c..c29363236 100644 --- a/test/empty_imported_table.wast.fromBinary +++ b/test/empty_imported_table.wast.fromBinary @@ -1,5 +1,5 @@ (module - (import "env" "table" (table $0 0 0 funcref)) + (import "env" "table" (table $timport$0 0 0 funcref)) (memory $0 0) ) diff --git a/test/events.wast.from-wast b/test/events.wast.from-wast index a511fe5a4..fca3041ab 100644 --- a/test/events.wast.from-wast +++ b/test/events.wast.from-wast @@ -3,7 +3,7 @@ (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (import "env" "im0" (event $e-import (attr 0) (param i32))) - (import "env" "im1" (event $import$event1 (attr 0) (param i32 f32))) + (import "env" "im1" (event $eimport$1 (attr 0) (param i32 f32))) (event $2 (attr 0) (param i32)) (event $e (attr 0) (param i32 f32)) (event $empty (attr 0) (param)) diff --git a/test/imported_memory.wast.from-wast b/test/imported_memory.wast.from-wast index 38a0d9a9c..f36ba7396 100644 --- a/test/imported_memory.wast.from-wast +++ b/test/imported_memory.wast.from-wast @@ -1,4 +1,4 @@ (module (import "env" "memory" (memory $0 256 256)) - (import "env" "table" (table $0 256 256 funcref)) + (import "env" "table" (table $timport$0 256 256 funcref)) ) diff --git a/test/imported_memory.wast.fromBinary b/test/imported_memory.wast.fromBinary index 884a2d9f4..ae1205de0 100644 --- a/test/imported_memory.wast.fromBinary +++ b/test/imported_memory.wast.fromBinary @@ -1,5 +1,5 @@ (module (import "env" "memory" (memory $0 256 256)) - (import "env" "table" (table $0 256 256 funcref)) + (import "env" "table" (table $timport$0 256 256 funcref)) ) diff --git a/test/imported_memory_growth.wast.from-wast b/test/imported_memory_growth.wast.from-wast index 745d1d1f0..a2533591b 100644 --- a/test/imported_memory_growth.wast.from-wast +++ b/test/imported_memory_growth.wast.from-wast @@ -1,4 +1,4 @@ (module (import "env" "memory" (memory $0 256)) - (import "env" "table" (table $0 256 funcref)) + (import "env" "table" (table $timport$0 256 funcref)) ) diff --git a/test/imported_memory_growth.wast.fromBinary b/test/imported_memory_growth.wast.fromBinary index cab44f5ff..75fe9ff14 100644 --- a/test/imported_memory_growth.wast.fromBinary +++ b/test/imported_memory_growth.wast.fromBinary @@ -1,5 +1,5 @@ (module (import "env" "memory" (memory $0 256)) - (import "env" "table" (table $0 256 funcref)) + (import "env" "table" (table $timport$0 256 funcref)) ) diff --git a/test/lld/em_asm_shared.wat.out b/test/lld/em_asm_shared.wat.out index 70ad00444..40eabcc24 100644 --- a/test/lld/em_asm_shared.wat.out +++ b/test/lld/em_asm_shared.wat.out @@ -6,7 +6,7 @@ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$3) "{ Module.print(\"Hello world\"); }\00\00{ return $0 + $1; }\00ii\00{ Module.print(\"Got \" + $0); }\00i\00") - (import "env" "table" (table $0 0 funcref)) + (import "env" "table" (table $timport$1 0 funcref)) (import "env" "__memory_base" (global $gimport$3 i32)) (import "env" "__table_base" (global $gimport$4 i32)) (import "env" "emscripten_asm_const_int" (func $emscripten_asm_const_int (param i32 i32 i32) (result i32))) diff --git a/test/lld/em_asm_table.wat.out b/test/lld/em_asm_table.wat.out index 59779b87b..e59ecfb40 100644 --- a/test/lld/em_asm_table.wat.out +++ b/test/lld/em_asm_table.wat.out @@ -4,7 +4,7 @@ (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) - (import "env" "memory" (memory $0 8192)) + (import "env" "memory" (memory $2 8192)) (import "env" "emscripten_log" (func $fimport$0 (param i32 i32))) (import "env" "emscripten_asm_const_int" (func $fimport$1 (param i32 i32 i32) (result i32))) (table $0 159609 funcref) diff --git a/test/lld/gdollar_mainmodule.wat.out b/test/lld/gdollar_mainmodule.wat.out index 91ba74b49..6ab1c6923 100644 --- a/test/lld/gdollar_mainmodule.wat.out +++ b/test/lld/gdollar_mainmodule.wat.out @@ -5,7 +5,7 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$3) "") - (import "env" "table" (table $0 0 funcref)) + (import "env" "table" (table $timport$1 0 funcref)) (import "env" "__stack_pointer" (global $gimport$2_import i32)) (import "env" "__memory_base" (global $gimport$3 i32)) (import "env" "__table_base" (global $gimport$4 i32)) diff --git a/test/lld/main_module.wat.out b/test/lld/main_module.wat.out index 8d885bc2c..12e561d9e 100644 --- a/test/lld/main_module.wat.out +++ b/test/lld/main_module.wat.out @@ -4,7 +4,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$2) "Hello, world\00\00\00\00\00\00\00\00\00\00\00\00") - (import "env" "table" (table $0 1 funcref)) + (import "env" "table" (table $timport$1 1 funcref)) (elem (global.get $gimport$3) $print_message\28\29) (import "env" "__stack_pointer" (global $sp_import i32)) (import "env" "__memory_base" (global $gimport$2 i32)) diff --git a/test/lld/main_module_table_2.wat.out b/test/lld/main_module_table_2.wat.out index 93b1ef3a6..2c9b50125 100644 --- a/test/lld/main_module_table_2.wat.out +++ b/test/lld/main_module_table_2.wat.out @@ -2,7 +2,7 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (import "env" "table" (table $0 2 funcref)) + (import "env" "table" (table $timport$9 2 funcref)) (elem (global.get $__table_base) $__stdio_write) (import "env" "__stack_pointer" (global $sp_import i32)) (import "env" "__table_base" (global $__table_base i32)) diff --git a/test/lld/main_module_table_3.wat.out b/test/lld/main_module_table_3.wat.out index 714b9b852..442dcf3b1 100644 --- a/test/lld/main_module_table_3.wat.out +++ b/test/lld/main_module_table_3.wat.out @@ -2,7 +2,7 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (import "env" "table" (table $0 2 funcref)) + (import "env" "table" (table $timport$9 2 funcref)) (elem (i32.const 0) $__stdio_write) (import "env" "__stack_pointer" (global $sp_import i32)) (import "env" "__table_base" (global $__table_base i32)) diff --git a/test/lld/main_module_table_4.wat.out b/test/lld/main_module_table_4.wat.out index cffa7c1b6..268f8af08 100644 --- a/test/lld/main_module_table_4.wat.out +++ b/test/lld/main_module_table_4.wat.out @@ -2,7 +2,7 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (import "env" "table" (table $0 2 funcref)) + (import "env" "table" (table $timport$9 2 funcref)) (elem (global.get $tb) $__stdio_write) (import "env" "__stack_pointer" (global $sp_import i32)) (import "env" "__table_base" (global $tb i32)) diff --git a/test/lld/main_module_table_5.wat.out b/test/lld/main_module_table_5.wat.out index a015b6081..8977c7d07 100644 --- a/test/lld/main_module_table_5.wat.out +++ b/test/lld/main_module_table_5.wat.out @@ -2,7 +2,7 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (import "env" "table" (table $0 2 funcref)) + (import "env" "table" (table $timport$9 2 funcref)) (elem (global.get $tb) $other $stuff $__stdio_write) (import "env" "__stack_pointer" (global $sp_import i32)) (import "env" "__table_base" (global $tb i32)) diff --git a/test/lld/shared.wat.out b/test/lld/shared.wat.out index ef28d55d4..4451ac44b 100644 --- a/test/lld/shared.wat.out +++ b/test/lld/shared.wat.out @@ -4,7 +4,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$2) "Hello, world\00\00\00\00\00\00\00\00\00\00\00\00") - (import "env" "table" (table $0 0 funcref)) + (import "env" "table" (table $timport$1 0 funcref)) (import "env" "__memory_base" (global $gimport$2 i32)) (import "env" "__table_base" (global $gimport$3 i32)) (import "env" "puts" (func $puts (param i32) (result i32))) diff --git a/test/lld/shared_longjmp.wat.out b/test/lld/shared_longjmp.wat.out index 7bfb1f597..8c7b97a32 100644 --- a/test/lld/shared_longjmp.wat.out +++ b/test/lld/shared_longjmp.wat.out @@ -9,7 +9,7 @@ (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$2) "\00\00\00\00\00\00\00\00") - (import "env" "table" (table $0 0 funcref)) + (import "env" "table" (table $timport$1 0 funcref)) (import "env" "__memory_base" (global $gimport$2 i32)) (import "env" "__table_base" (global $gimport$3 i32)) (import "env" "malloc" (func $fimport$4 (param i32) (result i32))) diff --git a/test/metadce/corners.wast.dced b/test/metadce/corners.wast.dced index 2d66127e6..dd21e7af9 100644 --- a/test/metadce/corners.wast.dced +++ b/test/metadce/corners.wast.dced @@ -1,6 +1,6 @@ (module (type $none_=>_none (func)) - (import "env" "table" (table $0 10 10 funcref)) + (import "env" "table" (table $timport$0 10 10 funcref)) (elem (i32.const 0) $imported_table_func) (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32)) (import "env" "imported_twice" (func $imported_twice_a)) diff --git a/test/metadce/outside.wast.dced b/test/metadce/outside.wast.dced index 006e14497..642d58266 100644 --- a/test/metadce/outside.wast.dced +++ b/test/metadce/outside.wast.dced @@ -3,7 +3,7 @@ (import "env" "memory" (memory $0 256 256)) (data (i32.const 1024) "abcd") (data (global.get $from_segment) "abcd") - (import "env" "table" (table $0 10 10 funcref)) + (import "env" "table" (table $timport$0 10 10 funcref)) (elem (global.get $from_segment_2) $table_func) (import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32)) (import "env" "js_func" (func $a_js_func)) diff --git a/test/newsyntax.wast.from-wast b/test/newsyntax.wast.from-wast index 88e25da0d..edf54b5b9 100644 --- a/test/newsyntax.wast.from-wast +++ b/test/newsyntax.wast.from-wast @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (import "env" "table" (table $0 9 9 funcref)) + (import "env" "table" (table $timport$0 9 9 funcref)) (export "call_indirect" (func $0)) (func $0 (drop diff --git a/test/newsyntax.wast.fromBinary b/test/newsyntax.wast.fromBinary index aaf9b1285..ea3b1ac9a 100644 --- a/test/newsyntax.wast.fromBinary +++ b/test/newsyntax.wast.fromBinary @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (import "env" "table" (table $0 9 9 funcref)) + (import "env" "table" (table $timport$0 9 9 funcref)) (export "call_indirect" (func $0)) (func $0 (drop diff --git a/test/passes/O3_low-memory-unused_metrics.txt b/test/passes/O3_low-memory-unused_metrics.txt index 22d72d241..4989dec5f 100644 --- a/test/passes/O3_low-memory-unused_metrics.txt +++ b/test/passes/O3_low-memory-unused_metrics.txt @@ -29,8 +29,8 @@ total (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (import "env" "memory" (memory $0 4096 4096)) - (import "env" "table" (table $0 10 funcref)) + (import "env" "memory" (memory $108 4096 4096)) + (import "env" "table" (table $timport$109 10 funcref)) (import "env" "crc32" (func $fimport$14 (param i32 i32 i32) (result i32))) (import "env" "adler32" (func $fimport$15 (param i32 i32 i32) (result i32))) (import "env" "deflate_huff" (func $fimport$20 (param i32 i32) (result i32))) diff --git a/test/passes/O4_disable-bulk-memory.txt b/test/passes/O4_disable-bulk-memory.txt index 454b23abb..730c2ac0f 100644 --- a/test/passes/O4_disable-bulk-memory.txt +++ b/test/passes/O4_disable-bulk-memory.txt @@ -13,7 +13,7 @@ (type $f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_=>_f64 (func (param i32) (result f64))) - (import "env" "memory" (memory $0 1)) + (import "env" "memory" (memory $1 1)) (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (table $0 1 funcref) diff --git a/test/passes/directize_enable-tail-call.txt b/test/passes/directize_enable-tail-call.txt index af172e825..97956bee5 100644 --- a/test/passes/directize_enable-tail-call.txt +++ b/test/passes/directize_enable-tail-call.txt @@ -56,7 +56,7 @@ ) (module (type $i32_i32_=>_none (func (param i32 i32))) - (import "env" "table" (table $0 5 5 funcref)) + (import "env" "table" (table $table 5 5 funcref)) (elem (i32.const 1) $foo) (func $foo (param $0 i32) (param $1 i32) (unreachable) diff --git a/test/passes/inlining-optimizing_optimize-level=3.txt b/test/passes/inlining-optimizing_optimize-level=3.txt index bcb7db0bd..1b8a1b9f5 100644 --- a/test/passes/inlining-optimizing_optimize-level=3.txt +++ b/test/passes/inlining-optimizing_optimize-level=3.txt @@ -13,7 +13,7 @@ (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (import "env" "memory" (memory $0 256 256)) (data (i32.const 1024) "emcc_hello_world.asm.js") - (import "env" "table" (table $0 18 18 funcref)) + (import "env" "table" (table $timport$0 18 18 funcref)) (elem (global.get $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32)) (import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32)) diff --git a/test/passes/minify-imports-and-exports_all-features.txt b/test/passes/minify-imports-and-exports_all-features.txt index 355e15b94..e5b99a84a 100644 --- a/test/passes/minify-imports-and-exports_all-features.txt +++ b/test/passes/minify-imports-and-exports_all-features.txt @@ -5009,9 +5009,9 @@ longname4880 => zza (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (import "env" "a" (global $import$global0 i32)) - (import "env" "b" (global $import$global1 i32)) - (import "env" "c" (global $import$global2 i32)) + (import "env" "a" (global $gimport$0 i32)) + (import "env" "b" (global $gimport$1 i32)) + (import "env" "c" (global $gimport$2 i32)) (import "env" "d" (func $internal1)) (import "env" "e" (func $internal2)) (import "env" "f" (func $internal3)) diff --git a/test/passes/minify-imports_all-features.txt b/test/passes/minify-imports_all-features.txt index 019cd7ee5..1be765254 100644 --- a/test/passes/minify-imports_all-features.txt +++ b/test/passes/minify-imports_all-features.txt @@ -5005,9 +5005,9 @@ longname4880 => zza (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (import "env" "a" (global $import$global0 i32)) - (import "env" "b" (global $import$global1 i32)) - (import "env" "c" (global $import$global2 i32)) + (import "env" "a" (global $gimport$0 i32)) + (import "env" "b" (global $gimport$1 i32)) + (import "env" "c" (global $gimport$2 i32)) (import "env" "d" (func $internal1)) (import "env" "e" (func $internal2)) (import "env" "f" (func $internal3)) diff --git a/test/passes/print-call-graph.txt b/test/passes/print-call-graph.txt index 9d1143610..7c8398405 100644 --- a/test/passes/print-call-graph.txt +++ b/test/passes/print-call-graph.txt @@ -122,7 +122,7 @@ digraph call { (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $0 256 256)) (data (global.get $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") - (import "env" "table" (table $0 9 9 funcref)) + (import "env" "table" (table $timport$0 9 9 funcref)) (elem (i32.const 0) $b0 $___stdio_close $b1 $___stdout_write $___stdio_seek $___stdio_write $b2 $_cleanup_387 $b3) (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32)) (import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32)) diff --git a/test/passes/remove-imports.txt b/test/passes/remove-imports.txt index e76949425..40758ca27 100644 --- a/test/passes/remove-imports.txt +++ b/test/passes/remove-imports.txt @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) - (import "env" "table" (table $0 1 1 funcref)) + (import "env" "table" (table $table 1 1 funcref)) (elem (i32.const 0) $waka-sneaky) - (import "env" "memBase" (global $import$global0 i32)) + (import "env" "memBase" (global $gimport$0 i32)) (import "somewhere" "waka-sneaky" (func $waka-sneaky)) (memory $0 1024 1024) (func $nada diff --git a/test/passes/remove-unused-module-elements_all-features.txt b/test/passes/remove-unused-module-elements_all-features.txt index 47f02aeb5..e79257211 100644 --- a/test/passes/remove-unused-module-elements_all-features.txt +++ b/test/passes/remove-unused-module-elements_all-features.txt @@ -85,7 +85,7 @@ ) (module (import "env" "memory" (memory $0 256)) - (import "env" "table" (table $0 1 funcref)) + (import "env" "table" (table $timport$0 1 funcref)) (export "mem" (memory $0)) (export "tab" (table $0)) ) @@ -93,7 +93,7 @@ (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) (data (i32.const 1) "hello, world!") - (import "env" "table" (table $0 1 funcref)) + (import "env" "table" (table $timport$0 1 funcref)) (elem (i32.const 0) $waka) (func $waka (nop) @@ -102,7 +102,7 @@ (module (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) - (import "env" "table" (table $0 0 funcref)) + (import "env" "table" (table $timport$0 0 funcref)) (export "user" (func $user)) (func $user (drop @@ -208,7 +208,7 @@ (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) (data (global.get $memoryBase) "hello, world!") - (import "env" "table" (table $0 0 funcref)) + (import "env" "table" (table $timport$0 0 funcref)) (elem (global.get $tableBase) $waka) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) @@ -265,7 +265,7 @@ ) (module (type $f64_=>_f64 (func (param f64) (result f64))) - (import "env" "table" (table $0 6 6 funcref)) + (import "env" "table" (table $timport$0 6 6 funcref)) (elem (i32.const 0) $0) (func $0 (param $var$0 f64) (result f64) (if (result f64) diff --git a/test/passes/remove-unused-names_remove-unused-brs_vacuum.txt b/test/passes/remove-unused-names_remove-unused-brs_vacuum.txt index 49636f323..e82601a79 100644 --- a/test/passes/remove-unused-names_remove-unused-brs_vacuum.txt +++ b/test/passes/remove-unused-names_remove-unused-brs_vacuum.txt @@ -9,7 +9,7 @@ (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_=>_i64 (func (param i32) (result i64))) (import "env" "memory" (memory $0 256)) - (import "env" "table" (table $0 18 18 funcref)) + (import "env" "table" (table $timport$0 18 18 funcref)) (import "env" "DYNAMICTOP_PTR" (global $import$0 i32)) (import "env" "tempDoublePtr" (global $import$1 i32)) (import "env" "ABORT" (global $import$2 i32)) diff --git a/test/passes/remove-unused-nonfunction-module-elements_all-features.txt b/test/passes/remove-unused-nonfunction-module-elements_all-features.txt index 22ad3d015..2091e9560 100644 --- a/test/passes/remove-unused-nonfunction-module-elements_all-features.txt +++ b/test/passes/remove-unused-nonfunction-module-elements_all-features.txt @@ -100,7 +100,7 @@ ) (module (import "env" "memory" (memory $0 256)) - (import "env" "table" (table $0 1 funcref)) + (import "env" "table" (table $timport$0 1 funcref)) (export "mem" (memory $0)) (export "tab" (table $0)) ) @@ -108,7 +108,7 @@ (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) (data (i32.const 1) "hello, world!") - (import "env" "table" (table $0 1 funcref)) + (import "env" "table" (table $timport$0 1 funcref)) (elem (i32.const 0) $waka) (func $waka (nop) @@ -117,7 +117,7 @@ (module (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) - (import "env" "table" (table $0 0 funcref)) + (import "env" "table" (table $timport$0 0 funcref)) (export "user" (func $user)) (func $user (drop @@ -223,7 +223,7 @@ (type $none_=>_none (func)) (import "env" "memory" (memory $0 256)) (data (global.get $memoryBase) "hello, world!") - (import "env" "table" (table $0 0 funcref)) + (import "env" "table" (table $timport$0 0 funcref)) (elem (global.get $tableBase) $waka) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) @@ -316,7 +316,7 @@ ) (module (type $f64_=>_f64 (func (param f64) (result f64))) - (import "env" "table" (table $0 6 6 funcref)) + (import "env" "table" (table $timport$0 6 6 funcref)) (elem (i32.const 0) $0) (func $0 (param $var$0 f64) (result f64) (if (result f64) diff --git a/test/polymorphic_stack.wast.from-wast b/test/polymorphic_stack.wast.from-wast index 2982761a7..18b991df3 100644 --- a/test/polymorphic_stack.wast.from-wast +++ b/test/polymorphic_stack.wast.from-wast @@ -3,7 +3,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (import "env" "table" (table $0 9 9 funcref)) + (import "env" "table" (table $timport$0 9 9 funcref)) (func $break-and-binary (result i32) (block $x (result i32) (f32.add diff --git a/test/polymorphic_stack.wast.fromBinary b/test/polymorphic_stack.wast.fromBinary index 8a3b92d6e..1265bd080 100644 --- a/test/polymorphic_stack.wast.fromBinary +++ b/test/polymorphic_stack.wast.fromBinary @@ -3,7 +3,7 @@ (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) - (import "env" "table" (table $0 9 9 funcref)) + (import "env" "table" (table $timport$0 9 9 funcref)) (func $break-and-binary (result i32) (block $label$1 (result i32) (unreachable) diff --git a/test/table-import.wast.from-wast b/test/table-import.wast.from-wast index 061ea5af2..e490d690b 100644 --- a/test/table-import.wast.from-wast +++ b/test/table-import.wast.from-wast @@ -1,6 +1,6 @@ (module (type $none_=>_none (func)) - (import "env" "table" (table $0 1 1 funcref)) + (import "env" "table" (table $timport$0 1 1 funcref)) (elem (i32.const 0) $foo) (memory $0 0) (func $foo diff --git a/test/table-import.wast.fromBinary b/test/table-import.wast.fromBinary index 4597ce783..5cf03f48a 100644 --- a/test/table-import.wast.fromBinary +++ b/test/table-import.wast.fromBinary @@ -1,6 +1,6 @@ (module (type $none_=>_none (func)) - (import "env" "table" (table $0 1 1 funcref)) + (import "env" "table" (table $timport$0 1 1 funcref)) (elem (i32.const 0) $foo) (memory $0 0) (func $foo |