Implement property references in JVM_IR
This commit is contained in:
@@ -199,7 +199,7 @@ fun IrBuilderWithScope.irNotEquals(arg1: IrExpression, arg2: IrExpression) =
|
||||
irEquals(arg1, arg2, origin = IrStatementOrigin.EXCLEQ)
|
||||
)
|
||||
|
||||
fun IrBuilderWithScope.irGet(type: IrType, receiver: IrExpression, getterSymbol: IrFunctionSymbol): IrCall =
|
||||
fun IrBuilderWithScope.irGet(type: IrType, receiver: IrExpression?, getterSymbol: IrFunctionSymbol): IrCall =
|
||||
IrGetterCallImpl(
|
||||
startOffset, endOffset,
|
||||
type,
|
||||
@@ -210,6 +210,18 @@ fun IrBuilderWithScope.irGet(type: IrType, receiver: IrExpression, getterSymbol:
|
||||
origin = IrStatementOrigin.GET_PROPERTY
|
||||
)
|
||||
|
||||
fun IrBuilderWithScope.irSet(type: IrType, receiver: IrExpression?, getterSymbol: IrFunctionSymbol, value: IrExpression): IrCall =
|
||||
IrSetterCallImpl(
|
||||
startOffset, endOffset,
|
||||
type,
|
||||
getterSymbol, getterSymbol.descriptor,
|
||||
typeArgumentsCount = 0,
|
||||
dispatchReceiver = receiver,
|
||||
extensionReceiver = null,
|
||||
argument = value,
|
||||
origin = IrStatementOrigin.EQ
|
||||
)
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol, type: IrType, typeArguments: List<IrType> = emptyList()): IrCall =
|
||||
IrCallImpl(startOffset, endOffset, type, callee, callee.descriptor).apply {
|
||||
typeArguments.forEachIndexed { index, irType ->
|
||||
|
||||
Reference in New Issue
Block a user