;;; TOOL: wat2wasm ;;; FLAGS: --enable-exceptions -v (module (except $ex i32) (export "except" (except $ex)) (func (result i32) (i32.const 7) (throw $ex) ) ) (;; 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: 01 ; num results 000000e: 7f ; i32 0000009: 05 ; 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 "Export" (7) 0000013: 07 ; section code 0000014: 00 ; section size (guess) 0000015: 01 ; num exports 0000016: 06 ; string length 0000017: 6578 6365 7074 except ; export name 000001d: 04 ; export kind 000001e: 00 ; export exception index 0000014: 0a ; FIXUP section size ; section "exception" 000001f: 00 ; custom section code 0000020: 00 ; section size (guess) 0000021: 09 ; string length 0000022: 6578 6365 7074 696f 6e exception ; custom section name 000002b: 01 ; exception count 000002c: 01 ; exception type count 000002d: 7f ; i32 0000020: 0d ; FIXUP section size ; section "Code" (10) 000002e: 0a ; section code 000002f: 00 ; section size (guess) 0000030: 01 ; num functions ; function body 0 0000031: 00 ; func body size (guess) 0000032: 00 ; local decl count 0000033: 41 ; i32.const 0000034: 07 ; i32 literal 0000035: 08 ; throw 0000036: 00 ; throw exception 0000037: 0b ; end 0000031: 06 ; FIXUP func body size 000002f: 08 ; FIXUP section size ;;; STDOUT ;;)