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
This commit is contained in:
extempore 2011-01-19 03:52:54 +00:00
parent c96b744689
commit 42e9ae0c38
1 changed files with 1 additions and 1 deletions

View File

@ -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)