File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,14 @@ class Compiler {
108
108
new CollectSuperCalls , // Find classes that are called with super
109
109
new DropInlined , // Drop Inlined nodes, since backend has no use for them
110
110
new LabelDefs ), // Converts calls to labels to jumps
111
- List (new GenBCode ) // Generate JVM bytecode
111
+ List (checkedIdOverflow( new GenBCode )) // Generate JVM bytecode
112
112
)
113
113
114
+ private def checkedIdOverflow (phase : Phase ): Phase = {
115
+ assert(phase.id <= Periods .MaxPossiblePhaseId )
116
+ phase
117
+ }
118
+
114
119
var runId = 1
115
120
def nextRunId = {
116
121
runId += 1 ; runId
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import scala.util.control.NonFatal
24
24
/** A compiler run. Exports various methods to compile source files */
25
25
class Run (comp : Compiler )(implicit ctx : Context ) {
26
26
27
- assert(comp.phases.last.last.id <= Periods .MaxPossiblePhaseId )
28
27
assert(ctx.runId <= Periods .MaxPossibleRunId )
29
28
30
29
var units : List [CompilationUnit ] = _
You can’t perform that action at this time.
0 commit comments