Move jet.runtime.Intrinsic to kotlin.jvm.internal.Intrinsic
This commit is contained in:
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package org.jetbrains.jet.lang.resolve;
|
package org.jetbrains.jet.lang.resolve;
|
||||||
|
|
||||||
import jet.runtime.Intrinsic;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||||
@@ -97,7 +96,8 @@ public class CompileTimeConstantUtils {
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static String getIntrinsicAnnotationArgument(@NotNull Annotated annotatedDescriptor) {
|
public static String getIntrinsicAnnotationArgument(@NotNull Annotated annotatedDescriptor) {
|
||||||
AnnotationDescriptor intrinsicAnnotation = annotatedDescriptor.getAnnotations().findAnnotation(new FqName(Intrinsic.class.getName()));
|
AnnotationDescriptor intrinsicAnnotation =
|
||||||
|
annotatedDescriptor.getAnnotations().findAnnotation(new FqName("kotlin.jvm.internal.Intrinsic"));
|
||||||
if (intrinsicAnnotation == null) return null;
|
if (intrinsicAnnotation == null) return null;
|
||||||
|
|
||||||
Collection<CompileTimeConstant<?>> values = intrinsicAnnotation.getAllValueArguments().values();
|
Collection<CompileTimeConstant<?>> values = intrinsicAnnotation.getAllValueArguments().values();
|
||||||
|
|||||||
@@ -1,28 +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;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@Target(ElementType.METHOD)
|
|
||||||
public @interface Intrinsic {
|
|
||||||
String value();
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ package kotlin
|
|||||||
import java.io.ByteArrayInputStream
|
import java.io.ByteArrayInputStream
|
||||||
import java.nio.charset.Charset
|
import java.nio.charset.Charset
|
||||||
import java.util.Arrays
|
import java.util.Arrays
|
||||||
import jet.runtime.Intrinsic
|
import kotlin.jvm.internal.Intrinsic
|
||||||
|
|
||||||
// Array "constructor"
|
// Array "constructor"
|
||||||
[Intrinsic("kotlin.arrays.array")] public fun <reified T> array(vararg t : T) : Array<T> = t
|
[Intrinsic("kotlin.arrays.array")] public fun <reified T> array(vararg t : T) : Array<T> = t
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
package kotlin
|
package kotlin
|
||||||
|
|
||||||
import java.lang.Class
|
|
||||||
import java.lang.Object
|
|
||||||
import java.lang.annotation.*
|
import java.lang.annotation.*
|
||||||
|
import kotlin.jvm.internal.Intrinsic
|
||||||
import jet.runtime.Intrinsic
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This annotation indicates what exceptions should be declared by a function when compiled to a JVM method
|
* This annotation indicates what exceptions should be declared by a function when compiled to a JVM method
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package kotlin.jvm.internal
|
||||||
|
|
||||||
|
import java.lang.annotation.*
|
||||||
|
|
||||||
|
Retention(RetentionPolicy.RUNTIME)
|
||||||
|
annotation class Intrinsic(val value: String)
|
||||||
Reference in New Issue
Block a user