-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A more robust scheme for resetting denotations after Recheck #18534
A more robust scheme for resetting denotations after Recheck #18534
Conversation
The aim is to have an efficient test whether a phase or denot transformer should be run.
The new scheme works also for arbitrary denotation changes in PreRecheck. Furthermore, recheck denot transformers are not run after Recheck has ended. This means that effectivly only symbols touched by the Rechecker are transformed and reset again afterwards.
This is part of a larger capture checker refactoring. Since it affects Rechecker it should be of interest also for the refinement types work. |
No backward mapping is necessary anymore. # Conflicts: # compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala
Need to copy the denotation, since denotations come with next pointers which would get scrambled otherwise. The bug was observed when compiling stdlib under new capture checking implementation. # Conflicts: # compiler/src/dotty/tools/dotc/transform/Recheck.scala
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise, LGTM!
@@ -158,16 +151,21 @@ abstract class Recheck extends Phase, SymTransformer: | |||
// One failing test is pos/i583a.scala | |||
|
|||
/** Change any `ResetPrivate` flags back to `Private` */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the documentation seems outdated
The new scheme works also for arbitrary denotation changes in PreRecheck.
Furthermore, recheck denot transformers are not run after Recheck has ended. This
means that effectively only symbols touched by the Rechecker are transformed and
reset again afterwards.