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,3 @@
MODULE main
Missing in K2
TestKt$example$2.class
@@ -1,4 +1,5 @@
// TARGET_BACKEND: JVM
// JVM_ABI_K1_K2_DIFF: KT-62865
// TODO support different bytecode text templates for FIR?
// --CHECK_BYTECODE_TEXT
+31
View File
@@ -0,0 +1,31 @@
MODULE main
Missing in K1
_1Kt$sam$Custom_MBiConsumer$0.class
CLASS _1Kt$box$1.class
Property: class.signature
K1
<T:Ljava/lang/Object;U:Ljava/lang/Object;>Ljava/lang/Object;LCustom$MBiConsumer;
K2
Lkotlin/jvm/internal/Lambda;Lkotlin/jvm/functions/Function2<Ljava/lang/String;Ljava/lang/String;Lkotlin/Unit;>;
Property: class.superClassInternalName
K1
java/lang/Object
K2
kotlin/jvm/internal/Lambda
Property: class.superInterfaces
K1
[Custom$MBiConsumer]
K2
[kotlin/jvm/functions/Function2]
K1
INNER_CLASS Custom$MBiConsumer Custom MBiConsumer 11000001001 [public, static, interface, abstract]
K2
---
K1
accept(Ljava/lang/String;Ljava/lang/String;)V [public, final]
K2
---
K1
---
K2
invoke(Ljava/lang/String;Ljava/lang/String;)V [public, final]
+1
View File
@@ -2,6 +2,7 @@
// SKIP_JDK6
// SAM_CONVERSIONS: CLASS
// ^ test checks reflection for synthetic classes
// JVM_ABI_K1_K2_DIFF: KT-62855
// MODULE: lib
// FILE: Custom.java
@@ -0,0 +1,73 @@
MODULE main
CLASS Kt50477EnabledKt$box$1.class
Property: class.signature
K1
NULL
K2
Lkotlin/jvm/internal/FunctionReferenceImpl;Lkotlin/jvm/functions/Function1<Lkotlin/coroutines/Continuation<-Lkotlin/Unit;>;Ljava/lang/Object;>;Lkotlin/coroutines/jvm/internal/SuspendFunction;
Property: class.superClassInternalName
K1
java/lang/Object
K2
kotlin/jvm/internal/FunctionReferenceImpl
Property: class.superInterfaces
K1
[FI, kotlin/jvm/internal/FunctionAdapter]
K2
[kotlin/coroutines/jvm/internal/SuspendFunction, kotlin/jvm/functions/Function1]
K1
call(Lkotlin/coroutines/Continuation;)Ljava/lang/Object; [public, final]
K2
---
K1
equals(Ljava/lang/Object;)Z [public, final]
K2
---
K1
getFunctionDelegate()Lkotlin/Function; [public, final]
K2
---
K1
hashCode()I [public, final]
K2
---
K1
---
K2
invoke(Lkotlin/coroutines/Continuation;)Ljava/lang/Object; [public, final]
CLASS Kt50477EnabledKt$box$4.class
Property: class.signature
K1
NULL
K2
Lkotlin/jvm/internal/FunctionReferenceImpl;Lkotlin/jvm/functions/Function1<Lkotlin/coroutines/Continuation<-Lkotlin/Unit;>;Ljava/lang/Object;>;Lkotlin/coroutines/jvm/internal/SuspendFunction;
Property: class.superClassInternalName
K1
java/lang/Object
K2
kotlin/jvm/internal/FunctionReferenceImpl
Property: class.superInterfaces
K1
[FI, kotlin/jvm/internal/FunctionAdapter]
K2
[kotlin/coroutines/jvm/internal/SuspendFunction, kotlin/jvm/functions/Function1]
K1
call(Lkotlin/coroutines/Continuation;)Ljava/lang/Object; [public, final]
K2
---
K1
equals(Ljava/lang/Object;)Z [public, final]
K2
---
K1
getFunctionDelegate()Lkotlin/Function; [public, final]
K2
---
K1
hashCode()I [public, final]
K2
---
K1
---
K2
invoke(Lkotlin/coroutines/Continuation;)Ljava/lang/Object; [public, final]
+1
View File
@@ -1,5 +1,6 @@
// !LANGUAGE: +SuspendOnlySamConversions
// TARGET_BACKEND: JVM_IR
// JVM_ABI_K1_K2_DIFF: KT-62855
fun interface FI {
suspend fun call() // suspending now(!!!)