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:
parent
c96b744689
commit
42e9ae0c38
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue