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/lld | |
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/lld')
-rw-r--r-- | test/lld/em_asm_shared.wat.out | 2 | ||||
-rw-r--r-- | test/lld/em_asm_table.wat.out | 2 | ||||
-rw-r--r-- | test/lld/gdollar_mainmodule.wat.out | 2 | ||||
-rw-r--r-- | test/lld/main_module.wat.out | 2 | ||||
-rw-r--r-- | test/lld/main_module_table_2.wat.out | 2 | ||||
-rw-r--r-- | test/lld/main_module_table_3.wat.out | 2 | ||||
-rw-r--r-- | test/lld/main_module_table_4.wat.out | 2 | ||||
-rw-r--r-- | test/lld/main_module_table_5.wat.out | 2 | ||||
-rw-r--r-- | test/lld/shared.wat.out | 2 | ||||
-rw-r--r-- | test/lld/shared_longjmp.wat.out | 2 |
10 files changed, 10 insertions, 10 deletions
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))) |