JVM_IR: wrap performInline in enterIntoInlining/exitFromInliningOf

This commit is contained in:
pyos
2019-04-12 14:51:27 +02:00
committed by max-kammerer
parent 931bbd8cec
commit 90f11211d3
78 changed files with 7 additions and 78 deletions
@@ -93,7 +93,13 @@ class IrInlineCodegen(
expression: IrFunctionAccessExpression
) {
val typeArguments = expression.descriptor.typeParameters.keysToMap { expression.getTypeArgumentOrDefault(it) }
performInline(typeArguments, callDefault, codegen)
// TODO port inlining cycle detection to IrFunctionAccessExpression & pass it
state.globalInlineContext.enterIntoInlining(null)
try {
performInline(typeArguments, callDefault, codegen)
} finally {
state.globalInlineContext.exitFromInliningOf(null)
}
}
private fun rememberClosure(irReference: IrFunctionReference, type: Type, parameter: IrValueParameter): LambdaInfo {