File tree 2 files changed +3
-7
lines changed 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ import scala.reflect.io.VirtualFile
13
13
14
14
class Run (comp : Compiler )(implicit ctx : Context ) {
15
15
16
+ assert(comp.phases.last.last.id <= Periods .MaxPossiblePhaseId )
17
+ assert(ctx.runId <= Periods .MaxPossibleRunId )
18
+
16
19
var units : List [CompilationUnit ] = _
17
20
18
21
def getSource (fileName : String ): SourceFile = {
Original file line number Diff line number Diff line change @@ -120,23 +120,16 @@ object Periods {
120
120
121
121
/** The single-phase period consisting of given run id and phase id */
122
122
def apply (rid : RunId , pid : PhaseId ): Period = {
123
- assert(rid <= MaxPossibleRunId )
124
- assert(pid <= MaxPossiblePhaseId )
125
123
new Period (((rid << PhaseWidth ) | pid) << PhaseWidth )
126
124
}
127
125
128
126
/** The period consisting of given run id, and lo/hi phase ids */
129
127
def apply (rid : RunId , loPid : PhaseId , hiPid : PhaseId ): Period = {
130
- assert(rid <= MaxPossibleRunId )
131
- assert(loPid <= MaxPossiblePhaseId )
132
- assert(hiPid <= MaxPossiblePhaseId )
133
-
134
128
new Period (((rid << PhaseWidth ) | hiPid) << PhaseWidth | (hiPid - loPid))
135
129
}
136
130
137
131
/** The interval consisting of all periods of given run id */
138
132
def allInRun (rid : RunId ) = {
139
- assert(rid <= MaxPossibleRunId )
140
133
apply(rid, 0 , PhaseMask )
141
134
}
142
135
}
You can’t perform that action at this time.
0 commit comments