Update bytecode text tests in JVM_IR

This commit is contained in:
Dmitry Petrov
2020-02-12 14:53:05 +03:00
parent db91b520a5
commit 59cdf3c52e
26 changed files with 87 additions and 58 deletions
@@ -1,4 +1,5 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36654 Generate more compact bytecode for safe call in JVM_IR
interface A {
fun foo()
}
@@ -7,5 +8,9 @@ fun test(x: A?) {
x?.foo()
}
// JVM_TEMPLATES
// 1 POP
// 0 ACONST_NULL
// JVM_IR_TEMPLATES
// 0 ACONST_NULL
@@ -1,4 +1,5 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36654 Generate more compact bytecode for safe call in JVM_IR
interface A {
fun foo(): Any
}
@@ -7,5 +8,10 @@ fun test(x: A?) {
x?.foo()
}
// JVM_TEMPLATES
// 2 POP
// 0 ACONST_NULL
// JVM_IR_TEMPLATES
// 1 POP
// 0 ACONST_NULL
@@ -1,4 +1,6 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36650 Don't generate CHECKCAST on null values in JVM_IR
// TODO KT-36654 Generate more compact bytecode for safe call in JVM_IR
fun test(ss: List<String?>) {
val shortStrings = hashSetOf<String>()
val longStrings = hashSetOf<String>()
@@ -14,7 +16,14 @@ fun test(ss: List<String?>) {
}
}
// JVM_TEMPLATES
// 2 POP
// 0 INVOKESTATIC java/lang/Boolean\.valueOf
// 0 CHECKCAST java/lang/Boolean
// 0 ACONST_NULL
// JVM_IR_TEMPLATES
// 2 POP
// 0 INVOKESTATIC java/lang/Boolean\.valueOf
// 1 CHECKCAST java/lang/Boolean
// 1 ACONST_NULL