Introduce support for plugin-defined intrinsics in JVM IR backend:

Add intrinsic for kotlinx.serialization.serializer<T>() function.

Plugin intrinsic for old backend is removed because it is too hard
and unjustifiable to unify them.
This commit is contained in:
Leonid Startsev
2022-02-07 18:08:23 +03:00
committed by Space
parent f9edbd825a
commit a59f5f407b
20 changed files with 989 additions and 580 deletions
@@ -72,7 +72,7 @@ class ReifiedTypeInliner<KT : KotlinTypeMarker>(
fun applyPluginDefinedReifiedOperationMarker(
insn: MethodInsnNode,
instructions: InsnList,
type: KotlinType,
type: KT,
asmType: Type
): Int = -1
}
@@ -206,7 +206,7 @@ class ReifiedTypeInliner<KT : KotlinTypeMarker>(
val applyResult = intrinsicsSupport.applyPluginDefinedReifiedOperationMarker(
insn,
instructions,
intrinsicsSupport.toKotlinType(type),
type,
asmType
)
if (applyResult == -1) return false