FoldConstantLowering: drop unnecessary experimental annotation
This commit is contained in:
committed by
teamcityserver
parent
fa307a5f75
commit
cb232725f0
+2
-3
@@ -40,7 +40,8 @@ val foldConstantLoweringPhase = makeIrFilePhase(
|
|||||||
class FoldConstantLowering(
|
class FoldConstantLowering(
|
||||||
private val context: CommonBackendContext,
|
private val context: CommonBackendContext,
|
||||||
// In K/JS Float and Double are the same so Float constant should be fold similar to Double
|
// In K/JS Float and Double are the same so Float constant should be fold similar to Double
|
||||||
private val floatSpecial: Boolean = false) : IrElementTransformerVoid(), BodyLoweringPass {
|
private val floatSpecial: Boolean = false
|
||||||
|
) : IrElementTransformerVoid(), BodyLoweringPass {
|
||||||
/**
|
/**
|
||||||
* ID of an binary operator / method.
|
* ID of an binary operator / method.
|
||||||
*
|
*
|
||||||
@@ -208,7 +209,6 @@ class FoldConstantLowering(
|
|||||||
private fun normalizeUnsignedValue(const: IrConst<*>): Any? {
|
private fun normalizeUnsignedValue(const: IrConst<*>): Any? {
|
||||||
// Unsigned constants are represented through signed constants with a different IrType
|
// Unsigned constants are represented through signed constants with a different IrType
|
||||||
if (const.type.isUnsigned()) {
|
if (const.type.isUnsigned()) {
|
||||||
@OptIn(ExperimentalUnsignedTypes::class)
|
|
||||||
when (val kind = const.kind) {
|
when (val kind = const.kind) {
|
||||||
is IrConstKind.Byte ->
|
is IrConstKind.Byte ->
|
||||||
return kind.valueOf(const).toUByte()
|
return kind.valueOf(const).toUByte()
|
||||||
@@ -248,7 +248,6 @@ class FoldConstantLowering(
|
|||||||
return normalizeUnsignedValue(const).toString()
|
return normalizeUnsignedValue(const).toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExperimentalUnsignedTypes
|
|
||||||
override fun lower(irBody: IrBody, container: IrDeclaration) {
|
override fun lower(irBody: IrBody, container: IrDeclaration) {
|
||||||
irBody.transformChildrenVoid(object : IrElementTransformerVoid() {
|
irBody.transformChildrenVoid(object : IrElementTransformerVoid() {
|
||||||
override fun visitCall(expression: IrCall): IrExpression {
|
override fun visitCall(expression: IrCall): IrExpression {
|
||||||
|
|||||||
Reference in New Issue
Block a user