diff options
author | Alon Zakai <azakai@google.com> | 2020-11-24 12:36:11 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-24 12:36:11 -0800 |
commit | 78ccc1976bac069ae65b2ec227e8c2c515a02801 (patch) | |
tree | b875343fa47a62a44db4370811080dc963a91233 /test/typed-function-references.wast.fromBinary.noDebugInfo | |
parent | cecff82aff317c3132f80a764dba163bcd852a78 (diff) | |
download | binaryen-78ccc1976bac069ae65b2ec227e8c2c515a02801.tar.gz binaryen-78ccc1976bac069ae65b2ec227e8c2c515a02801.tar.bz2 binaryen-78ccc1976bac069ae65b2ec227e8c2c515a02801.zip |
[TypedFunctionReferences] Implement call_ref (#3396)
Includes minimal support in various passes. Also includes actual optimization
work in Directize, which was easy to add.
Almost has fuzzer support, but the actual makeCallRef is just a stub so far.
Includes s-parser support for parsing typed function references types.
Diffstat (limited to 'test/typed-function-references.wast.fromBinary.noDebugInfo')
-rw-r--r-- | test/typed-function-references.wast.fromBinary.noDebugInfo | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/typed-function-references.wast.fromBinary.noDebugInfo b/test/typed-function-references.wast.fromBinary.noDebugInfo new file mode 100644 index 000000000..0808e0c52 --- /dev/null +++ b/test/typed-function-references.wast.fromBinary.noDebugInfo @@ -0,0 +1,46 @@ +(module + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $ref_null<i32_->_i32>_=>_i32 (func (param (ref null (func (param i32) (result i32)))) (result i32))) + (type $ref<i32_->_i32>_=>_i32 (func (param (ref (func (param i32) (result i32)))) (result i32))) + (func $0 + (call_ref + (ref.func $0) + ) + ) + (func $1 + (return_call_ref + (ref.func $0) + ) + ) + (func $2 (param $0 i32) (result i32) + (call_ref + (i32.const 42) + (ref.func $2) + ) + ) + (func $3 (param $0 (ref (func (param i32) (result i32)))) (result i32) + (call_ref + (i32.const 42) + (local.get $0) + ) + ) + (func $4 (param $0 (ref null (func (param i32) (result i32)))) (result i32) + (call_ref + (i32.const 42) + (local.get $0) + ) + ) + (func $5 (result i32) + (local $0 (ref null (func (param i32) (result i32)))) + (local.set $0 + (ref.func $2) + ) + (call_ref + (i32.const 42) + (local.get $0) + ) + ) +) + |