Minor. Renamed method parameter.

This commit is contained in:
Evgeny Gerashchenko
2013-06-27 17:41:59 +04:00
parent 72b0e1b07c
commit c6f6e6c756
@@ -1911,22 +1911,22 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
} }
private StackValue genSamInterfaceValue( private StackValue genSamInterfaceValue(
@NotNull JetExpression argumentExpression, @NotNull JetExpression expression,
@NotNull ClassDescriptorFromJvmBytecode samInterface, @NotNull ClassDescriptorFromJvmBytecode samInterface,
@NotNull JetVisitor<StackValue, StackValue> visitor @NotNull JetVisitor<StackValue, StackValue> visitor
) { ) {
if (argumentExpression instanceof JetFunctionLiteralExpression) { if (expression instanceof JetFunctionLiteralExpression) {
return genClosure(((JetFunctionLiteralExpression) argumentExpression).getFunctionLiteral(), samInterface); return genClosure(((JetFunctionLiteralExpression) expression).getFunctionLiteral(), samInterface);
} }
else { else {
JvmClassName className = JvmClassName className =
state.getSamWrapperClasses().getSamWrapperClass(samInterface, (JetFile) argumentExpression.getContainingFile()); state.getSamWrapperClasses().getSamWrapperClass(samInterface, (JetFile) expression.getContainingFile());
v.anew(className.getAsmType()); v.anew(className.getAsmType());
v.dup(); v.dup();
Type functionType = typeMapper.mapType(samInterface.getFunctionTypeForSamInterface()); Type functionType = typeMapper.mapType(samInterface.getFunctionTypeForSamInterface());
argumentExpression.accept(visitor, StackValue.none()).put(functionType, v); expression.accept(visitor, StackValue.none()).put(functionType, v);
v.invokespecial(className.getInternalName(), "<init>", Type.getMethodDescriptor(Type.VOID_TYPE, functionType)); v.invokespecial(className.getInternalName(), "<init>", Type.getMethodDescriptor(Type.VOID_TYPE, functionType));
return StackValue.onStack(className.getAsmType()); return StackValue.onStack(className.getAsmType());