Mathable Builders
class MathableBuilders(mathable: Kotlin.Mathable, builder: IrBuilderWithScope, context: IrPluginContext) : NumberBuilders
Content copied to clipboard
Functions
as Const
Link copied to clipboard
open fun Boolean.asConst(type: IrType = context.irBuiltIns.booleanType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Boolean>
Content copied to clipboard
open fun Byte.asConst(type: IrType = context.irBuiltIns.byteType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Byte>
Content copied to clipboard
open fun Char.asConst(type: IrType = context.irBuiltIns.charType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Char>
Content copied to clipboard
open fun Double.asConst(type: IrType = context.irBuiltIns.doubleType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Double>
Content copied to clipboard
open fun Float.asConst(type: IrType = context.irBuiltIns.floatType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Float>
Content copied to clipboard
open fun Int.asConst(type: IrType = context.irBuiltIns.intType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Int>
Content copied to clipboard
open fun Long.asConst(type: IrType = context.irBuiltIns.longType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Long>
Content copied to clipboard
build Lambda
Link copied to clipboard
open fun IrBuilderWithScope.buildLambda(returnType: IrType?, funBuilder: IrFunctionBuilder.() -> Unit = {}, funApply: IrSimpleFunction.() -> Unit): IrSimpleFunction
Content copied to clipboard
Builds a local function to be used as a lambda, likely with lambdaArgument Return type must be specified at some point, but may be passed as null and specified later. Will be automatically set if the lambda has an expression body and it wasn't set in funBuilder or funApply
build Statement
Link copied to clipboard
create Ir Builder
Link copied to clipboard
open fun createIrBuilder(symbol: IrSymbol, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): DeclarationIrBuilder
Content copied to clipboard
create Ir Builder At
Link copied to clipboard
ir Call
Link copied to clipboard
open fun IrBuilderWithScope.irCall(funcRef: FunctionRef, type: IrType): IrCall
Content copied to clipboard
is Subclass Of
Link copied to clipboard
lambda Argument
Link copied to clipboard
open fun lambdaArgument(lambda: IrSimpleFunction, type: IrType = run {
//TODO workaround for https://youtrack.jetbrains.com/issue/KT-46896
val base = if (lambda.isSuspend)
context.referenceClass(
StandardNames.getSuspendFunctionClassId(lambda.allParameters.size).asSingleFqName()
)
?: error("suspend function type not found")
else
context.referenceClass(StandardNames.getFunctionClassId(lambda.allParameters.size).asSingleFqName())
?: error("function type not found")
base.typeWith(lambda.allParameters.map { it.type } + lambda.returnType)
}, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrFunctionExpression
Content copied to clipboard
Creates a IrFunctionExpressionImpl from the given function, auto-inferring the type if not specified
resolve Or Null
Link copied to clipboard
resolve Type With
Link copied to clipboard
open fun ClassRef.resolveTypeWith(vararg arguments: IrType): IrSimpleType
Content copied to clipboard
with Builder
Link copied to clipboard
open fun <T> IrSymbolOwner.withBuilder(block: DeclarationIrBuilder.() -> T): T
Content copied to clipboard
Properties
Sources
jvm source
Link copied to clipboard