diff options
author | Alon Zakai <azakai@google.com> | 2021-03-04 20:31:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-04 12:31:58 -0800 |
commit | 2bd5f60769506479316811da2b07913d0412abe0 (patch) | |
tree | 1477b7adda76385f219736946cf89c20307a289e /test/reference-types.wast.fromBinary.noDebugInfo | |
parent | ecd05546466494973fcc196a6661e0d5dfff6aa1 (diff) | |
download | binaryen-2bd5f60769506479316811da2b07913d0412abe0.tar.gz binaryen-2bd5f60769506479316811da2b07913d0412abe0.tar.bz2 binaryen-2bd5f60769506479316811da2b07913d0412abe0.zip |
Emit "elem declare" for functions that need it (#3653)
This adds support for reading (elem declare func $foo .. in the text and
binary formats. We can simply ignore it: we don't need to represent it in
IR, rather we find what needs to be declared when writing. That part takes
a little more work, for which this adds a shared helper function.
Diffstat (limited to 'test/reference-types.wast.fromBinary.noDebugInfo')
-rw-r--r-- | test/reference-types.wast.fromBinary.noDebugInfo | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/reference-types.wast.fromBinary.noDebugInfo b/test/reference-types.wast.fromBinary.noDebugInfo index 9613c300b..970037571 100644 --- a/test/reference-types.wast.fromBinary.noDebugInfo +++ b/test/reference-types.wast.fromBinary.noDebugInfo @@ -3,15 +3,16 @@ (type $anyref_=>_none (func (param anyref))) (type $funcref_=>_none (func (param funcref))) (type $none_=>_funcref (func (result funcref))) + (type $none_=>_none (func)) (type $externref_=>_none (func (param externref))) (type $none_=>_externref (func (result externref))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $externref_=>_funcref (func (param externref) (result funcref))) (import "env" "import_global" (global $gimport$0 externref)) (import "env" "import_func" (func $fimport$0 (param externref) (result funcref))) (table $0 3 3 funcref) (elem (i32.const 0) $0 $1 $2) + (elem declare func $27 $3) (global $global$0 (mut externref) (ref.null extern)) (global $global$1 (mut funcref) (ref.null func)) (global $global$2 (mut funcref) (ref.func $3)) @@ -725,5 +726,13 @@ (local.get $1) ) ) + (func $26 + (drop + (ref.func $27) + ) + ) + (func $27 + (nop) + ) ) |