From 1c229d173e22d6c34a5a8bdc1f659f1f414b05f1 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Mon, 5 Oct 2015 12:40:01 +0300 Subject: [PATCH] Forget old classes from jet.runtime.typeinfo.*, drop JetValueParameter --- .../kotlin/load/java/JvmAnnotationNames.java | 13 ------- ...eadKotlinClassHeaderAnnotationVisitor.java | 19 ---------- .../runtime/typeinfo/JetValueParameter.java | 36 ------------------- .../idea/versions/KotlinAbiVersionIndex.kt | 9 ++--- 4 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 core/runtime.jvm/src/jet/runtime/typeinfo/JetValueParameter.java diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/JvmAnnotationNames.java b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/JvmAnnotationNames.java index 9c49c336897..281ecf6b77e 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/JvmAnnotationNames.java +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/JvmAnnotationNames.java @@ -77,19 +77,6 @@ public final class JvmAnnotationNames { public static final String KIND_INTERNAL_NAME = JvmClassName.byClassId(KIND_CLASS_ID).getInternalName(); } - @Deprecated - public static final FqName OLD_JET_CLASS_ANNOTATION = new FqName("jet.runtime.typeinfo.JetClass"); - @Deprecated - public static final FqName OLD_JET_PACKAGE_CLASS_ANNOTATION = new FqName("jet.runtime.typeinfo.JetPackageClass"); - @Deprecated - public static final FqName OLD_KOTLIN_CLASS = new FqName("jet.KotlinClass"); - @Deprecated - public static final FqName OLD_KOTLIN_PACKAGE = new FqName("jet.KotlinPackage"); - @Deprecated - public static final FqName OLD_KOTLIN_PACKAGE_FRAGMENT = new FqName("jet.KotlinPackageFragment"); - @Deprecated - public static final FqName OLD_KOTLIN_TRAIT_IMPL = new FqName("jet.KotlinTraitImpl"); - public static final String OLD_ABI_VERSION_FIELD_NAME = "abiVersion"; // When these annotations appear on a declaration, they are copied to the _type_ of the declaration, becoming type annotations diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/header/ReadKotlinClassHeaderAnnotationVisitor.java b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/header/ReadKotlinClassHeaderAnnotationVisitor.java index 384d96eafee..6d3bc9de532 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/header/ReadKotlinClassHeaderAnnotationVisitor.java +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/header/ReadKotlinClassHeaderAnnotationVisitor.java @@ -37,7 +37,6 @@ import static org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader.Kind.*; public class ReadKotlinClassHeaderAnnotationVisitor implements AnnotationVisitor { private static final Map HEADER_KINDS = new HashMap(); - private static final Map OLD_DEPRECATED_ANNOTATIONS_KINDS = new HashMap(); static { HEADER_KINDS.put(JvmClassName.byFqNameWithoutInnerClasses(KOTLIN_CLASS), CLASS); @@ -46,19 +45,6 @@ public class ReadKotlinClassHeaderAnnotationVisitor implements AnnotationVisitor HEADER_KINDS.put(JvmClassName.byFqNameWithoutInnerClasses(KOTLIN_MULTIFILE_CLASS), MULTIFILE_CLASS); HEADER_KINDS.put(JvmClassName.byFqNameWithoutInnerClasses(KOTLIN_MULTIFILE_CLASS_PART), MULTIFILE_CLASS_PART); HEADER_KINDS.put(KotlinSyntheticClass.CLASS_NAME, SYNTHETIC_CLASS); - - initOldAnnotations(); - } - - @SuppressWarnings("deprecation") - private static void initOldAnnotations() { - OLD_DEPRECATED_ANNOTATIONS_KINDS.put(JvmClassName.byFqNameWithoutInnerClasses(OLD_JET_CLASS_ANNOTATION), CLASS); - OLD_DEPRECATED_ANNOTATIONS_KINDS.put(JvmClassName.byFqNameWithoutInnerClasses(OLD_JET_PACKAGE_CLASS_ANNOTATION), - KotlinClassHeader.Kind.PACKAGE_FACADE); - OLD_DEPRECATED_ANNOTATIONS_KINDS.put(JvmClassName.byFqNameWithoutInnerClasses(OLD_KOTLIN_CLASS), CLASS); - OLD_DEPRECATED_ANNOTATIONS_KINDS.put(JvmClassName.byFqNameWithoutInnerClasses(OLD_KOTLIN_PACKAGE), PACKAGE_FACADE); - OLD_DEPRECATED_ANNOTATIONS_KINDS.put(JvmClassName.byFqNameWithoutInnerClasses(OLD_KOTLIN_PACKAGE_FRAGMENT), SYNTHETIC_CLASS); - OLD_DEPRECATED_ANNOTATIONS_KINDS.put(JvmClassName.byFqNameWithoutInnerClasses(OLD_KOTLIN_TRAIT_IMPL), SYNTHETIC_CLASS); } private BinaryVersion version = AbiVersionUtil.INVALID_VERSION; @@ -141,11 +127,6 @@ public class ReadKotlinClassHeaderAnnotationVisitor implements AnnotationVisitor } } - KotlinClassHeader.Kind oldAnnotationKind = OLD_DEPRECATED_ANNOTATIONS_KINDS.get(annotation); - if (oldAnnotationKind != null) { - headerKind = oldAnnotationKind; - } - return null; } diff --git a/core/runtime.jvm/src/jet/runtime/typeinfo/JetValueParameter.java b/core/runtime.jvm/src/jet/runtime/typeinfo/JetValueParameter.java deleted file mode 100644 index 060b337a85b..00000000000 --- a/core/runtime.jvm/src/jet/runtime/typeinfo/JetValueParameter.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2010-2013 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package jet.runtime.typeinfo; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * @deprecated This class is no longer used in the bytecode produced by Kotlin compiler - * and exists in the Kotlin Java Runtime only for compatibility with the older code. - * It will be deleted completely after M13. - */ -@Target(ElementType.PARAMETER) -@Retention(RetentionPolicy.RUNTIME) -@Deprecated -public @interface JetValueParameter { - String name(); - - String type() default ""; -} diff --git a/idea/src/org/jetbrains/kotlin/idea/versions/KotlinAbiVersionIndex.kt b/idea/src/org/jetbrains/kotlin/idea/versions/KotlinAbiVersionIndex.kt index 702ef355472..7d3e1fbc4d7 100644 --- a/idea/src/org/jetbrains/kotlin/idea/versions/KotlinAbiVersionIndex.kt +++ b/idea/src/org/jetbrains/kotlin/idea/versions/KotlinAbiVersionIndex.kt @@ -39,16 +39,11 @@ public object KotlinAbiVersionIndex : KotlinAbiVersionIndexBase() { inputData: FileContent -> var version: BinaryVersion? = null