-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup OpalCompiler & CompilationContext #13423
Merged
MarcusDenker
merged 8 commits into
pharo-project:Pharo12
from
privat:compiler-context-cleanup
Apr 18, 2023
Merged
Cleanup OpalCompiler & CompilationContext #13423
MarcusDenker
merged 8 commits into
pharo-project:Pharo12
from
privat:compiler-context-cleanup
Apr 18, 2023
Conversation
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
jecisc
approved these changes
Apr 13, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code seems way nicer
78 tasks
Sweet! I love that. |
The formatter seems impacted by those changes:
|
jecisc
added
the
Status: Need more work
The issue is nearly ready. Waiting some last bits.
label
Apr 13, 2023
privat
force-pushed
the
compiler-context-cleanup
branch
from
April 14, 2023 12:47
c74dce6
to
9c6ae3c
Compare
privat
added
Status: Tests passed please review!
and removed
Status: Need more work
The issue is nearly ready. Waiting some last bits.
labels
Apr 14, 2023
I rebased the PR to let plugins in place. For some reason is breaks FFI on the CI but not on my machine. Tests are now ok (beside #13446) |
jecisc
added
Status: Reviewed and Ready to Integrate
and removed
Status: Tests passed please review!
labels
Apr 15, 2023
jecisc
approved these changes
Apr 15, 2023
MarcusDenker
approved these changes
Apr 18, 2023
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.
In the OpalCompiler ecosystem, cohesion was very low and coupling very high.
In order to pass around information (and worse, store it is some escaping objects like AST) between the various components, a god-dataclass (two smells in one!) called CompilationContext was used.
After a few weeks of intense cleaning, the cohesion is higher and coupling lower, and some data stored in CompilationContext is now used by only a single class: OpalCompiler. Therefore, the present PR move this data to the class that has the responsibility to use them.
Beside the increase of code quality, this has the advantage of reducing the memory footprint caused by escaping CompilationContext. (maybe it's not that much, it's hard to quantify).
What remain (for the moment) in CompilationContext are:
noPattern