[Native] Move irByte from IrUtils2
We already have similar functions in `ExpressionHelpers`. Makes sense to keep them together.
This commit is contained in:
@@ -345,6 +345,12 @@ fun IrBuilderWithScope.irReinterpretCast(argument: IrExpression, type: IrType) =
|
||||
fun IrBuilderWithScope.irSamConversion(argument: IrExpression, type: IrType) =
|
||||
typeOperator(type, argument, IrTypeOperator.SAM_CONVERSION, type)
|
||||
|
||||
fun IrBuilderWithScope.irByte(value: Byte) =
|
||||
IrConstImpl.byte(startOffset, endOffset, context.irBuiltIns.byteType, value)
|
||||
|
||||
fun IrBuilderWithScope.irShort(value: Short) =
|
||||
IrConstImpl.short(startOffset, endOffset, context.irBuiltIns.shortType, value)
|
||||
|
||||
fun IrBuilderWithScope.irInt(value: Int, type: IrType = context.irBuiltIns.intType) =
|
||||
IrConstImpl.int(startOffset, endOffset, type, value)
|
||||
|
||||
|
||||
-3
@@ -32,8 +32,5 @@ fun IrBuilderWithScope.irCatch() =
|
||||
)
|
||||
)
|
||||
|
||||
fun IrBuilderWithScope.irByte(value: Byte) =
|
||||
IrConstImpl.byte(startOffset, endOffset, context.irBuiltIns.byteType, value)
|
||||
|
||||
val IrField.hasNonConstInitializer: Boolean
|
||||
get() = initializer?.expression.let { it != null && it !is IrConst<*> && it !is IrConstantValue }
|
||||
|
||||
Reference in New Issue
Block a user