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.
This PR implements naive effect forwarding: When generating code for `resume`, we ensure that when asked to handle an effect not considered by the `resume` instruction under consideration, we simply `suspend` and let our own parent handle the unknown effect. Once resuming from that we use a back edge to the code that invokes `resume` on the current fiber (i.e., after moving up in the handler chain to find a handler, we move down in the chain back to where the original `suspend` of the unknown effect happened). Payloads are handled as follows: 1. When moving "up", we don't need to consider payloads: They are stored in the "payload buffer" of the `VMContext` and left untouched while moving upwards in the handler chain until the right handler is found and accesses the data. 2. When moving down, we need to deal with the "tag return payloads" that were provided via `resume` or `cont.bind` further up in the chain. These payloads are stored in continuation objects directly. Before resuming into our own child, we thus swap the payload pointers of the current continuation object and the child.
- Loading branch information
1 parent
074fda3
commit 7825da3
Showing
16 changed files
with
572 additions
and
58 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
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
Oops, something went wrong.