Switch default JVM target to 1.8

#KT-29405 Fixed
This commit is contained in:
Alexander Udalov
2021-01-21 17:12:46 +01:00
parent 509ed64917
commit d022bb0248
52 changed files with 247 additions and 164 deletions
@@ -0,0 +1,11 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
fun foo() {
val x: Int? = 6
val hc = x!!.hashCode()
}
// 1 java/lang/Integer.hashCode \(I\)I
// 0 java/lang/Integer.valueOf
// 0 intValue
@@ -4,4 +4,4 @@ fun box(): String {
return "OK"
}
// 1 INVOKESTATIC java/lang/Integer.valueOf
// 0 INVOKESTATIC java/lang/Integer.valueOf
@@ -15,9 +15,6 @@ fun foo() {
val b = arrayOfNulls<Int>(4)
b[100] = 5
val x: Int? = 6
val hc = x!!.hashCode()
val y: Int? = 7
val z: Int? = 8
val res = y === z
@@ -26,5 +23,5 @@ fun foo() {
val c2: Any = if (1 != one) 0 else "abc"
}
// 9 java/lang/Integer.valueOf
// 8 java/lang/Integer.valueOf
// 0 intValue
@@ -1,3 +1,5 @@
// JVM_TARGET: 1.6
fun box(): String {
true.hashCode()
1.toByte().hashCode()
@@ -9,7 +9,7 @@ inline class UInt(val value: Int)
fun test(u1: UInt, u2: UInt) {
val a = u1.value
val b = u1.value.hashCode() // box int to call hashCode
val b = u1.value.hashCode()
val c = u1.value + u2.value
}
@@ -18,5 +18,5 @@ fun test(u1: UInt, u2: UInt) {
// 0 INVOKESTATIC UInt\$Erased.box
// 0 INVOKEVIRTUAL UInt.unbox
// 1 valueOf
// 0 intValue
// 0 valueOf
// 0 intValue
@@ -1,4 +1,5 @@
// WITH_RUNTIME
// JVM_TARGET: 1.6
val ua = 1234U
val ub = 5678U