summaryrefslogtreecommitdiff
path: root/test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-12-11 17:12:37 -0800
committerAlon Zakai <azakai@google.com>2019-12-11 17:12:37 -0800
commit759c485a9f35bd859d43b86b02e1397a669fa469 (patch)
treea5c7475002b406e35c6d1e5c2d843000947ef192 /test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt
parentacd786dbd1e59f9d105c4ec8603c2ff46f233649 (diff)
downloadbinaryen-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-names_vacuum_ignore-implicit-traps.txt')
-rw-r--r--test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt31
1 files changed, 15 insertions, 16 deletions
diff --git a/test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt b/test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt
index 22288056a..69835c780 100644
--- a/test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt
+++ b/test/passes/remove-unused-names_vacuum_ignore-implicit-traps.txt
@@ -1,15 +1,14 @@
(module
- (type $0 (func))
- (type $FUNCSIG$j (func (result i32)))
- (type $FUNCSIG$i (func (result i32)))
- (type $legaltype$wasm2js_scratch_load_i64 (func (result i32)))
- (type $FUNCSIG$vj (func (param i32 i32)))
- (type $legaltype$wasm2js_scratch_store_i64 (func (param i32 i32)))
- (type $FUNCSIG$ii (func (param i32) (result i32)))
- (type $FUNCSIG$f (func (result f32)))
- (type $FUNCSIG$vf (func (param f32)))
- (type $FUNCSIG$d (func (result f64)))
- (type $FUNCSIG$vd (func (param f64)))
+ (type $i32_i32_=>_none (func (param i32 i32)))
+ (type $none_=>_i32 (func (result i32)))
+ (type $none_=>_none (func))
+ (type $i64_=>_none (func (param i64)))
+ (type $f32_=>_none (func (param f32)))
+ (type $f64_=>_none (func (param f64)))
+ (type $i32_=>_i32 (func (param i32) (result i32)))
+ (type $none_=>_i64 (func (result i64)))
+ (type $none_=>_f32 (func (result f32)))
+ (type $none_=>_f64 (func (result f64)))
(import "env" "wasm2js_scratch_load_i32" (func $wasm2js_scratch_load_i32 (param i32) (result i32)))
(import "env" "wasm2js_scratch_store_i32" (func $wasm2js_scratch_store_i32 (param i32 i32)))
(import "env" "wasm2js_scratch_load_f32" (func $wasm2js_scratch_load_f32 (result f32)))
@@ -19,16 +18,16 @@
(import "env" "getTempRet0" (func $getTempRet0 (result i32)))
(import "env" "wasm2js_scratch_load_i64" (func $legalimport$wasm2js_scratch_load_i64 (result i32)))
(import "env" "wasm2js_scratch_store_i64" (func $legalimport$wasm2js_scratch_store_i64 (param i32 i32)))
- (import "env" "wasm2js_scratch_load_i64" (func $wasm2js_scratch_load_i64 (result i32)))
- (import "env" "wasm2js_scratch_store_i64" (func $wasm2js_scratch_store_i64 (param i32 i32)))
+ (import "env" "wasm2js_scratch_load_i64" (func $wasm2js_scratch_load_i64 (result i64)))
+ (import "env" "wasm2js_scratch_store_i64" (func $wasm2js_scratch_store_i64 (param i64)))
(memory $0 1 1)
(global $i64toi32_i32$HIGH_BITS (mut i32) (i32.const 0))
- (func $0 (; 11 ;) (type $0)
+ (func $0 (; 11 ;)
(local $0 f64)
(local $1 i32)
(nop)
)
- (func $legalfunc$wasm2js_scratch_load_i64 (; 12 ;) (type $FUNCSIG$j) (result i32)
+ (func $legalfunc$wasm2js_scratch_load_i64 (; 12 ;) (result i32)
(local $0 i32)
(local $1 i32)
(local.set $1
@@ -42,7 +41,7 @@
)
(local.get $1)
)
- (func $legalfunc$wasm2js_scratch_store_i64 (; 13 ;) (type $FUNCSIG$vj) (param $0 i32) (param $1 i32)
+ (func $legalfunc$wasm2js_scratch_store_i64 (; 13 ;) (param $0 i32) (param $1 i32)
(call $legalimport$wasm2js_scratch_store_i64
(local.get $0)
(local.get $1)