Get rid of redundant 'afterParameterPut' method from call generators
This commit is contained in:
@@ -44,13 +44,6 @@ abstract class CallGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
override fun afterParameterPut(
|
||||
type: Type,
|
||||
stackValue: StackValue,
|
||||
parameterIndex: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun processAndPutHiddenParameters(justProcess: Boolean) {
|
||||
|
||||
}
|
||||
@@ -111,11 +104,6 @@ abstract class CallGenerator {
|
||||
|
||||
abstract fun genCallInner(callableMethod: Callable, resolvedCall: ResolvedCall<*>?, callDefault: Boolean, codegen: ExpressionCodegen)
|
||||
|
||||
abstract fun afterParameterPut(
|
||||
type: Type,
|
||||
stackValue: StackValue,
|
||||
parameterIndex: Int)
|
||||
|
||||
abstract fun genValueAndPut(
|
||||
valueParameterDescriptor: ValueParameterDescriptor,
|
||||
argumentExpression: KtExpression,
|
||||
|
||||
@@ -1087,8 +1087,7 @@ public abstract class StackValue {
|
||||
Type lastParameterType = ArraysKt.last(setter.getParameterTypes());
|
||||
coerce(topOfStackType, lastParameterType, v);
|
||||
|
||||
getCallGenerator().afterParameterPut(lastParameterType, StackValue.onStack(lastParameterType),
|
||||
CollectionsKt.getLastIndex(setter.getValueParameterTypes()));
|
||||
getCallGenerator().putValueIfNeeded(lastParameterType, StackValue.onStack(lastParameterType));
|
||||
|
||||
//Convention setter couldn't have default parameters, just getter can have it at last positions
|
||||
//We should remove default parameters of getter from stack*/
|
||||
|
||||
@@ -670,11 +670,6 @@ public class InlineCodegen extends CallGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterParameterPut(@NotNull Type type, @NotNull StackValue stackValue, int parameterIndex) {
|
||||
putArgumentOrCapturedToLocalVal(type, stackValue, -1, parameterIndex);
|
||||
}
|
||||
|
||||
private void putArgumentOrCapturedToLocalVal(
|
||||
@NotNull Type type,
|
||||
@NotNull StackValue stackValue,
|
||||
@@ -932,7 +927,8 @@ public class InlineCodegen extends CallGenerator {
|
||||
if (shouldPutGeneralValue(parameterType, value)) {
|
||||
value.put(parameterType, codegen.v);
|
||||
}
|
||||
afterParameterPut(parameterType, value, index);
|
||||
|
||||
putArgumentOrCapturedToLocalVal(parameterType, value, -1, index);
|
||||
}
|
||||
|
||||
private boolean processDefaultMaskOrMethodHandler(@NotNull StackValue value, @NotNull ValueKind kind) {
|
||||
|
||||
-4
@@ -87,10 +87,6 @@ class InlineCodegenForDefaultBody(
|
||||
transformedMethod.accept(MethodBodyVisitor(codegen.v))
|
||||
}
|
||||
|
||||
override fun afterParameterPut(type: Type, stackValue: StackValue, parameterIndex: Int) {
|
||||
throw UnsupportedOperationException("Shouldn't be called")
|
||||
}
|
||||
|
||||
override fun genValueAndPut(valueParameterDescriptor: ValueParameterDescriptor, argumentExpression: KtExpression, parameterType: Type, parameterIndex: Int) {
|
||||
throw UnsupportedOperationException("Shouldn't be called")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user