diff options
author | Asumu Takikawa <asumu@igalia.com> | 2021-02-09 12:12:01 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-10 05:12:01 +0900 |
commit | 036a632a24679062e7fc891e7743195139bfa0a9 (patch) | |
tree | 6e639f32f3d4d1dee55280709cc5607153e3002f /test/binary | |
parent | 09ac53e41d959ce8e14e703e627327971e67f6d3 (diff) | |
download | wabt-036a632a24679062e7fc891e7743195139bfa0a9.tar.gz wabt-036a632a24679062e7fc891e7743195139bfa0a9.tar.bz2 wabt-036a632a24679062e7fc891e7743195139bfa0a9.zip |
Update exception handling support to current proposal (#1596)
This PR updates the support of exception handling to the latest proposal (that is compatible with future 2-phase exception handling) described in https://github.com/WebAssembly/exception-handling/pull/137 and https://github.com/WebAssembly/exception-handling/pull/143.
* Adds back tagged `catch $e`, `catch_all`, and `rethrow N` from a previous version of wabt, but with updates to match the current spec (e.g., `catch_all` shares an opcode with `else`, `rethrow`'s depth indexes only catch blocks, etc).
* Adds `unwind` and `delegate` instructions.
* Removes `exnref` and `br_on_exn`.
* Updates relevant tests.
There are some details that could still change (e.g., maybe how `delegate`'s depth is validated), but I'd be happy to submit further PRs if the spec details change.
Diffstat (limited to 'test/binary')
-rw-r--r-- | test/binary/bad-multiple-catch-all.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/binary/bad-multiple-catch-all.txt b/test/binary/bad-multiple-catch-all.txt new file mode 100644 index 00000000..5951e0ae --- /dev/null +++ b/test/binary/bad-multiple-catch-all.txt @@ -0,0 +1,23 @@ +;;; TOOL: run-gen-wasm-bad +;;; ARGS1: --enable-exceptions +;;; ARGS2: --enable-exceptions +magic +version +section(TYPE) { count[1] function params[0] results[0] } +section(FUNCTION) { count[1] type[0] } +section(CODE) { + count[1] + func { + locals[0] + try 0 + catch_all + catch_all + end + } +} +(;; STDERR ;;; +error: only one catch_all allowed in try block +000001b: error: OnElseExpr callback failed +error: only one catch_all allowed in try block +000001b: error: OnElseExpr callback failed +;;; STDERR ;;) |