Skip to content
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

Merged
merged 6 commits into from
Oct 1, 2023

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Sep 10, 2023

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.

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.
@odersky
Copy link
Contributor Author

odersky commented Sep 10, 2023

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
Copy link
Contributor

@Linyxus Linyxus left a 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` */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the documentation seems outdated

@odersky odersky merged commit 09ea77e into scala:main Oct 1, 2023
17 checks passed
@odersky odersky deleted the change-recheck-denot-handling branch October 1, 2023 16:16
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants