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
2.10 regression: inliner warnings with Map literal and -optimize #6723
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6723?orig=1 |
@SethTisue said: but actually, for whatever it's worth, RC2 with -optimize compiles my entire large codebase (100K+ lines of mixed Scala and Java) with no other warnings produced besides this one (246 times). tests pass, too. so I'm thiiiiiis close to being able to use -optimize and -Xfatal-warnings. which would be pretty cool and help the optimizer get tested. |
@magarciaEPFL said:
That, and the
|
@non said: In my case I solved it by using (x, y) instead of x -> y. Since most users probably think of -> as syntax (and not as an implicitly called extension method on a value class) it would be nice if the inlining could be forced in cases like this. |
Martin Kneissl (mkneissl) said: |
Sarah Gerweck (gerweck) said: It's a little annoying to get hundreds of warnings because of this. The cost of disabling the Scala optimizer is too high to disable it just because of this, but it's hard to find your real warnings in the midst of all the noise this generates. |
@Blaisorblade said:
What happened out of this? Getting worse performance for more optimization, by itself, should not stop such a patch being merged. |
@gkossakowski said: |
@gkossakowski said: |
@lrytz said: |
@retronym said: |
Malcolm Greaves (malcolmgreaves) said: |
@adriaanm said: |
Malcolm Greaves (malcolmgreaves) said: |
Malcolm Greaves (malcolmgreaves) said: |
@lrytz said: |
@SethTisue said (edited on Apr 6, 2016 7:33:17 PM UTC): I was able to get the new optimizer to produce the following warning, but only by cranking the size of the map up really high (thousands): [warn] scala/Predef$ArrowAssoc$::$minus$greater$extension(Ljava/lang/Object;Ljava/lang/Object;)Lscala/Tuple2; is annotated @inline but could not be inlined:
[warn] The size of the callsite method O$::<init>()V
[warn] would exceed the JVM method size limit after inlining scala/Predef$ArrowAssoc$::$minus$greater$extension(Ljava/lang/Object;Ljava/lang/Object;)Lscala/Tuple2;. |
here's the code:
2.9 with -optimize likes it fine:
but with 2.10 (RC2) the inliner starts whining:
The map has to be a certain length before the warnings start appearing.
The text was updated successfully, but these errors were encountered: