forked from gopherjs/gopherjs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect potentially blocking return statements and correctly resume.
Fixes gopherjs#603. The fix consists of two parts: 1. If a function has a deferred call, we assume that call might be blocking and therefore return statements in the function may behave like a blocking call even though the returned expression may not be blocking itself. 2. When generating code for return statements that were marked as blocking we add a resumption point to make sure that before resuming the deferred function we re-return the correct value.
- Loading branch information
1 parent
df720d6
commit dbafb8b
Showing
3 changed files
with
65 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