KT-52027 Encapsulate and fix calculation of parameter indices

This commit is contained in:
Pavel Mikhailovskii
2022-12-06 23:16:11 +00:00
committed by Space Team
parent a297240870
commit 2d69fd5a8a
9 changed files with 49 additions and 26 deletions
@@ -509,7 +509,6 @@ class ExpressionCodegen(
callGenerator.genValueAndPut(callee.extensionReceiverParameter!!, receiver, type, this, data)
}
callGenerator.beforeValueParametersStart(callee.contextReceiverParametersCount)
callee.valueParameters.subList(callee.contextReceiverParametersCount, callee.valueParameters.size)
.forEachIndexed { i, valueParameter -> handleValueParameter(i + contextReceivers.size, valueParameter) }
@@ -36,8 +36,6 @@ interface IrCallGenerator {
fun beforeCallStart() {}
fun beforeValueParametersStart(contextReceiversCount: Int) {}
fun afterCallEnd() {}
fun genValueAndPut(
@@ -150,10 +150,6 @@ class IrInlineCodegen(
}
}
override fun beforeValueParametersStart(contextReceiversCount: Int) {
invocationParamBuilder.markValueParametersStart(contextReceiversCount)
}
override fun genInlineCall(
callableMethod: IrCallableMethod,
codegen: ExpressionCodegen,