diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt index 47774e920f1..8154aeed054 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt @@ -7,6 +7,7 @@ package org.jetbrains.kotlin.backend.jvm.codegen import com.intellij.psi.PsiElement import com.intellij.psi.PsiFile +import org.jetbrains.kotlin.backend.common.ir.ir2string import org.jetbrains.kotlin.codegen.BaseExpressionCodegen import org.jetbrains.kotlin.codegen.ClassBuilder import org.jetbrains.kotlin.codegen.OwnerKind @@ -38,13 +39,12 @@ class IrSourceCompilerForInline( private val data: BlockInfo ) : SourceCompilerForInline { - //TODO + //TODO: KotlinLookupLocation(callElement) override val lookupLocation: LookupLocation get() = NoLookupLocation.FROM_BACKEND - //TODO override val callElementText: String - get() = callElement.toString() + get() = ir2string(callElement) override val callsiteFile: PsiFile? get() = codegen.context.psiSourceManager.getKtFile(codegen.irFunction.fileParent) @@ -53,7 +53,19 @@ class IrSourceCompilerForInline( get() = OwnerKind.getMemberOwnerKind(callElement.descriptor.containingDeclaration) override val inlineCallSiteInfo: InlineCallSiteInfo - get() = InlineCallSiteInfo("TODO", null, null, false, false) + get() { + //TODO: support nested inline calls + val typeMapper = codegen.typeMapper + val signature = typeMapper.mapSignatureSkipGeneric(codegen.irFunction) + return InlineCallSiteInfo( + codegen.classCodegen.type.internalName, + signature.asmMethod.name, + signature.asmMethod.descriptor, + //compilationContextFunctionDescriptor.isInlineOrInsideInline() + false, + compilationContextFunctionDescriptor.isSuspend + ) + } override val lazySourceMapper: DefaultSourceMapper get() = codegen.classCodegen.getOrCreateSourceMapper() diff --git a/compiler/testData/codegen/box/assert/jvm/superClassInitializer.kt b/compiler/testData/codegen/box/assert/jvm/superClassInitializer.kt index 0f7c1493a16..c15120c2db0 100644 --- a/compiler/testData/codegen/box/assert/jvm/superClassInitializer.kt +++ b/compiler/testData/codegen/box/assert/jvm/superClassInitializer.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm // WITH_RUNTIME diff --git a/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt b/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt index 3db4c050527..d723f73771d 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt @@ -2,7 +2,6 @@ // KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm // WITH_RUNTIME // FULL_JDK -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM package test diff --git a/compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt b/compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt index d8d3925a350..3c5cd965972 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // FILE: inline.kt // KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm diff --git a/compiler/testData/codegen/bytecodeText/assert/jvmInlineLambda.kt b/compiler/testData/codegen/bytecodeText/assert/jvmInlineLambda.kt index e76d48714e4..3f823818f6c 100644 --- a/compiler/testData/codegen/bytecodeText/assert/jvmInlineLambda.kt +++ b/compiler/testData/codegen/bytecodeText/assert/jvmInlineLambda.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm inline fun inlineMe(c: () -> Unit) = c()