Skip to content

Fixes to lambdalift that prevent memory leaks. #1281

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 4 commits into from
May 27, 2016

Conversation

DarkDimius
Copy link
Contributor

@DarkDimius DarkDimius commented May 26, 2016

CollectDependencies had incorrect handling of Idents. If it had ever met
an Ident to a symbol defined outside of current owner-chain(e.g.
Predef.println) it would issue narrowTo(enclosingClass).

This is very conservative and leads to memory leaks even in trivial lambdas.

CollectDependencies had incorrect handling of `Ident`s.
If it had ever met an `Ident` to a symbol defined outside of current
owner-chain(e.g. Predef.println) it would issue narrowTo(enclosingClass).

This is very conservative and leads to memory leaks
even in trivial lambdas.

My lambda-lift-foo groes stronger :-)
Before there was an implicit assumption that static methods are only
present on objects.
This assumption is invalidated both by linker optimizations and the new
fix to lambdalift.
See t5375.scala for details.
@DarkDimius
Copy link
Contributor Author

@odersky please review.

lock inside classloader. Unlike if it not static and is called through This(Test).foo, no lock is grabbed.

@DarkDimius
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

:-)

@odersky
Copy link
Contributor

odersky commented May 27, 2016

LGTM

@odersky odersky merged commit 5d6cc45 into scala:master May 27, 2016
@allanrenucci allanrenucci deleted the fix-lamda-lift branch December 14, 2017 19:20
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.

3 participants