Mark all declarations that will be evaluated with ir interpreter
This commit is contained in:
@@ -104,6 +104,9 @@ public class DataFlowAnalyzer {
|
||||
}
|
||||
|
||||
private boolean typeHasOverriddenEquals(@NotNull KotlinType type, @NotNull KtElement lookupElement) {
|
||||
// `equals` from `String` is not fake override because it is marked as `IntrinsicConstEvaluation`
|
||||
if (KotlinBuiltIns.isString(type)) return false;
|
||||
|
||||
Collection<? extends SimpleFunctionDescriptor> members = type.getMemberScope().getContributedFunctions(
|
||||
OperatorNameConventions.EQUALS, new KotlinLookupLocation(lookupElement)
|
||||
);
|
||||
|
||||
@@ -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 {}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
@@ -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
|
||||
}
|
||||
|
||||
@@ -187,6 +187,8 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
}
|
||||
|
||||
generateConversions(kind)
|
||||
generateEquals()
|
||||
generateToString()
|
||||
|
||||
out.println("}\n")
|
||||
}
|
||||
@@ -207,6 +209,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
* 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.
|
||||
*/""")
|
||||
out.println(" @kotlin.internal.IntrinsicConstEvaluation")
|
||||
out.print(" public ")
|
||||
if (otherKind == thisKind) out.print("override ")
|
||||
out.println("operator fun compareTo(other: ${otherKind.capitalized}): Int")
|
||||
@@ -229,6 +232,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
"rem" ->
|
||||
out.println(" @SinceKotlin(\"1.1\")")
|
||||
}
|
||||
out.println(" @kotlin.internal.IntrinsicConstEvaluation")
|
||||
out.println(" public operator fun $name(other: ${otherKind.capitalized}): ${returnType.capitalized}")
|
||||
}
|
||||
out.println()
|
||||
@@ -258,6 +262,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
for ((name, doc) in unaryPlusMinusOperators) {
|
||||
val returnType = if (kind in listOf(PrimitiveType.SHORT, PrimitiveType.BYTE, PrimitiveType.CHAR)) "Int" else kind.capitalized
|
||||
out.println(" /** $doc */")
|
||||
out.println(" @kotlin.internal.IntrinsicConstEvaluation")
|
||||
out.println(" public operator fun $name(): $returnType")
|
||||
}
|
||||
out.println()
|
||||
@@ -272,6 +277,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
out.println(" *")
|
||||
out.println(detail.replaceIndent(" "))
|
||||
out.println(" */")
|
||||
out.println(" @kotlin.internal.IntrinsicConstEvaluation")
|
||||
out.println(" public infix fun $name(bitCount: Int): $className")
|
||||
out.println()
|
||||
}
|
||||
@@ -280,10 +286,12 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
for ((name, doc) in bitwiseOperators) {
|
||||
out.println(" /** $doc */")
|
||||
since?.let { out.println(" @SinceKotlin(\"$it\")") }
|
||||
out.println(" @kotlin.internal.IntrinsicConstEvaluation")
|
||||
out.println(" public infix fun $name(other: $className): $className")
|
||||
}
|
||||
out.println(" /** Inverts the bits in this value. */")
|
||||
since?.let { out.println(" @SinceKotlin(\"$it\")") }
|
||||
out.println(" @kotlin.internal.IntrinsicConstEvaluation")
|
||||
out.println(" public fun inv(): $className")
|
||||
out.println()
|
||||
}
|
||||
@@ -450,8 +458,21 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
out.println(" @DeprecatedSinceKotlin(warningSince = \"1.5\")")
|
||||
}
|
||||
|
||||
out.println(" @kotlin.internal.IntrinsicConstEvaluation")
|
||||
out.println(" public override fun to$otherName(): $otherName")
|
||||
}
|
||||
out.println()
|
||||
}
|
||||
|
||||
private fun generateEquals() {
|
||||
out.println(" @kotlin.internal.IntrinsicConstEvaluation")
|
||||
out.println(" public override fun equals(other: Any?): Boolean")
|
||||
out.println()
|
||||
}
|
||||
|
||||
private fun generateToString() {
|
||||
out.println(" @kotlin.internal.IntrinsicConstEvaluation")
|
||||
out.println(" public override fun toString(): String")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,6 +507,7 @@ class GenerateFloorDivMod(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
out.printDoc(GeneratePrimitives.binaryOperatorDoc("floorDiv", thisKind, otherKind), "")
|
||||
out.println("""@SinceKotlin("1.5")""")
|
||||
out.println("@kotlin.internal.InlineOnly")
|
||||
out.println("@kotlin.internal.IntrinsicConstEvaluation")
|
||||
val declaration = "public inline fun ${thisKind.capitalized}.floorDiv(other: ${otherKind.capitalized}): $returnTypeName"
|
||||
if (thisKind == otherKind && thisKind >= PrimitiveType.INT) {
|
||||
out.println(
|
||||
@@ -511,6 +533,7 @@ class GenerateFloorDivMod(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
out.printDoc(GeneratePrimitives.binaryOperatorDoc("mod", thisKind, otherKind),"")
|
||||
out.println("""@SinceKotlin("1.5")""")
|
||||
out.println("@kotlin.internal.InlineOnly")
|
||||
out.println("@kotlin.internal.IntrinsicConstEvaluation")
|
||||
val declaration = "public inline fun ${thisKind.capitalized}.mod(other: ${otherKind.capitalized}): ${returnType.capitalized}"
|
||||
if (thisKind == otherKind && thisKind >= PrimitiveType.INT) {
|
||||
out.println(
|
||||
@@ -536,6 +559,7 @@ class GenerateFloorDivMod(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
out.printDoc(GeneratePrimitives.binaryOperatorDoc("mod", thisKind, otherKind), "")
|
||||
out.println("""@SinceKotlin("1.5")""")
|
||||
out.println("@kotlin.internal.InlineOnly")
|
||||
out.println("@kotlin.internal.IntrinsicConstEvaluation")
|
||||
val declaration = "public inline fun ${thisKind.capitalized}.mod(other: ${otherKind.capitalized}): ${operationType.capitalized}"
|
||||
if (thisKind == otherKind && thisKind >= PrimitiveType.INT) {
|
||||
out.println(
|
||||
|
||||
@@ -67,7 +67,7 @@ class UnsignedTypeGenerator(val type: UnsignedType, out: PrintWriter) : BuiltIns
|
||||
out.println("@SinceKotlin(\"1.5\")")
|
||||
out.println("@WasExperimental(ExperimentalUnsignedTypes::class)")
|
||||
out.println("@JvmInline")
|
||||
out.println("public value class $className @PublishedApi internal constructor(@PublishedApi internal val data: $storageType) : Comparable<$className> {")
|
||||
out.println("public value class $className @kotlin.internal.IntrinsicConstEvaluation @PublishedApi internal constructor(@PublishedApi internal val data: $storageType) : Comparable<$className> {")
|
||||
out.println()
|
||||
out.println(""" companion object {
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1182,8 +1182,10 @@ public inline fun kotlin.String.trimEnd(predicate: (kotlin.Char) -> kotlin.Boole
|
||||
|
||||
public fun kotlin.String.trimEnd(vararg chars: kotlin.Char): kotlin.String
|
||||
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public fun kotlin.String.trimIndent(): kotlin.String
|
||||
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public fun kotlin.String.trimMargin(marginPrefix: kotlin.String = ...): kotlin.String
|
||||
|
||||
public fun kotlin.CharSequence.trimStart(): kotlin.CharSequence
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public val kotlin.Char.code: kotlin.Int { get; }
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.2")
|
||||
@@ -277,66 +278,82 @@ public inline fun kotlin.UShort.countTrailingZeroBits(): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Byte.floorDiv(other: kotlin.Byte): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Byte.floorDiv(other: kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Byte.floorDiv(other: kotlin.Long): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Byte.floorDiv(other: kotlin.Short): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Int.floorDiv(other: kotlin.Byte): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Int.floorDiv(other: kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Int.floorDiv(other: kotlin.Long): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Int.floorDiv(other: kotlin.Short): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Long.floorDiv(other: kotlin.Byte): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Long.floorDiv(other: kotlin.Int): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Long.floorDiv(other: kotlin.Long): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Long.floorDiv(other: kotlin.Short): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Short.floorDiv(other: kotlin.Byte): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Short.floorDiv(other: kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Short.floorDiv(other: kotlin.Long): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Short.floorDiv(other: kotlin.Short): kotlin.Int
|
||||
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -407,82 +424,102 @@ public inline fun <R, T> kotlin.Result<T>.mapCatching(transform: (value: T) -> R
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Byte.mod(other: kotlin.Byte): kotlin.Byte
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Byte.mod(other: kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Byte.mod(other: kotlin.Long): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Byte.mod(other: kotlin.Short): kotlin.Short
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Double.mod(other: kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Double.mod(other: kotlin.Float): kotlin.Double
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Float.mod(other: kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Float.mod(other: kotlin.Float): kotlin.Float
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Int.mod(other: kotlin.Byte): kotlin.Byte
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Int.mod(other: kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Int.mod(other: kotlin.Long): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Int.mod(other: kotlin.Short): kotlin.Short
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Long.mod(other: kotlin.Byte): kotlin.Byte
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Long.mod(other: kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Long.mod(other: kotlin.Long): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Long.mod(other: kotlin.Short): kotlin.Short
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Short.mod(other: kotlin.Byte): kotlin.Byte
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Short.mod(other: kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Short.mod(other: kotlin.Long): kotlin.Long
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun kotlin.Short.mod(other: kotlin.Short): kotlin.Short
|
||||
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -849,16 +886,16 @@ public final class Boolean : kotlin.Comparable<kotlin.Boolean> {
|
||||
|
||||
public open override operator fun compareTo(other: kotlin.Boolean): kotlin.Int
|
||||
|
||||
/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
/*∆*/
|
||||
public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
/*∆*/ public open override fun hashCode(): kotlin.Int
|
||||
/*∆*/
|
||||
public final operator fun not(): kotlin.Boolean
|
||||
|
||||
public final infix fun or(other: kotlin.Boolean): kotlin.Boolean
|
||||
|
||||
/*∆*/ public open override fun toString(): kotlin.String
|
||||
/*∆*/
|
||||
public open override fun toString(): kotlin.String
|
||||
|
||||
public final infix fun xor(other: kotlin.Boolean): kotlin.Boolean
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@@ -915,8 +952,8 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte> {
|
||||
|
||||
public final operator fun div(other: kotlin.Short): kotlin.Int
|
||||
|
||||
/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
/*∆*/
|
||||
public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
/*∆*/ public open override fun hashCode(): kotlin.Int
|
||||
/*∆*/
|
||||
public final operator fun inc(): kotlin.Byte
|
||||
@@ -999,8 +1036,8 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte> {
|
||||
|
||||
public open override fun toShort(): kotlin.Short
|
||||
|
||||
/*∆*/ public open override fun toString(): kotlin.String
|
||||
/*∆*/
|
||||
public open override fun toString(): kotlin.String
|
||||
|
||||
public final operator fun unaryMinus(): kotlin.Int
|
||||
|
||||
public final operator fun unaryPlus(): kotlin.Int
|
||||
@@ -1041,8 +1078,8 @@ public final class Char : kotlin.Comparable<kotlin.Char> {
|
||||
|
||||
public final operator fun dec(): kotlin.Char
|
||||
|
||||
/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
/*∆*/
|
||||
public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
/*∆*/ public open override fun hashCode(): kotlin.Int
|
||||
/*∆*/
|
||||
public final operator fun inc(): kotlin.Char
|
||||
@@ -1082,8 +1119,8 @@ public final class Char : kotlin.Comparable<kotlin.Char> {
|
||||
public final fun toShort(): kotlin.Short
|
||||
|
||||
/*∆*/ @kotlin.js.JsName(name = "toString")
|
||||
/*∆*/ public open override fun toString(): kotlin.String
|
||||
/*∆*/
|
||||
public open override fun toString(): kotlin.String
|
||||
|
||||
public companion object of Char {
|
||||
public const final val MAX_HIGH_SURROGATE: kotlin.Char = \uDBFF ('?') { get; }
|
||||
|
||||
@@ -1246,8 +1283,8 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double> {
|
||||
|
||||
public final operator fun div(other: kotlin.Short): kotlin.Double
|
||||
|
||||
/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
/*∆*/
|
||||
public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
/*∆*/ public open override fun hashCode(): kotlin.Int
|
||||
/*∆*/
|
||||
public final operator fun inc(): kotlin.Double
|
||||
@@ -1326,8 +1363,8 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double> {
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3")
|
||||
public open override fun toShort(): kotlin.Short
|
||||
|
||||
/*∆*/ public open override fun toString(): kotlin.String
|
||||
/*∆*/
|
||||
public open override fun toString(): kotlin.String
|
||||
|
||||
public final operator fun unaryMinus(): kotlin.Double
|
||||
|
||||
public final operator fun unaryPlus(): kotlin.Double
|
||||
@@ -1487,8 +1524,8 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float> {
|
||||
|
||||
public final operator fun div(other: kotlin.Short): kotlin.Float
|
||||
|
||||
/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
/*∆*/
|
||||
public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
/*∆*/ public open override fun hashCode(): kotlin.Int
|
||||
/*∆*/
|
||||
public final operator fun inc(): kotlin.Float
|
||||
@@ -1567,8 +1604,8 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float> {
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3")
|
||||
public open override fun toShort(): kotlin.Short
|
||||
|
||||
/*∆*/ public open override fun toString(): kotlin.String
|
||||
/*∆*/
|
||||
public open override fun toString(): kotlin.String
|
||||
|
||||
public final operator fun unaryMinus(): kotlin.Float
|
||||
|
||||
public final operator fun unaryPlus(): kotlin.Float
|
||||
@@ -1664,8 +1701,8 @@ public final class Int : kotlin.Number, kotlin.Comparable<kotlin.Int> {
|
||||
|
||||
public final operator fun div(other: kotlin.Short): kotlin.Int
|
||||
|
||||
/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
/*∆*/
|
||||
public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
/*∆*/ public open override fun hashCode(): kotlin.Int
|
||||
/*∆*/
|
||||
public final operator fun inc(): kotlin.Int
|
||||
@@ -1754,8 +1791,8 @@ public final class Int : kotlin.Number, kotlin.Comparable<kotlin.Int> {
|
||||
|
||||
public open override fun toShort(): kotlin.Short
|
||||
|
||||
/*∆*/ public open override fun toString(): kotlin.String
|
||||
/*∆*/
|
||||
public open override fun toString(): kotlin.String
|
||||
|
||||
public final operator fun unaryMinus(): kotlin.Int
|
||||
|
||||
public final operator fun unaryPlus(): kotlin.Int
|
||||
@@ -1865,8 +1902,8 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long> {
|
||||
|
||||
/*∆*/ public final inline operator fun div(other: kotlin.Short): kotlin.Long
|
||||
|
||||
/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
/*∆*/
|
||||
public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
/*∆*/ public open override fun hashCode(): kotlin.Int
|
||||
/*∆*/
|
||||
public final operator fun inc(): kotlin.Long
|
||||
@@ -1957,8 +1994,8 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long> {
|
||||
|
||||
public open override fun toShort(): kotlin.Short
|
||||
|
||||
/*∆*/ public open override fun toString(): kotlin.String
|
||||
/*∆*/
|
||||
public open override fun toString(): kotlin.String
|
||||
|
||||
public final operator fun unaryMinus(): kotlin.Long
|
||||
|
||||
/*∆*/ public final inline operator fun unaryPlus(): kotlin.Long
|
||||
@@ -2202,8 +2239,8 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short> {
|
||||
|
||||
public final operator fun div(other: kotlin.Short): kotlin.Int
|
||||
|
||||
/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
/*∆*/
|
||||
public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
/*∆*/ public open override fun hashCode(): kotlin.Int
|
||||
/*∆*/
|
||||
public final operator fun inc(): kotlin.Short
|
||||
@@ -2285,8 +2322,8 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short> {
|
||||
|
||||
public open override fun toShort(): kotlin.Short
|
||||
|
||||
/*∆*/ public open override fun toString(): kotlin.String
|
||||
/*∆*/
|
||||
public open override fun toString(): kotlin.String
|
||||
|
||||
public final operator fun unaryMinus(): kotlin.Int
|
||||
|
||||
public final operator fun unaryPlus(): kotlin.Int
|
||||
@@ -2334,8 +2371,8 @@ public final class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequenc
|
||||
|
||||
public open override operator fun compareTo(other: kotlin.String): kotlin.Int
|
||||
|
||||
/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
/*∆*/
|
||||
public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
public open override operator fun get(index: kotlin.Int): kotlin.Char
|
||||
|
||||
/*∆*/ public open override fun hashCode(): kotlin.Int
|
||||
@@ -2344,8 +2381,8 @@ public final class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequenc
|
||||
|
||||
public open override fun subSequence(startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence
|
||||
|
||||
/*∆*/ public open override fun toString(): kotlin.String
|
||||
/*∆*/
|
||||
public open override fun toString(): kotlin.String
|
||||
|
||||
public companion object of String {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1182,8 +1182,10 @@ public inline fun kotlin.String.trimEnd(predicate: (kotlin.Char) -> kotlin.Boole
|
||||
|
||||
public fun kotlin.String.trimEnd(vararg chars: kotlin.Char): kotlin.String
|
||||
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public fun kotlin.String.trimIndent(): kotlin.String
|
||||
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public fun kotlin.String.trimMargin(marginPrefix: kotlin.String = ...): kotlin.String
|
||||
|
||||
public fun kotlin.CharSequence.trimStart(): kotlin.CharSequence
|
||||
|
||||
@@ -19,6 +19,7 @@ public actual interface KCallable<out R> : KAnnotatedElement {
|
||||
* - property accessors: the getter for a property named "foo" will have the name "<get-foo>",
|
||||
* the setter, similarly, will have the name "<set-foo>".
|
||||
*/
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public actual val name: String
|
||||
|
||||
/**
|
||||
|
||||
@@ -46,4 +46,5 @@ public expect fun Char(code: UShort): Char
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
@kotlin.internal.InlineOnly
|
||||
@Suppress("DEPRECATION")
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline val Char.code: Int get() = this.toInt()
|
||||
|
||||
@@ -19,5 +19,6 @@ public expect interface KCallable<out R> {
|
||||
* - property accessors: the getter for a property named "foo" will have the name "<get-foo>",
|
||||
* the setter, similarly, will have the name "<set-foo>".
|
||||
*/
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public val name: String
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ package kotlin.text
|
||||
* @see trimIndent
|
||||
* @see kotlin.text.isWhitespace
|
||||
*/
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public fun String.trimMargin(marginPrefix: String = "|"): String =
|
||||
replaceIndentByMargin("", marginPrefix)
|
||||
|
||||
@@ -60,6 +61,7 @@ public fun String.replaceIndentByMargin(newIndent: String = "", marginPrefix: St
|
||||
* @see trimMargin
|
||||
* @see kotlin.text.isBlank
|
||||
*/
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public fun String.trimIndent(): String = replaceIndent("")
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,6 +14,7 @@ import kotlin.math.sign
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Byte.floorDiv(other: Byte): Int =
|
||||
this.toInt().floorDiv(other.toInt())
|
||||
|
||||
@@ -24,12 +25,14 @@ public inline fun Byte.floorDiv(other: Byte): Int =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Byte.mod(other: Byte): Byte =
|
||||
this.toInt().mod(other.toInt()).toByte()
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Byte.floorDiv(other: Short): Int =
|
||||
this.toInt().floorDiv(other.toInt())
|
||||
|
||||
@@ -40,12 +43,14 @@ public inline fun Byte.floorDiv(other: Short): Int =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Byte.mod(other: Short): Short =
|
||||
this.toInt().mod(other.toInt()).toShort()
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Byte.floorDiv(other: Int): Int =
|
||||
this.toInt().floorDiv(other)
|
||||
|
||||
@@ -56,12 +61,14 @@ public inline fun Byte.floorDiv(other: Int): Int =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Byte.mod(other: Int): Int =
|
||||
this.toInt().mod(other)
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Byte.floorDiv(other: Long): Long =
|
||||
this.toLong().floorDiv(other)
|
||||
|
||||
@@ -72,12 +79,14 @@ public inline fun Byte.floorDiv(other: Long): Long =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Byte.mod(other: Long): Long =
|
||||
this.toLong().mod(other)
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Short.floorDiv(other: Byte): Int =
|
||||
this.toInt().floorDiv(other.toInt())
|
||||
|
||||
@@ -88,12 +97,14 @@ public inline fun Short.floorDiv(other: Byte): Int =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Short.mod(other: Byte): Byte =
|
||||
this.toInt().mod(other.toInt()).toByte()
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Short.floorDiv(other: Short): Int =
|
||||
this.toInt().floorDiv(other.toInt())
|
||||
|
||||
@@ -104,12 +115,14 @@ public inline fun Short.floorDiv(other: Short): Int =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Short.mod(other: Short): Short =
|
||||
this.toInt().mod(other.toInt()).toShort()
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Short.floorDiv(other: Int): Int =
|
||||
this.toInt().floorDiv(other)
|
||||
|
||||
@@ -120,12 +133,14 @@ public inline fun Short.floorDiv(other: Int): Int =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Short.mod(other: Int): Int =
|
||||
this.toInt().mod(other)
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Short.floorDiv(other: Long): Long =
|
||||
this.toLong().floorDiv(other)
|
||||
|
||||
@@ -136,12 +151,14 @@ public inline fun Short.floorDiv(other: Long): Long =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Short.mod(other: Long): Long =
|
||||
this.toLong().mod(other)
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Int.floorDiv(other: Byte): Int =
|
||||
this.floorDiv(other.toInt())
|
||||
|
||||
@@ -152,12 +169,14 @@ public inline fun Int.floorDiv(other: Byte): Int =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Int.mod(other: Byte): Byte =
|
||||
this.mod(other.toInt()).toByte()
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Int.floorDiv(other: Short): Int =
|
||||
this.floorDiv(other.toInt())
|
||||
|
||||
@@ -168,12 +187,14 @@ public inline fun Int.floorDiv(other: Short): Int =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Int.mod(other: Short): Short =
|
||||
this.mod(other.toInt()).toShort()
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Int.floorDiv(other: Int): Int {
|
||||
var q = this / other
|
||||
if (this xor other < 0 && q * other != this) q--
|
||||
@@ -187,6 +208,7 @@ public inline fun Int.floorDiv(other: Int): Int {
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Int.mod(other: Int): Int {
|
||||
val r = this % other
|
||||
return r + (other and (((r xor other) and (r or -r)) shr 31))
|
||||
@@ -195,6 +217,7 @@ public inline fun Int.mod(other: Int): Int {
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Int.floorDiv(other: Long): Long =
|
||||
this.toLong().floorDiv(other)
|
||||
|
||||
@@ -205,12 +228,14 @@ public inline fun Int.floorDiv(other: Long): Long =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Int.mod(other: Long): Long =
|
||||
this.toLong().mod(other)
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Long.floorDiv(other: Byte): Long =
|
||||
this.floorDiv(other.toLong())
|
||||
|
||||
@@ -221,12 +246,14 @@ public inline fun Long.floorDiv(other: Byte): Long =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Long.mod(other: Byte): Byte =
|
||||
this.mod(other.toLong()).toByte()
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Long.floorDiv(other: Short): Long =
|
||||
this.floorDiv(other.toLong())
|
||||
|
||||
@@ -237,12 +264,14 @@ public inline fun Long.floorDiv(other: Short): Long =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Long.mod(other: Short): Short =
|
||||
this.mod(other.toLong()).toShort()
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Long.floorDiv(other: Int): Long =
|
||||
this.floorDiv(other.toLong())
|
||||
|
||||
@@ -253,12 +282,14 @@ public inline fun Long.floorDiv(other: Int): Long =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Long.mod(other: Int): Int =
|
||||
this.mod(other.toLong()).toInt()
|
||||
|
||||
/** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Long.floorDiv(other: Long): Long {
|
||||
var q = this / other
|
||||
if (this xor other < 0 && q * other != this) q--
|
||||
@@ -272,6 +303,7 @@ public inline fun Long.floorDiv(other: Long): Long {
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Long.mod(other: Long): Long {
|
||||
val r = this % other
|
||||
return r + (other and (((r xor other) and (r or -r)) shr 63))
|
||||
@@ -286,6 +318,7 @@ public inline fun Long.mod(other: Long): Long {
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Float.mod(other: Float): Float {
|
||||
val r = this % other
|
||||
return if (r != 0.0.toFloat() && r.sign != other.sign) r + other else r
|
||||
@@ -300,6 +333,7 @@ public inline fun Float.mod(other: Float): Float {
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Float.mod(other: Double): Double =
|
||||
this.toDouble().mod(other)
|
||||
|
||||
@@ -312,6 +346,7 @@ public inline fun Float.mod(other: Double): Double =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Double.mod(other: Float): Double =
|
||||
this.mod(other.toDouble())
|
||||
|
||||
@@ -324,6 +359,7 @@ public inline fun Double.mod(other: Float): Double =
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
@kotlin.internal.InlineOnly
|
||||
@kotlin.internal.IntrinsicConstEvaluation
|
||||
public inline fun Double.mod(other: Double): Double {
|
||||
val r = this % other
|
||||
return if (r != 0.0 && r.sign != other.sign) r + other else r
|
||||
|
||||
@@ -13,7 +13,7 @@ import kotlin.jvm.*
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalUnsignedTypes::class)
|
||||
@JvmInline
|
||||
public value class UByte @PublishedApi internal constructor(@PublishedApi internal val data: Byte) : Comparable<UByte> {
|
||||
public value class UByte @kotlin.internal.IntrinsicConstEvaluation @PublishedApi internal constructor(@PublishedApi internal val data: Byte) : Comparable<UByte> {
|
||||
|
||||
companion object {
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ import kotlin.jvm.*
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalUnsignedTypes::class)
|
||||
@JvmInline
|
||||
public value class UInt @PublishedApi internal constructor(@PublishedApi internal val data: Int) : Comparable<UInt> {
|
||||
public value class UInt @kotlin.internal.IntrinsicConstEvaluation @PublishedApi internal constructor(@PublishedApi internal val data: Int) : Comparable<UInt> {
|
||||
|
||||
companion object {
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ import kotlin.jvm.*
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalUnsignedTypes::class)
|
||||
@JvmInline
|
||||
public value class ULong @PublishedApi internal constructor(@PublishedApi internal val data: Long) : Comparable<ULong> {
|
||||
public value class ULong @kotlin.internal.IntrinsicConstEvaluation @PublishedApi internal constructor(@PublishedApi internal val data: Long) : Comparable<ULong> {
|
||||
|
||||
companion object {
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ import kotlin.jvm.*
|
||||
@SinceKotlin("1.5")
|
||||
@WasExperimental(ExperimentalUnsignedTypes::class)
|
||||
@JvmInline
|
||||
public value class UShort @PublishedApi internal constructor(@PublishedApi internal val data: Short) : Comparable<UShort> {
|
||||
public value class UShort @kotlin.internal.IntrinsicConstEvaluation @PublishedApi internal constructor(@PublishedApi internal val data: Short) : Comparable<UShort> {
|
||||
|
||||
companion object {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user