-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix delegate validation to allow any block target (#1748)
This PR makes wabt's validation behavior for `try-delegate` match the spec and spec interpreter. The spec now allows the delegate to target any block, rather than just `try` blocks and the function body block. The semantics was changed a bit ago as discussed in WebAssembly/exception-handling#176
- Loading branch information
Showing
3 changed files
with
38 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
;;; TOOL: wat2wasm | ||
;;; ARGS: --enable-exceptions | ||
(module | ||
(tag $e) | ||
(func | ||
try $l | ||
try | ||
delegate $l | ||
catch $e | ||
end) | ||
|
||
(func | ||
try $l | ||
try | ||
try | ||
delegate $l | ||
catch $e | ||
end | ||
catch $e | ||
end) | ||
|
||
(func | ||
block $l | ||
try | ||
delegate $l | ||
end) | ||
|
||
(func | ||
try $l | ||
catch_all | ||
try | ||
delegate $l | ||
end) | ||
|
||
(func | ||
try | ||
delegate 0) | ||
) |