[IR] Rename MFVC tests + Add test for get-field optimization

#KT-1179
This commit is contained in:
Evgeniy.Zhelenskiy
2022-10-02 04:41:43 +02:00
committed by teamcity
parent 2c50fef251
commit e76041bb3b
13 changed files with 76 additions and 55 deletions
@@ -22,6 +22,14 @@ value class D(val x: C) {
}
}
class Regular(private val x: D) {
fun privateAccess() {
listOf(x.x.x)
listOf(x.x)
listOf(x)
}
}
fun functionWithoutBoxes(x: D, y: D) {
var z: D = x
val t: D = D(C(1, B(3U), "4"))
@@ -61,7 +69,8 @@ fun functionWithoutBoxes(x: D, y: D) {
// 1 private final Ljava/lang/String; field-2\n
// 1 INVOKESPECIAL C.<init> \(IILjava/lang/String;\)V
// 1 INVOKESPECIAL D.<init> \(IILjava/lang/String;\)V
// 1 INVOKESTATIC D.box-impl \(IILjava/lang/String;\)LD;
// 2 INVOKESTATIC C.box-impl \(IILjava/lang/String;\)LC;
// 2 INVOKESTATIC D.box-impl \(IILjava/lang/String;\)LD;
// 3 INVOKESTATIC C.box-impl \(IILjava/lang/String;\)LC;
// 1 public final static functionWithoutBoxes-GPBa7dw\(IILjava/lang/String;IILjava/lang/String;\)V
// 0 functionWithoutBoxes.*(\n {3}.*)*(\n {4}(NEW [ABCD]|.*(box|[ABCD]\.<init>|LA;|LB;|LC;|LD;)))
// 1 privateAccess.*(\n .+)*(\n GETFIELD Regular\.x-0-0 : I)(\n .+)*(\n INVOKEVIRTUAL Regular\.getX-0 \(\)LC;)(\n .+)*(\n INVOKESPECIAL Regular\.getX \(\)LD;)