-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Wasm Exceptions] Fix binary parsing of a normal break to a try in a …
…singleton (#3581) The fix here is to remove the code with // maybe we don't need a block here? That would remove a try's block if we thought it wasn't needed. However, it just checked for exception branches, but not normal branches, which are also possible. At that location, we don't have a good way to find out if the block has other branches to it aside from scanning its contents. So this PR just gives up on doing so, which means we add an unnecessary block if the optimizer is not run. If this matters we could make the binary parser more complicated by remembering whether a block had branches in the past, but I'm not sure if it's worth it.
- Loading branch information
Showing
7 changed files
with
55 additions
and
27 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
Binary file not shown.
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,20 @@ | ||
(module | ||
(type $none_=>_none (func)) | ||
(type $i32_=>_none (func (param i32))) | ||
(event $event$0 (attr 0) (param i32)) | ||
(func $0 | ||
(try $label$3 | ||
(do | ||
(block $label$1 | ||
(br $label$1) | ||
) | ||
) | ||
(catch $event$0 | ||
(drop | ||
(pop i32) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
|
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 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 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 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