summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/UnCurry.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-05-20 16:57:40 +1000
committerJason Zaugg <jzaugg@gmail.com>2015-05-20 16:57:40 +1000
commit6322d1b9e7ffddf16baf8166eba911d7db4927e0 (patch)
tree24513ba940138967d0ae923c59609bc5927882cd /src/compiler/scala/tools/nsc/transform/UnCurry.scala
parent2f1b5259188698501dbc8430f63972bf7bc68154 (diff)
downloadscala-6322d1b9e7ffddf16baf8166eba911d7db4927e0.tar.gz
scala-6322d1b9e7ffddf16baf8166eba911d7db4927e0.tar.bz2
scala-6322d1b9e7ffddf16baf8166eba911d7db4927e0.zip
Avoid inefficient specialied lambdas w. delambdafy jvm-1.8, GenASM
A previous change disabled -Ydelambdafy:method for specialized lambdas, as `DelambdafyTransformer` made no attempt to emit the requisite machinery to avoid boxing. This was loosened to allow them under `-target:jvm-1.8`, in the knowledge that `indylambda` would do the right thing. However, this wasn't quite right: indylambda is only supported in `GenBCode`, so we should consider that setting as well.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/UnCurry.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
index 1020b98bb9..b310e6c3a1 100644
--- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala
+++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
@@ -237,7 +237,7 @@ abstract class UnCurry extends InfoTransform
def canUseDelamdafyMethod = (
(inConstructorFlag == 0) // Avoiding synthesizing code prone to SI-6666, SI-8363 by using old-style lambda translation
- && (!isSpecialized || (settings.target.value == "jvm-1.8")) // DelambdafyTransformer currently only emits generic FunctionN-s, use the old style in the meantime
+ && (!isSpecialized || (settings.isBCodeActive && settings.target.value == "jvm-1.8")) // DelambdafyTransformer currently only emits generic FunctionN-s, use the old style in the meantime
)
if (inlineFunctionExpansion || !canUseDelamdafyMethod) {
val parents = addSerializable(abstractFunctionForFunctionType(fun.tpe))