summaryrefslogtreecommitdiff
path: root/test/metadce
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/metadce
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/metadce')
-rw-r--r--test/metadce/all-outside.wast.dced1
-rw-r--r--test/metadce/corners.wast.dced1
-rw-r--r--test/metadce/no-outside.wast.dced1
-rw-r--r--test/metadce/rooted-export.wast.dced1
-rw-r--r--test/metadce/spanning_cycle.wast.dced1
-rw-r--r--test/metadce/spanning_cycle_unrooted.wast.dced1
-rw-r--r--test/metadce/threaded.wast.dced1
-rw-r--r--test/metadce/threaded_cycle.wast.dced1
-rw-r--r--test/metadce/threaded_unrooted.wast.dced1
-rw-r--r--test/metadce/threaded_unrooted_cycle.wast.dced1
10 files changed, 0 insertions, 10 deletions
diff --git a/test/metadce/all-outside.wast.dced b/test/metadce/all-outside.wast.dced
index 421c01b53..4427f36e0 100644
--- a/test/metadce/all-outside.wast.dced
+++ b/test/metadce/all-outside.wast.dced
@@ -1,3 +1,2 @@
(module
- (memory $0 0)
)
diff --git a/test/metadce/corners.wast.dced b/test/metadce/corners.wast.dced
index cf6346877..772b38653 100644
--- a/test/metadce/corners.wast.dced
+++ b/test/metadce/corners.wast.dced
@@ -6,7 +6,6 @@
(import "env" "table" (table 10 10 anyfunc))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(elem (i32.const 0) $imported_table_func)
- (memory $0 0)
(export "stackAlloc" (func $stackAlloc))
(func $stackAlloc (; 2 ;) (type $FUNCSIG$v)
(drop
diff --git a/test/metadce/no-outside.wast.dced b/test/metadce/no-outside.wast.dced
index 421c01b53..4427f36e0 100644
--- a/test/metadce/no-outside.wast.dced
+++ b/test/metadce/no-outside.wast.dced
@@ -1,3 +1,2 @@
(module
- (memory $0 0)
)
diff --git a/test/metadce/rooted-export.wast.dced b/test/metadce/rooted-export.wast.dced
index 6648c2791..a66014133 100644
--- a/test/metadce/rooted-export.wast.dced
+++ b/test/metadce/rooted-export.wast.dced
@@ -1,6 +1,5 @@
(module
(type $0 (func))
- (memory $0 0)
(export "wasm_func_b" (func $b_wasm_func))
(func $b_wasm_func (; 0 ;) (type $0)
(unreachable)
diff --git a/test/metadce/spanning_cycle.wast.dced b/test/metadce/spanning_cycle.wast.dced
index 9d2b4ced3..74c4eb4a5 100644
--- a/test/metadce/spanning_cycle.wast.dced
+++ b/test/metadce/spanning_cycle.wast.dced
@@ -1,7 +1,6 @@
(module
(type $FUNCSIG$v (func))
(import "env" "js_func" (func $a_js_func))
- (memory $0 0)
(export "wasm_func_a" (func $a_wasm_func))
(func $a_wasm_func (; 1 ;) (type $FUNCSIG$v)
(call $a_js_func)
diff --git a/test/metadce/spanning_cycle_unrooted.wast.dced b/test/metadce/spanning_cycle_unrooted.wast.dced
index 421c01b53..4427f36e0 100644
--- a/test/metadce/spanning_cycle_unrooted.wast.dced
+++ b/test/metadce/spanning_cycle_unrooted.wast.dced
@@ -1,3 +1,2 @@
(module
- (memory $0 0)
)
diff --git a/test/metadce/threaded.wast.dced b/test/metadce/threaded.wast.dced
index 1122cb536..1ee6158a5 100644
--- a/test/metadce/threaded.wast.dced
+++ b/test/metadce/threaded.wast.dced
@@ -3,7 +3,6 @@
(import "env" "js_func2" (func $js_func_2))
(import "env" "js_func3" (func $js_func_3))
(import "env" "js_func4" (func $js_func_4))
- (memory $0 0)
(export "wasm_func1" (func $wasm_func_1))
(export "wasm_func2" (func $wasm_func_2))
(export "wasm_func3" (func $wasm_func_3))
diff --git a/test/metadce/threaded_cycle.wast.dced b/test/metadce/threaded_cycle.wast.dced
index b73266fcc..34e299b8c 100644
--- a/test/metadce/threaded_cycle.wast.dced
+++ b/test/metadce/threaded_cycle.wast.dced
@@ -4,7 +4,6 @@
(import "env" "js_func2" (func $js_func_2))
(import "env" "js_func3" (func $js_func_3))
(import "env" "js_func4" (func $js_func_4))
- (memory $0 0)
(export "wasm_func1" (func $wasm_func_1))
(export "wasm_func2" (func $wasm_func_2))
(export "wasm_func3" (func $wasm_func_3))
diff --git a/test/metadce/threaded_unrooted.wast.dced b/test/metadce/threaded_unrooted.wast.dced
index 421c01b53..4427f36e0 100644
--- a/test/metadce/threaded_unrooted.wast.dced
+++ b/test/metadce/threaded_unrooted.wast.dced
@@ -1,3 +1,2 @@
(module
- (memory $0 0)
)
diff --git a/test/metadce/threaded_unrooted_cycle.wast.dced b/test/metadce/threaded_unrooted_cycle.wast.dced
index 421c01b53..4427f36e0 100644
--- a/test/metadce/threaded_unrooted_cycle.wast.dced
+++ b/test/metadce/threaded_unrooted_cycle.wast.dced
@@ -1,3 +1,2 @@
(module
- (memory $0 0)
)