summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/bad_params.fromasm4
-rw-r--r--test/bad_params.fromasm.clamp4
-rw-r--r--test/bad_params.fromasm.clamp.no-opts4
-rw-r--r--test/bad_params.fromasm.imprecise.no-opts4
-rw-r--r--test/bad_params.fromasm.no-opts4
-rw-r--r--test/debugInfo.fromasm4
-rw-r--r--test/debugInfo.fromasm.clamp4
-rw-r--r--test/debugInfo.fromasm.clamp.map2
-rw-r--r--test/debugInfo.fromasm.clamp.no-opts4
-rw-r--r--test/debugInfo.fromasm.clamp.no-opts.map2
-rw-r--r--test/debugInfo.fromasm.imprecise.no-opts4
-rw-r--r--test/debugInfo.fromasm.imprecise.no-opts.map2
-rw-r--r--test/debugInfo.fromasm.map2
-rw-r--r--test/debugInfo.fromasm.no-opts4
-rw-r--r--test/debugInfo.fromasm.no-opts.map2
-rw-r--r--test/debugInfo.fromasm.read-written2
-rw-r--r--test/dynamicLibrary.fromasm6
-rw-r--r--test/dynamicLibrary.fromasm.clamp6
-rw-r--r--test/dynamicLibrary.fromasm.clamp.no-opts8
-rw-r--r--test/dynamicLibrary.fromasm.imprecise3
-rw-r--r--test/dynamicLibrary.fromasm.imprecise.no-opts8
-rw-r--r--test/dynamicLibrary.fromasm.no-opts8
-rw-r--r--test/emcc_O2_hello_world.fromasm4
-rw-r--r--test/emcc_O2_hello_world.fromasm.clamp4
-rw-r--r--test/emcc_O2_hello_world.fromasm.clamp.no-opts6
-rw-r--r--test/emcc_O2_hello_world.fromasm.imprecise4
-rw-r--r--test/emcc_O2_hello_world.fromasm.imprecise.no-opts6
-rw-r--r--test/emcc_O2_hello_world.fromasm.no-opts6
-rw-r--r--test/emcc_hello_world.fromasm4
-rw-r--r--test/emcc_hello_world.fromasm.clamp4
-rw-r--r--test/emcc_hello_world.fromasm.clamp.no-opts6
-rw-r--r--test/emcc_hello_world.fromasm.imprecise4
-rw-r--r--test/emcc_hello_world.fromasm.imprecise.no-opts6
-rw-r--r--test/emcc_hello_world.fromasm.no-opts6
-rw-r--r--test/empty.fromasm.clamp.no-opts4
-rw-r--r--test/empty.fromasm.imprecise.no-opts4
-rw-r--r--test/empty.fromasm.no-opts4
-rw-r--r--test/empty_4GB.fromasm.clamp.no-opts4
-rw-r--r--test/empty_4GB.fromasm.imprecise.no-opts4
-rw-r--r--test/empty_4GB.fromasm.no-opts4
-rw-r--r--test/hello_world.fromasm4
-rw-r--r--test/hello_world.fromasm.clamp4
-rw-r--r--test/hello_world.fromasm.clamp.no-opts4
-rw-r--r--test/hello_world.fromasm.imprecise.no-opts4
-rw-r--r--test/hello_world.fromasm.no-opts4
-rw-r--r--test/i64-setTempRet0.fromasm4
-rw-r--r--test/i64-setTempRet0.fromasm.clamp4
-rw-r--r--test/i64-setTempRet0.fromasm.clamp.no-opts4
-rw-r--r--test/i64-setTempRet0.fromasm.imprecise.no-opts4
-rw-r--r--test/i64-setTempRet0.fromasm.no-opts4
-rw-r--r--test/importedSignCast.fromasm8
-rw-r--r--test/importedSignCast.fromasm.clamp8
-rw-r--r--test/importedSignCast.fromasm.clamp.no-opts6
-rw-r--r--test/importedSignCast.fromasm.imprecise4
-rw-r--r--test/importedSignCast.fromasm.imprecise.no-opts6
-rw-r--r--test/importedSignCast.fromasm.no-opts6
-rw-r--r--test/memorygrowth-minimal.fromasm4
-rw-r--r--test/memorygrowth-minimal.fromasm.clamp4
-rw-r--r--test/memorygrowth-minimal.fromasm.clamp.no-opts4
-rw-r--r--test/memorygrowth-minimal.fromasm.imprecise.no-opts4
-rw-r--r--test/memorygrowth-minimal.fromasm.no-opts4
-rw-r--r--test/memorygrowth.fromasm8
-rw-r--r--test/memorygrowth.fromasm.clamp8
-rw-r--r--test/memorygrowth.fromasm.clamp.no-opts6
-rw-r--r--test/memorygrowth.fromasm.imprecise4
-rw-r--r--test/memorygrowth.fromasm.imprecise.no-opts6
-rw-r--r--test/memorygrowth.fromasm.no-opts6
-rw-r--r--test/merge/basics.wast.combined28
-rw-r--r--test/merge/basics.wast.combined.finalized40
-rw-r--r--test/merge/basics.wast.combined.finalized.opt47
-rw-r--r--test/merge/basics.wast.combined.opt23
-rw-r--r--test/merge/dylib.wasm.combined9
-rw-r--r--test/merge/dylib.wasm.combined.finalized15
-rw-r--r--test/merge/dylib.wasm.combined.finalized.opt13
-rw-r--r--test/merge/dylib.wasm.combined.opt7
-rw-r--r--test/merge/fusing.wast.combined6
-rw-r--r--test/merge/fusing.wast.combined.finalized4
-rw-r--r--test/merge/fusing.wast.combined.opt6
-rw-r--r--test/merge/global-init.wast.combined6
-rw-r--r--test/merge/global-init.wast.combined.finalized4
-rw-r--r--test/merge/global-init.wast.combined.opt6
-rw-r--r--test/merge/main-lacks-segments.wast.combined18
-rw-r--r--test/merge/main-lacks-segments.wast.combined.finalized14
-rw-r--r--test/merge/main-lacks-segments.wast.combined.finalized.opt9
-rw-r--r--test/merge/main-lacks-segments.wast.combined.opt8
-rw-r--r--test/merge/noBases.wast.combined10
-rw-r--r--test/merge/noBases.wast.combined.finalized8
-rw-r--r--test/merge/noBases.wast.combined.opt6
-rw-r--r--test/merge/post-instantiate-a.wast.combined4
-rw-r--r--test/merge/post-instantiate-a.wast.combined.finalized4
-rw-r--r--test/merge/post-instantiate-a.wast.combined.opt4
-rw-r--r--test/merge/post-instantiate-b.wast.combined4
-rw-r--r--test/merge/post-instantiate-b.wast.combined.finalized4
-rw-r--r--test/merge/post-instantiate-b.wast.combined.opt4
-rw-r--r--test/merge/printf.wast.combined6
-rw-r--r--test/merge/printf.wast.combined.finalized4
-rw-r--r--test/merge/printf.wast.combined.opt6
-rw-r--r--test/min.fromasm4
-rw-r--r--test/min.fromasm.clamp4
-rw-r--r--test/min.fromasm.clamp.no-opts4
-rw-r--r--test/min.fromasm.imprecise.no-opts4
-rw-r--r--test/min.fromasm.no-opts4
-rw-r--r--test/noffi_f32.fromasm4
-rw-r--r--test/noffi_f32.fromasm.clamp4
-rw-r--r--test/noffi_f32.fromasm.clamp.no-opts4
-rw-r--r--test/noffi_f32.fromasm.imprecise.no-opts4
-rw-r--r--test/noffi_f32.fromasm.no-opts4
-rw-r--r--test/noffi_i64.fromasm4
-rw-r--r--test/noffi_i64.fromasm.clamp4
-rw-r--r--test/noffi_i64.fromasm.clamp.no-opts4
-rw-r--r--test/noffi_i64.fromasm.imprecise.no-opts4
-rw-r--r--test/noffi_i64.fromasm.no-opts4
-rw-r--r--test/passes/minify-imports-and-exports.txt4
-rw-r--r--test/passes/minify-imports-and-exports.wast4
-rw-r--r--test/threads.fromasm4
-rw-r--r--test/threads.fromasm.clamp4
-rw-r--r--test/threads.fromasm.clamp.no-opts4
-rw-r--r--test/threads.fromasm.imprecise.no-opts4
-rw-r--r--test/threads.fromasm.no-opts4
-rw-r--r--test/threads.wasm-only.fromasm4
-rw-r--r--test/threads.wasm-only.fromasm.clamp4
-rw-r--r--test/threads.wasm-only.fromasm.clamp.no-opts4
-rw-r--r--test/threads.wasm-only.fromasm.imprecise.no-opts4
-rw-r--r--test/threads.wasm-only.fromasm.no-opts4
-rw-r--r--test/two_sides.fromasm4
-rw-r--r--test/two_sides.fromasm.clamp4
-rw-r--r--test/two_sides.fromasm.clamp.no-opts4
-rw-r--r--test/two_sides.fromasm.imprecise.no-opts4
-rw-r--r--test/two_sides.fromasm.no-opts4
-rw-r--r--test/unit.fromasm8
-rw-r--r--test/unit.fromasm.clamp8
-rw-r--r--test/unit.fromasm.clamp.no-opts6
-rw-r--r--test/unit.fromasm.imprecise4
-rw-r--r--test/unit.fromasm.imprecise.no-opts6
-rw-r--r--test/unit.fromasm.no-opts6
-rw-r--r--test/unreachable-import_wasm-only.fromasm4
-rw-r--r--test/unreachable-import_wasm-only.fromasm.clamp4
-rw-r--r--test/unreachable-import_wasm-only.fromasm.clamp.no-opts4
-rw-r--r--test/unreachable-import_wasm-only.fromasm.imprecise.no-opts4
-rw-r--r--test/unreachable-import_wasm-only.fromasm.no-opts4
-rw-r--r--test/use-import-and-drop.fromasm4
-rw-r--r--test/use-import-and-drop.fromasm.clamp4
-rw-r--r--test/use-import-and-drop.fromasm.clamp.no-opts4
-rw-r--r--test/use-import-and-drop.fromasm.imprecise.no-opts4
-rw-r--r--test/use-import-and-drop.fromasm.no-opts4
-rw-r--r--test/wasm-only.fromasm8
-rw-r--r--test/wasm-only.fromasm.clamp8
-rw-r--r--test/wasm-only.fromasm.clamp.no-opts6
-rw-r--r--test/wasm-only.fromasm.imprecise4
-rw-r--r--test/wasm-only.fromasm.imprecise.no-opts6
-rw-r--r--test/wasm-only.fromasm.no-opts6
151 files changed, 474 insertions, 408 deletions
diff --git a/test/bad_params.fromasm b/test/bad_params.fromasm
index ba2754d76..5c9bd669b 100644
--- a/test/bad_params.fromasm
+++ b/test/bad_params.fromasm
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "bad_params.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "bad_params.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "ex" (func $ex))
(func $ex (; 0 ;) (; has Stack IR ;)
(nop)
diff --git a/test/bad_params.fromasm.clamp b/test/bad_params.fromasm.clamp
index ba2754d76..5c9bd669b 100644
--- a/test/bad_params.fromasm.clamp
+++ b/test/bad_params.fromasm.clamp
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "bad_params.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "bad_params.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "ex" (func $ex))
(func $ex (; 0 ;) (; has Stack IR ;)
(nop)
diff --git a/test/bad_params.fromasm.clamp.no-opts b/test/bad_params.fromasm.clamp.no-opts
index b7ed58e02..423633280 100644
--- a/test/bad_params.fromasm.clamp.no-opts
+++ b/test/bad_params.fromasm.clamp.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "ex" (func $ex))
(func $missing (; 0 ;) (param $x i32) (param $y f64)
(nop)
diff --git a/test/bad_params.fromasm.imprecise.no-opts b/test/bad_params.fromasm.imprecise.no-opts
index b7ed58e02..423633280 100644
--- a/test/bad_params.fromasm.imprecise.no-opts
+++ b/test/bad_params.fromasm.imprecise.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "ex" (func $ex))
(func $missing (; 0 ;) (param $x i32) (param $y f64)
(nop)
diff --git a/test/bad_params.fromasm.no-opts b/test/bad_params.fromasm.no-opts
index b7ed58e02..423633280 100644
--- a/test/bad_params.fromasm.no-opts
+++ b/test/bad_params.fromasm.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "ex" (func $ex))
(func $missing (; 0 ;) (param $x i32) (param $y f64)
(nop)
diff --git a/test/debugInfo.fromasm b/test/debugInfo.fromasm
index 366ffb4d8..c9eb61d21 100644
--- a/test/debugInfo.fromasm
+++ b/test/debugInfo.fromasm
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "debugInfo.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "debugInfo.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "add" (func $add))
(export "ret" (func $ret))
(export "opts" (func $opts))
diff --git a/test/debugInfo.fromasm.clamp b/test/debugInfo.fromasm.clamp
index 366ffb4d8..c9eb61d21 100644
--- a/test/debugInfo.fromasm.clamp
+++ b/test/debugInfo.fromasm.clamp
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "debugInfo.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "debugInfo.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "add" (func $add))
(export "ret" (func $ret))
(export "opts" (func $opts))
diff --git a/test/debugInfo.fromasm.clamp.map b/test/debugInfo.fromasm.clamp.map
index 0f4b9aca9..ab06a414e 100644
--- a/test/debugInfo.fromasm.clamp.map
+++ b/test/debugInfo.fromasm.clamp.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"mIC8ylTA,QC7vlTA,OAkDA,wBCnGA,OACA,OACA,cCAA,kBAKA,QAJA,OADA,0BAKA,wECsi1DA,KCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"sIC8ylTA,QC7vlTA,OAkDA,wBCnGA,OACA,OACA,cCAA,kBAKA,QAJA,OADA,0BAKA,wECsi1DA,KCrvyDA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.clamp.no-opts b/test/debugInfo.fromasm.clamp.no-opts
index 527fbc23f..0bd821535 100644
--- a/test/debugInfo.fromasm.clamp.no-opts
+++ b/test/debugInfo.fromasm.clamp.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(global $STACKTOP (mut i32) (i32.const 0))
(export "add" (func $add))
(export "ret" (func $ret))
diff --git a/test/debugInfo.fromasm.clamp.no-opts.map b/test/debugInfo.fromasm.clamp.no-opts.map
index 14e4f4e73..0b394eb99 100644
--- a/test/debugInfo.fromasm.clamp.no-opts.map
+++ b/test/debugInfo.fromasm.clamp.no-opts.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"mLAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"yLAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.imprecise.no-opts b/test/debugInfo.fromasm.imprecise.no-opts
index be589fd5a..02a444c79 100644
--- a/test/debugInfo.fromasm.imprecise.no-opts
+++ b/test/debugInfo.fromasm.imprecise.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(global $STACKTOP (mut i32) (i32.const 0))
(export "add" (func $add))
(export "ret" (func $ret))
diff --git a/test/debugInfo.fromasm.imprecise.no-opts.map b/test/debugInfo.fromasm.imprecise.no-opts.map
index f28541fa2..75f8f7d42 100644
--- a/test/debugInfo.fromasm.imprecise.no-opts.map
+++ b/test/debugInfo.fromasm.imprecise.no-opts.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"kLAIA,IACA,ICyylTA,aC7vlTA,OAkDA,SCnGA,OACA,OACA,sBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"wLAIA,IACA,ICyylTA,aC7vlTA,OAkDA,SCnGA,OACA,OACA,sBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.map b/test/debugInfo.fromasm.map
index 0f4b9aca9..ab06a414e 100644
--- a/test/debugInfo.fromasm.map
+++ b/test/debugInfo.fromasm.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"mIC8ylTA,QC7vlTA,OAkDA,wBCnGA,OACA,OACA,cCAA,kBAKA,QAJA,OADA,0BAKA,wECsi1DA,KCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"sIC8ylTA,QC7vlTA,OAkDA,wBCnGA,OACA,OACA,cCAA,kBAKA,QAJA,OADA,0BAKA,wECsi1DA,KCrvyDA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.no-opts b/test/debugInfo.fromasm.no-opts
index 527fbc23f..0bd821535 100644
--- a/test/debugInfo.fromasm.no-opts
+++ b/test/debugInfo.fromasm.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(global $STACKTOP (mut i32) (i32.const 0))
(export "add" (func $add))
(export "ret" (func $ret))
diff --git a/test/debugInfo.fromasm.no-opts.map b/test/debugInfo.fromasm.no-opts.map
index 14e4f4e73..0b394eb99 100644
--- a/test/debugInfo.fromasm.no-opts.map
+++ b/test/debugInfo.fromasm.no-opts.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"mLAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"yLAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.read-written b/test/debugInfo.fromasm.read-written
index 707c705bf..92deb4763 100644
--- a/test/debugInfo.fromasm.read-written
+++ b/test/debugInfo.fromasm.read-written
@@ -4,7 +4,7 @@
(type $2 (func))
(import "env" "memory" (memory $1 256 256))
(data (get_global $gimport$0) "debugInfo.asm.js")
- (import "env" "memoryBase" (global $gimport$0 i32))
+ (import "env" "__memory_base" (global $gimport$0 i32))
(export "add" (func $add))
(export "ret" (func $ret))
(export "opts" (func $opts))
diff --git a/test/dynamicLibrary.fromasm b/test/dynamicLibrary.fromasm
index 813f7334a..d3a391c51 100644
--- a/test/dynamicLibrary.fromasm
+++ b/test/dynamicLibrary.fromasm
@@ -2,10 +2,12 @@
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "dynamicLibrary.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "dynamicLibrary.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "memoryBase" (global $memoryBase$asm2wasm$import i32))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
(import "env" "_puts" (func $_puts (param i32) (result i32)))
+ (global $memoryBase (mut i32) (get_global $memoryBase$asm2wasm$import))
(global $STACKTOP (mut i32) (i32.const 0))
(global $STACK_MAX (mut i32) (i32.const 0))
(global $_global i32 (i32.const 5242912))
diff --git a/test/dynamicLibrary.fromasm.clamp b/test/dynamicLibrary.fromasm.clamp
index 813f7334a..d3a391c51 100644
--- a/test/dynamicLibrary.fromasm.clamp
+++ b/test/dynamicLibrary.fromasm.clamp
@@ -2,10 +2,12 @@
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "dynamicLibrary.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "dynamicLibrary.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "memoryBase" (global $memoryBase$asm2wasm$import i32))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
(import "env" "_puts" (func $_puts (param i32) (result i32)))
+ (global $memoryBase (mut i32) (get_global $memoryBase$asm2wasm$import))
(global $STACKTOP (mut i32) (i32.const 0))
(global $STACK_MAX (mut i32) (i32.const 0))
(global $_global i32 (i32.const 5242912))
diff --git a/test/dynamicLibrary.fromasm.clamp.no-opts b/test/dynamicLibrary.fromasm.clamp.no-opts
index 93312ae0a..ecd6e74d9 100644
--- a/test/dynamicLibrary.fromasm.clamp.no-opts
+++ b/test/dynamicLibrary.fromasm.clamp.no-opts
@@ -3,11 +3,13 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
+ (import "env" "memoryBase" (global $memoryBase$asm2wasm$import i32))
+ (import "env" "tableBase" (global $tableBase$asm2wasm$import i32))
(import "global" "NaN" (global $nan$asm2wasm$import f64))
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
@@ -15,6 +17,8 @@
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
+ (global $memoryBase (mut i32) (get_global $memoryBase$asm2wasm$import))
+ (global $tableBase (mut i32) (get_global $tableBase$asm2wasm$import))
(global $STACKTOP (mut i32) (i32.const 0))
(global $STACK_MAX (mut i32) (i32.const 0))
(global $__THREW__ (mut i32) (i32.const 0))
diff --git a/test/dynamicLibrary.fromasm.imprecise b/test/dynamicLibrary.fromasm.imprecise
index ce18a050f..6674e5b45 100644
--- a/test/dynamicLibrary.fromasm.imprecise
+++ b/test/dynamicLibrary.fromasm.imprecise
@@ -1,9 +1,10 @@
(module
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
- (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "memoryBase" (global $memoryBase$asm2wasm$import i32))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
(import "env" "_puts" (func $_puts (param i32) (result i32)))
+ (global $memoryBase (mut i32) (get_global $memoryBase$asm2wasm$import))
(global $STACKTOP (mut i32) (i32.const 0))
(global $STACK_MAX (mut i32) (i32.const 0))
(global $_global i32 (i32.const 5242912))
diff --git a/test/dynamicLibrary.fromasm.imprecise.no-opts b/test/dynamicLibrary.fromasm.imprecise.no-opts
index 93312ae0a..ecd6e74d9 100644
--- a/test/dynamicLibrary.fromasm.imprecise.no-opts
+++ b/test/dynamicLibrary.fromasm.imprecise.no-opts
@@ -3,11 +3,13 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
+ (import "env" "memoryBase" (global $memoryBase$asm2wasm$import i32))
+ (import "env" "tableBase" (global $tableBase$asm2wasm$import i32))
(import "global" "NaN" (global $nan$asm2wasm$import f64))
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
@@ -15,6 +17,8 @@
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
+ (global $memoryBase (mut i32) (get_global $memoryBase$asm2wasm$import))
+ (global $tableBase (mut i32) (get_global $tableBase$asm2wasm$import))
(global $STACKTOP (mut i32) (i32.const 0))
(global $STACK_MAX (mut i32) (i32.const 0))
(global $__THREW__ (mut i32) (i32.const 0))
diff --git a/test/dynamicLibrary.fromasm.no-opts b/test/dynamicLibrary.fromasm.no-opts
index 93312ae0a..ecd6e74d9 100644
--- a/test/dynamicLibrary.fromasm.no-opts
+++ b/test/dynamicLibrary.fromasm.no-opts
@@ -3,11 +3,13 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
+ (import "env" "memoryBase" (global $memoryBase$asm2wasm$import i32))
+ (import "env" "tableBase" (global $tableBase$asm2wasm$import i32))
(import "global" "NaN" (global $nan$asm2wasm$import f64))
(import "global" "Infinity" (global $inf$asm2wasm$import f64))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
@@ -15,6 +17,8 @@
(global $DYNAMICTOP_PTR (mut i32) (get_global $DYNAMICTOP_PTR$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))
(global $ABORT (mut i32) (get_global $ABORT$asm2wasm$import))
+ (global $memoryBase (mut i32) (get_global $memoryBase$asm2wasm$import))
+ (global $tableBase (mut i32) (get_global $tableBase$asm2wasm$import))
(global $STACKTOP (mut i32) (i32.const 0))
(global $STACK_MAX (mut i32) (i32.const 0))
(global $__THREW__ (mut i32) (i32.const 0))
diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm
index 91c312f7a..70ecb9020 100644
--- a/test/emcc_O2_hello_world.fromasm
+++ b/test/emcc_O2_hello_world.fromasm
@@ -9,8 +9,8 @@
(import "env" "memory" (memory $memory 256 256))
(data (i32.const 1024) "emcc_O2_hello_world.asm.js")
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "abort" (func $abort (param i32)))
diff --git a/test/emcc_O2_hello_world.fromasm.clamp b/test/emcc_O2_hello_world.fromasm.clamp
index 91c312f7a..70ecb9020 100644
--- a/test/emcc_O2_hello_world.fromasm.clamp
+++ b/test/emcc_O2_hello_world.fromasm.clamp
@@ -9,8 +9,8 @@
(import "env" "memory" (memory $memory 256 256))
(data (i32.const 1024) "emcc_O2_hello_world.asm.js")
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "abort" (func $abort (param i32)))
diff --git a/test/emcc_O2_hello_world.fromasm.clamp.no-opts b/test/emcc_O2_hello_world.fromasm.clamp.no-opts
index a8bb1aadd..bdaf7b27b 100644
--- a/test/emcc_O2_hello_world.fromasm.clamp.no-opts
+++ b/test/emcc_O2_hello_world.fromasm.clamp.no-opts
@@ -8,9 +8,9 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise
index 086e05c04..c2da41033 100644
--- a/test/emcc_O2_hello_world.fromasm.imprecise
+++ b/test/emcc_O2_hello_world.fromasm.imprecise
@@ -8,8 +8,8 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "abort" (func $abort (param i32)))
diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts
index 8d4243b65..2726389ed 100644
--- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts
+++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts
@@ -8,9 +8,9 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts
index a8bb1aadd..bdaf7b27b 100644
--- a/test/emcc_O2_hello_world.fromasm.no-opts
+++ b/test/emcc_O2_hello_world.fromasm.no-opts
@@ -8,9 +8,9 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $b1 $___stdio_write $b1 $b1 $b2 $b2 $b2 $b2 $_cleanup_418 $b2 $b2 $b2)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm
index 237b1cc5e..f730a33e7 100644
--- a/test/emcc_hello_world.fromasm
+++ b/test/emcc_hello_world.fromasm
@@ -10,8 +10,8 @@
(import "env" "memory" (memory $memory 256 256))
(data (i32.const 1024) "emcc_hello_world.asm.js")
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $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" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2)
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/emcc_hello_world.fromasm.clamp b/test/emcc_hello_world.fromasm.clamp
index 05e57ff34..c9ca55f67 100644
--- a/test/emcc_hello_world.fromasm.clamp
+++ b/test/emcc_hello_world.fromasm.clamp
@@ -9,8 +9,8 @@
(import "env" "memory" (memory $memory 256 256))
(data (i32.const 1024) "emcc_hello_world.asm.js")
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $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" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2)
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/emcc_hello_world.fromasm.clamp.no-opts b/test/emcc_hello_world.fromasm.clamp.no-opts
index 9f4bfc957..c00ef7dc1 100644
--- a/test/emcc_hello_world.fromasm.clamp.no-opts
+++ b/test/emcc_hello_world.fromasm.clamp.no-opts
@@ -8,9 +8,9 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $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" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise
index 26c7fb304..50bd5f37a 100644
--- a/test/emcc_hello_world.fromasm.imprecise
+++ b/test/emcc_hello_world.fromasm.imprecise
@@ -8,8 +8,8 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $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" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2)
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts
index 424679fcd..e5002b394 100644
--- a/test/emcc_hello_world.fromasm.imprecise.no-opts
+++ b/test/emcc_hello_world.fromasm.imprecise.no-opts
@@ -8,9 +8,9 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $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" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts
index 9488377ab..9b310b807 100644
--- a/test/emcc_hello_world.fromasm.no-opts
+++ b/test/emcc_hello_world.fromasm.no-opts
@@ -9,9 +9,9 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 18 18 anyfunc))
- (elem (get_global $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" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/empty.fromasm.clamp.no-opts b/test/empty.fromasm.clamp.no-opts
index 8d4b94845..1981e21f8 100644
--- a/test/empty.fromasm.clamp.no-opts
+++ b/test/empty.fromasm.clamp.no-opts
@@ -1,6 +1,6 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
)
diff --git a/test/empty.fromasm.imprecise.no-opts b/test/empty.fromasm.imprecise.no-opts
index 8d4b94845..1981e21f8 100644
--- a/test/empty.fromasm.imprecise.no-opts
+++ b/test/empty.fromasm.imprecise.no-opts
@@ -1,6 +1,6 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
)
diff --git a/test/empty.fromasm.no-opts b/test/empty.fromasm.no-opts
index 8d4b94845..1981e21f8 100644
--- a/test/empty.fromasm.no-opts
+++ b/test/empty.fromasm.no-opts
@@ -1,6 +1,6 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
)
diff --git a/test/empty_4GB.fromasm.clamp.no-opts b/test/empty_4GB.fromasm.clamp.no-opts
index f52e86de8..99940e3a3 100644
--- a/test/empty_4GB.fromasm.clamp.no-opts
+++ b/test/empty_4GB.fromasm.clamp.no-opts
@@ -1,6 +1,6 @@
(module
(import "env" "memory" (memory $memory 256 65536))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
)
diff --git a/test/empty_4GB.fromasm.imprecise.no-opts b/test/empty_4GB.fromasm.imprecise.no-opts
index f52e86de8..99940e3a3 100644
--- a/test/empty_4GB.fromasm.imprecise.no-opts
+++ b/test/empty_4GB.fromasm.imprecise.no-opts
@@ -1,6 +1,6 @@
(module
(import "env" "memory" (memory $memory 256 65536))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
)
diff --git a/test/empty_4GB.fromasm.no-opts b/test/empty_4GB.fromasm.no-opts
index f52e86de8..99940e3a3 100644
--- a/test/empty_4GB.fromasm.no-opts
+++ b/test/empty_4GB.fromasm.no-opts
@@ -1,6 +1,6 @@
(module
(import "env" "memory" (memory $memory 256 65536))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
)
diff --git a/test/hello_world.fromasm b/test/hello_world.fromasm
index 426989111..edbc0d6a3 100644
--- a/test/hello_world.fromasm
+++ b/test/hello_world.fromasm
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "hello_world.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "hello_world.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "add" (func $add))
(func $add (; 0 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
(i32.add
diff --git a/test/hello_world.fromasm.clamp b/test/hello_world.fromasm.clamp
index 426989111..edbc0d6a3 100644
--- a/test/hello_world.fromasm.clamp
+++ b/test/hello_world.fromasm.clamp
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "hello_world.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "hello_world.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "add" (func $add))
(func $add (; 0 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
(i32.add
diff --git a/test/hello_world.fromasm.clamp.no-opts b/test/hello_world.fromasm.clamp.no-opts
index bd0077baa..cfab7dcd1 100644
--- a/test/hello_world.fromasm.clamp.no-opts
+++ b/test/hello_world.fromasm.clamp.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "add" (func $add))
(func $add (; 0 ;) (param $x i32) (param $y i32) (result i32)
(return
diff --git a/test/hello_world.fromasm.imprecise.no-opts b/test/hello_world.fromasm.imprecise.no-opts
index bd0077baa..cfab7dcd1 100644
--- a/test/hello_world.fromasm.imprecise.no-opts
+++ b/test/hello_world.fromasm.imprecise.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "add" (func $add))
(func $add (; 0 ;) (param $x i32) (param $y i32) (result i32)
(return
diff --git a/test/hello_world.fromasm.no-opts b/test/hello_world.fromasm.no-opts
index bd0077baa..cfab7dcd1 100644
--- a/test/hello_world.fromasm.no-opts
+++ b/test/hello_world.fromasm.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "add" (func $add))
(func $add (; 0 ;) (param $x i32) (param $y i32) (result i32)
(return
diff --git a/test/i64-setTempRet0.fromasm b/test/i64-setTempRet0.fromasm
index 74c231fd9..b9e5bffe6 100644
--- a/test/i64-setTempRet0.fromasm
+++ b/test/i64-setTempRet0.fromasm
@@ -1,8 +1,8 @@
(module
(type $legaltype$illegalImportResult (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "i64-setTempRet0.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "i64-setTempRet0.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(global $tempRet0 (mut i32) (i32.const 0))
(export "illegalResult" (func $legalstub$illegalResult))
diff --git a/test/i64-setTempRet0.fromasm.clamp b/test/i64-setTempRet0.fromasm.clamp
index 74c231fd9..b9e5bffe6 100644
--- a/test/i64-setTempRet0.fromasm.clamp
+++ b/test/i64-setTempRet0.fromasm.clamp
@@ -1,8 +1,8 @@
(module
(type $legaltype$illegalImportResult (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "i64-setTempRet0.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "i64-setTempRet0.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(global $tempRet0 (mut i32) (i32.const 0))
(export "illegalResult" (func $legalstub$illegalResult))
diff --git a/test/i64-setTempRet0.fromasm.clamp.no-opts b/test/i64-setTempRet0.fromasm.clamp.no-opts
index b161dd2bf..1de61524b 100644
--- a/test/i64-setTempRet0.fromasm.clamp.no-opts
+++ b/test/i64-setTempRet0.fromasm.clamp.no-opts
@@ -3,8 +3,8 @@
(type $legaltype$illegalImportResult (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(global $tempRet0 (mut i32) (i32.const 0))
(export "illegalResult" (func $legalstub$illegalResult))
diff --git a/test/i64-setTempRet0.fromasm.imprecise.no-opts b/test/i64-setTempRet0.fromasm.imprecise.no-opts
index b161dd2bf..1de61524b 100644
--- a/test/i64-setTempRet0.fromasm.imprecise.no-opts
+++ b/test/i64-setTempRet0.fromasm.imprecise.no-opts
@@ -3,8 +3,8 @@
(type $legaltype$illegalImportResult (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(global $tempRet0 (mut i32) (i32.const 0))
(export "illegalResult" (func $legalstub$illegalResult))
diff --git a/test/i64-setTempRet0.fromasm.no-opts b/test/i64-setTempRet0.fromasm.no-opts
index b161dd2bf..1de61524b 100644
--- a/test/i64-setTempRet0.fromasm.no-opts
+++ b/test/i64-setTempRet0.fromasm.no-opts
@@ -3,8 +3,8 @@
(type $legaltype$illegalImportResult (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(global $tempRet0 (mut i32) (i32.const 0))
(export "illegalResult" (func $legalstub$illegalResult))
diff --git a/test/importedSignCast.fromasm b/test/importedSignCast.fromasm
index f7658ec98..9c7a3fd0e 100644
--- a/test/importedSignCast.fromasm
+++ b/test/importedSignCast.fromasm
@@ -1,11 +1,11 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "importedSignCast.asm.js")
+ (data (get_global $__memory_base) "importedSignCast.asm.js")
(import "env" "table" (table $table 1 1 anyfunc))
- (elem (get_global $tableBase) $gm)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $gm)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(export "func" (func $func))
(func $func (; 1 ;) (; has Stack IR ;)
diff --git a/test/importedSignCast.fromasm.clamp b/test/importedSignCast.fromasm.clamp
index f7658ec98..9c7a3fd0e 100644
--- a/test/importedSignCast.fromasm.clamp
+++ b/test/importedSignCast.fromasm.clamp
@@ -1,11 +1,11 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "importedSignCast.asm.js")
+ (data (get_global $__memory_base) "importedSignCast.asm.js")
(import "env" "table" (table $table 1 1 anyfunc))
- (elem (get_global $tableBase) $gm)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $gm)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(export "func" (func $func))
(func $func (; 1 ;) (; has Stack IR ;)
diff --git a/test/importedSignCast.fromasm.clamp.no-opts b/test/importedSignCast.fromasm.clamp.no-opts
index 9b2618245..6a8053cbf 100644
--- a/test/importedSignCast.fromasm.clamp.no-opts
+++ b/test/importedSignCast.fromasm.clamp.no-opts
@@ -2,9 +2,9 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 1 1 anyfunc))
- (elem (get_global $tableBase) $gm)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $gm)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(export "func" (func $func))
(func $func (; 1 ;)
diff --git a/test/importedSignCast.fromasm.imprecise b/test/importedSignCast.fromasm.imprecise
index 50e936b8a..edc1e7745 100644
--- a/test/importedSignCast.fromasm.imprecise
+++ b/test/importedSignCast.fromasm.imprecise
@@ -1,8 +1,8 @@
(module
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "table" (table $table 1 1 anyfunc))
- (elem (get_global $tableBase) $gm)
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $gm)
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(export "func" (func $func))
(func $func (; 1 ;) (; has Stack IR ;)
diff --git a/test/importedSignCast.fromasm.imprecise.no-opts b/test/importedSignCast.fromasm.imprecise.no-opts
index 9b2618245..6a8053cbf 100644
--- a/test/importedSignCast.fromasm.imprecise.no-opts
+++ b/test/importedSignCast.fromasm.imprecise.no-opts
@@ -2,9 +2,9 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 1 1 anyfunc))
- (elem (get_global $tableBase) $gm)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $gm)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(export "func" (func $func))
(func $func (; 1 ;)
diff --git a/test/importedSignCast.fromasm.no-opts b/test/importedSignCast.fromasm.no-opts
index 9b2618245..6a8053cbf 100644
--- a/test/importedSignCast.fromasm.no-opts
+++ b/test/importedSignCast.fromasm.no-opts
@@ -2,9 +2,9 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 1 1 anyfunc))
- (elem (get_global $tableBase) $gm)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $gm)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32)))
(export "func" (func $func))
(func $func (; 1 ;)
diff --git a/test/memorygrowth-minimal.fromasm b/test/memorygrowth-minimal.fromasm
index 64bf2cd4c..c1133bed5 100644
--- a/test/memorygrowth-minimal.fromasm
+++ b/test/memorygrowth-minimal.fromasm
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256))
- (data (get_global $memoryBase) "memorygrowth-minimal.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "memorygrowth-minimal.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "__growWasmMemory" (func $__growWasmMemory))
(func $__growWasmMemory (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32)
(grow_memory
diff --git a/test/memorygrowth-minimal.fromasm.clamp b/test/memorygrowth-minimal.fromasm.clamp
index 64bf2cd4c..c1133bed5 100644
--- a/test/memorygrowth-minimal.fromasm.clamp
+++ b/test/memorygrowth-minimal.fromasm.clamp
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256))
- (data (get_global $memoryBase) "memorygrowth-minimal.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "memorygrowth-minimal.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "__growWasmMemory" (func $__growWasmMemory))
(func $__growWasmMemory (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32)
(grow_memory
diff --git a/test/memorygrowth-minimal.fromasm.clamp.no-opts b/test/memorygrowth-minimal.fromasm.clamp.no-opts
index 85664316a..6487ed668 100644
--- a/test/memorygrowth-minimal.fromasm.clamp.no-opts
+++ b/test/memorygrowth-minimal.fromasm.clamp.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "__growWasmMemory" (func $__growWasmMemory))
(func $__growWasmMemory (; 0 ;) (param $newSize i32) (result i32)
(grow_memory
diff --git a/test/memorygrowth-minimal.fromasm.imprecise.no-opts b/test/memorygrowth-minimal.fromasm.imprecise.no-opts
index 85664316a..6487ed668 100644
--- a/test/memorygrowth-minimal.fromasm.imprecise.no-opts
+++ b/test/memorygrowth-minimal.fromasm.imprecise.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "__growWasmMemory" (func $__growWasmMemory))
(func $__growWasmMemory (; 0 ;) (param $newSize i32) (result i32)
(grow_memory
diff --git a/test/memorygrowth-minimal.fromasm.no-opts b/test/memorygrowth-minimal.fromasm.no-opts
index 85664316a..6487ed668 100644
--- a/test/memorygrowth-minimal.fromasm.no-opts
+++ b/test/memorygrowth-minimal.fromasm.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "__growWasmMemory" (func $__growWasmMemory))
(func $__growWasmMemory (; 0 ;) (param $newSize i32) (result i32)
(grow_memory
diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm
index 11f18ed1f..cd7014f8c 100644
--- a/test/memorygrowth.fromasm
+++ b/test/memorygrowth.fromasm
@@ -6,11 +6,11 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(import "env" "memory" (memory $memory 256))
- (data (get_global $memoryBase) "memorygrowth.asm.js")
+ (data (get_global $__memory_base) "memorygrowth.asm.js")
(import "env" "table" (table $table 8 8 anyfunc))
- (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "abort" (func $ja (param i32)))
diff --git a/test/memorygrowth.fromasm.clamp b/test/memorygrowth.fromasm.clamp
index 11f18ed1f..cd7014f8c 100644
--- a/test/memorygrowth.fromasm.clamp
+++ b/test/memorygrowth.fromasm.clamp
@@ -6,11 +6,11 @@
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(import "env" "memory" (memory $memory 256))
- (data (get_global $memoryBase) "memorygrowth.asm.js")
+ (data (get_global $__memory_base) "memorygrowth.asm.js")
(import "env" "table" (table $table 8 8 anyfunc))
- (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "abort" (func $ja (param i32)))
diff --git a/test/memorygrowth.fromasm.clamp.no-opts b/test/memorygrowth.fromasm.clamp.no-opts
index 4dc2daf7b..a70f683cb 100644
--- a/test/memorygrowth.fromasm.clamp.no-opts
+++ b/test/memorygrowth.fromasm.clamp.no-opts
@@ -7,9 +7,9 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(import "env" "memory" (memory $memory 256))
(import "env" "table" (table $table 8 8 anyfunc))
- (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $t$asm2wasm$import i32))
diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise
index 2af9c3647..25a491209 100644
--- a/test/memorygrowth.fromasm.imprecise
+++ b/test/memorygrowth.fromasm.imprecise
@@ -7,8 +7,8 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(import "env" "memory" (memory $memory 256))
(import "env" "table" (table $table 8 8 anyfunc))
- (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "abort" (func $ja (param i32)))
diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts
index ad11eb2e9..362b5d56a 100644
--- a/test/memorygrowth.fromasm.imprecise.no-opts
+++ b/test/memorygrowth.fromasm.imprecise.no-opts
@@ -7,9 +7,9 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(import "env" "memory" (memory $memory 256))
(import "env" "table" (table $table 8 8 anyfunc))
- (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $t$asm2wasm$import i32))
diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts
index 4dc2daf7b..a70f683cb 100644
--- a/test/memorygrowth.fromasm.no-opts
+++ b/test/memorygrowth.fromasm.no-opts
@@ -7,9 +7,9 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(import "env" "memory" (memory $memory 256))
(import "env" "table" (table $table 8 8 anyfunc))
- (elem (get_global $tableBase) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $r$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $s$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $t$asm2wasm$import i32))
diff --git a/test/merge/basics.wast.combined b/test/merge/basics.wast.combined
index 96ea89cfd..66e9221a0 100644
--- a/test/merge/basics.wast.combined
+++ b/test/merge/basics.wast.combined
@@ -9,8 +9,12 @@
(elem (get_global $tableBase) $only-a $willCollide $some-func $some-collide $only-a $some-func $only-b $willCollide$0 $some-func-b $some-collide$0)
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(import "env" "some-func" (func $some-func))
(import "env" "some-collide" (func $some-collide))
(import "env" "some-func-b" (func $some-func-b))
@@ -87,44 +91,32 @@
(get_global $global-b-mut)
)
(drop
- (i32.add
- (get_global $memoryBase$0)
- (i32.const 16)
- )
+ (get_global $memoryBase$0)
)
(drop
- (i32.add
- (get_global $tableBase$0)
- (i32.const 6)
- )
+ (get_global $tableBase$0)
)
(drop
(i32.add
(get_global $memoryBase$0)
- (i32.const 1016)
+ (i32.const 1000)
)
)
(drop
(i32.add
(get_global $tableBase$0)
- (i32.const 1006)
+ (i32.const 1000)
)
)
(drop
(i32.add
- (i32.add
- (get_global $tableBase$0)
- (i32.const 6)
- )
+ (get_global $tableBase$0)
(unreachable)
)
)
(drop
(i32.sub
- (i32.add
- (get_global $tableBase$0)
- (i32.const 6)
- )
+ (get_global $tableBase$0)
(i32.const 1000)
)
)
diff --git a/test/merge/basics.wast.combined.finalized b/test/merge/basics.wast.combined.finalized
index d3530fe58..cf4386847 100644
--- a/test/merge/basics.wast.combined.finalized
+++ b/test/merge/basics.wast.combined.finalized
@@ -4,13 +4,17 @@
(type $ii$0 (func (param i32 i32)))
(type $FUNCSIG$v$0 (func))
(import "env" "memory" (memory $0 256))
- (data (i32.const 1024) "hello, A!\n\00\00\00\00\00\00hello, B!\n\00\00\00\00\00\00")
+ (data (get_global $memoryBase) "hello, A!\n\00\00\00\00\00\00hello, B!\n\00\00\00\00\00\00")
(import "env" "table" (table $0 18 anyfunc))
- (elem (i32.const 8) $only-a $willCollide $some-func $some-collide $only-a $some-func $only-b $willCollide$0 $some-func-b $some-collide$0)
+ (elem (get_global $tableBase) $only-a $willCollide $some-func $some-collide $only-a $some-func $only-b $willCollide$0 $some-func-b $some-collide$0)
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(import "env" "some-func" (func $some-func))
(import "env" "some-collide" (func $some-collide))
(import "env" "some-func-b" (func $some-func-b))
@@ -50,10 +54,10 @@
(get_global $global-a-mut)
)
(drop
- (i32.const 1024)
+ (get_global $memoryBase)
)
(drop
- (i32.const 8)
+ (get_global $tableBase)
)
(set_global $global-collide-mut
(i32.const 1234)
@@ -87,44 +91,32 @@
(get_global $global-b-mut)
)
(drop
- (i32.add
- (i32.const 1024)
- (i32.const 16)
- )
+ (get_global $memoryBase$0)
)
(drop
- (i32.add
- (i32.const 8)
- (i32.const 6)
- )
+ (get_global $tableBase$0)
)
(drop
(i32.add
- (i32.const 1024)
- (i32.const 1016)
+ (get_global $memoryBase$0)
+ (i32.const 1000)
)
)
(drop
(i32.add
- (i32.const 8)
- (i32.const 1006)
+ (get_global $tableBase$0)
+ (i32.const 1000)
)
)
(drop
(i32.add
- (i32.add
- (i32.const 8)
- (i32.const 6)
- )
+ (get_global $tableBase$0)
(unreachable)
)
)
(drop
(i32.sub
- (i32.add
- (i32.const 8)
- (i32.const 6)
- )
+ (get_global $tableBase$0)
(i32.const 1000)
)
)
diff --git a/test/merge/basics.wast.combined.finalized.opt b/test/merge/basics.wast.combined.finalized.opt
index bb7475c45..0b9c21b3b 100644
--- a/test/merge/basics.wast.combined.finalized.opt
+++ b/test/merge/basics.wast.combined.finalized.opt
@@ -2,9 +2,13 @@
(type $ii (func (param i32 i32)))
(type $FUNCSIG$v (func))
(import "env" "memory" (memory $0 256))
- (data (i32.const 1024) "hello, A!\n\00\00\00\00\00\00hello, B!\n")
+ (data (get_global $memoryBase) "hello, A!\n\00\00\00\00\00\00hello, B!\n")
(import "env" "table" (table $0 18 anyfunc))
- (elem (i32.const 8) $only-a $willCollide $some-func $some-collide $only-a $some-func $only-b $willCollide$0 $some-func-b $some-collide$0)
+ (elem (get_global $tableBase) $only-a $willCollide $some-func $some-collide $only-a $some-func $only-b $willCollide$0 $some-func-b $some-collide$0)
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "memoryBase" (global $memoryBase$0 i32))
+ (import "env" "tableBase" (global $tableBase$0 i32))
(import "env" "some-func" (func $some-func))
(import "env" "some-collide" (func $some-collide))
(import "env" "some-func-b" (func $some-func-b))
@@ -33,8 +37,12 @@
(drop
(get_global $global-a-mut)
)
- (nop)
- (nop)
+ (drop
+ (get_global $memoryBase)
+ )
+ (drop
+ (get_global $tableBase)
+ )
(set_global $global-collide-mut
(i32.const 1234)
)
@@ -58,17 +66,36 @@
(drop
(get_global $global-b-mut)
)
- (nop)
- (nop)
- (nop)
- (nop)
+ (drop
+ (get_global $memoryBase$0)
+ )
+ (drop
+ (get_global $tableBase$0)
+ )
(drop
(i32.add
- (i32.const 14)
+ (get_global $memoryBase$0)
+ (i32.const 1000)
+ )
+ )
+ (drop
+ (i32.add
+ (get_global $tableBase$0)
+ (i32.const 1000)
+ )
+ )
+ (drop
+ (i32.add
+ (get_global $tableBase$0)
(unreachable)
)
)
- (nop)
+ (drop
+ (i32.sub
+ (get_global $tableBase$0)
+ (i32.const 1000)
+ )
+ )
(set_global $global-collide-mut$0
(i32.const 5678)
)
diff --git a/test/merge/basics.wast.combined.opt b/test/merge/basics.wast.combined.opt
index 2a83b355e..f210529fc 100644
--- a/test/merge/basics.wast.combined.opt
+++ b/test/merge/basics.wast.combined.opt
@@ -67,42 +67,33 @@
(get_global $global-b-mut)
)
(drop
- (i32.add
- (get_global $memoryBase$0)
- (i32.const 16)
- )
+ (get_global $memoryBase$0)
)
(drop
- (i32.add
- (get_global $tableBase$0)
- (i32.const 6)
- )
+ (get_global $tableBase$0)
)
(drop
(i32.add
(get_global $memoryBase$0)
- (i32.const 1016)
+ (i32.const 1000)
)
)
(drop
(i32.add
(get_global $tableBase$0)
- (i32.const 1006)
+ (i32.const 1000)
)
)
(drop
(i32.add
- (i32.add
- (get_global $tableBase$0)
- (i32.const 6)
- )
+ (get_global $tableBase$0)
(unreachable)
)
)
(drop
- (i32.add
+ (i32.sub
(get_global $tableBase$0)
- (i32.const -994)
+ (i32.const 1000)
)
)
(set_global $global-collide-mut$0
diff --git a/test/merge/dylib.wasm.combined b/test/merge/dylib.wasm.combined
index 0b97f4af4..de84f63cb 100644
--- a/test/merge/dylib.wasm.combined
+++ b/test/merge/dylib.wasm.combined
@@ -11,8 +11,12 @@
(import "env" "table" (table $timport$3 0 anyfunc))
(import "env" "memoryBase" (global $gimport$0 i32))
(import "env" "tableBase" (global $gimport$4 i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $gimport$0$0 i32))
(import "env" "tableBase" (global $gimport$4$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(import "env" "_puts" (func $import$1 (param i32) (result i32)))
(global $global$0 (mut i32) (i32.const 0))
(global $global$1 (mut i32) (i32.const 0))
@@ -81,10 +85,7 @@
(block $label$1
(block $label$2
(set_global $global$0$0
- (i32.add
- (get_global $gimport$0$0)
- (i32.const 48)
- )
+ (get_global $gimport$0$0)
)
(set_global $global$1$0
(i32.add
diff --git a/test/merge/dylib.wasm.combined.finalized b/test/merge/dylib.wasm.combined.finalized
index 4e82b433b..66a947fc7 100644
--- a/test/merge/dylib.wasm.combined.finalized
+++ b/test/merge/dylib.wasm.combined.finalized
@@ -7,12 +7,16 @@
(type $1$0 (func (result i32)))
(type $2$0 (func))
(import "env" "memory" (memory $2 256))
- (data (i32.const 1024) "hello, world!\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\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
+ (data (get_global $gimport$0) "hello, world!\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\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
(import "env" "table" (table $timport$3 8 anyfunc))
(import "env" "memoryBase" (global $gimport$0 i32))
(import "env" "tableBase" (global $gimport$4 i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $gimport$0$0 i32))
(import "env" "tableBase" (global $gimport$4$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(import "env" "_puts" (func $import$1 (param i32) (result i32)))
(global $global$0 (mut i32) (i32.const 0))
(global $global$1 (mut i32) (i32.const 0))
@@ -29,7 +33,7 @@
(block $label$2 (result i32)
(drop
(call $import$1
- (i32.const 1024)
+ (get_global $gimport$0)
)
)
(i32.const 0)
@@ -47,7 +51,7 @@
(block $label$2
(set_global $global$0
(i32.add
- (i32.const 1024)
+ (get_global $gimport$0)
(i32.const 16)
)
)
@@ -81,10 +85,7 @@
(block $label$1
(block $label$2
(set_global $global$0$0
- (i32.add
- (i32.const 1024)
- (i32.const 48)
- )
+ (get_global $gimport$0$0)
)
(set_global $global$1$0
(i32.add
diff --git a/test/merge/dylib.wasm.combined.finalized.opt b/test/merge/dylib.wasm.combined.finalized.opt
index 4598e194a..ae855f2fa 100644
--- a/test/merge/dylib.wasm.combined.finalized.opt
+++ b/test/merge/dylib.wasm.combined.finalized.opt
@@ -3,8 +3,10 @@
(type $2 (func (result i32)))
(type $3 (func))
(import "env" "memory" (memory $2 256))
- (data (i32.const 1024) "hello, world!")
+ (data (get_global $gimport$0) "hello, world!")
(import "env" "table" (table $timport$3 8 anyfunc))
+ (import "env" "memoryBase" (global $gimport$0 i32))
+ (import "env" "memoryBase" (global $gimport$0$0 i32))
(import "env" "_puts" (func $import$1 (param i32) (result i32)))
(global $global$0 (mut i32) (i32.const 0))
(global $global$1 (mut i32) (i32.const 0))
@@ -21,7 +23,7 @@
(block $label$2 (result i32)
(drop
(call $import$1
- (i32.const 1024)
+ (get_global $gimport$0)
)
)
(i32.const 0)
@@ -36,7 +38,10 @@
(block $label$1
(block $label$2
(set_global $global$0
- (i32.const 1040)
+ (i32.add
+ (get_global $gimport$0)
+ (i32.const 16)
+ )
)
(set_global $global$1
(i32.add
@@ -66,7 +71,7 @@
(block $label$1
(block $label$2
(set_global $global$0$0
- (i32.const 1072)
+ (get_global $gimport$0$0)
)
(set_global $global$1$0
(i32.add
diff --git a/test/merge/dylib.wasm.combined.opt b/test/merge/dylib.wasm.combined.opt
index 7545510a3..215baca4e 100644
--- a/test/merge/dylib.wasm.combined.opt
+++ b/test/merge/dylib.wasm.combined.opt
@@ -6,7 +6,7 @@
(data (get_global $gimport$0) "hello, world!")
(import "env" "table" (table $timport$3 0 anyfunc))
(import "env" "memoryBase" (global $gimport$0 i32))
- (import "env" "tableBase" (global $gimport$4 i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $gimport$0$0 i32))
(import "env" "_puts" (func $import$1 (param i32) (result i32)))
(global $global$0 (mut i32) (i32.const 0))
@@ -72,10 +72,7 @@
(block $label$1
(block $label$2
(set_global $global$0$0
- (i32.add
- (get_global $gimport$0$0)
- (i32.const 48)
- )
+ (get_global $gimport$0$0)
)
(set_global $global$1$0
(i32.add
diff --git a/test/merge/fusing.wast.combined b/test/merge/fusing.wast.combined
index e664a39ed..f6ab235c5 100644
--- a/test/merge/fusing.wast.combined
+++ b/test/merge/fusing.wast.combined
@@ -2,12 +2,16 @@
(type $FUNCSIG$v (func))
(type $FUNCSIG$v$0 (func))
(import "env" "memory" (memory $0 256))
- (data (get_global $memoryBase) "")
+ (data (get_global $__memory_base) "")
(import "env" "table" (table $0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(global $a-global i32 (i32.const 0))
(global $b-global$0 f64 (f64.const 2.14281428))
(export "foo" (func $foo-func))
diff --git a/test/merge/fusing.wast.combined.finalized b/test/merge/fusing.wast.combined.finalized
index edb5c4309..b7b85db92 100644
--- a/test/merge/fusing.wast.combined.finalized
+++ b/test/merge/fusing.wast.combined.finalized
@@ -6,8 +6,12 @@
(import "env" "table" (table $0 8 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(global $a-global i32 (i32.const 0))
(global $b-global$0 f64 (f64.const 2.14281428))
(export "foo" (func $foo-func))
diff --git a/test/merge/fusing.wast.combined.opt b/test/merge/fusing.wast.combined.opt
index e8bac5d8c..15c6ab4a0 100644
--- a/test/merge/fusing.wast.combined.opt
+++ b/test/merge/fusing.wast.combined.opt
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$v (func))
(import "env" "memory" (memory $0 256))
- (data (get_global $memoryBase) "")
+ (data (get_global $__memory_base) "")
(import "env" "table" (table $0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(global $a-global i32 (i32.const 0))
(global $b-global$0 f64 (f64.const 2.14281428))
(export "foo" (func $foo-func))
diff --git a/test/merge/global-init.wast.combined b/test/merge/global-init.wast.combined
index 453de1079..3fb947e84 100644
--- a/test/merge/global-init.wast.combined
+++ b/test/merge/global-init.wast.combined
@@ -1,13 +1,17 @@
(module
(import "env" "memory" (memory $0 256))
- (data (get_global $memoryBase) "")
+ (data (get_global $__memory_base) "")
(import "env" "table" (table $0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
(import "env" "globally" (global $i-collide i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
(import "env" "globally" (global $i-collide$0 f64))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(global $a i32 (get_global $i-collide))
(global $a-mut (mut i32) (get_global $i-collide))
(global $g-collide i32 (get_global $i-collide))
diff --git a/test/merge/global-init.wast.combined.finalized b/test/merge/global-init.wast.combined.finalized
index 89c969ea4..316e28620 100644
--- a/test/merge/global-init.wast.combined.finalized
+++ b/test/merge/global-init.wast.combined.finalized
@@ -5,9 +5,13 @@
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
(import "env" "globally" (global $i-collide i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
(import "env" "globally" (global $i-collide$0 f64))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(global $a i32 (get_global $i-collide))
(global $a-mut (mut i32) (get_global $i-collide))
(global $g-collide i32 (get_global $i-collide))
diff --git a/test/merge/global-init.wast.combined.opt b/test/merge/global-init.wast.combined.opt
index 725827c88..16a998b41 100644
--- a/test/merge/global-init.wast.combined.opt
+++ b/test/merge/global-init.wast.combined.opt
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $0 256))
- (data (get_global $memoryBase) "")
+ (data (get_global $__memory_base) "")
(import "env" "table" (table $0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
)
diff --git a/test/merge/main-lacks-segments.wast.combined b/test/merge/main-lacks-segments.wast.combined
index f07f75177..648b2797b 100644
--- a/test/merge/main-lacks-segments.wast.combined
+++ b/test/merge/main-lacks-segments.wast.combined
@@ -1,25 +1,23 @@
(module
(type $0 (func))
(import "env" "memory" (memory $0 256))
- (data (get_global $memoryBase) "hello, this is some data!\00\00\00\00\00\00\00")
+ (data (get_global $__memory_base) "hello, this is some data!\00\00\00\00\00\00\00")
(import "env" "table" (table $0 2 anyfunc))
- (elem (get_global $tableBase) $foo $foo)
+ (elem (get_global $__table_base) $foo $foo)
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(func $foo (; 0 ;) (type $0)
(drop
- (i32.add
- (get_global $tableBase$0)
- (i32.const 0)
- )
+ (get_global $tableBase$0)
)
(drop
- (i32.add
- (get_global $memoryBase$0)
- (i32.const 0)
- )
+ (get_global $memoryBase$0)
)
)
)
diff --git a/test/merge/main-lacks-segments.wast.combined.finalized b/test/merge/main-lacks-segments.wast.combined.finalized
index f37f9efe1..dd36cd0d6 100644
--- a/test/merge/main-lacks-segments.wast.combined.finalized
+++ b/test/merge/main-lacks-segments.wast.combined.finalized
@@ -6,20 +6,18 @@
(elem (i32.const 8) $foo $foo)
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(func $foo (; 0 ;) (type $0)
(drop
- (i32.add
- (i32.const 8)
- (i32.const 0)
- )
+ (get_global $tableBase$0)
)
(drop
- (i32.add
- (i32.const 1024)
- (i32.const 0)
- )
+ (get_global $memoryBase$0)
)
)
)
diff --git a/test/merge/main-lacks-segments.wast.combined.finalized.opt b/test/merge/main-lacks-segments.wast.combined.finalized.opt
index c98706332..41136cf95 100644
--- a/test/merge/main-lacks-segments.wast.combined.finalized.opt
+++ b/test/merge/main-lacks-segments.wast.combined.finalized.opt
@@ -4,7 +4,14 @@
(data (i32.const 1024) "hello, this is some data!")
(import "env" "table" (table $0 10 anyfunc))
(elem (i32.const 8) $foo $foo)
+ (import "env" "memoryBase" (global $memoryBase$0 i32))
+ (import "env" "tableBase" (global $tableBase$0 i32))
(func $foo (; 0 ;) (type $0)
- (nop)
+ (drop
+ (get_global $tableBase$0)
+ )
+ (drop
+ (get_global $memoryBase$0)
+ )
)
)
diff --git a/test/merge/main-lacks-segments.wast.combined.opt b/test/merge/main-lacks-segments.wast.combined.opt
index c121593c7..d70d24209 100644
--- a/test/merge/main-lacks-segments.wast.combined.opt
+++ b/test/merge/main-lacks-segments.wast.combined.opt
@@ -1,11 +1,11 @@
(module
(type $0 (func))
(import "env" "memory" (memory $0 256))
- (data (get_global $memoryBase) "hello, this is some data!")
+ (data (get_global $__memory_base) "hello, this is some data!")
(import "env" "table" (table $0 2 anyfunc))
- (elem (get_global $tableBase) $foo $foo)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $foo $foo)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
(func $foo (; 0 ;) (type $0)
diff --git a/test/merge/noBases.wast.combined b/test/merge/noBases.wast.combined
index 18c63fffc..3fb42a68b 100644
--- a/test/merge/noBases.wast.combined
+++ b/test/merge/noBases.wast.combined
@@ -5,15 +5,15 @@
(type $FUNCSIG$v$0 (func))
(import "env" "memory" (memory $0 256))
(data (i32.const 100) "hello, A!\n")
- (data (get_global $memoryBase) "")
+ (data (get_global $__memory_base) "")
(data (i32.const 200) "hello, B!\n")
(import "env" "table" (table $0 1000 anyfunc))
(elem (i32.const 10) $only-a $willCollide $some-func $some-collide $only-a)
(elem (i32.const 20) $only-b $willCollide $some-func-b $some-collide)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
- (import "env" "memoryBase" (global $memoryBase$0 i32))
- (import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(import "env" "some-func" (func $some-func))
(import "env" "some-collide" (func $some-collide))
(import "env" "some-func-b" (func $some-func-b))
diff --git a/test/merge/noBases.wast.combined.finalized b/test/merge/noBases.wast.combined.finalized
index 72f221017..aa456c16a 100644
--- a/test/merge/noBases.wast.combined.finalized
+++ b/test/merge/noBases.wast.combined.finalized
@@ -10,10 +10,10 @@
(import "env" "table" (table $0 1000 anyfunc))
(elem (i32.const 10) $only-a $willCollide $some-func $some-collide $only-a)
(elem (i32.const 20) $only-b $willCollide $some-func-b $some-collide)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
- (import "env" "memoryBase" (global $memoryBase$0 i32))
- (import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(import "env" "some-func" (func $some-func))
(import "env" "some-collide" (func $some-collide))
(import "env" "some-func-b" (func $some-func-b))
diff --git a/test/merge/noBases.wast.combined.opt b/test/merge/noBases.wast.combined.opt
index 08becc2cf..f36c64cd2 100644
--- a/test/merge/noBases.wast.combined.opt
+++ b/test/merge/noBases.wast.combined.opt
@@ -3,13 +3,13 @@
(type $FUNCSIG$v (func))
(import "env" "memory" (memory $0 256))
(data (i32.const 100) "hello, A!\n")
- (data (get_global $memoryBase) "")
+ (data (get_global $__memory_base) "")
(data (i32.const 200) "hello, B!\n")
(import "env" "table" (table $0 1000 anyfunc))
(elem (i32.const 10) $only-a $willCollide $some-func $some-collide $only-a)
(elem (i32.const 20) $only-b $willCollide $some-func-b $some-collide)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "some-func" (func $some-func))
(import "env" "some-collide" (func $some-collide))
(import "env" "some-func-b" (func $some-func-b))
diff --git a/test/merge/post-instantiate-a.wast.combined b/test/merge/post-instantiate-a.wast.combined
index ae25b3e75..90a8a5d36 100644
--- a/test/merge/post-instantiate-a.wast.combined
+++ b/test/merge/post-instantiate-a.wast.combined
@@ -3,8 +3,12 @@
(type $0$0 (func))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(export "__post_instantiate" (func $0))
(func $0 (; 0 ;) (type $0)
(drop
diff --git a/test/merge/post-instantiate-a.wast.combined.finalized b/test/merge/post-instantiate-a.wast.combined.finalized
index ae25b3e75..90a8a5d36 100644
--- a/test/merge/post-instantiate-a.wast.combined.finalized
+++ b/test/merge/post-instantiate-a.wast.combined.finalized
@@ -3,8 +3,12 @@
(type $0$0 (func))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(export "__post_instantiate" (func $0))
(func $0 (; 0 ;) (type $0)
(drop
diff --git a/test/merge/post-instantiate-a.wast.combined.opt b/test/merge/post-instantiate-a.wast.combined.opt
index 933ee2c2c..8685b4066 100644
--- a/test/merge/post-instantiate-a.wast.combined.opt
+++ b/test/merge/post-instantiate-a.wast.combined.opt
@@ -1,7 +1,7 @@
(module
(type $0 (func))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "__post_instantiate" (func $0))
(func $0 (; 0 ;) (type $0)
(nop)
diff --git a/test/merge/post-instantiate-b.wast.combined b/test/merge/post-instantiate-b.wast.combined
index f832716a9..551f2da2b 100644
--- a/test/merge/post-instantiate-b.wast.combined
+++ b/test/merge/post-instantiate-b.wast.combined
@@ -3,8 +3,12 @@
(type $0$0 (func))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(export "__post_instantiate" (func $0$0))
(func $0 (; 0 ;) (type $0)
(nop)
diff --git a/test/merge/post-instantiate-b.wast.combined.finalized b/test/merge/post-instantiate-b.wast.combined.finalized
index f832716a9..551f2da2b 100644
--- a/test/merge/post-instantiate-b.wast.combined.finalized
+++ b/test/merge/post-instantiate-b.wast.combined.finalized
@@ -3,8 +3,12 @@
(type $0$0 (func))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(export "__post_instantiate" (func $0$0))
(func $0 (; 0 ;) (type $0)
(nop)
diff --git a/test/merge/post-instantiate-b.wast.combined.opt b/test/merge/post-instantiate-b.wast.combined.opt
index 8ec2a5ca8..2fa79a98b 100644
--- a/test/merge/post-instantiate-b.wast.combined.opt
+++ b/test/merge/post-instantiate-b.wast.combined.opt
@@ -1,7 +1,7 @@
(module
(type $0$0 (func))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "__post_instantiate" (func $0$0))
(func $0$0 (; 0 ;) (type $0$0)
(nop)
diff --git a/test/merge/printf.wast.combined b/test/merge/printf.wast.combined
index a33e63fba..e7e8dff94 100644
--- a/test/merge/printf.wast.combined
+++ b/test/merge/printf.wast.combined
@@ -3,14 +3,18 @@
(type $FUNCSIG$iii$0 (func (param i32 i32) (result i32)))
(type $1 (func))
(import "env" "memory" (memory $0 256))
- (data (get_global $memoryBase) "")
+ (data (get_global $__memory_base) "")
(import "env" "table" (table $0 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
(import "env" "globally" (global $i-collide i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
(import "env" "globally" (global $i-collide$0 f64))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(import "env" "foobar" (func $import$8 (param i32 i32) (result i32)))
(export "_printf" (func $625))
(func $625 (; 1 ;) (type $FUNCSIG$iii) (param $var$0 i32) (param $var$1 i32) (result i32)
diff --git a/test/merge/printf.wast.combined.finalized b/test/merge/printf.wast.combined.finalized
index a66825dbf..b4c329749 100644
--- a/test/merge/printf.wast.combined.finalized
+++ b/test/merge/printf.wast.combined.finalized
@@ -8,9 +8,13 @@
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
(import "env" "globally" (global $i-collide i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "memoryBase" (global $memoryBase$0 i32))
(import "env" "tableBase" (global $tableBase$0 i32))
(import "env" "globally" (global $i-collide$0 f64))
+ (import "env" "__memory_base" (global $__memory_base$0 i32))
+ (import "env" "__table_base" (global $__table_base$0 i32))
(import "env" "foobar" (func $import$8 (param i32 i32) (result i32)))
(export "_printf" (func $625))
(func $625 (; 1 ;) (type $FUNCSIG$iii) (param $var$0 i32) (param $var$1 i32) (result i32)
diff --git a/test/merge/printf.wast.combined.opt b/test/merge/printf.wast.combined.opt
index 7cb267ec2..a5c6458ef 100644
--- a/test/merge/printf.wast.combined.opt
+++ b/test/merge/printf.wast.combined.opt
@@ -1,10 +1,10 @@
(module
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(import "env" "memory" (memory $0 256))
- (data (get_global $memoryBase) "")
+ (data (get_global $__memory_base) "")
(import "env" "table" (table $0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "_printf" (func $625))
(func $625 (; 0 ;) (type $FUNCSIG$iii) (param $var$0 i32) (param $var$1 i32) (result i32)
(i32.const 102030)
diff --git a/test/min.fromasm b/test/min.fromasm
index 215244c44..1591b1889 100644
--- a/test/min.fromasm
+++ b/test/min.fromasm
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "min.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "min.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(global $M (mut i32) (i32.const 0))
(export "floats" (func $legalstub$floats))
(export "getTempRet0" (func $ub))
diff --git a/test/min.fromasm.clamp b/test/min.fromasm.clamp
index 215244c44..1591b1889 100644
--- a/test/min.fromasm.clamp
+++ b/test/min.fromasm.clamp
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "min.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "min.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(global $M (mut i32) (i32.const 0))
(export "floats" (func $legalstub$floats))
(export "getTempRet0" (func $ub))
diff --git a/test/min.fromasm.clamp.no-opts b/test/min.fromasm.clamp.no-opts
index ebe491d43..f9077445f 100644
--- a/test/min.fromasm.clamp.no-opts
+++ b/test/min.fromasm.clamp.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32))
(global $tDP (mut i32) (get_global $tDP$asm2wasm$import))
(global $M (mut i32) (i32.const 0))
diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts
index ebe491d43..f9077445f 100644
--- a/test/min.fromasm.imprecise.no-opts
+++ b/test/min.fromasm.imprecise.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32))
(global $tDP (mut i32) (get_global $tDP$asm2wasm$import))
(global $M (mut i32) (i32.const 0))
diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts
index ebe491d43..f9077445f 100644
--- a/test/min.fromasm.no-opts
+++ b/test/min.fromasm.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "tempDoublePtr" (global $tDP$asm2wasm$import i32))
(global $tDP (mut i32) (get_global $tDP$asm2wasm$import))
(global $M (mut i32) (i32.const 0))
diff --git a/test/noffi_f32.fromasm b/test/noffi_f32.fromasm
index 311de68e3..8558d0e8d 100644
--- a/test/noffi_f32.fromasm
+++ b/test/noffi_f32.fromasm
@@ -1,8 +1,8 @@
(module
(type $FUNCSIG$ff (func (param f32) (result f32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "noffi_f32.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "noffi_f32.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(import "env" "_importf" (func $importf (param f32) (result f32)))
(export "main" (func $main))
(export "exportf" (func $exportf))
diff --git a/test/noffi_f32.fromasm.clamp b/test/noffi_f32.fromasm.clamp
index 311de68e3..8558d0e8d 100644
--- a/test/noffi_f32.fromasm.clamp
+++ b/test/noffi_f32.fromasm.clamp
@@ -1,8 +1,8 @@
(module
(type $FUNCSIG$ff (func (param f32) (result f32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "noffi_f32.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "noffi_f32.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(import "env" "_importf" (func $importf (param f32) (result f32)))
(export "main" (func $main))
(export "exportf" (func $exportf))
diff --git a/test/noffi_f32.fromasm.clamp.no-opts b/test/noffi_f32.fromasm.clamp.no-opts
index f1422fc21..9f94aeb72 100644
--- a/test/noffi_f32.fromasm.clamp.no-opts
+++ b/test/noffi_f32.fromasm.clamp.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$ff (func (param f32) (result f32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_importf" (func $importf (param f32) (result f32)))
(export "main" (func $main))
(export "exportf" (func $exportf))
diff --git a/test/noffi_f32.fromasm.imprecise.no-opts b/test/noffi_f32.fromasm.imprecise.no-opts
index f1422fc21..9f94aeb72 100644
--- a/test/noffi_f32.fromasm.imprecise.no-opts
+++ b/test/noffi_f32.fromasm.imprecise.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$ff (func (param f32) (result f32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_importf" (func $importf (param f32) (result f32)))
(export "main" (func $main))
(export "exportf" (func $exportf))
diff --git a/test/noffi_f32.fromasm.no-opts b/test/noffi_f32.fromasm.no-opts
index f1422fc21..9f94aeb72 100644
--- a/test/noffi_f32.fromasm.no-opts
+++ b/test/noffi_f32.fromasm.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$ff (func (param f32) (result f32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_importf" (func $importf (param f32) (result f32)))
(export "main" (func $main))
(export "exportf" (func $exportf))
diff --git a/test/noffi_i64.fromasm b/test/noffi_i64.fromasm
index fef586b7b..2e2c5b989 100644
--- a/test/noffi_i64.fromasm
+++ b/test/noffi_i64.fromasm
@@ -1,8 +1,8 @@
(module
(type $FUNCSIG$jj (func (param i64) (result i64)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "noffi_i64.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "noffi_i64.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(import "env" "_importll" (func $importll (param i64) (result i64)))
(export "_add" (func $add))
(export "_main" (func $main))
diff --git a/test/noffi_i64.fromasm.clamp b/test/noffi_i64.fromasm.clamp
index fef586b7b..2e2c5b989 100644
--- a/test/noffi_i64.fromasm.clamp
+++ b/test/noffi_i64.fromasm.clamp
@@ -1,8 +1,8 @@
(module
(type $FUNCSIG$jj (func (param i64) (result i64)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "noffi_i64.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "noffi_i64.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(import "env" "_importll" (func $importll (param i64) (result i64)))
(export "_add" (func $add))
(export "_main" (func $main))
diff --git a/test/noffi_i64.fromasm.clamp.no-opts b/test/noffi_i64.fromasm.clamp.no-opts
index 112392cae..be0294bb1 100644
--- a/test/noffi_i64.fromasm.clamp.no-opts
+++ b/test/noffi_i64.fromasm.clamp.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$jj (func (param i64) (result i64)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_importll" (func $importll (param i64) (result i64)))
(export "_add" (func $add))
(export "_main" (func $main))
diff --git a/test/noffi_i64.fromasm.imprecise.no-opts b/test/noffi_i64.fromasm.imprecise.no-opts
index 112392cae..be0294bb1 100644
--- a/test/noffi_i64.fromasm.imprecise.no-opts
+++ b/test/noffi_i64.fromasm.imprecise.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$jj (func (param i64) (result i64)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_importll" (func $importll (param i64) (result i64)))
(export "_add" (func $add))
(export "_main" (func $main))
diff --git a/test/noffi_i64.fromasm.no-opts b/test/noffi_i64.fromasm.no-opts
index 112392cae..be0294bb1 100644
--- a/test/noffi_i64.fromasm.no-opts
+++ b/test/noffi_i64.fromasm.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$jj (func (param i64) (result i64)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "_importll" (func $importll (param i64) (result i64)))
(export "_add" (func $add))
(export "_main" (func $main))
diff --git a/test/passes/minify-imports-and-exports.txt b/test/passes/minify-imports-and-exports.txt
index 816d2a4ce..b6a2cf8bf 100644
--- a/test/passes/minify-imports-and-exports.txt
+++ b/test/passes/minify-imports-and-exports.txt
@@ -5003,8 +5003,8 @@ longname4882 => zza
(module
(type $FUNCSIG$v (func))
(import "env" "a" (global $import$global0 i32))
- (import "env" "memoryBase" (global $import$global1 i32))
- (import "env" "tableBase" (global $import$global2 i32))
+ (import "env" "__memory_base" (global $import$global1 i32))
+ (import "env" "__table_base" (global $import$global2 i32))
(import "env" "b" (func $internal1))
(import "env" "c" (func $internal2))
(import "env" "d" (func $internal3))
diff --git a/test/passes/minify-imports-and-exports.wast b/test/passes/minify-imports-and-exports.wast
index 58d95ff1e..ce0c46f95 100644
--- a/test/passes/minify-imports-and-exports.wast
+++ b/test/passes/minify-imports-and-exports.wast
@@ -4999,8 +4999,8 @@
(import "env" "longname4997" (func $internal4997))
(import "env" "longname4998" (func $internal4998))
(import "env" "longname4999" (func $internal4999))
- (import "env" "memoryBase" (global i32))
- (import "env" "tableBase" (global i32))
+ (import "env" "__memory_base" (global i32))
+ (import "env" "__table_base" (global i32))
(import "other" "anything" (func $internalInfinity))
(export "exp1" (func $foo1))
(export "exp2" (func $foo2))
diff --git a/test/threads.fromasm b/test/threads.fromasm
index 25e26135c..0eed390a4 100644
--- a/test/threads.fromasm
+++ b/test/threads.fromasm
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory (shared 256 256)))
- (data (get_global $memoryBase) "threads.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "threads.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "test" (func $test))
(func $test (; 0 ;) (; has Stack IR ;)
(local $0 i32)
diff --git a/test/threads.fromasm.clamp b/test/threads.fromasm.clamp
index 25e26135c..0eed390a4 100644
--- a/test/threads.fromasm.clamp
+++ b/test/threads.fromasm.clamp
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory (shared 256 256)))
- (data (get_global $memoryBase) "threads.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "threads.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "test" (func $test))
(func $test (; 0 ;) (; has Stack IR ;)
(local $0 i32)
diff --git a/test/threads.fromasm.clamp.no-opts b/test/threads.fromasm.clamp.no-opts
index d15b56541..90e814437 100644
--- a/test/threads.fromasm.clamp.no-opts
+++ b/test/threads.fromasm.clamp.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory (shared 256 256)))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
diff --git a/test/threads.fromasm.imprecise.no-opts b/test/threads.fromasm.imprecise.no-opts
index d15b56541..90e814437 100644
--- a/test/threads.fromasm.imprecise.no-opts
+++ b/test/threads.fromasm.imprecise.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory (shared 256 256)))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
diff --git a/test/threads.fromasm.no-opts b/test/threads.fromasm.no-opts
index d15b56541..90e814437 100644
--- a/test/threads.fromasm.no-opts
+++ b/test/threads.fromasm.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory (shared 256 256)))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
diff --git a/test/threads.wasm-only.fromasm b/test/threads.wasm-only.fromasm
index 37316cc00..10e1806b0 100644
--- a/test/threads.wasm-only.fromasm
+++ b/test/threads.wasm-only.fromasm
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory (shared 256 256)))
- (data (get_global $memoryBase) "threads.wasm-only.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "threads.wasm-only.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $legalstub$test64))
(export "getTempRet0" (func $getTempRet0))
diff --git a/test/threads.wasm-only.fromasm.clamp b/test/threads.wasm-only.fromasm.clamp
index 37316cc00..10e1806b0 100644
--- a/test/threads.wasm-only.fromasm.clamp
+++ b/test/threads.wasm-only.fromasm.clamp
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory (shared 256 256)))
- (data (get_global $memoryBase) "threads.wasm-only.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "threads.wasm-only.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $legalstub$test64))
(export "getTempRet0" (func $getTempRet0))
diff --git a/test/threads.wasm-only.fromasm.clamp.no-opts b/test/threads.wasm-only.fromasm.clamp.no-opts
index d79a41b41..ef13ae97c 100644
--- a/test/threads.wasm-only.fromasm.clamp.no-opts
+++ b/test/threads.wasm-only.fromasm.clamp.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory (shared 256 256)))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $tempRet0 (mut i32) (i32.const 0))
diff --git a/test/threads.wasm-only.fromasm.imprecise.no-opts b/test/threads.wasm-only.fromasm.imprecise.no-opts
index d79a41b41..ef13ae97c 100644
--- a/test/threads.wasm-only.fromasm.imprecise.no-opts
+++ b/test/threads.wasm-only.fromasm.imprecise.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory (shared 256 256)))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $tempRet0 (mut i32) (i32.const 0))
diff --git a/test/threads.wasm-only.fromasm.no-opts b/test/threads.wasm-only.fromasm.no-opts
index d79a41b41..ef13ae97c 100644
--- a/test/threads.wasm-only.fromasm.no-opts
+++ b/test/threads.wasm-only.fromasm.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory (shared 256 256)))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $tempRet0 (mut i32) (i32.const 0))
diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm
index 0a60da254..0e845322d 100644
--- a/test/two_sides.fromasm
+++ b/test/two_sides.fromasm
@@ -1,8 +1,8 @@
(module
(type $FUNCSIG$id (func (param f64) (result i32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "two_sides.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "two_sides.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
(export "_test" (func $_test))
(func $_test (; 1 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
diff --git a/test/two_sides.fromasm.clamp b/test/two_sides.fromasm.clamp
index 86143eeba..0bb94b93f 100644
--- a/test/two_sides.fromasm.clamp
+++ b/test/two_sides.fromasm.clamp
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "two_sides.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "two_sides.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "_test" (func $_test))
(func $f64-to-int (; 0 ;) (; has Stack IR ;) (param $0 f64) (result i32)
(if (result i32)
diff --git a/test/two_sides.fromasm.clamp.no-opts b/test/two_sides.fromasm.clamp.no-opts
index 8967e2ad2..0a6bc5137 100644
--- a/test/two_sides.fromasm.clamp.no-opts
+++ b/test/two_sides.fromasm.clamp.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "_test" (func $_test))
(func $f64-to-int (; 0 ;) (param $0 f64) (result i32)
(if (result i32)
diff --git a/test/two_sides.fromasm.imprecise.no-opts b/test/two_sides.fromasm.imprecise.no-opts
index 01524e663..71de463d9 100644
--- a/test/two_sides.fromasm.imprecise.no-opts
+++ b/test/two_sides.fromasm.imprecise.no-opts
@@ -1,8 +1,8 @@
(module
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(export "_test" (func $_test))
(func $_test (; 0 ;) (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32)
(local $d6 f64)
diff --git a/test/two_sides.fromasm.no-opts b/test/two_sides.fromasm.no-opts
index e74005742..7ce042c17 100644
--- a/test/two_sides.fromasm.no-opts
+++ b/test/two_sides.fromasm.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$id (func (param f64) (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
(export "_test" (func $_test))
(func $_test (; 1 ;) (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32)
diff --git a/test/unit.fromasm b/test/unit.fromasm
index fa81c8bc3..184aaa92d 100644
--- a/test/unit.fromasm
+++ b/test/unit.fromasm
@@ -9,11 +9,11 @@
(type $FUNCSIG$dd (func (param f64) (result f64)))
(type $FUNCSIG$i (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "unit.asm.js")
+ (data (get_global $__memory_base) "unit.asm.js")
(import "env" "table" (table $table 25 25 anyfunc))
- (elem (get_global $tableBase) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "gb" (global $n$asm2wasm$import i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32)))
(import "env" "abort" (func $abort (param f64) (result f64)))
diff --git a/test/unit.fromasm.clamp b/test/unit.fromasm.clamp
index e1a1f90fa..5ce8dc3e2 100644
--- a/test/unit.fromasm.clamp
+++ b/test/unit.fromasm.clamp
@@ -8,11 +8,11 @@
(type $FUNCSIG$dd (func (param f64) (result f64)))
(type $FUNCSIG$i (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "unit.asm.js")
+ (data (get_global $__memory_base) "unit.asm.js")
(import "env" "table" (table $table 25 25 anyfunc))
- (elem (get_global $tableBase) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "gb" (global $n$asm2wasm$import i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32)))
(import "env" "abort" (func $abort (param f64) (result f64)))
diff --git a/test/unit.fromasm.clamp.no-opts b/test/unit.fromasm.clamp.no-opts
index 21c5603dc..bf338ecf0 100644
--- a/test/unit.fromasm.clamp.no-opts
+++ b/test/unit.fromasm.clamp.no-opts
@@ -9,9 +9,9 @@
(type $FUNCSIG$i (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 25 25 anyfunc))
- (elem (get_global $tableBase) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "global" "NaN" (global $t$asm2wasm$import f64))
(import "global" "Infinity" (global $u$asm2wasm$import f64))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise
index 4a7e56f3a..9ca992073 100644
--- a/test/unit.fromasm.imprecise
+++ b/test/unit.fromasm.imprecise
@@ -9,8 +9,8 @@
(type $FUNCSIG$i (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 25 25 anyfunc))
- (elem (get_global $tableBase) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "gb" (global $n$asm2wasm$import i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32)))
(import "env" "abort" (func $abort (param f64) (result f64)))
diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts
index 3efad229b..675843917 100644
--- a/test/unit.fromasm.imprecise.no-opts
+++ b/test/unit.fromasm.imprecise.no-opts
@@ -9,9 +9,9 @@
(type $FUNCSIG$i (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 25 25 anyfunc))
- (elem (get_global $tableBase) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "global" "NaN" (global $t$asm2wasm$import f64))
(import "global" "Infinity" (global $u$asm2wasm$import f64))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts
index 3e8c81d34..4ec9844f6 100644
--- a/test/unit.fromasm.no-opts
+++ b/test/unit.fromasm.no-opts
@@ -10,9 +10,9 @@
(type $FUNCSIG$i (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 25 25 anyfunc))
- (elem (get_global $tableBase) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $v $big_negative $v $v $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "global" "NaN" (global $t$asm2wasm$import f64))
(import "global" "Infinity" (global $u$asm2wasm$import f64))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
diff --git a/test/unreachable-import_wasm-only.fromasm b/test/unreachable-import_wasm-only.fromasm
index 659768b48..95bbdeb4c 100644
--- a/test/unreachable-import_wasm-only.fromasm
+++ b/test/unreachable-import_wasm-only.fromasm
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "unreachable-import_wasm-only.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "unreachable-import_wasm-only.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "__ZN10WasmAssertC2Ev__async_cb" (func $__ZN10WasmAssertC2Ev__async_cb))
(func $__ZN10WasmAssertC2Ev__async_cb (; 0 ;) (; has Stack IR ;) (param $0 i32)
(i32.store
diff --git a/test/unreachable-import_wasm-only.fromasm.clamp b/test/unreachable-import_wasm-only.fromasm.clamp
index 659768b48..95bbdeb4c 100644
--- a/test/unreachable-import_wasm-only.fromasm.clamp
+++ b/test/unreachable-import_wasm-only.fromasm.clamp
@@ -1,7 +1,7 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "unreachable-import_wasm-only.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "unreachable-import_wasm-only.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
(export "__ZN10WasmAssertC2Ev__async_cb" (func $__ZN10WasmAssertC2Ev__async_cb))
(func $__ZN10WasmAssertC2Ev__async_cb (; 0 ;) (; has Stack IR ;) (param $0 i32)
(i32.store
diff --git a/test/unreachable-import_wasm-only.fromasm.clamp.no-opts b/test/unreachable-import_wasm-only.fromasm.clamp.no-opts
index e7eecc451..39ef62baa 100644
--- a/test/unreachable-import_wasm-only.fromasm.clamp.no-opts
+++ b/test/unreachable-import_wasm-only.fromasm.clamp.no-opts
@@ -3,8 +3,8 @@
(type $FUNCSIG$viii (func (param i32 i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
diff --git a/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts b/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts
index e7eecc451..39ef62baa 100644
--- a/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts
+++ b/test/unreachable-import_wasm-only.fromasm.imprecise.no-opts
@@ -3,8 +3,8 @@
(type $FUNCSIG$viii (func (param i32 i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
diff --git a/test/unreachable-import_wasm-only.fromasm.no-opts b/test/unreachable-import_wasm-only.fromasm.no-opts
index e7eecc451..39ef62baa 100644
--- a/test/unreachable-import_wasm-only.fromasm.no-opts
+++ b/test/unreachable-import_wasm-only.fromasm.no-opts
@@ -3,8 +3,8 @@
(type $FUNCSIG$viii (func (param i32 i32 i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "DYNAMICTOP_PTR" (global $DYNAMICTOP_PTR$asm2wasm$import i32))
(import "env" "tempDoublePtr" (global $tempDoublePtr$asm2wasm$import i32))
(import "env" "ABORT" (global $ABORT$asm2wasm$import i32))
diff --git a/test/use-import-and-drop.fromasm b/test/use-import-and-drop.fromasm
index 14c3ff06e..c86c22412 100644
--- a/test/use-import-and-drop.fromasm
+++ b/test/use-import-and-drop.fromasm
@@ -1,5 +1,5 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "use-import-and-drop.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "use-import-and-drop.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
)
diff --git a/test/use-import-and-drop.fromasm.clamp b/test/use-import-and-drop.fromasm.clamp
index 14c3ff06e..c86c22412 100644
--- a/test/use-import-and-drop.fromasm.clamp
+++ b/test/use-import-and-drop.fromasm.clamp
@@ -1,5 +1,5 @@
(module
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "use-import-and-drop.asm.js")
- (import "env" "memoryBase" (global $memoryBase i32))
+ (data (get_global $__memory_base) "use-import-and-drop.asm.js")
+ (import "env" "__memory_base" (global $__memory_base i32))
)
diff --git a/test/use-import-and-drop.fromasm.clamp.no-opts b/test/use-import-and-drop.fromasm.clamp.no-opts
index 9c813eb0e..6b885db34 100644
--- a/test/use-import-and-drop.fromasm.clamp.no-opts
+++ b/test/use-import-and-drop.fromasm.clamp.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$vi (func (param i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32)))
(func $test1 (; 1 ;) (result i32)
(local $$b$1 i32)
diff --git a/test/use-import-and-drop.fromasm.imprecise.no-opts b/test/use-import-and-drop.fromasm.imprecise.no-opts
index 9c813eb0e..6b885db34 100644
--- a/test/use-import-and-drop.fromasm.imprecise.no-opts
+++ b/test/use-import-and-drop.fromasm.imprecise.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$vi (func (param i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32)))
(func $test1 (; 1 ;) (result i32)
(local $$b$1 i32)
diff --git a/test/use-import-and-drop.fromasm.no-opts b/test/use-import-and-drop.fromasm.no-opts
index 9c813eb0e..6b885db34 100644
--- a/test/use-import-and-drop.fromasm.no-opts
+++ b/test/use-import-and-drop.fromasm.no-opts
@@ -2,8 +2,8 @@
(type $FUNCSIG$vi (func (param i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 0 0 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32)))
(func $test1 (; 1 ;) (result i32)
(local $$b$1 i32)
diff --git a/test/wasm-only.fromasm b/test/wasm-only.fromasm
index e3b18b638..53ef4a7f3 100644
--- a/test/wasm-only.fromasm
+++ b/test/wasm-only.fromasm
@@ -3,11 +3,11 @@
(type $legaltype$illegalImportResult (func (result i32)))
(type $legaltype$_fabsf (func (param f64) (result f64)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "wasm-only.asm.js")
+ (data (get_global $__memory_base) "wasm-only.asm.js")
(import "env" "table" (table $table 3 3 anyfunc))
- (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "_fabsf" (func $legalimport$_fabsf (param f64) (result f64)))
diff --git a/test/wasm-only.fromasm.clamp b/test/wasm-only.fromasm.clamp
index e3b18b638..53ef4a7f3 100644
--- a/test/wasm-only.fromasm.clamp
+++ b/test/wasm-only.fromasm.clamp
@@ -3,11 +3,11 @@
(type $legaltype$illegalImportResult (func (result i32)))
(type $legaltype$_fabsf (func (param f64) (result f64)))
(import "env" "memory" (memory $memory 256 256))
- (data (get_global $memoryBase) "wasm-only.asm.js")
+ (data (get_global $__memory_base) "wasm-only.asm.js")
(import "env" "table" (table $table 3 3 anyfunc))
- (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "_fabsf" (func $legalimport$_fabsf (param f64) (result f64)))
diff --git a/test/wasm-only.fromasm.clamp.no-opts b/test/wasm-only.fromasm.clamp.no-opts
index 272c444a4..4fbbc11cb 100644
--- a/test/wasm-only.fromasm.clamp.no-opts
+++ b/test/wasm-only.fromasm.clamp.no-opts
@@ -9,9 +9,9 @@
(type $legaltype$do_i64 (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 3 3 anyfunc))
- (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "abort" (func $abort))
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
diff --git a/test/wasm-only.fromasm.imprecise b/test/wasm-only.fromasm.imprecise
index e7820953a..9ea224d4d 100644
--- a/test/wasm-only.fromasm.imprecise
+++ b/test/wasm-only.fromasm.imprecise
@@ -4,8 +4,8 @@
(type $legaltype$_fabsf (func (param f64) (result f64)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 3 3 anyfunc))
- (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "_fabsf" (func $legalimport$_fabsf (param f64) (result f64)))
diff --git a/test/wasm-only.fromasm.imprecise.no-opts b/test/wasm-only.fromasm.imprecise.no-opts
index e1160dff0..7cf7e7282 100644
--- a/test/wasm-only.fromasm.imprecise.no-opts
+++ b/test/wasm-only.fromasm.imprecise.no-opts
@@ -9,9 +9,9 @@
(type $legaltype$do_i64 (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 3 3 anyfunc))
- (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "abort" (func $abort))
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
diff --git a/test/wasm-only.fromasm.no-opts b/test/wasm-only.fromasm.no-opts
index 272c444a4..4fbbc11cb 100644
--- a/test/wasm-only.fromasm.no-opts
+++ b/test/wasm-only.fromasm.no-opts
@@ -9,9 +9,9 @@
(type $legaltype$do_i64 (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 3 3 anyfunc))
- (elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $__table_base) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
+ (import "env" "__memory_base" (global $__memory_base i32))
+ (import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "abort" (func $abort))
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))