@@ -37,7 +37,7 @@ list of sub-packages and their focus.
37
37
├── reporting // Reporting of error messages, warnings and other info.
38
38
├── rewrite // Helpers for rewriting Scala 2's constructs into dotty's.
39
39
├── transform // Miniphases and helpers for tree transformations.
40
- ├── typer //Type-checking and other frontend phases
40
+ ├── typer // Type-checking and other frontend phases
41
41
└── util // General purpose utility classes and modules.
42
42
```
43
43
@@ -93,7 +93,9 @@ phases. The current list of phases is specified in class [Compiler] as follows:
93
93
``` scala
94
94
def phases : List [List [Phase ]] = List (
95
95
List (new FrontEnd ), // Compiler frontend: scanner, parser, namer, typer
96
+ List (new sbt.ExtractDependencies ), // Sends information on classes' dependencies to sbt via callbacks
96
97
List (new PostTyper ), // Additional checks and cleanups after type checking
98
+ List (new sbt.ExtractAPI ), // Sends a representation of the API of classes to sbt via callbacks
97
99
List (new Pickler ), // Generate TASTY info
98
100
List (new FirstTransform , // Some transformations to put trees into a canonical form
99
101
new CheckReentrant ), // Internal use only: Check that compiled program has no data races involving global vars
@@ -106,18 +108,22 @@ phases. The current list of phases is specified in class [Compiler] as follows:
106
108
new TailRec , // Rewrite tail recursion to loops
107
109
new LiftTry , // Put try expressions that might execute on non-empty stacks into their own methods
108
110
new ClassOf ), // Expand `Predef.classOf` calls.
109
- List (new PatternMatcher , // Compile pattern matches
111
+ List (new TryCatchPatterns , // Compile cases in try/catch
112
+ new PatternMatcher , // Compile pattern matches
110
113
new ExplicitOuter , // Add accessors to outer classes from nested ones.
111
114
new ExplicitSelf , // Make references to non-trivial self types explicit as casts
115
+ new ShortcutImplicits , // Allow implicit functions without creating closures
112
116
new CrossCastAnd , // Normalize selections involving intersection types.
113
117
new Splitter ), // Expand selections involving union types into conditionals
114
118
List (new VCInlineMethods , // Inlines calls to value class methods
119
+ new IsInstanceOfEvaluator , // Issues warnings when unreachable statements are present in match/if expressions
115
120
new SeqLiterals , // Express vararg arguments as arrays
116
121
new InterceptedMethods , // Special handling of `==`, `|=`, `getClass` methods
117
122
new Getters , // Replace non-private vals and vars with getter defs (fields are added later)
118
123
new ElimByName , // Expand by-name parameters and arguments
119
124
new AugmentScala2Traits , // Expand traits defined in Scala 2.11 to simulate old-style rewritings
120
- new ResolveSuper ), // Implement super accessors and add forwarders to trait methods
125
+ new ResolveSuper , // Implement super accessors and add forwarders to trait methods
126
+ new ArrayConstructors ), // Intercept creation of (non-generic) arrays and intrinsify.
121
127
List (new Erasure ), // Rewrite types to JVM model, erasing all type parameters, abstract types and refinements.
122
128
List (new ElimErasedValueType , // Expand erased value types to their underlying implementation types
123
129
new VCElideAllocations , // Peep-hole optimization to eliminate unnecessary value class allocations
@@ -137,9 +143,12 @@ phases. The current list of phases is specified in class [Compiler] as follows:
137
143
new Flatten , // Lift all inner classes to package scope
138
144
new RestoreScopes ), // Repair scopes rendered invalid by moving definitions in prior phases of the group
139
145
List (new ExpandPrivate , // Widen private definitions accessed from nested classes
146
+ new SelectStatic , // get rid of selects that would be compiled into GetStatic
140
147
new CollectEntryPoints , // Find classes with main methods
148
+ new CollectSuperCalls , // Find classes that are called with super
149
+ new DropInlined , // Drop Inlined nodes, since backend has no use for them
150
+ new MoveStatics , // Move static methods to companion classes
141
151
new LabelDefs ), // Converts calls to labels to jumps
142
- List (new GenSJSIR ), // Generate .js code
143
152
List (new GenBCode ) // Generate JVM bytecode
144
153
)
145
154
```
@@ -180,10 +189,10 @@ Phases fall into four categories:
180
189
* Code generators: These map the transformed trees to Java classfiles or
181
190
Javascript files.
182
191
183
- [ dotty.tools ] : https://github.com/lampepfl/dotty/tree/master/src/dotty/tools
184
- [ dotc ] : https://github.com/lampepfl/dotty/tree/master/src/dotty/tools/dotc
185
- [ Main ] : https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/Main.scala
186
- [ Driver ] : https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/Driver.scala
187
- [ Compiler ] : https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/Compiler.scala
188
- [ Run ] : https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/Run.scala
189
- [ Context ] : https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/core/Contexts.scala
192
+ [ dotty.tools ] : https://github.com/lampepfl/dotty/tree/master/compiler/ src/dotty/tools
193
+ [ dotc ] : https://github.com/lampepfl/dotty/tree/master/compiler/ src/dotty/tools/dotc
194
+ [ Main ] : https://github.com/lampepfl/dotty/blob/master/compiler/ src/dotty/tools/dotc/Main.scala
195
+ [ Driver ] : https://github.com/lampepfl/dotty/blob/master/compiler/ src/dotty/tools/dotc/Driver.scala
196
+ [ Compiler ] : https://github.com/lampepfl/dotty/blob/master/compiler/ src/dotty/tools/dotc/Compiler.scala
197
+ [ Run ] : https://github.com/lampepfl/dotty/blob/master/compiler/ src/dotty/tools/dotc/Run.scala
198
+ [ Context ] : https://github.com/lampepfl/dotty/blob/master/compiler/ src/dotty/tools/dotc/core/Contexts.scala
0 commit comments