Skip to content

Commit 74c1924

Browse files
committed
Drop expensive escapeToNext
The `ensuring` seems to be expensive. Omiting it does not seem to cause a problem since a denotation that's valid nowhere would certainly produce other errors when accessed.
1 parent 3045669 commit 74c1924

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,6 @@ object Denotations {
798798
assert(!d.is(Package), s"illegal transformation of package denotation by transformer $transformer")
799799
case _ =>
800800

801-
def escapeToNext = nextDefined.ensuring(_.validFor != Nowhere)
802-
803801
def toNewRun =
804802
util.Stats.record("current.bringForward")
805803
if exists then initial.bringForward().current else this
@@ -874,7 +872,7 @@ object Denotations {
874872
// can happen if we sit on a stale denotation which has been replaced
875873
// wholesale by an installAfter; in this case, proceed to the next
876874
// denotation and try again.
877-
escapeToNext
875+
nextDefined
878876
else if valid.runId != currentPeriod.runId then
879877
toNewRun
880878
else if currentPeriod.code > valid.code then

0 commit comments

Comments
 (0)