diff options
author | Ben Smith <binjimin@gmail.com> | 2018-03-02 17:48:10 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-02 17:48:10 -0800 |
commit | c0e3c8ae30236582060dfa830bf405b209d9e149 (patch) | |
tree | b0723ece60bf89f31c2a19701465e9af19e9f6f3 /test/dump/try.txt | |
parent | 2c591c592b5e1480e4d69093dd051348c1ec5f0e (diff) | |
download | wabt-c0e3c8ae30236582060dfa830bf405b209d9e149.tar.gz wabt-c0e3c8ae30236582060dfa830bf405b209d9e149.tar.bz2 wabt-c0e3c8ae30236582060dfa830bf405b209d9e149.zip |
WIP on support for level1 exception spec (#773)
Implemented:
* Parsing `try`, `if_except`, `throw`, `rethrow`
* Validation
* Binary and text output
Still missing:
* `except_ref` for locals
* Interpreter implementation
Diffstat (limited to 'test/dump/try.txt')
-rw-r--r-- | test/dump/try.txt | 105 |
1 files changed, 41 insertions, 64 deletions
diff --git a/test/dump/try.txt b/test/dump/try.txt index aadda90b..4404157f 100644 --- a/test/dump/try.txt +++ b/test/dump/try.txt @@ -1,19 +1,15 @@ ;;; TOOL: run-objdump ;;; ARGS0: -v --enable-exceptions -;;; ARGS1: --headers (module - (except $ex i32) - (func (result i32) + (func try $try1 (result i32) nop i32.const 7 - catch $ex - nop - catch_all - rethrow $try1 + catch + drop + i32.const 8 end - ) -) + drop)) (;; STDOUT ;;; 0000000: 0061 736d ; WASM_BINARY_MAGIC 0000004: 0100 0000 ; WASM_BINARY_VERSION @@ -24,67 +20,48 @@ ; type 0 000000b: 60 ; func 000000c: 00 ; num params -000000d: 01 ; num results -000000e: 7f ; i32 -0000009: 05 ; FIXUP section size +000000d: 00 ; num results +0000009: 04 ; FIXUP section size ; section "Function" (3) -000000f: 03 ; section code -0000010: 00 ; section size (guess) -0000011: 01 ; num functions -0000012: 00 ; function 0 signature index -0000010: 02 ; FIXUP section size -; section "exception" -0000013: 00 ; section code -0000014: 00 ; section size (guess) -0000015: 09 ; string length -0000016: 6578 6365 7074 696f 6e exception ; custom section name -000001f: 01 ; exception count -0000020: 01 ; exception type count -0000021: 7f ; i32 -0000014: 0d ; FIXUP section size +000000e: 03 ; section code +000000f: 00 ; section size (guess) +0000010: 01 ; num functions +0000011: 00 ; function 0 signature index +000000f: 02 ; FIXUP section size ; section "Code" (10) -0000022: 0a ; section code -0000023: 00 ; section size (guess) -0000024: 01 ; num functions +0000012: 0a ; section code +0000013: 00 ; section size (guess) +0000014: 01 ; num functions ; function body 0 -0000025: 00 ; func body size (guess) -0000026: 00 ; local decl count -0000027: 06 ; try -0000028: 7f ; i32 -0000029: 01 ; nop -000002a: 41 ; i32.const -000002b: 07 ; i32 literal -000002c: 07 ; catch -000002d: 00 ; catch exception -000002e: 01 ; nop -000002f: 0a ; catch_all -0000030: 09 ; rethrow -0000031: 00 ; rethrow depth -0000032: 0b ; end -0000033: 0b ; end -0000025: 0e ; FIXUP func body size -0000023: 10 ; FIXUP section size +0000015: 00 ; func body size (guess) +0000016: 00 ; local decl count +0000017: 06 ; try +0000018: 7f ; i32 +0000019: 01 ; nop +000001a: 41 ; i32.const +000001b: 07 ; i32 literal +000001c: 07 ; catch +000001d: 1a ; drop +000001e: 41 ; i32.const +000001f: 08 ; i32 literal +0000020: 0b ; end +0000021: 1a ; drop +0000022: 0b ; end +0000015: 0d ; FIXUP func body size +0000013: 0f ; FIXUP section size try.wasm: file format wasm 0x1 -Sections: - - Type start=0x0000000a end=0x0000000f (size=0x00000005) count: 1 - Function start=0x00000011 end=0x00000013 (size=0x00000002) count: 1 - Custom start=0x00000015 end=0x00000022 (size=0x0000000d) "exception" -count: 1 - Code start=0x00000024 end=0x00000034 (size=0x00000010) count: 1 - Code Disassembly: -000025 func[0]: - 000027: 06 7f | try i32 - 000029: 01 | nop - 00002a: 41 07 | i32.const 7 - 00002c: 07 00 | catch 0 - 00002e: 01 | nop - 00002f: 0a | catch_all - 000030: 09 00 | rethrow 0 - 000032: 0b | end - 000033: 0b | end +000015 func[0]: + 000017: 06 7f | try i32 + 000019: 01 | nop + 00001a: 41 07 | i32.const 7 + 00001c: 07 | catch + 00001d: 1a | drop + 00001e: 41 08 | i32.const 8 + 000020: 0b | end + 000021: 1a | drop + 000022: 0b | end ;;; STDOUT ;;) |