summaryrefslogtreecommitdiff
path: root/test/files/neg/bug1872.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-15 23:21:25 +0000
committerPaul Phillips <paulp@improving.org>2011-01-15 23:21:25 +0000
commit866801385f81417a2ac33916280df918e4bd5b3b (patch)
tree17cf474ab89a37804af270c97852d580a576beec /test/files/neg/bug1872.scala
parent604797b64518cbd75583e6ac14876552d6598c9d (diff)
downloadscala-866801385f81417a2ac33916280df918e4bd5b3b.tar.gz
scala-866801385f81417a2ac33916280df918e4bd5b3b.tar.bz2
scala-866801385f81417a2ac33916280df918e4bd5b3b.zip
Optimization to string concatenation.
with a primitive CONCAT and several opcodes, I'm assuming nobody will oppose this on principle. Given an expression of the exact form "" + x (that is, the NPE-immune and much less ugly way to call .toString) we used to get 4x the bytecode and create an unneeded StringBuilder. Now this: 0: aload_1 1: invokestatic #20; //Method java/lang/String.valueOf:(Ljava/lang/Object;)Ljava/lang/String; 4: areturn Closes #4160, review by dragos.
Diffstat (limited to 'test/files/neg/bug1872.scala')
0 files changed, 0 insertions, 0 deletions