JVM IR: introduce IrCallableMethod as a simpler replacement for CallableMethod

This commit is contained in:
Alexander Udalov
2019-08-06 04:38:29 +02:00
parent 6969717201
commit 6191fc10f0
6 changed files with 37 additions and 18 deletions
@@ -10,7 +10,6 @@ import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterKind
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterSignature
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature
import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.org.objectweb.asm.Opcodes
import org.jetbrains.org.objectweb.asm.Opcodes.INVOKESPECIAL
import org.jetbrains.org.objectweb.asm.Opcodes.INVOKESTATIC
import org.jetbrains.org.objectweb.asm.Type
@@ -23,15 +22,15 @@ class CallableMethod(
private val defaultImplOwner: Type?,
computeDefaultMethodDesc: () -> String,
private val signature: JvmMethodSignature,
private val invokeOpcode: Int,
val invokeOpcode: Int,
override val dispatchReceiverType: Type?,
override val dispatchReceiverKotlinType: KotlinType?,
override val extensionReceiverType: Type?,
override val extensionReceiverKotlinType: KotlinType?,
override val generateCalleeType: Type?,
override val returnKotlinType: KotlinType?,
private val isInterfaceMethod: Boolean = Opcodes.INVOKEINTERFACE == invokeOpcode,
private val isDefaultMethodInInterface: Boolean = false
val isInterfaceMethod: Boolean,
private val isDefaultMethodInInterface: Boolean
) : Callable {
private val defaultMethodDesc: String by lazy(LazyThreadSafetyMode.PUBLICATION, computeDefaultMethodDesc)