Minor. Renamed enum constants for clarification.
This commit is contained in:
@@ -367,7 +367,7 @@ public class FunctionCodegen extends ParentCodegenAwareImpl {
|
||||
}
|
||||
|
||||
private static boolean needIndexForVar(JvmMethodParameterKind kind) {
|
||||
return kind == JvmMethodParameterKind.SHARED_VAR || kind == JvmMethodParameterKind.SUPER_CALL_PARAM;
|
||||
return kind == JvmMethodParameterKind.CAPTURED_LOCAL_VARIABLE || kind == JvmMethodParameterKind.SUPER_OF_ANONYMOUS_CALL_PARAM;
|
||||
}
|
||||
|
||||
public static void endVisit(MethodVisitor mv, @Nullable String description, @Nullable PsiElement method) {
|
||||
|
||||
@@ -1577,7 +1577,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
private static int findFirstSuperArgument(@NotNull CallableMethod method) {
|
||||
int i = 0;
|
||||
for (JvmMethodParameterSignature type : method.getValueParameters()) {
|
||||
if (type.getKind() == JvmMethodParameterKind.SUPER_CALL_PARAM) {
|
||||
if (type.getKind() == JvmMethodParameterKind.SUPER_OF_ANONYMOUS_CALL_PARAM) {
|
||||
return i + 1; // because of this
|
||||
}
|
||||
i += type.getAsmType().getSize();
|
||||
|
||||
+2
-2
@@ -23,10 +23,10 @@ public enum JvmMethodParameterKind {
|
||||
THIS,
|
||||
OUTER,
|
||||
RECEIVER,
|
||||
SHARED_VAR,
|
||||
CAPTURED_LOCAL_VARIABLE,
|
||||
ENUM_NAME,
|
||||
ENUM_ORDINAL,
|
||||
SUPER_CALL_PARAM;
|
||||
SUPER_OF_ANONYMOUS_CALL_PARAM;
|
||||
|
||||
private static final EnumSet<JvmMethodParameterKind> SKIPPED_IN_GENERIC_SIGNATURE = EnumSet.of(OUTER, ENUM_NAME, ENUM_ORDINAL);
|
||||
|
||||
|
||||
@@ -769,7 +769,7 @@ public class JetTypeMapper extends BindingTraceAware {
|
||||
}
|
||||
|
||||
if (type != null) {
|
||||
signatureWriter.writeParameterType(JvmMethodParameterKind.SHARED_VAR);
|
||||
signatureWriter.writeParameterType(JvmMethodParameterKind.CAPTURED_LOCAL_VARIABLE);
|
||||
signatureWriter.writeAsmType(type);
|
||||
signatureWriter.writeParameterTypeEnd();
|
||||
}
|
||||
@@ -782,7 +782,7 @@ public class JetTypeMapper extends BindingTraceAware {
|
||||
|
||||
if (superDescriptor instanceof ConstructorDescriptor && isAnonymousObject(descriptor.getContainingDeclaration())) {
|
||||
for (JvmMethodParameterSignature parameter : mapSignature((ConstructorDescriptor) superDescriptor).getValueParameters()) {
|
||||
signatureWriter.writeParameterType(JvmMethodParameterKind.SUPER_CALL_PARAM);
|
||||
signatureWriter.writeParameterType(JvmMethodParameterKind.SUPER_OF_ANONYMOUS_CALL_PARAM);
|
||||
signatureWriter.writeAsmType(parameter.getAsmType());
|
||||
signatureWriter.writeParameterTypeEnd();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user