aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Periods.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/Periods.scala')
-rw-r--r--src/dotty/tools/dotc/core/Periods.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/Periods.scala b/src/dotty/tools/dotc/core/Periods.scala
index 3a91b48cb..f524c8a99 100644
--- a/src/dotty/tools/dotc/core/Periods.scala
+++ b/src/dotty/tools/dotc/core/Periods.scala
@@ -11,17 +11,17 @@ abstract class Periods extends DotClass { self: Context =>
import Periods._
/** The current phase identifier */
- def phaseId = period.phaseId
+ def phaseId: Int = period.phaseId
/** The current run identifier */
- def runId = period.runId
+ def runId: Int = period.runId
/** Execute `op` at given period */
- def atPeriod[T](pd: Period)(op: Context => T) =
+ def atPeriod[T](pd: Period)(op: Context => T): T =
op(ctx.fresh.withPeriod(pd))
/** Execute `op` at given phase id */
- def atPhase[T](pid: PhaseId)(op: Context => T) =
+ def atPhase[T](pid: PhaseId)(op: Context => T): T =
op(ctx.fresh.withPhase(pid))
}
@@ -117,5 +117,5 @@ object Periods {
/** The number of bits needed to encode a phase identifier. */
final val PhaseWidth = 5
final val PhaseMask = (1 << PhaseWidth) - 1
-
+ final val MaxPossiblePhaseId = PhaseMask
} \ No newline at end of file