Skip to content

Refactor/tree transform inits #224

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

Merged
merged 6 commits into from
Nov 13, 2014

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Nov 13, 2014

Replaces imperative init method by prepareForUnit/transformUnit. Makes phases better parallelizable. Review by @DarkDimius

This allows to move to a functional implementation later.
Only exception: CapturedVars still uses init() because it
contains a (dubious!) interaction with intialization and
transformSym. Looking at this next.
Required some refactoring. Instead of transformSym we now
transform ValDefs as we prepare for them. The previous scheme
could not control directly whetrher transformSym or collectCaptured would
run first. Turns out that init ran before collectCaptured but
prepareForUnit did not, leading to test failures in pos/capturedvars.
Do not lead to temptation...
No global side effect on capturedVars anymore.
State moved into local transforms which are allocated one per unit.
Thsi allows lambda lifters on different units to run in parallel.
DarkDimius added a commit that referenced this pull request Nov 13, 2014
@DarkDimius DarkDimius merged commit c7ed89d into scala:master Nov 13, 2014
@odersky odersky deleted the refactor/treeTransformInits branch November 13, 2014 10:06
WojciechMazur pushed a commit to WojciechMazur/dotty that referenced this pull request May 8, 2025
Backport "CheckUnused checks span.exists before testing its parts" to 3.3 LTS
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.

2 participants