Improve IR and JVM AOT support#9380
Draft
headius wants to merge 1 commit into
Draft
Conversation
This is part of making IRScope better at detecting when full AOT compilation is possible. In this case, not all child scopes of a script would get scanned if only closures were included, so I expand that scan to all lexically-contained scopes.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While exploring more AOT use cases, specifically for Project Leyden AOTCache support, I ran into several code forms that appear to be causing AOT-compiled JVM bytecode to fail at boot with a null scope. I originally suspected bad eval detection, which should be improved by the first commit in this PR, but other cases soon surfaced. This PR will eventually improve the coverage of the following scenarios:
jrubyc. I do not know of current issues here, but recent bug JRuby 9.4.8.0 AOT: compiled .class silently drops Hash#select! mutations inside Hash#each — no error, wrong result #9378 is a strong candidate.