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/emcc_hello_world.fromasm.no-opts | |
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/emcc_hello_world.fromasm.no-opts')
-rw-r--r-- | test/emcc_hello_world.fromasm.no-opts | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts index 218f7068a..e8ba408c4 100644 --- a/test/emcc_hello_world.fromasm.no-opts +++ b/test/emcc_hello_world.fromasm.no-opts @@ -1,12 +1,17 @@ (module - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "memory" (memory $memory 256 256)) (import "env" "table" (table $table 18 18 funcref)) (elem (global.get $__table_base) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) @@ -2551,7 +2556,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (i32.const 0) (i32.const 0) @@ -2841,7 +2846,7 @@ ) ) (local.set $$call4 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$s) (local.get $$l) @@ -2972,7 +2977,7 @@ ) ) (local.set $$call16 - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$s) (local.get $$i$0$lcssa36) @@ -4451,7 +4456,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (i32.const 0) (i32.const 0) @@ -4550,7 +4555,7 @@ ) ) (drop - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $$f) (local.get $$sub$ptr$sub) (i32.const 1) @@ -31565,7 +31570,7 @@ ) (func $dynCall_ii (; 75 ;) (param $index i32) (param $a1 i32) (result i32) (return - (call_indirect (type $FUNCSIG$ii) + (call_indirect (type $i32_=>_i32) (local.get $a1) (i32.add (i32.and @@ -31579,7 +31584,7 @@ ) (func $dynCall_iiii (; 76 ;) (param $index i32) (param $a1 i32) (param $a2 i32) (param $a3 i32) (result i32) (return - (call_indirect (type $FUNCSIG$iiii) + (call_indirect (type $i32_i32_i32_=>_i32) (local.get $a1) (local.get $a2) (local.get $a3) @@ -31594,7 +31599,7 @@ ) ) (func $dynCall_vi (; 77 ;) (param $index i32) (param $a1 i32) - (call_indirect (type $FUNCSIG$vi) + (call_indirect (type $i32_=>_none) (local.get $a1) (i32.add (i32.and |