Mark all declarations that will be evaluated with ir interpreter

This commit is contained in:
Ivan Kylchik
2021-10-28 16:42:23 +03:00
parent 1ccd5d1a3a
commit 1564f2c549
21 changed files with 905 additions and 41 deletions
+11
View File
@@ -24,27 +24,38 @@ public class Boolean private constructor() : Comparable<Boolean> {
/**
* Returns the inverse of this boolean.
*/
@kotlin.internal.IntrinsicConstEvaluation
public operator fun not(): Boolean
/**
* Performs a logical `and` operation between this Boolean and the [other] one. Unlike the `&&` operator,
* this function does not perform short-circuit evaluation. Both `this` and [other] will always be evaluated.
*/
@kotlin.internal.IntrinsicConstEvaluation
public infix fun and(other: Boolean): Boolean
/**
* Performs a logical `or` operation between this Boolean and the [other] one. Unlike the `||` operator,
* this function does not perform short-circuit evaluation. Both `this` and [other] will always be evaluated.
*/
@kotlin.internal.IntrinsicConstEvaluation
public infix fun or(other: Boolean): Boolean
/**
* Performs a logical `xor` operation between this Boolean and the [other] one.
*/
@kotlin.internal.IntrinsicConstEvaluation
public infix fun xor(other: Boolean): Boolean
@kotlin.internal.IntrinsicConstEvaluation
public override fun compareTo(other: Boolean): Int
@kotlin.internal.IntrinsicConstEvaluation
public override fun equals(other: Any?): Boolean
@kotlin.internal.IntrinsicConstEvaluation
public override fun toString(): String
@SinceKotlin("1.3")
companion object {}
}
+17
View File
@@ -28,14 +28,18 @@ public class Char private constructor() : Comparable<Char> {
* Returns zero if this value is equal to the specified other value, a negative number if it's less than other,
* or a positive number if it's greater than other.
*/
@kotlin.internal.IntrinsicConstEvaluation
public override fun compareTo(other: Char): Int
/** Adds the other Int value to this value resulting a Char. */
@kotlin.internal.IntrinsicConstEvaluation
public operator fun plus(other: Int): Char
/** Subtracts the other Char value from this value resulting an Int. */
@kotlin.internal.IntrinsicConstEvaluation
public operator fun minus(other: Char): Int
/** Subtracts the other Int value from this value resulting a Char. */
@kotlin.internal.IntrinsicConstEvaluation
public operator fun minus(other: Int): Char
/**
@@ -58,30 +62,43 @@ public class Char private constructor() : Comparable<Char> {
/** Returns the value of this character as a `Byte`. */
@Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code.toByte()"))
@DeprecatedSinceKotlin(warningSince = "1.5")
@kotlin.internal.IntrinsicConstEvaluation
public fun toByte(): Byte
/** Returns the value of this character as a `Char`. */
@kotlin.internal.IntrinsicConstEvaluation
public fun toChar(): Char
/** Returns the value of this character as a `Short`. */
@Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code.toShort()"))
@DeprecatedSinceKotlin(warningSince = "1.5")
@kotlin.internal.IntrinsicConstEvaluation
public fun toShort(): Short
/** Returns the value of this character as a `Int`. */
@Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code"))
@DeprecatedSinceKotlin(warningSince = "1.5")
@kotlin.internal.IntrinsicConstEvaluation
public fun toInt(): Int
/** Returns the value of this character as a `Long`. */
@Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code.toLong()"))
@DeprecatedSinceKotlin(warningSince = "1.5")
@kotlin.internal.IntrinsicConstEvaluation
public fun toLong(): Long
/** Returns the value of this character as a `Float`. */
@Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code.toFloat()"))
@DeprecatedSinceKotlin(warningSince = "1.5")
@kotlin.internal.IntrinsicConstEvaluation
public fun toFloat(): Float
/** Returns the value of this character as a `Double`. */
@Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code.toDouble()"))
@DeprecatedSinceKotlin(warningSince = "1.5")
@kotlin.internal.IntrinsicConstEvaluation
public fun toDouble(): Double
@kotlin.internal.IntrinsicConstEvaluation
public override fun equals(other: Any?): Boolean
@kotlin.internal.IntrinsicConstEvaluation
public override fun toString(): String
companion object {
/**
* The minimum value of a character code unit.
+1
View File
@@ -16,6 +16,7 @@ public abstract class Enum<E : Enum<E>>(name: String, ordinal: Int): Comparable<
/**
* Returns the name of this enum constant, exactly as declared in its enum declaration.
*/
@kotlin.internal.IntrinsicConstEvaluation
public final val name: String
/**
File diff suppressed because it is too large Load Diff
+10
View File
@@ -26,8 +26,10 @@ public class String : Comparable<String>, CharSequence {
/**
* Returns a string obtained by concatenating this string with the string representation of the given [other] object.
*/
@kotlin.internal.IntrinsicConstEvaluation
public operator fun plus(other: Any?): String
@kotlin.internal.IntrinsicConstEvaluation
public override val length: Int
/**
@@ -36,9 +38,17 @@ public class String : Comparable<String>, CharSequence {
* If the [index] is out of bounds of this string, throws an [IndexOutOfBoundsException] except in Kotlin/JS
* where the behavior is unspecified.
*/
@kotlin.internal.IntrinsicConstEvaluation
public override fun get(index: Int): Char
public override fun subSequence(startIndex: Int, endIndex: Int): CharSequence
@kotlin.internal.IntrinsicConstEvaluation
public override fun compareTo(other: String): Int
@kotlin.internal.IntrinsicConstEvaluation
public override fun equals(other: Any?): Boolean
@kotlin.internal.IntrinsicConstEvaluation
public override fun toString(): String
}