@@ -862,7 +862,7 @@ object SymDenotations {
862
862
def membersNeedAsSeenFrom (pre : Type )(using Context ): Boolean =
863
863
! ( this .isTerm
864
864
|| this .isStaticOwner && ! this .seesOpaques
865
- || currentlyAfterErasure
865
+ || ctx.erasedTypes
866
866
|| (pre eq NoPrefix )
867
867
|| (pre eq thisType)
868
868
)
@@ -875,7 +875,7 @@ object SymDenotations {
875
875
* Default parameters are recognized until erasure.
876
876
*/
877
877
def hasDefaultParams (using Context ): Boolean =
878
- if currentlyAfterErasure then false
878
+ if ctx.erasedTypes then false
879
879
else if is(HasDefaultParams ) then true
880
880
else if is(NoDefaultParams ) then false
881
881
else
@@ -1450,7 +1450,7 @@ object SymDenotations {
1450
1450
// simulate default parameters, while also passing implicit context ctx to the default values
1451
1451
val initFlags1 = (if (initFlags != UndefinedFlags ) initFlags else this .flags)
1452
1452
val info1 = if (info != null ) info else this .info
1453
- if (currentlyAfterTyper && changedClassParents(info, info1, completersMatter = false ))
1453
+ if (ctx.isAfterTyper && changedClassParents(info, info1, completersMatter = false ))
1454
1454
assert(ctx.phase.changesParents, i " undeclared parent change at ${ctx.phase} for $this, was: $info, now: $info1" )
1455
1455
val privateWithin1 = if (privateWithin != null ) privateWithin else this .privateWithin
1456
1456
val annotations1 = if (annotations != null ) annotations else this .annotations
@@ -1567,17 +1567,17 @@ object SymDenotations {
1567
1567
private var memberNamesCache : MemberNames = MemberNames .None
1568
1568
1569
1569
private def memberCache (using Context ): LRUCache [Name , PreDenotation ] = {
1570
- if (myMemberCachePeriod != currentPeriod ) {
1570
+ if (myMemberCachePeriod != ctx.period ) {
1571
1571
myMemberCache = new LRUCache
1572
- myMemberCachePeriod = currentPeriod
1572
+ myMemberCachePeriod = ctx.period
1573
1573
}
1574
1574
myMemberCache
1575
1575
}
1576
1576
1577
1577
private def baseTypeCache (using Context ): BaseTypeMap = {
1578
1578
if ! currentHasSameBaseTypesAs(myBaseTypeCachePeriod) then
1579
1579
myBaseTypeCache = new BaseTypeMap
1580
- myBaseTypeCachePeriod = currentPeriod
1580
+ myBaseTypeCachePeriod = ctx.period
1581
1581
myBaseTypeCache
1582
1582
}
1583
1583
@@ -1641,7 +1641,7 @@ object SymDenotations {
1641
1641
override final def typeParams (using Context ): List [TypeSymbol ] = {
1642
1642
if (myTypeParams == null )
1643
1643
myTypeParams =
1644
- if (currentlyAfterErasure || is(Module )) Nil // fast return for modules to avoid scanning package decls
1644
+ if (ctx.erasedTypes || is(Module )) Nil // fast return for modules to avoid scanning package decls
1645
1645
else {
1646
1646
val di = initial
1647
1647
if (this ne di) di.typeParams
@@ -1729,7 +1729,7 @@ object SymDenotations {
1729
1729
1730
1730
def computeBaseData (implicit onBehalf : BaseData , ctx : Context ): (List [ClassSymbol ], BaseClassSet ) = {
1731
1731
def emptyParentsExpected =
1732
- is(Package ) || (symbol == defn.AnyClass ) || currentlyAfterErasure && (symbol == defn.ObjectClass )
1732
+ is(Package ) || (symbol == defn.AnyClass ) || ctx.erasedTypes && (symbol == defn.ObjectClass )
1733
1733
if (classParents.isEmpty && ! emptyParentsExpected)
1734
1734
onBehalf.signalProvisional()
1735
1735
val builder = new BaseDataBuilder
@@ -1825,7 +1825,7 @@ object SymDenotations {
1825
1825
*/
1826
1826
def ensureTypeParamsInCorrectOrder ()(using Context ): Unit = {
1827
1827
val tparams = typeParams
1828
- if (! currentlyAfterErasure && ! typeParamsFromDecls.corresponds(tparams)(_.name == _.name)) {
1828
+ if (! ctx.erasedTypes && ! typeParamsFromDecls.corresponds(tparams)(_.name == _.name)) {
1829
1829
val decls = info.decls
1830
1830
val decls1 = newScope
1831
1831
for (tparam <- typeParams) decls1.enter(decls.lookup(tparam.name))
@@ -2372,7 +2372,7 @@ object SymDenotations {
2372
2372
def traceInvalid (denot : Denotation )(using Context ): Boolean = {
2373
2373
def show (d : Denotation ) = s " $d# ${d.symbol.id}"
2374
2374
def explain (msg : String ) = {
2375
- println(s " ${show(denot)} is invalid at ${currentPeriod } because $msg" )
2375
+ println(s " ${show(denot)} is invalid at ${ctx.period } because $msg" )
2376
2376
false
2377
2377
}
2378
2378
denot match {
@@ -2535,7 +2535,7 @@ object SymDenotations {
2535
2535
implicit val None : MemberNames = new InvalidCache with MemberNames {
2536
2536
def apply (keepOnly : NameFilter , clsd : ClassDenotation )(implicit onBehalf : MemberNames , ctx : Context ) = ???
2537
2537
}
2538
- def newCache ()(using Context ): MemberNames = new MemberNamesImpl (currentPeriod )
2538
+ def newCache ()(using Context ): MemberNames = new MemberNamesImpl (ctx.period )
2539
2539
}
2540
2540
2541
2541
/** A cache for baseclasses, as a sequence in linearization order and as a set that
@@ -2552,7 +2552,7 @@ object SymDenotations {
2552
2552
def apply (clsd : ClassDenotation )(implicit onBehalf : BaseData , ctx : Context ) = ???
2553
2553
def signalProvisional () = ()
2554
2554
}
2555
- def newCache ()(using Context ): BaseData = new BaseDataImpl (currentPeriod )
2555
+ def newCache ()(using Context ): BaseData = new BaseDataImpl (ctx.period )
2556
2556
}
2557
2557
2558
2558
private abstract class InheritedCacheImpl (val createdAt : Period ) extends InheritedCache {
@@ -2575,11 +2575,11 @@ object SymDenotations {
2575
2575
}
2576
2576
2577
2577
def isValidAt (phase : Phase )(using Context ) =
2578
- checkedPeriod == currentPeriod ||
2578
+ checkedPeriod == ctx.period ||
2579
2579
createdAt.runId == ctx.runId &&
2580
2580
createdAt.phaseId < unfusedPhases.length &&
2581
2581
sameGroup(unfusedPhases(createdAt.phaseId), phase) &&
2582
- { checkedPeriod = currentPeriod ; true }
2582
+ { checkedPeriod = ctx.period ; true }
2583
2583
}
2584
2584
2585
2585
private class InvalidCache extends InheritedCache {
0 commit comments