File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -1670,6 +1670,7 @@ object SymDenotations {
1670
1670
}
1671
1671
1672
1672
/* >|>*/ ctx.debugTraceIndented(s " $tp.baseType( $this) " ) /* <|<*/ {
1673
+ Stats .record(" baseTypeOf" )
1673
1674
tp match {
1674
1675
case tp : CachedType =>
1675
1676
val btrCache = baseTypeCache
@@ -1679,8 +1680,9 @@ object SymDenotations {
1679
1680
btrCache.put(tp, NoPrefix )
1680
1681
basetp = computeBaseTypeOf(tp)
1681
1682
if (! basetp.exists) Stats .record(" base type miss" )
1682
- if (isCachable(tp, baseTypeCache)) {
1683
- if (! basetp.exists) Stats .record(" cached base type miss" )
1683
+ if (isCachable(tp, btrCache)) {
1684
+ if (basetp.exists) Stats .record(" cached base type hit" )
1685
+ else Stats .record(" cached base type miss" )
1684
1686
btrCache.put(tp, basetp)
1685
1687
}
1686
1688
else btrCache.remove(tp)
Original file line number Diff line number Diff line change @@ -848,7 +848,7 @@ object Types {
848
848
/** The basetype TypeRef of this type with given class symbol,
849
849
* but without including any type arguments
850
850
*/
851
- final def baseType (base : Symbol )(implicit ctx : Context ): Type = /* ctx.traceIndented(s"$this baseType $base")*/ /* >|>*/ track(" baseType " ) /* <|<*/ {
851
+ final def baseType (base : Symbol )(implicit ctx : Context ): Type = /* ctx.traceIndented(s"$this baseType $base")*/ /* >|>*/ track(" base type " ) /* <|<*/ {
852
852
base.denot match {
853
853
case classd : ClassDenotation => classd.baseTypeOf(this )
854
854
case _ => NoType
Original file line number Diff line number Diff line change @@ -62,11 +62,17 @@ class ResolveSuper extends MiniPhaseTransform with IdentityDenotTransformer { th
62
62
63
63
def superAccessors (mixin : ClassSymbol ): List [Tree ] =
64
64
for (superAcc <- mixin.info.decls.filter(_.isSuperAccessor).toList)
65
- yield polyDefDef(implementation(superAcc.asTerm), forwarder(rebindSuper(cls, superAcc)))
65
+ yield {
66
+ util.Stats .record(" super accessors" )
67
+ polyDefDef(implementation(superAcc.asTerm), forwarder(rebindSuper(cls, superAcc)))
68
+ }
66
69
67
70
def methodOverrides (mixin : ClassSymbol ): List [Tree ] =
68
71
for (meth <- mixin.info.decls.toList if needsForwarder(meth))
69
- yield polyDefDef(implementation(meth.asTerm), forwarder(meth))
72
+ yield {
73
+ util.Stats .record(" method forwarders" )
74
+ polyDefDef(implementation(meth.asTerm), forwarder(meth))
75
+ }
70
76
71
77
val overrides = mixins.flatMap(mixin => superAccessors(mixin) ::: methodOverrides(mixin))
72
78
You can’t perform that action at this time.
0 commit comments