Remove invokeWithAssertion function

This commit is contained in:
Michael Bogdanov
2015-04-07 12:01:16 +03:00
parent 3e953dbe24
commit 8b4886e3e0
5 changed files with 3 additions and 14 deletions
@@ -41,7 +41,7 @@ public abstract class CallGenerator {
@NotNull ExpressionCodegen codegen
) {
if (!callDefault) {
callableMethod.invokeWithNotNullAssertion(codegen.v, codegen.getState(), resolvedCall);
callableMethod.invokeWithoutAssertions(codegen.v);
}
else {
((CallableMethod)callableMethod).invokeDefaultWithNotNullAssertion(codegen.v, codegen.getState(), resolvedCall);
@@ -40,8 +40,6 @@ public trait Callable {
public val returnType: Type
public fun invokeWithNotNullAssertion(v: InstructionAdapter, state: GenerationState, resolvedCall: ResolvedCall<*>)
public fun invokeWithoutAssertions(v: InstructionAdapter)
public fun isStaticCall(): Boolean
@@ -55,11 +55,6 @@ public class CallableMethod(override val owner: Type, private val defaultImplOwn
get() = getAsmMethod().getArgumentTypes()
public override fun invokeWithNotNullAssertion(v: InstructionAdapter, state: GenerationState, resolvedCall: ResolvedCall<*>) {
invokeWithoutAssertions(v)
AsmUtil.genNotNullAssertionForMethod(v, state, resolvedCall)
}
public override fun invokeWithoutAssertions(v: InstructionAdapter) {
v.visitMethodInsn(invokeOpcode, owner.getInternalName(), getAsmMethod().getName(), getAsmMethod().getDescriptor())
}
@@ -910,7 +910,7 @@ public abstract class StackValue {
throw new UnsupportedOperationException("no getter specified");
}
getter.invokeWithNotNullAssertion(v, state, resolvedGetCall);
getter.invokeWithoutAssertions(v);
coerceTo(type, v);
}
@@ -963,7 +963,7 @@ public abstract class StackValue {
Type[] argumentTypes = setter.getParameterTypes();
coerce(topOfStackType, argumentTypes[argumentTypes.length - 1], v);
setter.invokeWithNotNullAssertion(v, state, resolvedSetCall);
setter.invokeWithoutAssertions(v);
Type returnType = setter.getReturnType();
if (returnType != Type.VOID_TYPE) {
pop(v, returnType);
@@ -40,10 +40,6 @@ public open class IntrinsicCallable(override val returnType: Type,
invokeIntrinsic(v)
}
override fun invokeWithNotNullAssertion(v: InstructionAdapter, state: GenerationState, resolvedCall: ResolvedCall<out CallableDescriptor>) {
invokeWithoutAssertions(v)
}
public open fun invokeIntrinsic(v: InstructionAdapter) {
invoke(v)
}