JVM: split inline intrinsics into "needed by JVM_IR" and "not"
or, alternatively, "suspend" and "not".
This commit is contained in:
+2
-7
@@ -126,13 +126,8 @@ class IrInlineCodegen(
|
||||
expression: IrFunctionAccessExpression,
|
||||
isInsideIfCondition: Boolean,
|
||||
) {
|
||||
performInline(
|
||||
expression.symbol.owner.typeParameters.map { it.symbol },
|
||||
// Always look for default lambdas to allow custom default argument handling in compiler plugins.
|
||||
inlineDefaultLambdas = true,
|
||||
codegen.typeMapper.typeSystem,
|
||||
registerLineNumberAfterwards = isInsideIfCondition,
|
||||
)
|
||||
// Always look for default lambdas to allow custom default argument handling in compiler plugins.
|
||||
performInline(inlineDefaultLambdas = true, registerLineNumberAfterwards = isInsideIfCondition)
|
||||
}
|
||||
|
||||
override fun genCycleStub(text: String, codegen: ExpressionCodegen) {
|
||||
|
||||
+9
-4
@@ -104,10 +104,15 @@ class IrSourceCompilerForInline(
|
||||
return FunctionCodegen(lambdaInfo.function, codegen.classCodegen).generate(codegen, reifiedTypeParameters)
|
||||
}
|
||||
|
||||
override fun compileInlineFunction(jvmSignature: JvmMethodSignature): SMAPAndMethodNode =
|
||||
callee.parentClassId?.let { containerId ->
|
||||
loadCompiledInlineFunction(containerId, jvmSignature.asmMethod, callee.isSuspend, callee.hasMangledReturnType, state)
|
||||
} ?: ClassCodegen.getOrCreate(callee.parentAsClass, codegen.context).generateMethodNode(callee)
|
||||
override fun compileInlineFunction(jvmSignature: JvmMethodSignature): SMAPAndMethodNode {
|
||||
generateInlineIntrinsicForIr(state.languageVersionSettings, callee.toIrBasedDescriptor())?.let {
|
||||
return it
|
||||
}
|
||||
callee.parentClassId?.let {
|
||||
return loadCompiledInlineFunction(it, jvmSignature.asmMethod, callee.isSuspend, callee.hasMangledReturnType, state)
|
||||
}
|
||||
return ClassCodegen.getOrCreate(callee.parentAsClass, codegen.context).generateMethodNode(callee)
|
||||
}
|
||||
|
||||
override fun hasFinallyBlocks() = data.hasFinallyBlocks()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user