summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-19 03:52:54 +0000
committerPaul Phillips <paulp@improving.org>2011-01-19 03:52:54 +0000
commitc90ff3d95dde4b81583e445da2c125b5bed9ab53 (patch)
treeef85b0dfb08f437e3a635c60bffee5490643d0d7
parentc1db69d909cb432e971d33f7c81571ecbb0238da (diff)
downloadscala-c90ff3d95dde4b81583e445da2c125b5bed9ab53.tar.gz
scala-c90ff3d95dde4b81583e445da2c125b5bed9ab53.tar.bz2
scala-c90ff3d95dde4b81583e445da2c125b5bed9ab53.zip
Made recent string optimization jvm-only.
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index e9d0b6c90e..c28b5918d0 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -1358,7 +1358,7 @@ abstract class GenICode extends SubComponent {
def genStringConcat(tree: Tree, ctx: Context): Context = {
liftStringConcat(tree) match {
// Optimization for expressions of the form "" + x. We can avoid the StringBuilder.
- case List(Literal(Constant("")), arg) =>
+ case List(Literal(Constant("")), arg) if !forMSIL =>
if (settings.debug.value) log("Rewriting \"\" + x as String.valueOf(x) for: " + arg)
val ctx1 = genLoad(arg, ctx, ObjectReference)
ctx1.bb.emit(CALL_METHOD(String_valueOf, Static(false)), arg.pos)