-
Notifications
You must be signed in to change notification settings - Fork 327
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
Eliminate references to Truffle nodes & co. in the compiler #8172
Conversation
@@ -34,8 +34,6 @@ import org.enso.compiler.phase.{ | |||
ImportResolver | |||
} | |||
import org.enso.editions.LibraryName | |||
import org.enso.interpreter.node.{ExpressionNode => RuntimeExpression} | |||
import org.enso.interpreter.runtime.scope.ModuleScope |
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.
No more Node
and ModuleScope
referenced in the compiler.
import org.enso.interpreter.runtime.data.Type; | ||
import org.enso.interpreter.runtime.scope.LocalScope; | ||
import org.enso.interpreter.runtime.scope.ModuleScope; |
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.
No more scopes and ExpressionNode
in the CompilerContext
.
@@ -1,7 +1,8 @@ | |||
package org.enso.compiler.codegen | |||
package org.enso.interpreter.runtime |
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.
IrToTruffle
moves next to TruffleCompilerContext
implementation as it is runtime related - not compile (e.g. IR processing) time related activity.
With latest changes (8477a78b54) there are only few remaining references to interpreter in the IR compiler Scala package: Chances are that soon (in another PR) we might be able to create |
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.
LGTM
@@ -2228,4 +2275,13 @@ class IrToTruffle( | |||
) | |||
} | |||
} | |||
|
|||
private def asScope(module: CompilerContext.Module): ModuleScope = { |
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.
nit: as
suggests that we have some casting involved, get
or infer
would seem to suggest that we get the scope for the given module.
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.
some casting involved
In such case I have chosen the right name. There is casting hidden in fromCompilerModule
and it could fail if some non-TruffleCompilerContext.Module
is passed in.
Pull Request Description
Work on #6100 has resulted in additional cleanups & refactorings of the Enso
Compiler
&CompilerContext
abstraction.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,