diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2019-12-11 17:12:37 -0800 |
---|---|---|
committer | Alon Zakai <azakai@google.com> | 2019-12-11 17:12:37 -0800 |
commit | 759c485a9f35bd859d43b86b02e1397a669fa469 (patch) | |
tree | a5c7475002b406e35c6d1e5c2d843000947ef192 /test/passes/remove-unused-brs_shrink-level=1.txt | |
parent | acd786dbd1e59f9d105c4ec8603c2ff46f233649 (diff) | |
download | binaryen-759c485a9f35bd859d43b86b02e1397a669fa469.tar.gz binaryen-759c485a9f35bd859d43b86b02e1397a669fa469.tar.bz2 binaryen-759c485a9f35bd859d43b86b02e1397a669fa469.zip |
Remove FunctionType (#2510)
Function signatures were previously redundantly stored on Function
objects as well as on FunctionType objects. These two signature
representations had to always be kept in sync, which was error-prone
and needlessly complex. This PR takes advantage of the new ability of
Type to represent multiple value types by consolidating function
signatures as a pair of Types (params and results) stored on the
Function object.
Since there are no longer module-global named function types,
significant changes had to be made to the printing and emitting of
function types, as well as their parsing and manipulation in various
passes.
The C and JS APIs and their tests also had to be updated to remove
named function types.
Diffstat (limited to 'test/passes/remove-unused-brs_shrink-level=1.txt')
-rw-r--r-- | test/passes/remove-unused-brs_shrink-level=1.txt | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/test/passes/remove-unused-brs_shrink-level=1.txt b/test/passes/remove-unused-brs_shrink-level=1.txt index 5d17a7688..e05b66040 100644 --- a/test/passes/remove-unused-brs_shrink-level=1.txt +++ b/test/passes/remove-unused-brs_shrink-level=1.txt @@ -1,9 +1,8 @@ (module - (type $0 (func (param i32))) - (type $1 (func)) - (type $2 (func (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) (memory $0 256 256) - (func $b14 (; 0 ;) (type $2) (result i32) + (func $b14 (; 0 ;) (result i32) (drop (select (block $block1 (result i32) @@ -45,7 +44,7 @@ ) (i32.const 0) ) - (func $join-br_ifs (; 1 ;) (type $1) + (func $join-br_ifs (; 1 ;) (block $out (br_if $out (i32.or @@ -123,7 +122,7 @@ ) ) ) - (func $join-and-it-becomes-unreachable (; 2 ;) (type $1) + (func $join-and-it-becomes-unreachable (; 2 ;) (block $label$1 (block $block (br_if $label$1 @@ -139,7 +138,7 @@ ) ) ) - (func $br-if-unreachable-pair (; 3 ;) (type $1) + (func $br-if-unreachable-pair (; 3 ;) (block $label$14 (br_if $label$14 (unreachable) @@ -149,7 +148,7 @@ ) ) ) - (func $br-if-unreachable-pair2 (; 4 ;) (type $1) + (func $br-if-unreachable-pair2 (; 4 ;) (block $label$14 (br_if $label$14 (i32.const 0) @@ -159,7 +158,7 @@ ) ) ) - (func $simple-switch (; 5 ;) (type $2) (result i32) + (func $simple-switch (; 5 ;) (result i32) (block $A (block $B (block $y @@ -180,7 +179,7 @@ ) (i32.const 3) ) - (func $simple-switch-2 (; 6 ;) (type $2) (result i32) + (func $simple-switch-2 (; 6 ;) (result i32) (local $0 i32) (block $A (block $B @@ -214,7 +213,7 @@ ) (i32.const 3) ) - (func $simple-switch-3 (; 7 ;) (type $2) (result i32) + (func $simple-switch-3 (; 7 ;) (result i32) (local $0 i32) (block $A (block $B @@ -247,7 +246,7 @@ ) (i32.const 3) ) - (func $simple-switch-4 (; 8 ;) (type $2) (result i32) + (func $simple-switch-4 (; 8 ;) (result i32) (block $A (block $B (block $y |