Skip to content

Conversation

@allanrenucci
Copy link
Contributor

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 fix-5340 branch 2 times, most recently from 6615cdd to 8e98d71 Compare October 31, 2018 17:43
@allanrenucci allanrenucci requested a review from smarter October 31, 2018 20:23
@allanrenucci allanrenucci force-pushed the fix-5340 branch 7 times, most recently from 85d8822 to 8a2aabf Compare November 8, 2018 13:46
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

Nice!

@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
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
`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 merged commit 3cfbb6d into scala:master Nov 9, 2018
@allanrenucci allanrenucci deleted the fix-5340 branch November 9, 2018 09:39
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