Minor. Renamed enum constants for clarification.

This commit is contained in:
Evgeny Gerashchenko
2014-03-28 21:25:58 +04:00
parent 4a79bfa16d
commit 93dfc00880
4 changed files with 6 additions and 6 deletions
@@ -367,7 +367,7 @@ public class FunctionCodegen extends ParentCodegenAwareImpl {
} }
private static boolean needIndexForVar(JvmMethodParameterKind kind) { 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) { 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) { private static int findFirstSuperArgument(@NotNull CallableMethod method) {
int i = 0; int i = 0;
for (JvmMethodParameterSignature type : method.getValueParameters()) { 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 return i + 1; // because of this
} }
i += type.getAsmType().getSize(); i += type.getAsmType().getSize();
@@ -23,10 +23,10 @@ public enum JvmMethodParameterKind {
THIS, THIS,
OUTER, OUTER,
RECEIVER, RECEIVER,
SHARED_VAR, CAPTURED_LOCAL_VARIABLE,
ENUM_NAME, ENUM_NAME,
ENUM_ORDINAL, 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); 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) { if (type != null) {
signatureWriter.writeParameterType(JvmMethodParameterKind.SHARED_VAR); signatureWriter.writeParameterType(JvmMethodParameterKind.CAPTURED_LOCAL_VARIABLE);
signatureWriter.writeAsmType(type); signatureWriter.writeAsmType(type);
signatureWriter.writeParameterTypeEnd(); signatureWriter.writeParameterTypeEnd();
} }
@@ -782,7 +782,7 @@ public class JetTypeMapper extends BindingTraceAware {
if (superDescriptor instanceof ConstructorDescriptor && isAnonymousObject(descriptor.getContainingDeclaration())) { if (superDescriptor instanceof ConstructorDescriptor && isAnonymousObject(descriptor.getContainingDeclaration())) {
for (JvmMethodParameterSignature parameter : mapSignature((ConstructorDescriptor) superDescriptor).getValueParameters()) { 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.writeAsmType(parameter.getAsmType());
signatureWriter.writeParameterTypeEnd(); signatureWriter.writeParameterTypeEnd();
} }