diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-02-22 11:10:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-22 11:10:12 -0800 |
commit | a40f14508fb769358737c3f8c9b94e6c42f79c61 (patch) | |
tree | f57dca752269f26168c98a2f224e57037b1faebf /test/dylib.wasm.fromBinary | |
parent | 30c1b0c58ee60a730ddfd862fbed7dd5e4d7cf93 (diff) | |
download | binaryen-a40f14508fb769358737c3f8c9b94e6c42f79c61.tar.gz binaryen-a40f14508fb769358737c3f8c9b94e6c42f79c61.tar.bz2 binaryen-a40f14508fb769358737c3f8c9b94e6c42f79c61.zip |
ensure unique import names for each type, by giving them a prefix, avoiding collisions between say a global import and a function with a name from the name section that happens to match it (#1424)
Diffstat (limited to 'test/dylib.wasm.fromBinary')
-rw-r--r-- | test/dylib.wasm.fromBinary | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/dylib.wasm.fromBinary b/test/dylib.wasm.fromBinary index aae9b0372..37dcab84f 100644 --- a/test/dylib.wasm.fromBinary +++ b/test/dylib.wasm.fromBinary @@ -2,15 +2,15 @@ (type $0 (func (param i32) (result i32))) (type $1 (func (result i32))) (type $2 (func)) - (import "env" "memoryBase" (global $import$0 i32)) + (import "env" "memoryBase" (global $gimport$0 i32)) (import "env" "memory" (memory $0 256)) (import "env" "table" (table 0 anyfunc)) - (import "env" "tableBase" (global $import$4 i32)) - (import "env" "_puts" (func $import$1 (param i32) (result i32))) + (import "env" "tableBase" (global $gimport$4 i32)) + (import "env" "_puts" (func $fimport$1 (param i32) (result i32))) (global $global$0 (mut i32) (i32.const 0)) (global $global$1 (mut i32) (i32.const 0)) (global $global$2 i32 (i32.const 0)) - (data (get_global $import$0) "hello, world!") + (data (get_global $gimport$0) "hello, world!") (export "__post_instantiate" (func $2)) (export "_main" (func $0)) (export "runPostSets" (func $1)) @@ -18,8 +18,8 @@ (func $0 (; 1 ;) (type $1) (result i32) (block $label$1 (result i32) (drop - (call $import$1 - (get_global $import$0) + (call $fimport$1 + (get_global $gimport$0) ) ) (i32.const 0) @@ -32,7 +32,7 @@ (block $label$1 (set_global $global$0 (i32.add - (get_global $import$0) + (get_global $gimport$0) (i32.const 16) ) ) |