Skip to content

Commit 0cb26ef

Browse files
committed
Make atPhase inline
1 parent fd9a3d5 commit 0cb26ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/core/Periods.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class Periods { thisCtx: Context =>
2121
op(thisCtx.fresh.setPeriod(pd))
2222

2323
/** Execute `op` at given phase id */
24-
def atPhase[T](pid: PhaseId)(op: Context ?=> T): T =
24+
inline def atPhase[T](pid: PhaseId)(inline op: Context ?=> T): T =
2525
op(using thisCtx.withPhase(pid))
2626

2727
/** The period containing the current period where denotations do not change.

compiler/src/dotty/tools/dotc/core/Phases.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ trait Phases {
3131
}
3232

3333
/** Execute `op` at given phase */
34-
def atPhase[T](phase: Phase)(op: Context ?=> T): T =
34+
inline def atPhase[T](phase: Phase)(inline op: Context ?=> T): T =
3535
atPhase(phase.id)(op)
3636

3737
def atNextPhase[T](op: Context ?=> T): T = atPhase(phase.next)(op)

0 commit comments

Comments
 (0)