;;; TOOL: wat2wasm
;;; FLAGS: --enable-exceptions -v
(module
  (import "c++" "except" (except $ex i32))
  (func (result i32)
    (try $try1 (result i32)
      (nop)
      (i32.const 7)
      (catch $ex
        (nop)
      )
      (catch_all
        (rethrow $try1)
      )
    )
  )
)
(;; 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 "Import" (2)
000000f: 02                                        ; section code
0000010: 00                                        ; section size (guess)
0000011: 01                                        ; num imports
; import header 0
0000012: 03                                        ; string length
0000013: 632b 2b                                  c++  ; import module name
0000016: 06                                        ; string length
0000017: 6578 6365 7074                           except  ; import field name
000001d: 04                                        ; import kind
000001e: 01                                        ; exception type count
000001f: 7f                                        ; i32
0000010: 0f                                        ; FIXUP section size
; section "Function" (3)
0000020: 03                                        ; section code
0000021: 00                                        ; section size (guess)
0000022: 01                                        ; num functions
0000023: 00                                        ; function 0 signature index
0000021: 02                                        ; FIXUP section size
; section "Code" (10)
0000024: 0a                                        ; section code
0000025: 00                                        ; section size (guess)
0000026: 01                                        ; num functions
; function body 0
0000027: 00                                        ; func body size (guess)
0000028: 00                                        ; local decl count
0000029: 06                                        ; try
000002a: 7f                                        ; i32
000002b: 01                                        ; nop
000002c: 41                                        ; i32.const
000002d: 07                                        ; i32 literal
000002e: 07                                        ; catch
000002f: 00                                        ; catch exception
0000030: 01                                        ; nop
0000031: 0a                                        ; catch_all
0000032: 09                                        ; rethrow
0000033: 00                                        ; rethrow depth
0000034: 0b                                        ; end
0000035: 0b                                        ; end
0000027: 0e                                        ; FIXUP func body size
0000025: 10                                        ; FIXUP section size
;;; STDOUT ;;)
