KT-2712 Debugger should show value of receiver of extension functions

#KT-2712 fixed
This commit is contained in:
Evgeny Gerashchenko
2012-10-01 21:02:28 +04:00
parent e4f2fdc5f2
commit 069ef8ef91
3 changed files with 4 additions and 3 deletions
@@ -245,7 +245,7 @@ public class FunctionCodegen extends GenerationStateAware {
if (receiverParameter.exists()) {
Type type = state.getTypeMapper().mapType(receiverParameter.getType());
// TODO: specify signature
mv.visitLocalVariable("this$receiver", type.getDescriptor(), null, methodBegin, methodEnd, k);
mv.visitLocalVariable(JvmAbi.RECEIVER_PARAMETER, type.getDescriptor(), null, methodBegin, methodEnd, k);
k += type.getSize();
}
@@ -370,7 +370,7 @@ public class FunctionCodegen extends GenerationStateAware {
if (receiverParameter.exists()) {
JetValueParameterAnnotationWriter av = JetValueParameterAnnotationWriter.visitParameterAnnotation(mv, start++);
av.writeName("this$receiver");
av.writeName(JvmAbi.RECEIVER_PARAMETER);
av.writeReceiver();
if (kotlinParameterTypes.get(0) != null) {
av.writeType(kotlinParameterTypes.get(0).getKotlinSignature());
@@ -32,6 +32,7 @@ public class JvmAbi {
public static final String CLASS_OBJECT_SUFFIX = "$" + CLASS_OBJECT_CLASS_NAME;
public static final String INSTANCE_FIELD = "$instance";
public static final String RECEIVER_PARAMETER = "$receiver";
public static final JvmClassName JETBRAINS_NOT_NULL_ANNOTATION =
JvmClassName.byFqNameWithoutInnerClasses("org.jetbrains.annotations.NotNull");
@@ -24,7 +24,7 @@ import java.lang.annotation.Target;
/**
* Annotation for method
*
* The fact of receiver presence must be deducted from presence of 'this$receiver' parameter
* The fact of receiver presence must be deducted from presence of '$receiver' parameter
*
* @author alex.tkachman
*