diff options
author | Sam Clegg <sbc@chromium.org> | 2020-10-14 21:10:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-14 19:10:26 -0700 |
commit | 9c5df069cc466d904c8faa1888095e84ae74d404 (patch) | |
tree | c8f69e0c526428d2849d45be1154ed45dfa77868 /test/dylib.wasm.fromBinary | |
parent | 6216becd5e8d93cd17c758a63f24db4494719e2c (diff) | |
download | binaryen-9c5df069cc466d904c8faa1888095e84ae74d404.tar.gz binaryen-9c5df069cc466d904c8faa1888095e84ae74d404.tar.bz2 binaryen-9c5df069cc466d904c8faa1888095e84ae74d404.zip |
Assign import names consistently between text and binaryn reader (#3238)
The s-parser was assigning numbers names per-type where as
the binaryn reader was using the global import count as the
number to append.
This change switches to use per-element count which I think
it preferable as it increases the stability of the auto-generated
names. e.g. memory is now always named `$mimport0`.
Diffstat (limited to 'test/dylib.wasm.fromBinary')
-rw-r--r-- | test/dylib.wasm.fromBinary | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/dylib.wasm.fromBinary b/test/dylib.wasm.fromBinary index dcf6f4ec4..8c8a517d9 100644 --- a/test/dylib.wasm.fromBinary +++ b/test/dylib.wasm.fromBinary @@ -3,9 +3,9 @@ (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (import "env" "memory" (memory $mimport$5 0)) - (data (global.get $gimport$4) "*\00\00\00") - (import "env" "__memory_base" (global $gimport$4 i32)) + (import "env" "memory" (memory $mimport$0 0)) + (data (global.get $gimport$0) "*\00\00\00") + (import "env" "__memory_base" (global $gimport$0 i32)) (import "env" "g$waka_mine" (func $fimport$0 (result i32))) (import "env" "g$waka_others" (func $fimport$1 (result i32))) (import "env" "fp$_Z16waka_func_theirsi$ii" (func $fimport$2 (result i32))) |