summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-11-10 15:02:55 +0100
committerLukas Rytz <lukas.rytz@gmail.com>2015-11-10 15:02:55 +0100
commit12b6598714d72bd1d275d756de0b8e7df04d1f16 (patch)
treeb947a8416e61ac3b724784a4b1927ed25474a0e6 /src/compiler
parent9fa3783a11079ce48afc42d8da633c0b8c9f7526 (diff)
downloadscala-12b6598714d72bd1d275d756de0b8e7df04d1f16.tar.gz
scala-12b6598714d72bd1d275d756de0b8e7df04d1f16.tar.bz2
scala-12b6598714d72bd1d275d756de0b8e7df04d1f16.zip
Fix specialized function class names in closure optimizer
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/BytecodeUtils.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/BytecodeUtils.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/BytecodeUtils.scala
index 3854bc840d..d7ef13cb9c 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/BytecodeUtils.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/BytecodeUtils.scala
@@ -461,15 +461,17 @@ object BytecodeUtils {
private def buildFunctionTypes(base: String): Set[InternalName] = {
def primitives = Iterator("B", "S", "I", "J", "C", "F", "D", "Z", "V")
def ijfd = Iterator("I", "J", "F", "D")
+ def ijfdzv = Iterator("I", "J", "F", "D", "Z", "V")
def ijd = Iterator("I", "J", "D")
Set.empty[String] ++ {
(0 to 22).map(base + _)
} ++ {
primitives.map(base + "0$mc" + _ + "$sp") // Function0
} ++ {
- for (a <- ijfd; b <- ijfd) yield base + "1$mc" + a + b + "$sp" // Function1
+ // return type specializations appear first in the name string (alphabetical sorting)
+ for (r <- ijfdzv; a <- ijfd) yield base + "1$mc" + r + a + "$sp" // Function1
} ++ {
- for (a <- ijd; b <- ijd; c <- ijd) yield base + "2$mc" + a + b + c + "$sp" // Function2
+ for (r <- ijfdzv; a <- ijd; b <- ijd) yield base + "2$mc" + r + a + b + "$sp" // Function2
}
}