From 759c485a9f35bd859d43b86b02e1397a669fa469 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Wed, 11 Dec 2019 17:12:37 -0800 Subject: 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. --- ...asyncify-asserts_pass-arg=asyncify-whitelist@waka.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.txt') diff --git a/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.txt b/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.txt index 2caa76d8e..dc92b497d 100644 --- a/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.txt +++ b/test/passes/asyncify_pass-arg=asyncify-asserts_pass-arg=asyncify-whitelist@waka.txt @@ -1,7 +1,7 @@ (module - (type $f (func)) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "import" (func $import)) (import "env" "import2" (func $import2 (result i32))) (import "env" "import3" (func $import3 (param i32))) @@ -14,7 +14,7 @@ (export "asyncify_stop_unwind" (func $asyncify_stop_unwind)) (export "asyncify_start_rewind" (func $asyncify_start_rewind)) (export "asyncify_stop_rewind" (func $asyncify_stop_rewind)) - (func $calls-import (; 3 ;) (type $f) + (func $calls-import (; 3 ;) (local $0 i32) (local.set $0 (global.get $__asyncify_state) @@ -33,7 +33,7 @@ (nop) ) ) - (func $calls-import2-drop (; 4 ;) (type $f) + (func $calls-import2-drop (; 4 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -62,7 +62,7 @@ (nop) ) ) - (func $returns (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $returns (; 5 ;) (result i32) (local $x i32) (local $1 i32) (local $2 i32) @@ -109,7 +109,7 @@ ) ) ) - (func $calls-indirect (; 6 ;) (type $FUNCSIG$vi) (param $x i32) + (func $calls-indirect (; 6 ;) (param $x i32) (local $1 i32) (local $2 i32) (local.set $2 @@ -120,7 +120,7 @@ (local.get $x) ) (block - (call_indirect (type $f) + (call_indirect (type $none_=>_none) (local.get $1) ) (if -- cgit v1.2.3