-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Split Compiler.phases into smaller logical groups #3671
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
Split Compiler.phases into smaller logical groups #3671
Conversation
new LambdaLift, // Lifts out nested functions to class scope, storing free variables in environments | ||
frontendPhases ::: picklerPhases ::: transformPhases ::: backendPhases | ||
|
||
/** Phases dealing with the the frontend up to trees ready for TASTY pickling */ |
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.
typo: the the
List(new LinkAll) :: // Reload compilation units from TASTY for library code (if needed) | ||
Nil | ||
|
||
/** Phases dealing transforming from pickled trees to backend trees */ |
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.
"dealing transforming" is not correct grammar
protected def transformPhases: List[List[Phase]] = | ||
List(new FirstTransform, // Some transformations to put trees into a canonical form | ||
new CheckReentrant, // Internal use only: Check that compiled program has no data races involving global vars | ||
new ElimJavaPackages) :: // Eliminate syntactic references to Java packages |
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.
Why use ::
instead of List(List(...), ...)
?
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.
I personally prefer List(List(...), ...)
😄
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.
I thought it would make a better distinction between micro and macro phases and it is a little bit more efficient.
10aa8cb
to
0fe84d4
Compare
0fe84d4
to
d732ae4
Compare
Rebased after addition of |
This change aims to simplify overriding of
phases
in classes that extendCompiler
. It also splits the macro phases into groups that share a same logical purpose.