Skip to content

Commit 443867f

Browse files
Merge pull request #7765 from dotty-staging/rename-front
Rename "frontend" phase to "typer"
2 parents 6d3fe1d + 10b4abe commit 443867f

24 files changed

+48
-48
lines changed

compiler/src/dotty/tools/dotc/config/CompilerCommand.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ object CompilerCommand {
2323
| - (partial) phase names with an optional "+" suffix to include the next phase
2424
| - the string "all"
2525
| example: -Xprint:all prints all phases.
26-
| example: -Xprint:front,mixin prints the frontend and mixin phases.
26+
| example: -Xprint:typer,mixin prints the typer and mixin phases.
2727
| example: -Ylog:erasure+ logs the erasure phase and the phase after the erasure phase.
2828
| This is useful because during the tree transform of phase X, we often
2929
| already are in phase X + 1.

compiler/src/dotty/tools/dotc/typer/FrontEnd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,5 @@ class FrontEnd extends Phase {
136136
}
137137

138138
object FrontEnd {
139-
val name: String = "frontend"
139+
val name: String = "typer"
140140
}

compiler/src/dotty/tools/repl/ReplCompiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class ReplCompiler extends Compiler {
276276
val src = SourceFile.virtual("<typecheck>", expr)
277277
implicit val ctx: Context = state.context.fresh
278278
.setReporter(newStoreReporter)
279-
.setSetting(state.context.settings.YstopAfter, List("frontend"))
279+
.setSetting(state.context.settings.YstopAfter, List("typer"))
280280

281281
wrapped(expr, src, state).flatMap { pkg =>
282282
val unit = CompilationUnit(src)

compiler/test/dotc/comptest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ object comptest extends ParallelTesting {
2525
dotcDir + "tools/dotc/core/Types.scala",
2626
dotcDir + "tools/dotc/ast/Trees.scala"
2727
),
28-
TestFlags("", Array("-Ylog:frontend", "-Xprompt"))
28+
TestFlags("", Array("-Ylog:typer", "-Xprompt"))
2929
)(TestGroup("comptest"))
3030
}

compiler/test/dotty/tools/DottyTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ trait DottyTest extends ContextEscapeDetection {
7777
val dummyName = "x_x_x"
7878
val vals = typeStringss.flatten.zipWithIndex.map{case (s, x)=> s"val ${dummyName}$x: $s = ???"}.mkString("\n")
7979
val gatheredSource = s" ${source}\n object A$dummyName {$vals}"
80-
checkCompile("frontend", gatheredSource) {
80+
checkCompile("typer", gatheredSource) {
8181
(tree, context) =>
8282
implicit val ctx = context
8383
val findValDef: (List[tpd.ValDef], tpd.Tree) => List[tpd.ValDef] =

compiler/test/dotty/tools/DottyTypeStealer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ object DottyTypeStealer extends DottyTest {
1414
val gatheredSource = s" ${source}\n object A$dummyName {$vals}"
1515
var scontext : Context = null
1616
var tp: List[Type] = null
17-
checkCompile("frontend", gatheredSource) {
17+
checkCompile("typer", gatheredSource) {
1818
(tree, context) =>
1919
implicit val ctx = context
2020
val findValDef: (List[ValDef], tpd.Tree) => List[ValDef] =

compiler/test/dotty/tools/dotc/ast/AttachmentsTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AttachmentsTests extends DottyTest {
1616

1717
@Test
1818
def attachmentsAreNotCopiedOver: Unit = {
19-
checkCompile("frontend", "class A") {
19+
checkCompile("typer", "class A") {
2020
case (PackageDef(_, (clazz: tpd.TypeDef) :: Nil), context) =>
2121
assertTrue("Attachment shouldn't be present", clazz.getAttachment(TestKey).isEmpty)
2222

@@ -35,7 +35,7 @@ class AttachmentsTests extends DottyTest {
3535

3636
@Test
3737
def stickyAttachmentsAreCopiedOver: Unit = {
38-
checkCompile("frontend", "class A") {
38+
checkCompile("typer", "class A") {
3939
case (PackageDef(_, (clazz: tpd.TypeDef) :: Nil), context) =>
4040
assertTrue("Attachment shouldn't be present", clazz.getAttachment(StickyTestKey).isEmpty)
4141
assertTrue("Attachment shouldn't be present", clazz.getAttachment(StickyTestKey2).isEmpty)

compiler/test/dotty/tools/dotc/ast/DesugarTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DesugarTests extends DottyTest {
2222
}
2323

2424
@Test def caseClassHasCorrectMembers: Unit =
25-
checkCompile("frontend", "case class Foo(x: Int, y: String)") { (tree, context) =>
25+
checkCompile("typer", "case class Foo(x: Int, y: String)") { (tree, context) =>
2626
implicit val ctx = context
2727
val ccTree = tree.find(tree => tree.symbol.name == typeName("Foo")).get
2828
val List(_, foo) = defPath(ccTree.symbol, tree).map(_.symbol.info)
@@ -37,7 +37,7 @@ class DesugarTests extends DottyTest {
3737
}
3838

3939
@Test def caseClassCompanionHasCorrectMembers: Unit =
40-
checkCompile("frontend", "case class Foo(x: Int, y: String)") { (tree, context) =>
40+
checkCompile("typer", "case class Foo(x: Int, y: String)") { (tree, context) =>
4141
implicit val ctx = context
4242
val ccTree = tree.find(tree => tree.symbol.name == termName("Foo")).get
4343
val List(_, foo) = defPath(ccTree.symbol, tree).map(_.symbol.info)

compiler/test/dotty/tools/dotc/ast/TreeInfoTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class TreeInfoTest extends DottyTest {
1414
import tpd._
1515

1616
@Test
17-
def testDefPath: Unit = checkCompile("frontend", "class A { def bar = { val x = { val z = 0; 0} }} ") {
17+
def testDefPath: Unit = checkCompile("typer", "class A { def bar = { val x = { val z = 0; 0} }} ") {
1818
(tree, context) =>
1919
implicit val ctx = context
2020
val xTree = tree.find(tree => tree.symbol.name == termName("x")).get

compiler/test/dotty/tools/dotc/parsing/DocstringTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait DocstringTest extends DottyTest {
2525
}
2626

2727
def checkFrontend(source: String)(docAssert: PartialFunction[Tree[Untyped], Unit]): Unit = {
28-
checkCompile("frontend", source) { (_, ctx) =>
28+
checkCompile("typer", source) { (_, ctx) =>
2929
implicit val c: Context = ctx
3030
(docAssert orElse defaultAssertion)(ctx.compilationUnit.untpdTree)
3131
}

0 commit comments

Comments
 (0)