diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-07-28 14:16:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-28 14:16:19 -0700 |
commit | cffbc4bc36f5e5f53e34f16ba4e687fdf130131d (patch) | |
tree | 0bf5c6d3bc347b2fddffce477a67826c9093a8be /test/passes/duplicate-function-elimination.txt | |
parent | 3dc2e2579199fb0457846a22b3759ef16531b3da (diff) | |
download | binaryen-cffbc4bc36f5e5f53e34f16ba4e687fdf130131d.tar.gz binaryen-cffbc4bc36f5e5f53e34f16ba4e687fdf130131d.tar.bz2 binaryen-cffbc4bc36f5e5f53e34f16ba4e687fdf130131d.zip |
wast function type name desugaring is changing in spec:301 (#654)
Diffstat (limited to 'test/passes/duplicate-function-elimination.txt')
-rw-r--r-- | test/passes/duplicate-function-elimination.txt | 317 |
1 files changed, 193 insertions, 124 deletions
diff --git a/test/passes/duplicate-function-elimination.txt b/test/passes/duplicate-function-elimination.txt index 9595f5705..3671ce24b 100644 --- a/test/passes/duplicate-function-elimination.txt +++ b/test/passes/duplicate-function-elimination.txt @@ -1,68 +1,75 @@ (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (nop) ) ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.const 0) ) - (func $other + (func $other (type $0) (nop) ) ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (i32.const 0) ) ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.const 0) ) - (func $other + (func $other (type $0) (i32.const 1) ) ) (module (memory 0) (start $keep2) + (type $0 (func)) (export "keep2" $keep2) (export "other" $keep2) (table $keep2 $keep2 $caller) - (func $keep2 + (func $keep2 (type $0) (nop) ) - (func $caller + (func $caller (type $0) (call $keep2) (call $keep2) ) ) (module (memory 0) - (func $keep2-after-two-passes + (type $0 (func)) + (func $keep2-after-two-passes (type $0) (nop) ) - (func $keep-caller + (func $keep-caller (type $0) (call $keep2-after-two-passes) ) ) (module (memory 0) - (func $keep-4 + (type $0 (func)) + (func $keep-4 (type $0) (nop) ) - (func $other + (func $other (type $0) (unreachable) ) - (func $keep-caller + (func $keep-caller (type $0) (call $keep-4) ) - (func $other-caller + (func $other-caller (type $0) (call $other) ) ) @@ -70,10 +77,12 @@ (memory 0) (type $T (func (result i32))) (type $S (func (result i32))) - (func $keep4-similar-but-func-sig-differs + (type $2 (func)) + (type $3 (func (param i32))) + (func $keep4-similar-but-func-sig-differs (type $2) (i32.const 0) ) - (func $other1 (param $i i32) + (func $other1 (type $3) (param $i i32) (i32.const 0) ) (func $other2 (type $T) (result i32) @@ -86,7 +95,8 @@ (module (memory 0) (type $S (func (result i32))) - (func $keep2-similar-but-func-sig-differs (param $i i32) + (type $1 (func (param i32))) + (func $keep2-similar-but-func-sig-differs (type $1) (param $i i32) (i32.const 0) ) (func $other2 (type $S) (result i32) @@ -95,28 +105,31 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (nop) ) - (func $other + (func $other (type $0) (nop) (nop) ) ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (block $block0 ) ) ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (block $block0 ) ) - (func $other + (func $other (type $0) (block $block0 (nop) ) @@ -124,7 +137,8 @@ ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (block $block0 (nop) ) @@ -132,12 +146,13 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (block $block0 (nop) ) ) - (func $other + (func $other (type $0) (block $block0 (nop) (unreachable) @@ -146,12 +161,13 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (block $block0 (nop) ) ) - (func $other + (func $other (type $0) (block $block0 (unreachable) ) @@ -159,14 +175,16 @@ ) (module (memory 0) - (func $erase-since-block-names-do-not-matter + (type $0 (func)) + (func $erase-since-block-names-do-not-matter (type $0) (block $foo ) ) ) (module (memory 0) - (func $erase-since-block-names-do-not-matter + (type $0 (func)) + (func $erase-since-block-names-do-not-matter (type $0) (block $foo (br $foo) (br_table $foo $foo @@ -177,14 +195,15 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (block $foo (br $foo (i32.const 0) ) ) ) - (func $other + (func $other (type $0) (block $bar (br $bar (i32.const 1) @@ -194,14 +213,15 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (block $foo (br_if $foo (i32.const 0) ) ) ) - (func $other + (func $other (type $0) (block $bar (br_if $bar (i32.const 1) @@ -211,7 +231,8 @@ ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (block $foo (br_if $foo (i32.const 0) @@ -221,14 +242,15 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (block $foo (br_table $foo $foo (i32.const 0) ) ) ) - (func $other + (func $other (type $0) (block $bar (br_table $bar $bar (i32.const 1) @@ -238,7 +260,8 @@ ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (loop $foo $bar (nop) ) @@ -246,7 +269,8 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (block $foo (br_table $foo $foo (i32.const 0) @@ -254,7 +278,7 @@ ) ) ) - (func $other + (func $other (type $0) (block $bar (br_table $bar $bar (i32.const 0) @@ -265,7 +289,8 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (block $foo (block $bar (br_table $foo $bar @@ -277,7 +302,8 @@ ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (block $foo (block $bar (br_table $foo $bar @@ -286,7 +312,7 @@ ) ) ) - (func $other + (func $other (type $0) (block $bar (block $foo (br_table $foo $bar @@ -298,16 +324,18 @@ ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (call $erase) ) ) (module (memory 0) - (func $keep2-but-in-theory-we-could-erase + (type $0 (func)) + (func $keep2-but-in-theory-we-could-erase (type $0) (call $keep2-but-in-theory-we-could-erase) ) - (func $other + (func $other (type $0) (call $other) ) ) @@ -316,7 +344,7 @@ (type $FUNCSIG$v (func)) (import $i "env" "i") (import $i "env" "j") - (func $erase + (func $erase (type $FUNCSIG$v) (call_import $i) ) ) @@ -325,10 +353,10 @@ (type $FUNCSIG$v (func)) (import $i "env" "i") (import $j "env" "j") - (func $keep2 + (func $keep2 (type $FUNCSIG$v) (call_import $i) ) - (func $other + (func $other (type $FUNCSIG$v) (call_import $j) ) ) @@ -336,7 +364,7 @@ (memory 0) (type $T (func)) (table $erase $erase) - (func $erase + (func $erase (type $T) (call_indirect $T (i32.const 0) ) @@ -346,12 +374,12 @@ (memory 0) (type $T (func)) (table $keep2 $other) - (func $keep2 + (func $keep2 (type $T) (call_indirect $T (i32.const 0) ) ) - (func $other + (func $other (type $T) (call_indirect $T (i32.const 1) ) @@ -362,12 +390,12 @@ (type $T (func)) (type $S (func)) (table $keep2 $other) - (func $keep2 + (func $keep2 (type $T) (call_indirect $T (i32.const 0) ) ) - (func $other + (func $other (type $T) (call_indirect $S (i32.const 0) ) @@ -375,25 +403,28 @@ ) (module (memory 0) - (func $erase-even-locals-with-different-names + (type $0 (func)) + (func $erase-even-locals-with-different-names (type $0) (local $i i32) (get_local $i) ) ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (local $i i32) (get_local $i) ) - (func $other + (func $other (type $0) (local $j i64) (get_local $j) ) ) (module (memory 0) - (func $erase-even-locals-with-different-names + (type $0 (func)) + (func $erase-even-locals-with-different-names (type $0) (local $i i32) (set_local $i (i32.const 0) @@ -402,13 +433,14 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (local $i i32) (set_local $i (i32.const 0) ) ) - (func $other + (func $other (type $0) (local $j i64) (set_local $j (i64.const 0) @@ -417,13 +449,14 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (local $i i32) (set_local $i (i32.const 0) ) ) - (func $other + (func $other (type $0) (local $j i32) (set_local $j (i32.const 1) @@ -432,7 +465,8 @@ ) (module (memory 10) - (func $erase + (type $0 (func)) + (func $erase (type $0) (i32.load (i32.const 0) ) @@ -443,12 +477,13 @@ ) (module (memory 10) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.load16_s offset=3 (i32.const 0) ) ) - (func $other + (func $other (type $0) (i32.load8_s offset=3 align=2 (i32.const 0) ) @@ -456,12 +491,13 @@ ) (module (memory 10) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.load8_s offset=3 (i32.const 0) ) ) - (func $other + (func $other (type $0) (i32.load8_s offset=3 align=2 (i32.const 0) ) @@ -469,12 +505,13 @@ ) (module (memory 10) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.load8_s align=2 (i32.const 0) ) ) - (func $other + (func $other (type $0) (i32.load8_s offset=3 align=2 (i32.const 0) ) @@ -482,12 +519,13 @@ ) (module (memory 10) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.load8_s offset=3 align=2 (i32.const 0) ) ) - (func $other + (func $other (type $0) (i32.load8_s offset=3 align=2 (i32.const 1) ) @@ -495,12 +533,13 @@ ) (module (memory 10) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.load8_u offset=3 align=2 (i32.const 0) ) ) - (func $other + (func $other (type $0) (i32.load8_s offset=3 align=2 (i32.const 0) ) @@ -508,7 +547,8 @@ ) (module (memory 10) - (func $erase + (type $0 (func)) + (func $erase (type $0) (i32.store (i32.const 0) (i32.const 100) @@ -521,13 +561,14 @@ ) (module (memory 10) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.store16 offset=3 (i32.const 0) (i32.const 100) ) ) - (func $other + (func $other (type $0) (i32.store8 offset=3 align=2 (i32.const 0) (i32.const 100) @@ -536,13 +577,14 @@ ) (module (memory 10) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.store8 offset=3 (i32.const 0) (i32.const 100) ) ) - (func $other + (func $other (type $0) (i32.store8 offset=3 align=2 (i32.const 0) (i32.const 100) @@ -551,13 +593,14 @@ ) (module (memory 10) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.store8 align=2 (i32.const 0) (i32.const 100) ) ) - (func $other + (func $other (type $0) (i32.store8 offset=3 align=2 (i32.const 0) (i32.const 100) @@ -566,13 +609,14 @@ ) (module (memory 10) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.store8 offset=3 align=2 (i32.const 0) (i32.const 100) ) ) - (func $other + (func $other (type $0) (i32.store8 offset=3 align=2 (i32.const 1) (i32.const 100) @@ -581,13 +625,14 @@ ) (module (memory 10) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.store8 offset=3 align=2 (i32.const 0) (i32.const 100) ) ) - (func $other + (func $other (type $0) (i32.store8 offset=3 align=2 (i32.const 0) (i32.const 101) @@ -596,61 +641,68 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.const 0) ) - (func $other + (func $other (type $0) (i64.const 0) ) ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.const 0) ) - (func $other + (func $other (type $0) (f32.const 0) ) ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i32.const 0) ) - (func $other + (func $other (type $0) (f64.const 0) ) ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (i64.const 0) ) - (func $other + (func $other (type $0) (i64.const 1) ) ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (f32.const 0.10000000149011612) ) - (func $other + (func $other (type $0) (f32.const -0.10000000149011612) ) ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (f64.const 0.1) ) - (func $other + (func $other (type $0) (f64.const 0.2) ) ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (f32.abs (f32.const 0) ) @@ -658,12 +710,13 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (f32.abs (f32.const 0) ) ) - (func $other + (func $other (type $0) (f32.abs (f32.const 1) ) @@ -671,12 +724,13 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (f32.abs (f32.const 0) ) ) - (func $other + (func $other (type $0) (f32.neg (f32.const 0) ) @@ -684,7 +738,8 @@ ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (f32.add (f32.const 0) (f32.const 0) @@ -693,13 +748,14 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (f32.add (f32.const 0) (f32.const 0) ) ) - (func $other + (func $other (type $0) (f32.add (f32.const 0) (f32.const 1) @@ -708,13 +764,14 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (f32.add (f32.const 0) (f32.const 0) ) ) - (func $other + (func $other (type $0) (f32.add (f32.const 1) (f32.const 0) @@ -723,13 +780,14 @@ ) (module (memory 0) - (func $keep2 + (type $0 (func)) + (func $keep2 (type $0) (f32.add (f32.const 0) (f32.const 0) ) ) - (func $other + (func $other (type $0) (f32.sub (f32.const 0) (f32.const 0) @@ -738,7 +796,8 @@ ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (select (i32.const 0) (i32.const 0) @@ -748,14 +807,15 @@ ) (module (memory 0) - (func $keep + (type $0 (func)) + (func $keep (type $0) (select (i32.const 0) (i32.const 0) (i32.const 0) ) ) - (func $other + (func $other (type $0) (select (i32.const 1) (i32.const 0) @@ -765,14 +825,15 @@ ) (module (memory 0) - (func $keep + (type $0 (func)) + (func $keep (type $0) (select (i32.const 0) (i32.const 0) (i32.const 0) ) ) - (func $other + (func $other (type $0) (select (i32.const 0) (i32.const 2) @@ -782,14 +843,15 @@ ) (module (memory 0) - (func $keep + (type $0 (func)) + (func $keep (type $0) (select (i32.const 0) (i32.const 0) (i32.const 0) ) ) - (func $other + (func $other (type $0) (select (i32.const 0) (i32.const 0) @@ -799,13 +861,15 @@ ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (return) ) ) (module (memory 0) - (func $erase (result i32) + (type $0 (func (result i32))) + (func $erase (type $0) (result i32) (return (i32.const 0) ) @@ -813,12 +877,13 @@ ) (module (memory 0) - (func $keep (result i32) + (type $0 (func (result i32))) + (func $keep (type $0) (result i32) (return (i32.const 0) ) ) - (func $other (result i32) + (func $other (type $0) (result i32) (return (i32.const 1) ) @@ -826,13 +891,15 @@ ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (current_memory) ) ) (module (memory 0) - (func $erase + (type $0 (func)) + (func $erase (type $0) (grow_memory (i32.const 10) ) @@ -840,12 +907,13 @@ ) (module (memory 0) - (func $keep + (type $0 (func)) + (func $keep (type $0) (grow_memory (i32.const 10) ) ) - (func $other + (func $other (type $0) (grow_memory (i32.const 11) ) @@ -853,10 +921,11 @@ ) (module (memory 0) - (func $keep + (type $0 (func)) + (func $keep (type $0) (current_memory) ) - (func $other + (func $other (type $0) (grow_memory (i32.const 10) ) |