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 {
108108 new CollectSuperCalls , // Find classes that are called with super
109109 new DropInlined , // Drop Inlined nodes, since backend has no use for them
110110 new LabelDefs ), // Converts calls to labels to jumps
111- List (new GenBCode ) // Generate JVM bytecode
111+ List (checkedIdOverflow( new GenBCode )) // Generate JVM bytecode
112112 )
113113
114+ private def checkedIdOverflow (phase : Phase ): Phase = {
115+ assert(phase.id <= Periods .MaxPossiblePhaseId )
116+ phase
117+ }
118+
114119 var runId = 1
115120 def nextRunId = {
116121 runId += 1 ; runId
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import scala.util.control.NonFatal
2424/** A compiler run. Exports various methods to compile source files */
2525class Run (comp : Compiler )(implicit ctx : Context ) {
2626
27- assert(comp.phases.last.last.id <= Periods .MaxPossiblePhaseId )
2827 assert(ctx.runId <= Periods .MaxPossibleRunId )
2928
3029 var units : List [CompilationUnit ] = _
You can’t perform that action at this time.
0 commit comments