File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -477,25 +477,29 @@ object Symbols {
477
477
478
478
/** Set the denotation of this symbol */
479
479
private [core] def denot_= (d : SymDenotation ): Unit = {
480
+ util.Stats .record(" Symbol.denot_=" )
480
481
lastDenot = d
481
482
checkedPeriod = Nowhere
482
483
}
483
484
484
485
/** The current denotation of this symbol */
485
486
final def denot (using Context ): SymDenotation = {
487
+ util.Stats .record(" Symbol.denot" )
486
488
val lastd = lastDenot
487
489
if (checkedPeriod == ctx.period) lastd
488
490
else computeDenot(lastd)
489
491
}
490
492
491
493
private def computeDenot (lastd : SymDenotation )(using Context ): SymDenotation = {
494
+ util.Stats .record(" Symbol.computeDenot" )
492
495
val now = ctx.period
493
496
checkedPeriod = now
494
497
if (lastd.validFor contains now) lastd else recomputeDenot(lastd)
495
498
}
496
499
497
500
/** Overridden in NoSymbol */
498
501
protected def recomputeDenot (lastd : SymDenotation )(using Context ): SymDenotation = {
502
+ util.Stats .record(" Symbol.recomputeDenot" )
499
503
val newd = lastd.current.asInstanceOf [SymDenotation ]
500
504
lastDenot = newd
501
505
newd
Original file line number Diff line number Diff line change @@ -1976,6 +1976,7 @@ object Types {
1976
1976
1977
1977
/** The denotation currently denoted by this type */
1978
1978
final def denot (using Context ): Denotation = {
1979
+ util.Stats .record(" NamedType.denot" )
1979
1980
val now = ctx.period
1980
1981
// Even if checkedPeriod == now we still need to recheck lastDenotation.validFor
1981
1982
// as it may have been mutated by SymDenotation#installAfter
@@ -1987,6 +1988,7 @@ object Types {
1987
1988
}
1988
1989
1989
1990
private def computeDenot (using Context ): Denotation = {
1991
+ util.Stats .record(" NamedType.computeDenot" )
1990
1992
1991
1993
def finish (d : Denotation ) = {
1992
1994
if (d.exists)
You can’t perform that action at this time.
0 commit comments