Correct the argument types of the StringBuilder.append

Modified AsmUtil to generate calls to more specific append methods
in the StringBuilder class in order to save computation time and make
less temporary objects.

Also adds unit-test to verify that the append(Object) method was
invoked 0 times while the append(String) 3 times

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
This commit is contained in:
Laszlo Hornyak
2014-05-12 21:07:47 +02:00
committed by Alexander Udalov
parent 34e8cae89e
commit 9dec0fb779
5 changed files with 73 additions and 5 deletions
@@ -107,6 +107,21 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
doTest("compiler/testData/codegen/bytecodeText/kt2887.kt");
}
@TestMetadata("kt5016.kt")
public void testKt5016() throws Exception {
doTest("compiler/testData/codegen/bytecodeText/kt5016.kt");
}
@TestMetadata("kt5016int.kt")
public void testKt5016int() throws Exception {
doTest("compiler/testData/codegen/bytecodeText/kt5016int.kt");
}
@TestMetadata("kt5016intOrNull.kt")
public void testKt5016intOrNull() throws Exception {
doTest("compiler/testData/codegen/bytecodeText/kt5016intOrNull.kt");
}
@TestMetadata("noVolatileAnnotation.kt")
public void testNoVolatileAnnotation() throws Exception {
doTest("compiler/testData/codegen/bytecodeText/noVolatileAnnotation.kt");