Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No unsafe gets from closures; parent may not be jitted.
This is a "fix" for #4235 in that it prevents closures from ever blindly reading closed-over variables that have not been initialized to nil. This may happen if the block jits independent of the method, in which case the method will continue to be run through null-checking interpreter logic, so the closure code cannot guarantee all values are non-null on first read. This is only a "fix" in quotes because it completely disables the fast path optimizaton for all non-method JIT. Note that I did add specialized "OrNil" paths to the generated DynamicScope subclasses, so that should at least inline to a field plus null check.
- Loading branch information
Showing
3 changed files
with
121 additions
and
8 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