Support bound callable reference inlining in IR

This commit is contained in:
Mikhael Bogdanov
2019-05-28 15:44:51 +02:00
parent 3c093f321d
commit 81e6416bfe
28 changed files with 461 additions and 180 deletions
@@ -188,7 +188,7 @@ internal fun Type.boxReceiverForBoundReference() =
internal fun Type.boxReceiverForBoundReference(kotlinType: KotlinType, typeMapper: KotlinTypeMapper) =
AsmUtil.boxType(this, kotlinType, typeMapper)
abstract class ExpressionLambda(protected val typeMapper: KotlinTypeMapper, isCrossInline: Boolean) : LambdaInfo(isCrossInline) {
abstract class ExpressionLambda(isCrossInline: Boolean) : LambdaInfo(isCrossInline) {
override fun generateLambdaBody(sourceCompiler: SourceCompilerForInline, reifiedTypeInliner: ReifiedTypeInliner) {
node = sourceCompiler.generateLambdaBody(this)
}
@@ -200,7 +200,7 @@ class PsiExpressionLambda(
languageVersionSettings: LanguageVersionSettings,
isCrossInline: Boolean,
override val isBoundCallableReference: Boolean
) : ExpressionLambda(typeMapper, isCrossInline) {
) : ExpressionLambda(isCrossInline) {
override val lambdaClassType: Type