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

Improve implementation of local lazy vals and synchronized blocks #5354

Merged
merged 2 commits into from Nov 9, 2018

Conversation

Projects
None yet
2 participants
@allanrenucci
Copy link
Member

allanrenucci commented Oct 31, 2018

Reduce the amount of code generated for local lazy val by moving some of
the generated code to the runtime library.

This is a port of scala/scala#5374

@allanrenucci allanrenucci force-pushed the dotty-staging:fix-5340 branch 2 times, most recently from 6615cdd to 8e98d71 Oct 31, 2018

@allanrenucci allanrenucci requested a review from smarter Oct 31, 2018

@allanrenucci allanrenucci force-pushed the dotty-staging:fix-5340 branch 7 times, most recently from 85d8822 to 8a2aabf Nov 1, 2018

@smarter

smarter approved these changes Nov 8, 2018

Copy link
Member

smarter left a comment

Nice!

Show resolved Hide resolved compiler/src/dotty/tools/dotc/transform/LazyVals.scala
Show resolved Hide resolved compiler/src/dotty/tools/dotc/transform/LazyVals.scala Outdated
Show resolved Hide resolved compiler/src/dotty/tools/dotc/transform/LazyVals.scala
Show resolved Hide resolved tests/run/i5340.scala
Show resolved Hide resolved tests/run/i505.scala

@allanrenucci allanrenucci changed the title Fix #5340: Improve runtime implementation of local lazy vals Improve implementation of local lazy vals and synchronized block Nov 8, 2018

@allanrenucci allanrenucci changed the title Improve implementation of local lazy vals and synchronized block Improve implementation of local lazy vals and synchronized blocks Nov 8, 2018

Fix #5340: Improve runtime implementation of local lazy vals
Reduce the amount of code generated for local lazy val by moving some of
the generated code to the runtime library.

This is a port of scala/scala#5374

@allanrenucci allanrenucci force-pushed the dotty-staging:fix-5340 branch from 8a2aabf to f65ec8e Nov 8, 2018

Fix #505: Remove unnecessary boxing of synchronized block
`synchronized` is now treated as a magic method by the compiler and is no
longer erased (similarly to `asInstanceOf` and `isInstanceOf`). Backend
is updated to handle this new magic polymorphic method.

@allanrenucci allanrenucci force-pushed the dotty-staging:fix-5340 branch from f65ec8e to 3d33bae Nov 8, 2018

@allanrenucci allanrenucci merged commit 3cfbb6d into lampepfl:master Nov 9, 2018

2 checks passed

CLA User signed CLA
Details
continuous-integration/drone/pr the build was successful
Details

@allanrenucci allanrenucci deleted the dotty-staging:fix-5340 branch Nov 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment