From 42e9ae0c38b3e6a5c9ecb916d30a576c30411722 Mon Sep 17 00:00:00 2001 From: extempore Date: Wed, 19 Jan 2011 03:52:54 +0000 Subject: [PATCH] Made recent string optimization jvm-only. No review. git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24019 5e8d7ff9-d8ef-0310-90f0-a4852d11357a --- src/compiler/scala/tools/nsc/backend/icode/GenICode.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala index e1f533434..a57794552 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)