Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nested runloops leaving call stack in confused state
Certain actions (like return) unwind the call stack to the next record representing a call frame. When returning from a nested runloop (e.g. a NativeCall callback) however, we must only unwind the records added by the code running in the nested runloop. Otherwise we can end up unwinding records that are still needed by a currently running dispatch in the outer runloop. To fix this We add a new kind of callstack record representing the boundary of a nested runloop and holding a reference to the outer frame (because return needs to know the frame to return to). Also make sure that the outer frame's return type and reference to the register into which to write the return value are restored fully.
- Loading branch information
Showing
3 changed files
with
58 additions
and
15 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