File tree Expand file tree Collapse file tree 3 files changed +122
-162
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +122
-162
lines changed Original file line number Diff line number Diff line change @@ -1818,6 +1818,19 @@ object SymDenotations {
1818
1818
1819
1819
override def hashCode = common.id // for debugging
1820
1820
1821
+ /** The current denotation of this symbol */
1822
+ def currentDenot (using Context ): SymDenotation =
1823
+ util.Stats .record(" Symbol.denot" )
1824
+ val valid = validFor.code
1825
+ // Next condition is inlined from Periods.containsSinglePhasePeriod
1826
+ if ((valid - ctx.period.code) >>> PhaseWidth ) <= (valid & PhaseMask )
1827
+ then this
1828
+ else recomputeDenot()
1829
+
1830
+ private def recomputeDenot ()(using Context ): SymDenotation =
1831
+ util.Stats .record(" Symbol.recomputeDenot" )
1832
+ symbol.setLastDenot(currentSymDenot)
1833
+
1821
1834
// ---- ParamInfo bindings -------------------------------------
1822
1835
1823
1836
type ThisName <: Name
You can’t perform that action at this time.
0 commit comments