@@ -7,9 +7,9 @@ import typer.{TyperPhase, RefChecks}
77import parsing .Parser
88import Phases .Phase
99import transform ._
10- import dotty .tools .backend .jvm .{CollectSuperCalls , GenBCode }
1110import dotty .tools .backend
12- import dotty .tools .dotc .transform .localopt .StringInterpolatorOpt
11+ import backend .jvm .{CollectSuperCalls , GenBCode }
12+ import localopt .StringInterpolatorOpt
1313
1414/** The central class of the dotc compiler. The job of a compiler is to create
1515 * runs, which process given `phases` in a given `rootContext`.
@@ -67,23 +67,24 @@ class Compiler {
6767 new CheckLoopingImplicits , // Check that implicit defs do not call themselves in an infinite loop
6868 new BetaReduce , // Reduce closure applications
6969 new InlineVals , // Check right hand-sides of an `inline val`s
70- new ExpandSAMs ) :: // Expand single abstract method closures to anonymous classes
70+ new ExpandSAMs , // Expand single abstract method closures to anonymous classes
71+ new ElimRepeated , // Rewrite vararg parameters and arguments
72+ new RefChecks ) :: // Various checks mostly related to abstract members and overriding
7173 List (new init.Checker ) :: // Check initialization of objects
72- List (new ElimRepeated , // Rewrite vararg parameters and arguments
74+ List (new CrossVersionChecks , // Check issues related to deprecated and experimental
7375 new ProtectedAccessors , // Add accessors for protected members
7476 new ExtensionMethods , // Expand methods of value classes with extension methods
7577 new UncacheGivenAliases , // Avoid caching RHS of simple parameterless given aliases
76- new ByNameClosures , // Expand arguments to by-name parameters to closures
78+ new ElimByName , // Map by-name parameters to functions
7779 new HoistSuperArgs , // Hoist complex arguments of supercalls to enclosing scope
80+ new ForwardDepChecks , // Check that there are no forward references to local vals
7881 new SpecializeApplyMethods , // Adds specialized methods to FunctionN
79- new RefChecks , // Various checks mostly related to abstract members and overriding
8082 new TryCatchPatterns , // Compile cases in try/catch
8183 new PatternMatcher ) :: // Compile pattern matches
8284 List (new ElimOpaque , // Turn opaque into normal aliases
8385 new sjs.ExplicitJSClasses , // Make all JS classes explicit (Scala.js only)
8486 new ExplicitOuter , // Add accessors to outer classes from nested ones.
8587 new ExplicitSelf , // Make references to non-trivial self types explicit as casts
86- new ElimByName , // Expand by-name parameter references
8788 new StringInterpolatorOpt ) :: // Optimizes raw and s string interpolators by rewriting them to string concatenations
8889 List (new PruneErasedDefs , // Drop erased definitions from scopes and simplify erased expressions
8990 new UninitializedDefs , // Replaces `compiletime.uninitialized` by `_`
0 commit comments