JVM: remove unused methodOwner from InlineCodegen

This commit is contained in:
pyos
2021-05-27 14:52:02 +02:00
committed by max-kammerer
parent ed26e97df8
commit d4485bc475
5 changed files with 8 additions and 13 deletions
@@ -2967,13 +2967,11 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
typeMapper.setUseOldManglingRulesForFunctionAcceptingInlineClass(false);
}
}
Type methodOwner = typeMapper.mapImplementationOwner(functionDescriptor);
if (isDefaultCompilation) {
return new InlineCodegenForDefaultBody(functionDescriptor, this, state, signature, sourceCompiler);
}
else {
return new PsiInlineCodegen(this, state, functionDescriptor, methodOwner, signature, typeParameterMappings, sourceCompiler,
typeMapper.mapOwner(descriptor));
} else {
return new PsiInlineCodegen(this, state, functionDescriptor, signature, typeParameterMappings, sourceCompiler,
typeMapper.mapImplementationOwner(functionDescriptor), typeMapper.mapOwner(descriptor));
}
}
@@ -36,7 +36,6 @@ abstract class InlineCodegen<out T : BaseExpressionCodegen>(
protected val codegen: T,
protected val state: GenerationState,
protected val functionDescriptor: FunctionDescriptor,
protected val methodOwner: Type,
protected val jvmSignature: JvmMethodSignature,
private val typeParameterMappings: TypeParameterMappings<*>,
protected val sourceCompiler: SourceCompilerForInline,
@@ -40,13 +40,13 @@ class PsiInlineCodegen(
codegen: ExpressionCodegen,
state: GenerationState,
function: FunctionDescriptor,
methodOwner: Type,
signature: JvmMethodSignature,
typeParameterMappings: TypeParameterMappings<KotlinType>,
sourceCompiler: SourceCompilerForInline,
private val actualDispatchReceiver: Type = methodOwner
private val methodOwner: Type,
private val actualDispatchReceiver: Type
) : InlineCodegen<ExpressionCodegen>(
codegen, state, function, methodOwner, signature, typeParameterMappings, sourceCompiler,
codegen, state, function, signature, typeParameterMappings, sourceCompiler,
ReifiedTypeInliner(
typeParameterMappings, PsiInlineIntrinsicsSupport(state), codegen.typeSystem,
state.languageVersionSettings, state.unifiedNullChecks