From 386d8b1f61430c1ee9a797760528187aff6a9f7f Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Tue, 13 Dec 2011 18:36:11 +0400 Subject: [PATCH] rename @JetParameter to @JetValueParameter requested by Andrey Breslav --- .../jetbrains/jet/codegen/FunctionCodegen.java | 18 +++++++++--------- .../jetbrains/jet/codegen/JetTypeMapper.java | 2 +- .../resolve/java/JavaDescriptorResolver.java | 6 +++--- .../jet/lang/resolve/java/StdlibNames.java | 10 +++++----- ...etParameter.java => JetValueParameter.java} | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) rename stdlib/src/jet/typeinfo/{JetParameter.java => JetValueParameter.java} (94%) diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/FunctionCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/FunctionCodegen.java index 1f7f2cfca14..ab951d0e173 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/FunctionCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/FunctionCodegen.java @@ -94,15 +94,15 @@ public class FunctionCodegen { } if(kind == OwnerKind.TRAIT_IMPL) { - AnnotationVisitor av = mv.visitParameterAnnotation(start++, StdlibNames.JET_PARAMETER_DESCRIPTOR, true); - av.visit(StdlibNames.JET_PARAMETER_NAME_FIELD, "this$self"); + AnnotationVisitor av = mv.visitParameterAnnotation(start++, StdlibNames.JET_VALUE_PARAMETER_DESCRIPTOR, true); + av.visit(StdlibNames.JET_VALUE_PARAMETER_NAME_FIELD, "this$self"); av.visitEnd(); } if(receiverParameter.exists()) { - AnnotationVisitor av = mv.visitParameterAnnotation(start++, StdlibNames.JET_PARAMETER_DESCRIPTOR, true); - av.visit(StdlibNames.JET_PARAMETER_NAME_FIELD, "this$receiver"); + AnnotationVisitor av = mv.visitParameterAnnotation(start++, StdlibNames.JET_VALUE_PARAMETER_DESCRIPTOR, true); + av.visit(StdlibNames.JET_VALUE_PARAMETER_NAME_FIELD, "this$receiver"); if(receiverParameter.getType().isNullable()) { - av.visit(StdlibNames.JET_PARAMETER_NULLABLE_FIELD, true); + av.visit(StdlibNames.JET_VALUE_PARAMETER_NULLABLE_FIELD, true); } av.visitEnd(); } @@ -112,14 +112,14 @@ public class FunctionCodegen { av.visitEnd(); } for(int i = 0; i != paramDescrs.size(); ++i) { - AnnotationVisitor av = mv.visitParameterAnnotation(i + start, StdlibNames.JET_PARAMETER_DESCRIPTOR, true); + AnnotationVisitor av = mv.visitParameterAnnotation(i + start, StdlibNames.JET_VALUE_PARAMETER_DESCRIPTOR, true); ValueParameterDescriptor parameterDescriptor = paramDescrs.get(i); - av.visit(StdlibNames.JET_PARAMETER_NAME_FIELD, parameterDescriptor.getName()); + av.visit(StdlibNames.JET_VALUE_PARAMETER_NAME_FIELD, parameterDescriptor.getName()); if(parameterDescriptor.hasDefaultValue()) { - av.visit(StdlibNames.JET_PARAMETER_HAS_DEFAULT_VALUE_FIELD, true); + av.visit(StdlibNames.JET_VALUE_PARAMETER_HAS_DEFAULT_VALUE_FIELD, true); } if(parameterDescriptor.getOutType().isNullable()) { - av.visit(StdlibNames.JET_PARAMETER_NULLABLE_FIELD, true); + av.visit(StdlibNames.JET_VALUE_PARAMETER_NULLABLE_FIELD, true); } av.visitEnd(); } diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/JetTypeMapper.java b/compiler/backend/src/org/jetbrains/jet/codegen/JetTypeMapper.java index 750d036d961..d09e0480f0b 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/JetTypeMapper.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/JetTypeMapper.java @@ -54,7 +54,7 @@ public class JetTypeMapper { public static final Type ARRAY_DOUBLE_TYPE = Type.getType(double[].class); public static final Type ARRAY_BOOL_TYPE = Type.getType(boolean[].class); public static final Type ARRAY_GENERIC_TYPE = Type.getType(Object[].class); - public static final Type JET_PARAMETER_TYPE = Type.getObjectType("jet/typeinfo/JetParameter"); + public static final Type JET_PARAMETER_TYPE = Type.getObjectType("jet/typeinfo/JetValueParameter"); public static final Type JET_TYPE_PARAMETER_TYPE = Type.getObjectType("jet/typeinfo/JetTypeParameter"); public static final Type JET_METHOD_TYPE = Type.getObjectType("jet/typeinfo/JetMethod"); diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java index 4bafcdc944d..d74c6aafd28 100644 --- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java +++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java @@ -369,13 +369,13 @@ public class JavaDescriptorResolver { PsiNameValuePair[] attributes = annotation.getParameterList().getAttributes(); attributes.toString(); - if (annotation.getQualifiedName().equals(StdlibNames.JET_PARAMETER_CLASS)) { - PsiLiteralExpression nameExpression = (PsiLiteralExpression) annotation.findAttributeValue(StdlibNames.JET_PARAMETER_NAME_FIELD); + if (annotation.getQualifiedName().equals(StdlibNames.JET_VALUE_PARAMETER_CLASS)) { + PsiLiteralExpression nameExpression = (PsiLiteralExpression) annotation.findAttributeValue(StdlibNames.JET_VALUE_PARAMETER_NAME_FIELD); if (nameExpression != null) { name = (String) nameExpression.getValue(); } - PsiLiteralExpression nullableExpression = (PsiLiteralExpression) annotation.findAttributeValue(StdlibNames.JET_PARAMETER_NULLABLE_FIELD); + PsiLiteralExpression nullableExpression = (PsiLiteralExpression) annotation.findAttributeValue(StdlibNames.JET_VALUE_PARAMETER_NULLABLE_FIELD); if (nullableExpression != null) { nullable = (Boolean) nullableExpression.getValue(); } else { diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/StdlibNames.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/StdlibNames.java index bf268b52f7a..214be7c888d 100644 --- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/StdlibNames.java +++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/StdlibNames.java @@ -7,12 +7,12 @@ import org.objectweb.asm.Type; */ public class StdlibNames { - public static final String JET_PARAMETER_CLASS = "jet.typeinfo.JetParameter"; - public static final String JET_PARAMETER_DESCRIPTOR = "Ljet/typeinfo/JetParameter;"; + public static final String JET_VALUE_PARAMETER_CLASS = "jet.typeinfo.JetValueParameter"; + public static final String JET_VALUE_PARAMETER_DESCRIPTOR = "Ljet/typeinfo/JetValueParameter;"; - public static final String JET_PARAMETER_NAME_FIELD = "name"; - public static final String JET_PARAMETER_HAS_DEFAULT_VALUE_FIELD = "hasDefaultValue"; - public static final String JET_PARAMETER_NULLABLE_FIELD = "nullable"; + public static final String JET_VALUE_PARAMETER_NAME_FIELD = "name"; + public static final String JET_VALUE_PARAMETER_HAS_DEFAULT_VALUE_FIELD = "hasDefaultValue"; + public static final String JET_VALUE_PARAMETER_NULLABLE_FIELD = "nullable"; public static final String JET_TYPE_PARAMETER_CLASS = "jet.typeinfo.JetTypeParameter"; diff --git a/stdlib/src/jet/typeinfo/JetParameter.java b/stdlib/src/jet/typeinfo/JetValueParameter.java similarity index 94% rename from stdlib/src/jet/typeinfo/JetParameter.java rename to stdlib/src/jet/typeinfo/JetValueParameter.java index bae06e264b1..c40848327db 100644 --- a/stdlib/src/jet/typeinfo/JetParameter.java +++ b/stdlib/src/jet/typeinfo/JetValueParameter.java @@ -12,7 +12,7 @@ import java.lang.annotation.Target; */ @Target({ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) -public @interface JetParameter { +public @interface JetValueParameter { /** * @return name of parameter */