forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dedicated trap code for suspending with a unhandled tag (bytecodealli…
…ance#35) In the generated code for `resume`, we have a block that is branched to when none of the tags handled by the resume instruction under consideration handle the tag that we encountered. This block then contains the necessary logic to forward to the parent continuation. However, if no such parent exists, the current behaviour means that we re-suspend the unhandled tag, but now there is no handler at all. This means that the error for the case where we have active handlers, but none of them handle the `suspend`-ed tag is equivalent to the error shown when `suspend`-ing when there is no handler at all. This PR addresses an existing TODO: In the forwarding block, we check if there actually is a parent to forward to. If not, we now trap with a new, dedicated trap code to indicate that there is no matching handler. --------- Co-authored-by: Daniel Hillerström <daniel.hillerstrom@ed.ac.uk>
- Loading branch information
1 parent
65f7629
commit 82539bf
Showing
5 changed files
with
19 additions
and
3 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 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