-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Various fixes related to lambda adaptation #3203
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
Conversation
673eaed
to
66098d3
Compare
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Needs rebase |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/3203/ to see the changes. Benchmarks is based on merge(s) with master |
66098d3
to
9d296d8
Compare
@liufengyun I'm getting a 404 on this page |
It works on my phone, strange. Are you using Firefox or Chrome?
Le 28 sept. 2017 7:32 PM, "Guillaume Martres" <notifications@github.com> a
écrit :
… Visit http://dotty-bench.epfl.ch/3203/ to see the changes.
@liufengyun <https://github.com/liufengyun> I'm getting a 404 on this page
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3203 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAuDyeYkK7nA0AQKAA9SBfocm2mFZ0QXks5sm9g3gaJpZM4PnaXR>
.
|
Same issue with both firefox and chrome, however I don't get a 404 when I use curl or wget. |
Hah, it magically works now! |
Needs rebase |
When unboxing a null to a value class in Scala, the default value of the value class should be returned, before this commit an NPE was thrown instead. Like in scala/scala-java8-compat@d7e0125, we fix this by using BoxesRunTime, bun we don't use it for boxing since it's unnecessary. After this commit, we still throw NPE when unboxing nulls in unspecialized lambdas called in generic contexts (see if3_unspecialized in the added test). This is addressed by the next commits in this PR.
This commit does not change the end result of FunctionalInterfaces but makes the code easier to read, and add a `Definitions#isSpecializableFunction` method used in the next commit.
Previously, we only created bridges for derived value classes because we assumed the default adaptation done by LambdaMetaFactory was good enough. But this is not the case when unboxing null: LMF will throw an NPE when Scala semantics require using the default value of the value class instead. We fix this by creating more bridges when needed, this is similar to the solution adopted in scalac. Also fixed a bug where adapted closures did not preserve Closure#tpt, leading to a runtime failure in lambda-sam-bridge.scala
9d296d8
to
fe3c357
Compare
No description provided.