@@ -677,7 +677,7 @@ object Types {
677
677
}
678
678
else
679
679
val joint = pdenot.meet(
680
- new JointRefDenotation (NoSymbol , rinfo, Period .allInRun(currentRunId ), pre),
680
+ new JointRefDenotation (NoSymbol , rinfo, Period .allInRun(ctx.runId ), pre),
681
681
pre,
682
682
safeIntersection = ctx.base.pendingMemberSearches.contains(name))
683
683
joint match
@@ -1914,7 +1914,7 @@ object Types {
1914
1914
* some symbols change their signature at erasure.
1915
1915
*/
1916
1916
private def currentSignature (using Context ): Signature =
1917
- if currentRunId == mySignatureRunId then mySignature
1917
+ if ctx.runId == mySignatureRunId then mySignature
1918
1918
else
1919
1919
val lastd = lastDenotation
1920
1920
if lastd != null then sigFromDenot(lastd)
@@ -1948,7 +1948,7 @@ object Types {
1948
1948
* current run.
1949
1949
*/
1950
1950
def denotationIsCurrent (using Context ): Boolean =
1951
- lastDenotation != null && lastDenotation.validFor.runId == currentRunId
1951
+ lastDenotation != null && lastDenotation.validFor.runId == ctx.runId
1952
1952
1953
1953
/** If the reference is symbolic or the denotation is current, its symbol, otherwise NoDenotation.
1954
1954
*
@@ -1969,7 +1969,7 @@ object Types {
1969
1969
* Used to get the class underlying a ThisType.
1970
1970
*/
1971
1971
private [Types ] def stableInRunSymbol (using Context ): Symbol =
1972
- if (checkedPeriod.runId == currentRunId ) lastSymbol
1972
+ if (checkedPeriod.runId == ctx.runId ) lastSymbol
1973
1973
else symbol
1974
1974
1975
1975
def info (using Context ): Type = denot.info
@@ -2008,7 +2008,7 @@ object Types {
2008
2008
finish(memberDenot(name, allowPrivate))
2009
2009
case sym : Symbol =>
2010
2010
val symd = sym.lastKnownDenotation
2011
- if (symd.validFor.runId != currentRunId && ! stillValid(symd))
2011
+ if (symd.validFor.runId != ctx.runId && ! stillValid(symd))
2012
2012
finish(memberDenot(symd.initial.name, allowPrivate = false ))
2013
2013
else if (prefix.isArgPrefixOf(symd))
2014
2014
finish(argDenot(sym.asType))
@@ -2021,7 +2021,7 @@ object Types {
2021
2021
lastDenotation match {
2022
2022
case lastd0 : SingleDenotation =>
2023
2023
val lastd = lastd0.skipRemoved
2024
- if (lastd.validFor.runId == currentRunId && (checkedPeriod != Nowhere )) finish(lastd.current)
2024
+ if (lastd.validFor.runId == ctx.runId && (checkedPeriod != Nowhere )) finish(lastd.current)
2025
2025
else lastd match {
2026
2026
case lastd : SymDenotation =>
2027
2027
if (stillValid(lastd) && (checkedPeriod != Nowhere )) finish(lastd.current)
@@ -2053,9 +2053,9 @@ object Types {
2053
2053
if (! d.exists && ! allowPrivate && ctx.mode.is(Mode .Interactive ))
2054
2054
// In the IDE we might change a public symbol to private, and would still expect to find it.
2055
2055
d = memberDenot(prefix, name, true )
2056
- if (! d.exists && currentPhaseId > FirstPhaseId && lastDenotation.isInstanceOf [SymDenotation ])
2056
+ if (! d.exists && ctx.phaseId > FirstPhaseId && lastDenotation.isInstanceOf [SymDenotation ])
2057
2057
// name has changed; try load in earlier phase and make current
2058
- d = atPhase(currentPhaseId - 1 )(memberDenot(name, allowPrivate)).current
2058
+ d = atPhase(ctx.phaseId - 1 )(memberDenot(name, allowPrivate)).current
2059
2059
if (d.isOverloaded)
2060
2060
d = disambiguate(d)
2061
2061
d
@@ -2155,7 +2155,7 @@ object Types {
2155
2155
s """ data race? overwriting $lastSymbol with $sym in type $this,
2156
2156
|last sym id = ${lastSymbol.id}, new sym id = ${sym.id},
2157
2157
|last owner = ${lastSymbol.owner}, new owner = ${sym.owner},
2158
- |period = ${currentPhase} at run ${currentRunId }""" )
2158
+ |period = ${currentPhase} at run ${ctx.runId }""" )
2159
2159
}
2160
2160
2161
2161
/** A reference with the initial symbol in `symd` has an info that
@@ -2980,12 +2980,12 @@ object Types {
2980
2980
private var myWidened : Type = _
2981
2981
2982
2982
private def ensureAtomsComputed ()(using Context ): Unit =
2983
- if atomsRunId != currentRunId then
2983
+ if atomsRunId != ctx.runId then
2984
2984
myAtoms = tp1.atoms | tp2.atoms
2985
2985
val tp1w = tp1.widenSingletons
2986
2986
val tp2w = tp2.widenSingletons
2987
2987
myWidened = if ((tp1 eq tp1w) && (tp2 eq tp2w)) this else tp1w | tp2w
2988
- atomsRunId = currentRunId
2988
+ atomsRunId = ctx.runId
2989
2989
2990
2990
override def atoms (using Context ): Atoms =
2991
2991
ensureAtomsComputed()
@@ -3070,9 +3070,9 @@ object Types {
3070
3070
protected [dotc] def computeSignature (using Context ): Signature
3071
3071
3072
3072
final override def signature (using Context ): Signature = {
3073
- if (currentRunId != mySignatureRunId) {
3073
+ if (ctx.runId != mySignatureRunId) {
3074
3074
mySignature = computeSignature
3075
- if (! mySignature.isUnderDefined) mySignatureRunId = currentRunId
3075
+ if (! mySignature.isUnderDefined) mySignatureRunId = ctx.runId
3076
3076
}
3077
3077
mySignature
3078
3078
}
@@ -4994,11 +4994,11 @@ object Types {
4994
4994
case tp : LazyRef =>
4995
4995
LazyRef {
4996
4996
val ref1 = tp.ref
4997
- if currentRunId == currentRunId( using mapCtx) then this (ref1)
4997
+ if ctx.runId == mapCtx.runId then this (ref1)
4998
4998
else // splice in new run into map context
4999
4999
val saved = mapCtx
5000
5000
mapCtx = mapCtx.fresh
5001
- .setPeriod(Period (currentRunId, currentPhaseId( using mapCtx) ))
5001
+ .setPeriod(Period (ctx.runId, mapCtx.phaseId ))
5002
5002
.setRun(ctx.run)
5003
5003
try this (ref1) finally mapCtx = saved
5004
5004
}
0 commit comments