Skip to content

Commit 8f80923

Browse files
committed
Rename miniphase
Don't mention ImplClasses in the name since they do not exist in the scheme for 2.12.
1 parent 2e4d159 commit 8f80923

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/Compiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Compiler {
9494
new FunctionalInterfaces, // Rewrites closures to implement @specialized types of Functions.
9595
new GetClass, // Rewrites getClass calls on primitive types.
9696
new Simplify), // Perform local optimizations, simplified versions of what linker does.
97-
List(new LinkScala2ImplClasses, // Forward calls to the implementation classes of traits defined by Scala 2.11
97+
List(new LinkScala2Impls, // Redirect calls to trait methods defined by Scala 2.x, so that they now go to their implementations
9898
new LambdaLift, // Lifts out nested functions to class scope, storing free variables in environments
9999
// Note: in this mini-phase block scopes are incorrect. No phases that rely on scopes should be here
100100
new ElimStaticThis, // Replace `this` references to static objects by global identifiers

compiler/src/dotty/tools/dotc/transform/LinkScala2ImplClasses.scala renamed to compiler/src/dotty/tools/dotc/transform/LinkScala2Impls.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import collection.mutable
3434
*
3535
* where f is a static member of M.
3636
*/
37-
class LinkScala2ImplClasses extends MiniPhase with IdentityDenotTransformer { thisTransform =>
37+
class LinkScala2Impls extends MiniPhase with IdentityDenotTransformer { thisTransform =>
3838
import ast.tpd._
3939

4040
override def phaseName: String = "linkScala2ImplClasses"
@@ -46,7 +46,7 @@ class LinkScala2ImplClasses extends MiniPhase with IdentityDenotTransformer { th
4646
// that's why it is runsAfterGroupOf
4747

4848
class Transform extends TreeTransform {
49-
def phase = thisTransform
49+
def phase = LinkScala2Impls
5050

5151
/** Copy definitions from implementation class to trait itself */
5252
private def augmentScala_2_12_Trait(mixin: ClassSymbol)(implicit ctx: Context): Unit = {
@@ -55,7 +55,7 @@ class LinkScala2ImplClasses extends MiniPhase with IdentityDenotTransformer { th
5555
name = if (sym.isConstructor) sym.name else ImplMethName(sym.name)
5656
)
5757
for (sym <- mixin.implClass.info.decls)
58-
newImpl(sym.asTerm).enteredAfter(thisTransform)
58+
newImpl(sym.asTerm).enteredAfter(LinkScala2Impls)
5959
}
6060

6161
override def prepareForTemplate(impl: Template)(implicit ctx: Context) = {

0 commit comments

Comments
 (0)