JVM_IR: Do not box inline class in methods

This commit is contained in:
Ilmir Usmanov
2020-11-01 20:23:58 +01:00
parent e20093d762
commit 7b315a8b52
7 changed files with 38 additions and 16 deletions
@@ -16,15 +16,14 @@ fun takeNullable(a: UInt?) {}
// 1 valueOf
// 0 intValue
// JVM_TEMPLATES:
// -- 1 before takeNullable
// -- 1 before takeAnyInside
// 2 INVOKESTATIC UInt\.box
// JVM_TEMPLATES:
// -- equals-impl
// 1 INVOKEVIRTUAL UInt\.unbox
// JVM_IR_TEMPLATES:
// -- 1 before takeNullable
// -- 1 before takeAnyInside
// -- 1 before takeAnyInside's GETFIELD
// 3 INVOKESTATIC UInt\.box
// -- getA, toString, hashCode, equals-impl, equals
// 5 INVOKEVIRTUAL UInt\.unbox
@@ -0,0 +1,5 @@
inline class IC(val value: Int) {
inline fun toLong(): Long = this.value.toLong()
}
// 0 INVOKESTATIC IC\.box-impl