Сoncrete values for enums#19
Merged
Merged
Conversation
e677199 to
689f701
Compare
CaelmBleidd
requested changes
May 25, 2022
CaelmBleidd
left a comment
Member
There was a problem hiding this comment.
Add a design doc for concrete processing of enum's clinit sections
f5aa849 to
bf8e294
Compare
CaelmBleidd
approved these changes
May 26, 2022
9f89429 to
3bd2859
Compare
2828472 to
6e9d74b
Compare
added 7 commits
May 29, 2022 19:43
6e9d74b to
ce6c64f
Compare
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.
Closes #18, closes #32
To increase the performance of symbolic analysis for source code that uses enums, we can extract these enums concretely from runtime instead of enum's initializers analysis which can require a lot of time for enums with a lot of constants (because enum's static initializer fills fields for every enum constant, creates
$VALUESarray, invokesjava.lang.Enuminitializer for every constant, etc).But very important thing is that we cannot process concretely every enum but only isolated - enums that do not affect the system state (like other classes' statics) in their initializers and do not use external statics to initialize its own statics. To prevent concrete processing of enum that is not isolated, we need to traverse its static initializer and check that it does not initialize external statics and does not use external statics to initialize its own statics.