diff options
author | Ben Smith <binjimin@gmail.com> | 2018-06-14 15:16:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-14 15:16:43 -0700 |
commit | d23c99d036ab31f7de21bc4a90b651c4cfd4a356 (patch) | |
tree | 7e352f593a161accef670ad0553a8aa6257d4364 /test/dump/func-result-multi.txt | |
parent | ace6f17fae2ae6511e1c676217d76143ddf0f23d (diff) | |
download | wabt-d23c99d036ab31f7de21bc4a90b651c4cfd4a356.tar.gz wabt-d23c99d036ab31f7de21bc4a90b651c4cfd4a356.tar.bz2 wabt-d23c99d036ab31f7de21bc4a90b651c4cfd4a356.zip |
Add support for multi-value proposal (#861)
Use the `--enable-multi-value` flag to enable.
A lot of code already "worked" with multi-value, and just needed to
remove the restrictions. Most of the other changes are modifying the
callback APIs to be more general, e.g. taking more than 1 result type.
* Types are now stored as the negative values; this works nicely with
the encoding of inline function types (used for block signatures),
which are always positive values.
* Remove `BlockSignature` and use `BlockDeclaration` instead, which
is just a typedef to `FuncSignature`. This allows for explicit or
implicit type specifications on the block signatures.
* Allow for >1 "keep" values in the DropKeep interpreter instruction
Diffstat (limited to 'test/dump/func-result-multi.txt')
-rw-r--r-- | test/dump/func-result-multi.txt | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test/dump/func-result-multi.txt b/test/dump/func-result-multi.txt new file mode 100644 index 00000000..ba246b42 --- /dev/null +++ b/test/dump/func-result-multi.txt @@ -0,0 +1,50 @@ +;;; TOOL: run-objdump +;;; ARGS0: -v --enable-multi-value +(module + (func (result i32 i64) + i32.const 0 + i64.const 0)) +(;; STDOUT ;;; +0000000: 0061 736d ; WASM_BINARY_MAGIC +0000004: 0100 0000 ; WASM_BINARY_VERSION +; section "Type" (1) +0000008: 01 ; section code +0000009: 00 ; section size (guess) +000000a: 01 ; num types +; type 0 +000000b: 60 ; func +000000c: 00 ; num params +000000d: 02 ; num results +000000e: 7f ; i32 +000000f: 7e ; i64 +0000009: 06 ; FIXUP section size +; section "Function" (3) +0000010: 03 ; section code +0000011: 00 ; section size (guess) +0000012: 01 ; num functions +0000013: 00 ; function 0 signature index +0000011: 02 ; FIXUP section size +; section "Code" (10) +0000014: 0a ; section code +0000015: 00 ; section size (guess) +0000016: 01 ; num functions +; function body 0 +0000017: 00 ; func body size (guess) +0000018: 00 ; local decl count +0000019: 41 ; i32.const +000001a: 00 ; i32 literal +000001b: 42 ; i64.const +000001c: 00 ; i64 literal +000001d: 0b ; end +0000017: 06 ; FIXUP func body size +0000015: 08 ; FIXUP section size + +func-result-multi.wasm: file format wasm 0x1 + +Code Disassembly: + +000017 func[0]: + 000019: 41 00 | i32.const 0 + 00001b: 42 00 | i64.const 0 + 00001d: 0b | end +;;; STDOUT ;;) |