Add JVM ABI K1/K2 consistency tests

This commit is contained in:
vladislav.grechko
2023-12-26 10:18:19 +00:00
committed by Space Team
parent 5a1fb78fcd
commit 34bac48541
1104 changed files with 88413 additions and 66 deletions
@@ -0,0 +1,9 @@
MODULE main
CLASS NestedBigArityFunCallsKt.class
PACKAGE METADATA
FUNCTION test(Lkotlin/jvm/functions/FunctionN;)Ljava/lang/String;
Property: class.metadata.function.valueParameters
K1
(f: kotlin/Function25<A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, kotlin/Function25<A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, kotlin/String, kotlin/String>, kotlin/String> /* = F^<kotlin/Function25<A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, kotlin/String, kotlin/String> /* = F^<kotlin/String> */> */)
K2
(f: kotlin/Function25<A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, kotlin/Function25<A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, kotlin/String, kotlin/String> /* = F^<kotlin/String> */, kotlin/String> /* = F^<kotlin/Function25<A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, kotlin/String, kotlin/String> /* = F^<kotlin/String> */> */)
@@ -1,3 +1,4 @@
// JVM_ABI_K1_K2_DIFF: KT-63877
interface A
object O : A
@@ -0,0 +1,11 @@
MODULE main
CLASS MC.class
CLASS METADATA
K1
---
K2
bar
K1
getBar()Ljava/lang/String;
K2
---
@@ -2,6 +2,8 @@
// DUMP_IR
// IGNORE_CODEGEN_WITH_IR_FAKE_OVERRIDE_GENERATION: extra overridden symbols for declarations in MyMutableList.
// ^ This is most likely not a problem, and IR dump can be changed once IR fake override generation is enabled by default.
// JVM_ABI_K1_K2_DIFF: KT-63828
interface MyCollection<out E1> {
fun foo(): E1
@@ -0,0 +1,11 @@
MODULE main
CLASS MC.class
CLASS METADATA
K1
---
K2
bar
K1
getBar()Ljava/lang/String;
K2
---
@@ -2,6 +2,7 @@
// DUMP_IR
// IGNORE_CODEGEN_WITH_IR_FAKE_OVERRIDE_GENERATION: extra overridden symbols for declarations in MyMutableList.
// ^ This is most likely not a problem, and IR dump can be changed once IR fake override generation is enabled by default.
// JVM_ABI_K1_K2_DIFF: KT-63828
interface MyCollection {
fun foo(): String
@@ -0,0 +1,9 @@
MODULE main
CLASS Cached.class
CLASS METADATA
PROPERTY getStore()Ljava/util/HashMap;
Property: class.metadata.property.returnType
K1
java/util/HashMap<T#0, T#1> /* = kotlin/collections/HashMap^<T#0, T#1> */
K2
java/util/HashMap<T#0, T#1>
@@ -3,6 +3,7 @@
//KT-3190 Compiler crash if function called 'invoke' calls a closure
// IGNORE_BACKEND: JS
// JS backend does not allow to implement Function{N} interfaces
// JVM_ABI_K1_K2_DIFF: KT-63864
fun box(): String {
val test = Cached<Int,Int>({ it + 2 })