Skip to content

Allow MiniPhase to be DenotTransformer & LazyVals #80

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

Closed
wants to merge 7 commits into from

Conversation

DarkDimius
Copy link
Contributor

Finally :-)
@odersky, @sjrd please review

odersky and others added 7 commits March 14, 2014 21:49
This makes naming uniform between trees and types, and also avoids the clash with
transform.TreeTransformer. The idea is that transformers are parts of phases, and
have logic that is phase-specific. In particular, a context is passed around when
transforming a tree. Maps are simpler, they only have a T -> T apply method.
To bring in line with TreeTransformer terminology.
Many small and large changes. Added samplePhase to demonstrate functionality.

To test functioning, run the compiler with args

     tests/pos/uncurry.scala -Ylog:sample,terminal
CreateCompanionObjectTests were re-enabled. They failed in a previous version but succeed again in the latest commit.
Also uncurry.scala got renamed to curried.scala.
Creates accessors for lazy vals:
1) lazy local vals are rewritten to dotty.runtime.Lazy*** holders
2) for a non-volatile field lazy val create a non-thread-safe accessor and flag:
2.a) if lazy val type indicates that val is not nullable, uses null value as a flag
2.b) else uses boolean flag for sake of performance, method size, and
allowing more jvm optimizations
3) for a volatile field lazy val use double locking scheme, that guaranties no
spurious deadlocks, using long bits as bitmaps and creating companion
objects to store offsets needed for unsafe methods.
All MiniPhases now start as full-fledged phases,
and are given their own periods and can register DenotTransformers.
Consecutive MiniPhases will be squashed automatically, to force
separation into multiple phases Separator should be used

Conflicts:
	test/test/transform/CreateCompanionObjectsTest.scala
@DarkDimius
Copy link
Contributor Author

I'll fix merging and resubmit

@DarkDimius DarkDimius closed this Mar 18, 2014
WojciechMazur pushed a commit to WojciechMazur/dotty that referenced this pull request Mar 19, 2025
Backport "Do not warn about expected missing positions in quotes.reflect.Symbol" 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