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 /src/binary-reader-logging.cc | |
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 'src/binary-reader-logging.cc')
-rw-r--r-- | src/binary-reader-logging.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/binary-reader-logging.cc b/src/binary-reader-logging.cc index 8090c95b..2c2d1e7f 100644 --- a/src/binary-reader-logging.cc +++ b/src/binary-reader-logging.cc @@ -790,13 +790,13 @@ DEFINE_LOAD_STORE_OPCODE(OnAtomicStoreExpr); DEFINE_LOAD_STORE_OPCODE(OnAtomicWaitExpr); DEFINE_INDEX_DESC(OnAtomicFenceExpr, "consistency_model"); DEFINE_LOAD_STORE_OPCODE(OnAtomicNotifyExpr); -DEFINE_INDEX_INDEX(OnBrOnExnExpr, "depth", "event_index"); DEFINE_OPCODE(OnBinaryExpr) DEFINE_INDEX_DESC(OnCallExpr, "func_index") DEFINE_INDEX_INDEX(OnCallIndirectExpr, "sig_index", "table_index") -DEFINE0(OnCatchExpr); +DEFINE_INDEX_DESC(OnCatchExpr, "event_index"); DEFINE_OPCODE(OnCompareExpr) DEFINE_OPCODE(OnConvertExpr) +DEFINE_INDEX_DESC(OnDelegateExpr, "depth"); DEFINE0(OnDropExpr) DEFINE0(OnElseExpr) DEFINE0(OnEndExpr) @@ -824,7 +824,7 @@ DEFINE_INDEX(OnRefFuncExpr) DEFINE_TYPE(OnRefNullExpr) DEFINE0(OnRefIsNullExpr) DEFINE0(OnNopExpr) -DEFINE0(OnRethrowExpr); +DEFINE_INDEX_DESC(OnRethrowExpr, "depth"); DEFINE_INDEX_DESC(OnReturnCallExpr, "func_index") DEFINE_INDEX_INDEX(OnReturnCallIndirectExpr, "sig_index", "table_index") @@ -833,6 +833,7 @@ DEFINE_LOAD_STORE_OPCODE(OnLoadSplatExpr); DEFINE_LOAD_STORE_OPCODE(OnStoreExpr); DEFINE_INDEX_DESC(OnThrowExpr, "event_index") DEFINE0(OnUnreachableExpr) +DEFINE0(OnUnwindExpr) DEFINE_OPCODE(OnUnaryExpr) DEFINE_OPCODE(OnTernaryExpr) DEFINE_END(EndCodeSection) |