Drop annotations from stdlib and compiler

This commit is contained in:
Alexey Tsvetkov
2015-10-16 18:14:24 +03:00
parent c50aab6a75
commit df8066b1e4
14 changed files with 34 additions and 216 deletions
-19
View File
@@ -80,16 +80,6 @@ public annotation class Extension
@Retention(SOURCE)
public annotation class Suppress(vararg val names: String)
/**
* Enables the tail call optimization for the annotated function. If the annotated function
* calls itself recursively as the last operation it performs, it will be executed without
* growing the stack depth. Tail call optimization is currently only supported by the JVM
* backend.
*/
@Target(FUNCTION)
@Retention(SOURCE)
private annotation class tailrec
/**
* Hides the annotated function, property or constructor from the overload resolution,
* thus preventing its usages from newly compiled code, but keeps compiling it
@@ -101,15 +91,6 @@ private annotation class tailrec
@Deprecated("Use @Deprecated(\"...\", level = DeprecationLevel.HIDDEN) instead", replaceWith = ReplaceWith("@Deprecated(, level = DeprecationLevel.HIDDEN)"))
public annotation class HiddenDeclaration
/**
* Marks annotated function as `external`, meaning that it's not implemented
* in Kotlin but rather in a different language (for example, in C/C++ using JNI or JavaScript).
*/
@Target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
@Retention(SOURCE)
@MustBeDocumented
private annotation class external
/**
* Suppresses errors about variance conflict
*/
-48
View File
@@ -1,48 +0,0 @@
/*
* Copyright 2010-2015 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 kotlin
/**
* Annotates the parameter of a function annotated as [inline] and forbids inlining of
* function literals passed as arguments for this parameter.
*/
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.RUNTIME)
@MustBeDocumented
private annotation class noinline
/**
* Enables inlining of the annotated function and the function literals that it takes as parameters into the
* calling functions. Inline functions can use reified type parameters, and lambdas passed to inline
* functions can contain non-local returns.
* See the [Kotlin language documentation](http://kotlinlang.org/docs/reference/inline-functions.html) for more information.
*
* @see noinline
* @see crossinline
*/
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
@Retention(AnnotationRetention.RUNTIME)
@MustBeDocumented
private annotation class inline
/**
* Forbids use of non-local control flow statements within lambdas passed as arguments for this parameter.
*/
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.RUNTIME)
@MustBeDocumented
private annotation class crossinline