diff options
author | Thomas Lively <tlively@google.com> | 2023-04-04 11:33:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-04 11:33:15 -0700 |
commit | a802fbe07c270f510c87dfa93577bd4731c075f3 (patch) | |
tree | 4c67b39ced46258593f6904bba4a5ac20292886c /test/lld/main_module_table_5.wat.out | |
parent | 05e1183954e49f8b3a1669cc7973af590afe9fc3 (diff) | |
download | binaryen-a802fbe07c270f510c87dfa93577bd4731c075f3.tar.gz binaryen-a802fbe07c270f510c87dfa93577bd4731c075f3.tar.bz2 binaryen-a802fbe07c270f510c87dfa93577bd4731c075f3.zip |
Use Names instead of indices to identify segments (#5618)
All top-level Module elements are identified and referred to by Name, but for
historical reasons element and data segments were referred to by index instead.
Fix this inconsistency by using Names to refer to segments from expressions that
use them. Also parse and print segment names like we do for other elements.
The C API is partially converted to use names instead of indices, but there are
still many functions that refer to data segments by index. Finishing the
conversion can be done in the future once it becomes necessary.
Diffstat (limited to 'test/lld/main_module_table_5.wat.out')
-rw-r--r-- | test/lld/main_module_table_5.wat.out | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lld/main_module_table_5.wat.out b/test/lld/main_module_table_5.wat.out index 3620dc0b4..50d996c72 100644 --- a/test/lld/main_module_table_5.wat.out +++ b/test/lld/main_module_table_5.wat.out @@ -6,7 +6,7 @@ (import "GOT.func" "__stdio_write" (global $gimport$9 (mut i32))) (import "env" "__table_base" (global $tb i32)) (global $global i32 (i32.const 42)) - (elem (global.get $tb) $other $stuff) + (elem $0 (global.get $tb) $other $stuff) (export "__stdio_write" (func $__stdio_write)) (export "__data_end" (global $global)) (export "dynCall_v" (func $dynCall_v)) |