[Generator] Generate Boolean class

This commit is contained in:
Ivan Kylchik
2023-07-21 15:17:17 +02:00
committed by Space Team
parent 3f3cd2e87a
commit 38e434bc07
11 changed files with 410 additions and 101 deletions
+11 -17
View File
@@ -1,20 +1,20 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// Auto-generated file. DO NOT EDIT!
@file:Suppress("NON_ABSTRACT_FUNCTION_WITH_NO_BODY", "UNUSED_PARAMETER")
package kotlin
/**
* Represents a value which is either `true` or `false`. On the JVM, non-nullable values of this type are
* represented as values of the primitive type `boolean`.
*/
/** Represents a value which is either `true` or `false`. */
public class Boolean private constructor() : Comparable<Boolean> {
/**
* Returns the inverse of this boolean.
*/
@SinceKotlin("1.3")
companion object {}
/** Returns the inverse of this boolean. */
@kotlin.internal.IntrinsicConstEvaluation
public operator fun not(): Boolean
@@ -32,24 +32,18 @@ public class Boolean private constructor() : Comparable<Boolean> {
@kotlin.internal.IntrinsicConstEvaluation
public infix fun or(other: Boolean): Boolean
/**
* Performs a logical `xor` operation between this Boolean and the [other] one.
*/
/** 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 toString(): String
@kotlin.internal.IntrinsicConstEvaluation
public override fun equals(other: Any?): Boolean
public override fun hashCode(): Int
@kotlin.internal.IntrinsicConstEvaluation
public override fun toString(): String
@SinceKotlin("1.3")
companion object {}
}
@@ -1,25 +1,25 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// Auto-generated file. DO NOT EDIT!
@file:Suppress("UNUSED_PARAMETER")
package kotlin
import kotlin.wasm.internal.*
/**
* Represents a value which is either `true` or `false`. On the JVM, non-nullable values of this type are
* represented as values of the primitive type `boolean`.
*/
/** Represents a value which is either `true` or `false`. */
@WasmAutoboxed
public class Boolean private constructor(private val value: Boolean) : Comparable<Boolean> {
/**
* Returns the inverse of this boolean.
*/
@WasmOp(WasmOp.I32_EQZ)
@SinceKotlin("1.3")
public companion object {}
/** Returns the inverse of this boolean. */
@kotlin.internal.IntrinsicConstEvaluation
@WasmOp(WasmOp.I32_EQZ)
public operator fun not(): Boolean =
implementedAsIntrinsic
@@ -27,8 +27,8 @@ public class Boolean private constructor(private val value: Boolean) : Comparabl
* 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.
*/
@WasmOp(WasmOp.I32_AND)
@kotlin.internal.IntrinsicConstEvaluation
@WasmOp(WasmOp.I32_AND)
public infix fun and(other: Boolean): Boolean =
implementedAsIntrinsic
@@ -36,16 +36,14 @@ public class Boolean private constructor(private val value: Boolean) : Comparabl
* 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.
*/
@WasmOp(WasmOp.I32_OR)
@kotlin.internal.IntrinsicConstEvaluation
@WasmOp(WasmOp.I32_OR)
public infix fun or(other: Boolean): Boolean =
implementedAsIntrinsic
/**
* Performs a logical `xor` operation between this Boolean and the [other] one.
*/
@WasmOp(WasmOp.I32_XOR)
/** Performs a logical `xor` operation between this Boolean and the [other] one. */
@kotlin.internal.IntrinsicConstEvaluation
@WasmOp(WasmOp.I32_XOR)
public infix fun xor(other: Boolean): Boolean =
implementedAsIntrinsic
@@ -57,9 +55,6 @@ public class Boolean private constructor(private val value: Boolean) : Comparabl
override fun toString(): String =
if (this) "true" else "false"
override fun hashCode(): Int =
if (this) 1231 else 1237
@kotlin.internal.IntrinsicConstEvaluation
override fun equals(other: Any?): Boolean {
return if (other !is Boolean) {
@@ -69,10 +64,10 @@ public class Boolean private constructor(private val value: Boolean) : Comparabl
}
}
override fun hashCode(): Int =
if (this) 1231 else 1237
@WasmNoOpCast
internal fun toInt(): Int =
implementedAsIntrinsic
@SinceKotlin("1.3")
public companion object
}