summaryrefslogtreecommitdiff
path: root/test/emcc_hello_world.fromasm.no-opts
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-01-10 11:34:53 -0800
committerGitHub <noreply@github.com>2018-01-10 11:34:53 -0800
commit623e42aa7be8aa030093b204491d94f3c297d312 (patch)
tree05158ff7c3ef2856345c1650192283ed737f91fd /test/emcc_hello_world.fromasm.no-opts
parent8f90b655201e4cd77196a0b90ea4f398ecfe2c56 (diff)
downloadbinaryen-623e42aa7be8aa030093b204491d94f3c297d312.tar.gz
binaryen-623e42aa7be8aa030093b204491d94f3c297d312.tar.bz2
binaryen-623e42aa7be8aa030093b204491d94f3c297d312.zip
Optimize out memory and table when possible (#1352)
We can remove the memory/table (itself, or an import if imported) if they are not used. This is pretty minor on a large wasm file, but when reading small wasts it's very noticeable to have an unused memory and table all the time.
Diffstat (limited to 'test/emcc_hello_world.fromasm.no-opts')
-rw-r--r--test/emcc_hello_world.fromasm.no-opts8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts
index dd84b963a..2d7a706ae 100644
--- a/test/emcc_hello_world.fromasm.no-opts
+++ b/test/emcc_hello_world.fromasm.no-opts
@@ -7,6 +7,10 @@
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 18 18 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase 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))
@@ -33,10 +37,6 @@
(import "env" "_sysconf" (func $_sysconf (param i32) (result i32)))
(import "env" "___syscall146" (func $___syscall146 (param i32 i32) (result i32)))
(import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
- (import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 18 18 anyfunc))
- (import "env" "memoryBase" (global $memoryBase i32))
- (import "env" "tableBase" (global $tableBase i32))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import))
(global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import))