IrOperator -> IrStatementOrigin

This commit is contained in:
Dmitry Petrov
2016-09-14 11:25:16 +03:00
committed by Dmitry Petrov
parent 5386d27284
commit a8a6477ce5
150 changed files with 2234 additions and 2297 deletions
@@ -30,13 +30,13 @@ import org.jetbrains.kotlin.types.KotlinType
inline fun IrBuilderWithScope.irLet( inline fun IrBuilderWithScope.irLet(
value: IrExpression, value: IrExpression,
operator: IrOperator? = null, origin: IrStatementOrigin? = null,
nameHint: String? = null, nameHint: String? = null,
body: (VariableDescriptor) -> IrExpression body: (VariableDescriptor) -> IrExpression
): IrExpression { ): IrExpression {
val irTemporary = scope.createTemporaryVariable(value, nameHint) val irTemporary = scope.createTemporaryVariable(value, nameHint)
val irResult = body(irTemporary.descriptor) val irResult = body(irTemporary.descriptor)
val irBlock = IrBlockImpl(startOffset, endOffset, irResult.type, operator) val irBlock = IrBlockImpl(startOffset, endOffset, irResult.type, origin)
irBlock.addStatement(irTemporary) irBlock.addStatement(irTemporary)
irBlock.addStatement(irResult) irBlock.addStatement(irResult)
return irBlock return irBlock
@@ -63,8 +63,8 @@ fun IrBuilderWithScope.irIfThenElse(type: KotlinType, condition: IrExpression, t
fun IrBuilderWithScope.irIfNull(type: KotlinType, subject: IrExpression, thenPart: IrExpression, elsePart: IrExpression) = fun IrBuilderWithScope.irIfNull(type: KotlinType, subject: IrExpression, thenPart: IrExpression, elsePart: IrExpression) =
irIfThenElse(type, irEqualsNull(subject), thenPart, elsePart) irIfThenElse(type, irEqualsNull(subject), thenPart, elsePart)
fun IrBuilderWithScope.irThrowNpe(operator: IrOperator) = fun IrBuilderWithScope.irThrowNpe(origin: IrStatementOrigin) =
IrNullaryPrimitiveImpl(startOffset, endOffset, operator, context.irBuiltIns.throwNpe) IrNullaryPrimitiveImpl(startOffset, endOffset, origin, context.irBuiltIns.throwNpe)
fun IrBuilderWithScope.irIfThenReturnTrue(condition: IrExpression) = fun IrBuilderWithScope.irIfThenReturnTrue(condition: IrExpression) =
IrIfThenElseImpl(startOffset, endOffset, context.builtIns.unitType, condition, irReturnTrue()) IrIfThenElseImpl(startOffset, endOffset, context.builtIns.unitType, condition, irReturnTrue())
@@ -81,7 +81,7 @@ fun IrBuilderWithScope.irGet(variable: VariableDescriptor) =
IrGetVariableImpl(startOffset, endOffset, variable) IrGetVariableImpl(startOffset, endOffset, variable)
fun IrBuilderWithScope.irSetVar(variable: VariableDescriptor, value: IrExpression) = fun IrBuilderWithScope.irSetVar(variable: VariableDescriptor, value: IrExpression) =
IrSetVariableImpl(startOffset, endOffset, variable, value, IrOperator.EQ) IrSetVariableImpl(startOffset, endOffset, variable, value, IrStatementOrigin.EQ)
fun IrBuilderWithScope.irOther() = fun IrBuilderWithScope.irOther() =
irGet(scope.functionOwner().valueParameters.single()) irGet(scope.functionOwner().valueParameters.single())
@@ -93,16 +93,16 @@ fun IrBuilderWithScope.irNull() =
IrConstImpl.constNull(startOffset, endOffset, context.builtIns.nullableNothingType) IrConstImpl.constNull(startOffset, endOffset, context.builtIns.nullableNothingType)
fun IrBuilderWithScope.irEqualsNull(argument: IrExpression) = fun IrBuilderWithScope.irEqualsNull(argument: IrExpression) =
primitiveOp2(startOffset, endOffset, context.irBuiltIns.eqeq, IrOperator.EQEQ, primitiveOp2(startOffset, endOffset, context.irBuiltIns.eqeq, IrStatementOrigin.EQEQ,
argument, irNull()) argument, irNull())
fun IrBuilderWithScope.irNotEquals(arg1: IrExpression, arg2: IrExpression) = fun IrBuilderWithScope.irNotEquals(arg1: IrExpression, arg2: IrExpression) =
primitiveOp1(startOffset, endOffset, context.irBuiltIns.booleanNot, IrOperator.EXCLEQ, primitiveOp1(startOffset, endOffset, context.irBuiltIns.booleanNot, IrStatementOrigin.EXCLEQ,
primitiveOp2(startOffset, endOffset, context.irBuiltIns.eqeq, IrOperator.EXCLEQ, primitiveOp2(startOffset, endOffset, context.irBuiltIns.eqeq, IrStatementOrigin.EXCLEQ,
arg1, arg2)) arg1, arg2))
fun IrBuilderWithScope.irGet(receiver: IrExpression, property: PropertyDescriptor): IrExpression = fun IrBuilderWithScope.irGet(receiver: IrExpression, property: PropertyDescriptor): IrExpression =
IrGetterCallImpl(startOffset, endOffset, property.getter!!, receiver, null, IrOperator.GET_PROPERTY) IrGetterCallImpl(startOffset, endOffset, property.getter!!, receiver, null, IrStatementOrigin.GET_PROPERTY)
fun IrBuilderWithScope.irCall(callee: CallableDescriptor) = fun IrBuilderWithScope.irCall(callee: CallableDescriptor) =
IrCallImpl(startOffset, endOffset, callee.returnType!!, callee) IrCallImpl(startOffset, endOffset, callee.returnType!!, callee)
@@ -83,11 +83,9 @@ open class IrBlockBodyBuilder(
} }
class IrBlockBuilder( class IrBlockBuilder(
context: GeneratorContext, context: GeneratorContext, scope: Scope,
scope: Scope, startOffset: Int, endOffset: Int,
startOffset: Int, val origin: IrStatementOrigin? = null,
endOffset: Int,
val operator: IrOperator? = null,
var resultType: KotlinType? = null var resultType: KotlinType? = null
) : IrStatementsBuilder<IrBlock>(context, scope, startOffset, endOffset) { ) : IrStatementsBuilder<IrBlock>(context, scope, startOffset, endOffset) {
private val statements = ArrayList<IrStatement>() private val statements = ArrayList<IrStatement>()
@@ -105,7 +103,7 @@ class IrBlockBuilder(
val resultType = this.resultType ?: val resultType = this.resultType ?:
(statements.lastOrNull() as? IrExpression)?.type ?: (statements.lastOrNull() as? IrExpression)?.type ?:
context.builtIns.unitType context.builtIns.unitType
val irBlock = IrBlockImpl(startOffset, endOffset, resultType, operator) val irBlock = IrBlockImpl(startOffset, endOffset, resultType, origin)
irBlock.addAll(statements) irBlock.addAll(statements)
return irBlock return irBlock
} }
@@ -123,13 +121,13 @@ fun <T : IrBuilder> T.at(psiElement: PsiElement): T {
return this return this
} }
inline fun GeneratorWithScope.irBlock(ktElement: KtElement? = null, operator: IrOperator? = null, resultType: KotlinType? = null, inline fun GeneratorWithScope.irBlock(ktElement: KtElement? = null, origin: IrStatementOrigin? = null, resultType: KotlinType? = null,
body: IrBlockBuilder.() -> Unit body: IrBlockBuilder.() -> Unit
): IrExpression = ): IrExpression =
IrBlockBuilder(context, scope, IrBlockBuilder(context, scope,
ktElement?.startOffset ?: UNDEFINED_OFFSET, ktElement?.startOffset ?: UNDEFINED_OFFSET,
ktElement?.endOffset ?: UNDEFINED_OFFSET, ktElement?.endOffset ?: UNDEFINED_OFFSET,
operator, resultType origin, resultType
).block(body) ).block(body)
inline fun GeneratorWithScope.irBlockBody(ktElement: KtElement? = null, body: IrBlockBodyBuilder.() -> Unit) : IrBlockBody = inline fun GeneratorWithScope.irBlockBody(ktElement: KtElement? = null, body: IrBlockBodyBuilder.() -> Unit) : IrBlockBody =
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.descriptors.impl.LocalVariableDescriptor import org.jetbrains.kotlin.descriptors.impl.LocalVariableDescriptor
import org.jetbrains.kotlin.descriptors.impl.SyntheticFieldDescriptor import org.jetbrains.kotlin.descriptors.impl.SyntheticFieldDescriptor
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.impl.IrThisReferenceImpl import org.jetbrains.kotlin.ir.expressions.impl.IrThisReferenceImpl
import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.*
import org.jetbrains.kotlin.psi.psiUtil.endOffset import org.jetbrains.kotlin.psi.psiUtil.endOffset
@@ -38,22 +38,22 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
fun generateAssignment(expression: KtBinaryExpression): IrExpression { fun generateAssignment(expression: KtBinaryExpression): IrExpression {
val ktLeft = expression.left!! val ktLeft = expression.left!!
val irRhs = statementGenerator.generateExpression(expression.right!!) val irRhs = statementGenerator.generateExpression(expression.right!!)
val irAssignmentReceiver = generateAssignmentReceiver(ktLeft, IrOperator.EQ) val irAssignmentReceiver = generateAssignmentReceiver(ktLeft, IrStatementOrigin.EQ)
return irAssignmentReceiver.assign(irRhs) return irAssignmentReceiver.assign(irRhs)
} }
fun generateAugmentedAssignment(expression: KtBinaryExpression, irOperator: IrOperator): IrExpression { fun generateAugmentedAssignment(expression: KtBinaryExpression, origin: IrStatementOrigin): IrExpression {
val opResolvedCall = getResolvedCall(expression)!! val opResolvedCall = getResolvedCall(expression)!!
val isSimpleAssignment = get(BindingContext.VARIABLE_REASSIGNMENT, expression) ?: false val isSimpleAssignment = get(BindingContext.VARIABLE_REASSIGNMENT, expression) ?: false
val ktLeft = expression.left!! val ktLeft = expression.left!!
val ktRight = expression.right!! val ktRight = expression.right!!
val irAssignmentReceiver = generateAssignmentReceiver(ktLeft, irOperator) val irAssignmentReceiver = generateAssignmentReceiver(ktLeft, origin)
return irAssignmentReceiver.assign { irLValue -> return irAssignmentReceiver.assign { irLValue ->
val opCall = statementGenerator.pregenerateCall(opResolvedCall) val opCall = statementGenerator.pregenerateCall(opResolvedCall)
opCall.setExplicitReceiverValue(irLValue) opCall.setExplicitReceiverValue(irLValue)
opCall.irValueArgumentsByIndex[0] = statementGenerator.generateExpression(ktRight) opCall.irValueArgumentsByIndex[0] = statementGenerator.generateExpression(ktRight)
val irOpCall = CallGenerator(statementGenerator).generateCall(expression, opCall, irOperator) val irOpCall = CallGenerator(statementGenerator).generateCall(expression, opCall, origin)
if (isSimpleAssignment) { if (isSimpleAssignment) {
// Set( Op( Get(), RHS ) ) // Set( Op( Get(), RHS ) )
@@ -66,16 +66,16 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
} }
} }
fun generatePrefixIncrementDecrement(expression: KtPrefixExpression, irOperator: IrOperator): IrExpression { fun generatePrefixIncrementDecrement(expression: KtPrefixExpression, origin: IrStatementOrigin): IrExpression {
val opResolvedCall = getResolvedCall(expression)!! val opResolvedCall = getResolvedCall(expression)!!
val ktBaseExpression = expression.baseExpression!! val ktBaseExpression = expression.baseExpression!!
val irAssignmentReceiver = generateAssignmentReceiver(ktBaseExpression, irOperator) val irAssignmentReceiver = generateAssignmentReceiver(ktBaseExpression, origin)
return irAssignmentReceiver.assign { irLValue -> return irAssignmentReceiver.assign { irLValue ->
irBlock(expression, irOperator, irLValue.type) { irBlock(expression, origin, irLValue.type) {
val opCall = statementGenerator.pregenerateCall(opResolvedCall) val opCall = statementGenerator.pregenerateCall(opResolvedCall)
opCall.setExplicitReceiverValue(irLValue) opCall.setExplicitReceiverValue(irLValue)
val irOpCall = CallGenerator(statementGenerator).generateCall(expression, opCall, irOperator) val irOpCall = CallGenerator(statementGenerator).generateCall(expression, opCall, origin)
val temporary = defineTemporary(irOpCall) val temporary = defineTemporary(irOpCall)
+irLValue.store(irGet(temporary)) +irLValue.store(irGet(temporary))
+irGet(temporary) +irGet(temporary)
@@ -83,26 +83,26 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
} }
} }
fun generatePostfixIncrementDecrement(expression: KtPostfixExpression, irOperator: IrOperator): IrExpression { fun generatePostfixIncrementDecrement(expression: KtPostfixExpression, origin: IrStatementOrigin): IrExpression {
val opResolvedCall = getResolvedCall(expression)!! val opResolvedCall = getResolvedCall(expression)!!
val ktBaseExpression = expression.baseExpression!! val ktBaseExpression = expression.baseExpression!!
val irAssignmentReceiver = generateAssignmentReceiver(ktBaseExpression, irOperator) val irAssignmentReceiver = generateAssignmentReceiver(ktBaseExpression, origin)
return irAssignmentReceiver.assign { irLValue -> return irAssignmentReceiver.assign { irLValue ->
irBlock(expression, irOperator, irLValue.type) { irBlock(expression, origin, irLValue.type) {
val temporary = defineTemporary(irLValue.load()) val temporary = defineTemporary(irLValue.load())
val opCall = statementGenerator.pregenerateCall(opResolvedCall) val opCall = statementGenerator.pregenerateCall(opResolvedCall)
opCall.setExplicitReceiverValue(VariableLValue(startOffset, endOffset, temporary)) opCall.setExplicitReceiverValue(VariableLValue(startOffset, endOffset, temporary))
val irOpCall = CallGenerator(statementGenerator).generateCall(expression, opCall, irOperator) val irOpCall = CallGenerator(statementGenerator).generateCall(expression, opCall, origin)
+irLValue.store(irOpCall) +irLValue.store(irOpCall)
+irGet(temporary) +irGet(temporary)
} }
} }
} }
fun generateAssignmentReceiver(ktLeft: KtExpression, operator: IrOperator): AssignmentReceiver { fun generateAssignmentReceiver(ktLeft: KtExpression, origin: IrStatementOrigin): AssignmentReceiver {
if (ktLeft is KtArrayAccessExpression) { if (ktLeft is KtArrayAccessExpression) {
return generateArrayAccessAssignmentReceiver(ktLeft, operator) return generateArrayAccessAssignmentReceiver(ktLeft, origin)
} }
val resolvedCall = getResolvedCall(ktLeft) ?: TODO("no resolved call for LHS") val resolvedCall = getResolvedCall(ktLeft) ?: TODO("no resolved call for LHS")
@@ -114,18 +114,18 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
statementGenerator.generateReceiver(ktLeft, it) statementGenerator.generateReceiver(ktLeft, it)
} }
BackingFieldLValue(ktLeft.startOffset, ktLeft.endOffset, descriptor.propertyDescriptor, BackingFieldLValue(ktLeft.startOffset, ktLeft.endOffset, descriptor.propertyDescriptor,
receiverValue, operator) receiverValue, origin)
} }
is LocalVariableDescriptor -> is LocalVariableDescriptor ->
if (descriptor.isDelegated) if (descriptor.isDelegated)
DelegatedLocalPropertyLValue(ktLeft.startOffset, ktLeft.endOffset, descriptor, operator) DelegatedLocalPropertyLValue(ktLeft.startOffset, ktLeft.endOffset, descriptor, origin)
else else
VariableLValue(ktLeft.startOffset, ktLeft.endOffset, descriptor, operator) VariableLValue(ktLeft.startOffset, ktLeft.endOffset, descriptor, origin)
is PropertyDescriptor -> is PropertyDescriptor ->
generateAssignmentReceiverForProperty(descriptor, operator, ktLeft, resolvedCall) generateAssignmentReceiverForProperty(descriptor, origin, ktLeft, resolvedCall)
is VariableDescriptor -> is VariableDescriptor ->
VariableLValue(ktLeft.startOffset, ktLeft.endOffset, descriptor, operator) VariableLValue(ktLeft.startOffset, ktLeft.endOffset, descriptor, origin)
else -> else ->
OnceExpressionValue(statementGenerator.generateExpression(ktLeft)) OnceExpressionValue(statementGenerator.generateExpression(ktLeft))
} }
@@ -133,7 +133,7 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
private fun generateAssignmentReceiverForProperty( private fun generateAssignmentReceiverForProperty(
descriptor: PropertyDescriptor, descriptor: PropertyDescriptor,
irOperator: IrOperator, origin: IrStatementOrigin,
ktLeft: KtExpression, ktLeft: KtExpression,
resolvedCall: ResolvedCall<*> resolvedCall: ResolvedCall<*>
): AssignmentReceiver { ): AssignmentReceiver {
@@ -149,7 +149,7 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
val superQualifier = getSuperQualifier(resolvedCall) val superQualifier = getSuperQualifier(resolvedCall)
return SimplePropertyLValue(context, scope, ktLeft.startOffset, ktLeft.endOffset, irOperator, descriptor, return SimplePropertyLValue(context, scope, ktLeft.startOffset, ktLeft.endOffset, origin, descriptor,
propertyReceiver, superQualifier) propertyReceiver, superQualifier)
} }
@@ -167,7 +167,7 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
} }
} }
private fun generateArrayAccessAssignmentReceiver(ktLeft: KtArrayAccessExpression, irOperator: IrOperator): ArrayAccessAssignmentReceiver { private fun generateArrayAccessAssignmentReceiver(ktLeft: KtArrayAccessExpression, origin: IrStatementOrigin): ArrayAccessAssignmentReceiver {
val irArray = statementGenerator.generateExpression(ktLeft.arrayExpression!!) val irArray = statementGenerator.generateExpression(ktLeft.arrayExpression!!)
val irIndexExpressions = ktLeft.indexExpressions.map { statementGenerator.generateExpression(it) } val irIndexExpressions = ktLeft.indexExpressions.map { statementGenerator.generateExpression(it) }
@@ -179,7 +179,7 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
return ArrayAccessAssignmentReceiver(irArray, irIndexExpressions, indexedGetCall, indexedSetCall, return ArrayAccessAssignmentReceiver(irArray, irIndexExpressions, indexedGetCall, indexedSetCall,
CallGenerator(statementGenerator), CallGenerator(statementGenerator),
ktLeft.startOffset, ktLeft.endOffset, irOperator) ktLeft.startOffset, ktLeft.endOffset, origin)
} }
} }
@@ -55,10 +55,10 @@ class BranchingExpressionGenerator(statementGenerator: StatementGenerator) : Sta
return if (irBranches.size == 1) { return if (irBranches.size == 1) {
val (irCondition, irThenBranch) = irBranches[0] val (irCondition, irThenBranch) = irBranches[0]
IrIfThenElseImpl(expression.startOffset, expression.endOffset, resultType, IrIfThenElseImpl(expression.startOffset, expression.endOffset, resultType,
irCondition, irThenBranch, irElseBranch, IrOperator.IF) irCondition, irThenBranch, irElseBranch, IrStatementOrigin.IF)
} }
else { else {
val irWhen = IrWhenImpl(expression.startOffset, expression.endOffset, resultType, IrOperator.WHEN) val irWhen = IrWhenImpl(expression.startOffset, expression.endOffset, resultType, IrStatementOrigin.WHEN)
for ((irCondition, irThenBranch) in irBranches) { for ((irCondition, irThenBranch) in irBranches) {
irWhen.addBranch(irCondition, irThenBranch) irWhen.addBranch(irCondition, irThenBranch)
} }
@@ -74,7 +74,7 @@ class BranchingExpressionGenerator(statementGenerator: StatementGenerator) : Sta
val resultType = getInferredTypeWithImplicitCastsOrFail(expression) val resultType = getInferredTypeWithImplicitCastsOrFail(expression)
val irWhen = IrWhenImpl(expression.startOffset, expression.endOffset, resultType, IrOperator.WHEN) val irWhen = IrWhenImpl(expression.startOffset, expression.endOffset, resultType, IrStatementOrigin.WHEN)
for (ktEntry in expression.entries) { for (ktEntry in expression.entries) {
if (ktEntry.isElse) { if (ktEntry.isElse) {
@@ -103,18 +103,18 @@ class BranchingExpressionGenerator(statementGenerator: StatementGenerator) : Sta
private fun generateWhenBody(expression: KtWhenExpression, irSubject: IrVariable?, irWhen: IrWhen): IrExpression { private fun generateWhenBody(expression: KtWhenExpression, irSubject: IrVariable?, irWhen: IrWhen): IrExpression {
if (irSubject == null) { if (irSubject == null) {
if (irWhen.branchesCount == 0 && irWhen.elseBranch == null) if (irWhen.branchesCount == 0 && irWhen.elseBranch == null)
return IrBlockImpl(expression.startOffset, expression.endOffset, context.builtIns.unitType, IrOperator.WHEN) return IrBlockImpl(expression.startOffset, expression.endOffset, context.builtIns.unitType, IrStatementOrigin.WHEN)
else else
return irWhen return irWhen
} }
else { else {
if (irWhen.branchesCount == 0) { if (irWhen.branchesCount == 0) {
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, context.builtIns.unitType, IrOperator.WHEN) val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, context.builtIns.unitType, IrStatementOrigin.WHEN)
irBlock.addStatement(irSubject) irBlock.addStatement(irSubject)
return irBlock return irBlock
} }
else { else {
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, irWhen.type, IrOperator.WHEN) val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, irWhen.type, IrStatementOrigin.WHEN)
irBlock.addStatement(irSubject) irBlock.addStatement(irSubject)
irBlock.addStatement(irWhen) irBlock.addStatement(irWhen)
return irBlock return irBlock
@@ -152,9 +152,9 @@ class BranchingExpressionGenerator(statementGenerator: StatementGenerator) : Sta
val inOperator = getInfixOperator(ktCondition.operationReference.getReferencedNameElementType()) val inOperator = getInfixOperator(ktCondition.operationReference.getReferencedNameElementType())
val irInCall = CallGenerator(statementGenerator).generateCall(ktCondition, inCall, inOperator) val irInCall = CallGenerator(statementGenerator).generateCall(ktCondition, inCall, inOperator)
return when (inOperator) { return when (inOperator) {
IrOperator.IN -> irInCall IrStatementOrigin.IN -> irInCall
IrOperator.NOT_IN -> IrStatementOrigin.NOT_IN ->
IrUnaryPrimitiveImpl(ktCondition.startOffset, ktCondition.endOffset, IrOperator.EXCL, context.irBuiltIns.booleanNot, irInCall) IrUnaryPrimitiveImpl(ktCondition.startOffset, ktCondition.endOffset, IrStatementOrigin.EXCL, context.irBuiltIns.booleanNot, irInCall)
else -> throw AssertionError("Expected 'in' or '!in', got $inOperator") else -> throw AssertionError("Expected 'in' or '!in', got $inOperator")
} }
} }
@@ -162,7 +162,7 @@ class BranchingExpressionGenerator(statementGenerator: StatementGenerator) : Sta
private fun generateEqualsCondition(irSubject: IrVariable, ktCondition: KtWhenConditionWithExpression): IrBinaryPrimitiveImpl = private fun generateEqualsCondition(irSubject: IrVariable, ktCondition: KtWhenConditionWithExpression): IrBinaryPrimitiveImpl =
IrBinaryPrimitiveImpl( IrBinaryPrimitiveImpl(
ktCondition.startOffset, ktCondition.endOffset, ktCondition.startOffset, ktCondition.endOffset,
IrOperator.EQEQ, context.irBuiltIns.eqeq, IrStatementOrigin.EQEQ, context.irBuiltIns.eqeq,
irSubject.defaultLoad(), statementGenerator.generateExpression(ktCondition.expression!!) irSubject.defaultLoad(), statementGenerator.generateExpression(ktCondition.expression!!)
) )
} }
@@ -29,7 +29,7 @@ import org.jetbrains.kotlin.types.KotlinType
import java.util.* import java.util.*
class CallGenerator(statementGenerator: StatementGenerator): StatementGeneratorExtension(statementGenerator) { class CallGenerator(statementGenerator: StatementGenerator): StatementGeneratorExtension(statementGenerator) {
fun generateCall(startOffset: Int, endOffset: Int, call: CallBuilder, operator: IrOperator? = null): IrExpression { fun generateCall(startOffset: Int, endOffset: Int, call: CallBuilder, origin: IrStatementOrigin? = null): IrExpression {
val descriptor = call.descriptor val descriptor = call.descriptor
return when (descriptor) { return when (descriptor) {
@@ -37,20 +37,20 @@ class CallGenerator(statementGenerator: StatementGenerator): StatementGeneratorE
generatePropertyGetterCall(descriptor, startOffset, endOffset, call) generatePropertyGetterCall(descriptor, startOffset, endOffset, call)
is VariableDescriptor -> is VariableDescriptor ->
call.callReceiver.call { dispatchReceiverValue, extensionReceiverValue -> call.callReceiver.call { dispatchReceiverValue, extensionReceiverValue ->
generateGetVariable(startOffset, endOffset, descriptor, operator) generateGetVariable(startOffset, endOffset, descriptor, origin)
} }
is FunctionDescriptor -> is FunctionDescriptor ->
generateFunctionCall(descriptor, startOffset, endOffset, operator, call) generateFunctionCall(descriptor, startOffset, endOffset, origin, call)
else -> else ->
TODO("Unexpected callable descriptor: $descriptor ${descriptor.javaClass.simpleName}") TODO("Unexpected callable descriptor: $descriptor ${descriptor.javaClass.simpleName}")
} }
} }
fun generateGetVariable(startOffset: Int, endOffset: Int, descriptor: VariableDescriptor, operator: IrOperator? = null) = fun generateGetVariable(startOffset: Int, endOffset: Int, descriptor: VariableDescriptor, origin: IrStatementOrigin? = null) =
if (descriptor is LocalVariableDescriptor && descriptor.isDelegated) if (descriptor is LocalVariableDescriptor && descriptor.isDelegated)
IrCallImpl(startOffset, endOffset, descriptor.type, descriptor.getter!!, operator ?: IrOperator.GET_LOCAL_PROPERTY) IrCallImpl(startOffset, endOffset, descriptor.type, descriptor.getter!!, origin ?: IrStatementOrigin.GET_LOCAL_PROPERTY)
else else
IrGetVariableImpl(startOffset, endOffset, descriptor, operator) IrGetVariableImpl(startOffset, endOffset, descriptor, origin)
fun generateDelegatingConstructorCall(startOffset: Int, endOffset: Int, call: CallBuilder) : IrExpression { fun generateDelegatingConstructorCall(startOffset: Int, endOffset: Int, call: CallBuilder) : IrExpression {
val descriptor = call.descriptor val descriptor = call.descriptor
@@ -90,11 +90,11 @@ class CallGenerator(statementGenerator: StatementGenerator): StatementGeneratorE
IrGetterCallImpl(startOffset, endOffset, getter, IrGetterCallImpl(startOffset, endOffset, getter,
dispatchReceiverValue?.load(), dispatchReceiverValue?.load(),
extensionReceiverValue?.load(), extensionReceiverValue?.load(),
IrOperator.GET_PROPERTY, IrStatementOrigin.GET_PROPERTY,
call.superQualifier) call.superQualifier)
} ?: IrGetFieldImpl(startOffset, endOffset, descriptor, } ?: IrGetFieldImpl(startOffset, endOffset, descriptor,
dispatchReceiverValue?.load(), dispatchReceiverValue?.load(),
IrOperator.GET_PROPERTY, call.superQualifier) IrStatementOrigin.GET_PROPERTY, call.superQualifier)
} }
} }
@@ -102,13 +102,13 @@ class CallGenerator(statementGenerator: StatementGenerator): StatementGeneratorE
descriptor: FunctionDescriptor, descriptor: FunctionDescriptor,
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
operator: IrOperator?, origin: IrStatementOrigin?,
call: CallBuilder call: CallBuilder
): IrExpression { ): IrExpression {
val returnType = descriptor.returnType!! val returnType = descriptor.returnType!!
return call.callReceiver.call { dispatchReceiverValue, extensionReceiverValue -> return call.callReceiver.call { dispatchReceiverValue, extensionReceiverValue ->
val irCall = IrCallImpl(startOffset, endOffset, returnType, descriptor, operator, call.superQualifier) val irCall = IrCallImpl(startOffset, endOffset, returnType, descriptor, origin, call.superQualifier)
irCall.dispatchReceiver = dispatchReceiverValue?.load() irCall.dispatchReceiver = dispatchReceiverValue?.load()
irCall.extensionReceiver = extensionReceiverValue?.load() irCall.extensionReceiver = extensionReceiverValue?.load()
@@ -140,7 +140,7 @@ class CallGenerator(statementGenerator: StatementGenerator): StatementGeneratorE
val valueArgumentsInEvaluationOrder = resolvedCall.valueArguments.values val valueArgumentsInEvaluationOrder = resolvedCall.valueArguments.values
val valueParameters = resolvedCall.resultingDescriptor.valueParameters val valueParameters = resolvedCall.resultingDescriptor.valueParameters
val irBlock = IrBlockImpl(startOffset, endOffset, resultType, IrOperator.ARGUMENTS_REORDERING_FOR_CALL) val irBlock = IrBlockImpl(startOffset, endOffset, resultType, IrStatementOrigin.ARGUMENTS_REORDERING_FOR_CALL)
val valueArgumentsToValueParameters = HashMap<ResolvedValueArgument, ValueParameterDescriptor>() val valueArgumentsToValueParameters = HashMap<ResolvedValueArgument, ValueParameterDescriptor>()
for ((index, valueArgument) in resolvedCall.valueArgumentsByIndex!!.withIndex()) { for ((index, valueArgument) in resolvedCall.valueArgumentsByIndex!!.withIndex()) {
@@ -168,8 +168,8 @@ class CallGenerator(statementGenerator: StatementGenerator): StatementGeneratorE
} }
} }
fun CallGenerator.generateCall(ktElement: KtElement, call: CallBuilder, operator: IrOperator? = null) = fun CallGenerator.generateCall(ktElement: KtElement, call: CallBuilder, origin: IrStatementOrigin? = null) =
generateCall(ktElement.startOffset, ktElement.endOffset, call, operator) generateCall(ktElement.startOffset, ktElement.endOffset, call, origin)
fun CallGenerator.generateCall(irExpression: IrExpression, call: CallBuilder, operator: IrOperator? = null) = fun CallGenerator.generateCall(irExpression: IrExpression, call: CallBuilder, origin: IrStatementOrigin? = null) =
generateCall(irExpression.startOffset, irExpression.endOffset, call, operator) generateCall(irExpression.startOffset, irExpression.endOffset, call, origin)
@@ -197,7 +197,7 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
val primaryConstructorDescriptor = classDescriptor.unsubstitutedPrimaryConstructor ?: return val primaryConstructorDescriptor = classDescriptor.unsubstitutedPrimaryConstructor ?: return
val irPrimaryConstructor = IrConstructorImpl(ktClassOrObject.startOffset, ktClassOrObject.endOffset, IrDeclarationOrigin.DEFINED, val irPrimaryConstructor = IrConstructorImpl(ktClassOrObject.startOffset, ktClassOrObject.endOffset, IrDeclarationOrigin.DEFINED,
primaryConstructorDescriptor) primaryConstructorDescriptor)
val bodyGenerator = BodyGenerator(primaryConstructorDescriptor, context) val bodyGenerator = BodyGenerator(primaryConstructorDescriptor, context)
ktClassOrObject.getPrimaryConstructor()?.valueParameterList?.let { ktValueParameterList -> ktClassOrObject.getPrimaryConstructor()?.valueParameterList?.let { ktValueParameterList ->
@@ -66,11 +66,11 @@ class DeclarationGenerator(override val context: GeneratorContext) : Generator {
fun generateTypeAliasDeclaration(ktDeclaration: KtTypeAlias): IrDeclaration = fun generateTypeAliasDeclaration(ktDeclaration: KtTypeAlias): IrDeclaration =
IrTypeAliasImpl(ktDeclaration.startOffset, ktDeclaration.endOffset, IrDeclarationOrigin.DEFINED, IrTypeAliasImpl(ktDeclaration.startOffset, ktDeclaration.endOffset, IrDeclarationOrigin.DEFINED,
getOrFail(BindingContext.TYPE_ALIAS, ktDeclaration)) getOrFail(BindingContext.TYPE_ALIAS, ktDeclaration))
fun generateAnonymousInitializerDeclaration(ktAnonymousInitializer: KtAnonymousInitializer, classDescriptor: ClassDescriptor): IrDeclaration { fun generateAnonymousInitializerDeclaration(ktAnonymousInitializer: KtAnonymousInitializer, classDescriptor: ClassDescriptor): IrDeclaration {
val irAnonymousInitializer = IrAnonymousInitializerImpl(ktAnonymousInitializer.startOffset, ktAnonymousInitializer.endOffset, val irAnonymousInitializer = IrAnonymousInitializerImpl(ktAnonymousInitializer.startOffset, ktAnonymousInitializer.endOffset,
IrDeclarationOrigin.DEFINED, classDescriptor) IrDeclarationOrigin.DEFINED, classDescriptor)
irAnonymousInitializer.body = BodyGenerator(classDescriptor, context).generateAnonymousInitializerBody(ktAnonymousInitializer) irAnonymousInitializer.body = BodyGenerator(classDescriptor, context).generateAnonymousInitializerBody(ktAnonymousInitializer)
return irAnonymousInitializer return irAnonymousInitializer
} }
@@ -89,7 +89,7 @@ class DelegatedPropertyGenerator(override val context: GeneratorContext) : Gener
private fun createCallableReference(ktElement: KtElement, type: KotlinType, referencedDescriptor: CallableDescriptor): IrCallableReference = private fun createCallableReference(ktElement: KtElement, type: KotlinType, referencedDescriptor: CallableDescriptor): IrCallableReference =
IrCallableReferenceImpl(ktElement.startOffset, ktElement.endOffset, type, IrCallableReferenceImpl(ktElement.startOffset, ktElement.endOffset, type,
referencedDescriptor, IrOperator.PROPERTY_REFERENCE_FOR_DELEGATE) referencedDescriptor, IrStatementOrigin.PROPERTY_REFERENCE_FOR_DELEGATE)
fun generateLocalDelegatedProperty( fun generateLocalDelegatedProperty(
ktProperty: KtProperty, ktProperty: KtProperty,
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.psi2ir.generators
import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.IrStatement
import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtClassOrObject
import org.jetbrains.kotlin.psi.KtObjectLiteralExpression import org.jetbrains.kotlin.psi.KtObjectLiteralExpression
import org.jetbrains.kotlin.psi.psiUtil.endOffset import org.jetbrains.kotlin.psi.psiUtil.endOffset
@@ -28,7 +28,7 @@ import org.jetbrains.kotlin.psi.psiUtil.startOffset
class LocalClassGenerator(statementGenerator: StatementGenerator): StatementGeneratorExtension(statementGenerator) { class LocalClassGenerator(statementGenerator: StatementGenerator): StatementGeneratorExtension(statementGenerator) {
fun generateObjectLiteral(ktObjectLiteral: KtObjectLiteralExpression): IrStatement { fun generateObjectLiteral(ktObjectLiteral: KtObjectLiteralExpression): IrStatement {
val objectLiteralType = getInferredTypeWithImplicitCastsOrFail(ktObjectLiteral) val objectLiteralType = getInferredTypeWithImplicitCastsOrFail(ktObjectLiteral)
val irBlock = IrBlockImpl(ktObjectLiteral.startOffset, ktObjectLiteral.endOffset, objectLiteralType, IrOperator.OBJECT_LITERAL) val irBlock = IrBlockImpl(ktObjectLiteral.startOffset, ktObjectLiteral.endOffset, objectLiteralType, IrStatementOrigin.OBJECT_LITERAL)
val irClass = DeclarationGenerator(statementGenerator.context).generateClassOrObjectDeclaration(ktObjectLiteral.objectDeclaration) val irClass = DeclarationGenerator(statementGenerator.context).generateClassOrObjectDeclaration(ktObjectLiteral.objectDeclaration)
irBlock.addStatement(irClass) irBlock.addStatement(irClass)
@@ -46,7 +46,7 @@ class LocalClassGenerator(statementGenerator: StatementGenerator): StatementGene
} }
irBlock.addStatement(IrCallImpl(ktObjectLiteral.startOffset, ktObjectLiteral.endOffset, objectLiteralType, irBlock.addStatement(IrCallImpl(ktObjectLiteral.startOffset, ktObjectLiteral.endOffset, objectLiteralType,
objectConstructor, IrOperator.OBJECT_LITERAL)) objectConstructor, IrStatementOrigin.OBJECT_LITERAL))
return irBlock return irBlock
} }
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.ir.declarations.IrFunction
import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrCallableReferenceImpl import org.jetbrains.kotlin.ir.expressions.impl.IrCallableReferenceImpl
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.psi.KtLambdaExpression import org.jetbrains.kotlin.psi.KtLambdaExpression
import org.jetbrains.kotlin.psi.KtNamedFunction import org.jetbrains.kotlin.psi.KtNamedFunction
import org.jetbrains.kotlin.psi.psiUtil.endOffset import org.jetbrains.kotlin.psi.psiUtil.endOffset
@@ -34,14 +34,14 @@ class LocalFunctionGenerator(statementGenerator: StatementGenerator) : Statement
val ktFun = ktLambda.functionLiteral val ktFun = ktLambda.functionLiteral
val lambdaExpressionType = getInferredTypeWithImplicitCastsOrFail(ktLambda) val lambdaExpressionType = getInferredTypeWithImplicitCastsOrFail(ktLambda)
val lambdaDescriptor = getOrFail(BindingContext.FUNCTION, ktFun) val lambdaDescriptor = getOrFail(BindingContext.FUNCTION, ktFun)
val irBlock = IrBlockImpl(ktLambda.startOffset, ktLambda.endOffset, lambdaExpressionType, IrOperator.LAMBDA) val irBlock = IrBlockImpl(ktLambda.startOffset, ktLambda.endOffset, lambdaExpressionType, IrStatementOrigin.LAMBDA)
val irFun = IrFunctionImpl(ktFun.startOffset, ktFun.endOffset, IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA, lambdaDescriptor) val irFun = IrFunctionImpl(ktFun.startOffset, ktFun.endOffset, IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA, lambdaDescriptor)
irFun.body = BodyGenerator(lambdaDescriptor, statementGenerator.context).generateLambdaBody(ktFun) irFun.body = BodyGenerator(lambdaDescriptor, statementGenerator.context).generateLambdaBody(ktFun)
irBlock.addStatement(irFun) irBlock.addStatement(irFun)
irBlock.addStatement(IrCallableReferenceImpl(ktLambda.startOffset, ktLambda.endOffset, lambdaExpressionType, irBlock.addStatement(IrCallableReferenceImpl(ktLambda.startOffset, ktLambda.endOffset, lambdaExpressionType,
lambdaDescriptor, IrOperator.LAMBDA)) lambdaDescriptor, IrStatementOrigin.LAMBDA))
return irBlock return irBlock
} }
@@ -53,13 +53,13 @@ class LocalFunctionGenerator(statementGenerator: StatementGenerator) : Statement
else { else {
// anonymous function expression // anonymous function expression
val funExpressionType = getInferredTypeWithImplicitCastsOrFail(ktFun) val funExpressionType = getInferredTypeWithImplicitCastsOrFail(ktFun)
val irBlock = IrBlockImpl(ktFun.startOffset, ktFun.endOffset, funExpressionType, IrOperator.ANONYMOUS_FUNCTION) val irBlock = IrBlockImpl(ktFun.startOffset, ktFun.endOffset, funExpressionType, IrStatementOrigin.ANONYMOUS_FUNCTION)
val irFun = generateFunctionDeclaration(ktFun) val irFun = generateFunctionDeclaration(ktFun)
irBlock.addStatement(irFun) irBlock.addStatement(irFun)
irBlock.addStatement(IrCallableReferenceImpl(ktFun.startOffset, ktFun.endOffset, funExpressionType, irBlock.addStatement(IrCallableReferenceImpl(ktFun.startOffset, ktFun.endOffset, funExpressionType,
irFun.descriptor, IrOperator.ANONYMOUS_FUNCTION)) irFun.descriptor, IrStatementOrigin.ANONYMOUS_FUNCTION))
irBlock irBlock
} }
@@ -32,12 +32,12 @@ class LoopExpressionGenerator(statementGenerator: StatementGenerator) : Statemen
fun generateWhileLoop(ktWhile: KtWhileExpression): IrExpression = fun generateWhileLoop(ktWhile: KtWhileExpression): IrExpression =
generateConditionalLoop(ktWhile, generateConditionalLoop(ktWhile,
IrWhileLoopImpl(ktWhile.startOffset, ktWhile.endOffset, IrWhileLoopImpl(ktWhile.startOffset, ktWhile.endOffset,
context.builtIns.unitType, IrOperator.WHILE_LOOP)) context.builtIns.unitType, IrStatementOrigin.WHILE_LOOP))
fun generateDoWhileLoop(ktDoWhile: KtDoWhileExpression): IrExpression = fun generateDoWhileLoop(ktDoWhile: KtDoWhileExpression): IrExpression =
generateConditionalLoop(ktDoWhile, generateConditionalLoop(ktDoWhile,
IrDoWhileLoopImpl(ktDoWhile.startOffset, ktDoWhile.endOffset, IrDoWhileLoopImpl(ktDoWhile.startOffset, ktDoWhile.endOffset,
context.builtIns.unitType, IrOperator.DO_WHILE_LOOP)) context.builtIns.unitType, IrStatementOrigin.DO_WHILE_LOOP))
private fun generateConditionalLoop(ktLoop: KtWhileExpressionBase, irLoop: IrLoopBase): IrLoop { private fun generateConditionalLoop(ktLoop: KtWhileExpressionBase, irLoop: IrLoopBase): IrLoop {
irLoop.condition = statementGenerator.generateExpression(ktLoop.condition!!) irLoop.condition = statementGenerator.generateExpression(ktLoop.condition!!)
@@ -113,34 +113,34 @@ class LoopExpressionGenerator(statementGenerator: StatementGenerator) : Statemen
val callGenerator = CallGenerator(statementGenerator) val callGenerator = CallGenerator(statementGenerator)
val irForBlock = IrBlockImpl(ktFor.startOffset, ktFor.endOffset, context.builtIns.unitType, IrOperator.FOR_LOOP) val irForBlock = IrBlockImpl(ktFor.startOffset, ktFor.endOffset, context.builtIns.unitType, IrStatementOrigin.FOR_LOOP)
val iteratorCall = statementGenerator.pregenerateCall(iteratorResolvedCall) val iteratorCall = statementGenerator.pregenerateCall(iteratorResolvedCall)
val irIteratorCall = callGenerator.generateCall(ktLoopRange, iteratorCall, IrOperator.FOR_LOOP_ITERATOR) val irIteratorCall = callGenerator.generateCall(ktLoopRange, iteratorCall, IrStatementOrigin.FOR_LOOP_ITERATOR)
val irIterator = scope.createTemporaryVariable(irIteratorCall, "iterator") val irIterator = scope.createTemporaryVariable(irIteratorCall, "iterator")
val iteratorValue = VariableLValue(irIterator) val iteratorValue = VariableLValue(irIterator)
irForBlock.addStatement(irIterator) irForBlock.addStatement(irIterator)
val irInnerWhile = IrWhileLoopImpl(ktFor.startOffset, ktFor.endOffset, context.builtIns.unitType, IrOperator.FOR_LOOP_INNER_WHILE) val irInnerWhile = IrWhileLoopImpl(ktFor.startOffset, ktFor.endOffset, context.builtIns.unitType, IrStatementOrigin.FOR_LOOP_INNER_WHILE)
irInnerWhile.label = getLoopLabel(ktFor) irInnerWhile.label = getLoopLabel(ktFor)
statementGenerator.bodyGenerator.putLoop(ktFor, irInnerWhile) statementGenerator.bodyGenerator.putLoop(ktFor, irInnerWhile)
irForBlock.addStatement(irInnerWhile) irForBlock.addStatement(irInnerWhile)
val hasNextCall = statementGenerator.pregenerateCall(hasNextResolvedCall) val hasNextCall = statementGenerator.pregenerateCall(hasNextResolvedCall)
hasNextCall.setExplicitReceiverValue(iteratorValue) hasNextCall.setExplicitReceiverValue(iteratorValue)
val irHasNextCall = callGenerator.generateCall(ktLoopRange, hasNextCall, IrOperator.FOR_LOOP_HAS_NEXT) val irHasNextCall = callGenerator.generateCall(ktLoopRange, hasNextCall, IrStatementOrigin.FOR_LOOP_HAS_NEXT)
irInnerWhile.condition = irHasNextCall irInnerWhile.condition = irHasNextCall
val irInnerBody = IrBlockImpl(ktFor.startOffset, ktFor.endOffset, context.builtIns.unitType, IrOperator.FOR_LOOP_INNER_WHILE) val irInnerBody = IrBlockImpl(ktFor.startOffset, ktFor.endOffset, context.builtIns.unitType, IrStatementOrigin.FOR_LOOP_INNER_WHILE)
irInnerWhile.body = irInnerBody irInnerWhile.body = irInnerBody
val nextCall = statementGenerator.pregenerateCall(nextResolvedCall) val nextCall = statementGenerator.pregenerateCall(nextResolvedCall)
nextCall.setExplicitReceiverValue(iteratorValue) nextCall.setExplicitReceiverValue(iteratorValue)
val irNextCall = callGenerator.generateCall(ktLoopRange, nextCall, IrOperator.FOR_LOOP_NEXT) val irNextCall = callGenerator.generateCall(ktLoopRange, nextCall, IrStatementOrigin.FOR_LOOP_NEXT)
val irLoopParameter = if (ktLoopParameter != null) { val irLoopParameter = if (ktLoopParameter != null) {
val loopParameterDescriptor = getOrFail(BindingContext.VALUE_PARAMETER, ktLoopParameter) val loopParameterDescriptor = getOrFail(BindingContext.VALUE_PARAMETER, ktLoopParameter)
IrVariableImpl(ktLoopParameter.startOffset, ktLoopParameter.endOffset, IrDeclarationOrigin.DEFINED, IrVariableImpl(ktLoopParameter.startOffset, ktLoopParameter.endOffset, IrDeclarationOrigin.DEFINED,
loopParameterDescriptor, irNextCall) loopParameterDescriptor, irNextCall)
} }
else { else {
scope.createTemporaryVariable(irNextCall, "loop_parameter") scope.createTemporaryVariable(irNextCall, "loop_parameter")
@@ -17,56 +17,56 @@
package org.jetbrains.kotlin.psi2ir.generators package org.jetbrains.kotlin.psi2ir.generators
import com.intellij.psi.tree.IElementType import com.intellij.psi.tree.IElementType
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.IrTypeOperator import org.jetbrains.kotlin.ir.expressions.IrTypeOperator
import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.lexer.KtTokens
fun getInfixOperator(ktOperator: IElementType): IrOperator? = fun getInfixOperator(ktOperator: IElementType): IrStatementOrigin? =
when (ktOperator) { when (ktOperator) {
KtTokens.EQ -> IrOperator.EQ KtTokens.EQ -> IrStatementOrigin.EQ
KtTokens.PLUSEQ -> IrOperator.PLUSEQ KtTokens.PLUSEQ -> IrStatementOrigin.PLUSEQ
KtTokens.MINUSEQ -> IrOperator.MINUSEQ KtTokens.MINUSEQ -> IrStatementOrigin.MINUSEQ
KtTokens.MULTEQ -> IrOperator.MULTEQ KtTokens.MULTEQ -> IrStatementOrigin.MULTEQ
KtTokens.DIVEQ -> IrOperator.DIVEQ KtTokens.DIVEQ -> IrStatementOrigin.DIVEQ
KtTokens.PERCEQ -> IrOperator.PERCEQ KtTokens.PERCEQ -> IrStatementOrigin.PERCEQ
KtTokens.PLUS -> IrOperator.PLUS KtTokens.PLUS -> IrStatementOrigin.PLUS
KtTokens.MINUS -> IrOperator.MINUS KtTokens.MINUS -> IrStatementOrigin.MINUS
KtTokens.MUL -> IrOperator.MUL KtTokens.MUL -> IrStatementOrigin.MUL
KtTokens.DIV -> IrOperator.DIV KtTokens.DIV -> IrStatementOrigin.DIV
KtTokens.PERC -> IrOperator.PERC KtTokens.PERC -> IrStatementOrigin.PERC
KtTokens.RANGE -> IrOperator.RANGE KtTokens.RANGE -> IrStatementOrigin.RANGE
KtTokens.LT -> IrOperator.LT KtTokens.LT -> IrStatementOrigin.LT
KtTokens.LTEQ -> IrOperator.LTEQ KtTokens.LTEQ -> IrStatementOrigin.LTEQ
KtTokens.GT -> IrOperator.GT KtTokens.GT -> IrStatementOrigin.GT
KtTokens.GTEQ -> IrOperator.GTEQ KtTokens.GTEQ -> IrStatementOrigin.GTEQ
KtTokens.EQEQ -> IrOperator.EQEQ KtTokens.EQEQ -> IrStatementOrigin.EQEQ
KtTokens.EXCLEQ -> IrOperator.EXCLEQ KtTokens.EXCLEQ -> IrStatementOrigin.EXCLEQ
KtTokens.EQEQEQ -> IrOperator.EQEQEQ KtTokens.EQEQEQ -> IrStatementOrigin.EQEQEQ
KtTokens.EXCLEQEQEQ -> IrOperator.EXCLEQEQ KtTokens.EXCLEQEQEQ -> IrStatementOrigin.EXCLEQEQ
KtTokens.IN_KEYWORD -> IrOperator.IN KtTokens.IN_KEYWORD -> IrStatementOrigin.IN
KtTokens.NOT_IN -> IrOperator.NOT_IN KtTokens.NOT_IN -> IrStatementOrigin.NOT_IN
KtTokens.ANDAND -> IrOperator.ANDAND KtTokens.ANDAND -> IrStatementOrigin.ANDAND
KtTokens.OROR -> IrOperator.OROR KtTokens.OROR -> IrStatementOrigin.OROR
KtTokens.ELVIS -> IrOperator.ELVIS KtTokens.ELVIS -> IrStatementOrigin.ELVIS
else -> null else -> null
} }
fun getPrefixOperator(ktOperator: IElementType): IrOperator? = fun getPrefixOperator(ktOperator: IElementType): IrStatementOrigin? =
when (ktOperator) { when (ktOperator) {
KtTokens.PLUSPLUS -> IrOperator.PREFIX_INCR KtTokens.PLUSPLUS -> IrStatementOrigin.PREFIX_INCR
KtTokens.MINUSMINUS -> IrOperator.PREFIX_DECR KtTokens.MINUSMINUS -> IrStatementOrigin.PREFIX_DECR
KtTokens.EXCL -> IrOperator.EXCL KtTokens.EXCL -> IrStatementOrigin.EXCL
KtTokens.MINUS -> IrOperator.UMINUS KtTokens.MINUS -> IrStatementOrigin.UMINUS
KtTokens.PLUS -> IrOperator.UPLUS KtTokens.PLUS -> IrStatementOrigin.UPLUS
else -> null else -> null
} }
fun getPostfixOperator(ktOperator: IElementType): IrOperator? = fun getPostfixOperator(ktOperator: IElementType): IrStatementOrigin? =
when (ktOperator) { when (ktOperator) {
KtTokens.PLUSPLUS -> IrOperator.POSTFIX_INCR KtTokens.PLUSPLUS -> IrStatementOrigin.POSTFIX_INCR
KtTokens.MINUSMINUS -> IrOperator.POSTFIX_DECR KtTokens.MINUSMINUS -> IrStatementOrigin.POSTFIX_DECR
KtTokens.EXCLEXCL -> IrOperator.EXCLEXCL KtTokens.EXCLEXCL -> IrStatementOrigin.EXCLEXCL
else -> null else -> null
} }
@@ -80,29 +80,29 @@ fun getIrTypeOperator(ktOperator: IElementType): IrTypeOperator? =
} }
val AUGMENTED_ASSIGNMENTS = val AUGMENTED_ASSIGNMENTS =
setOf(IrOperator.PLUSEQ, IrOperator.MINUSEQ, IrOperator.MULTEQ, IrOperator.DIVEQ, IrOperator.PERCEQ) setOf(IrStatementOrigin.PLUSEQ, IrStatementOrigin.MINUSEQ, IrStatementOrigin.MULTEQ, IrStatementOrigin.DIVEQ, IrStatementOrigin.PERCEQ)
val OPERATORS_DESUGARED_TO_CALLS = val OPERATORS_DESUGARED_TO_CALLS =
setOf(IrOperator.PLUS, IrOperator.MINUS, IrOperator.MUL, IrOperator.DIV, IrOperator.PERC, IrOperator.RANGE, setOf(IrStatementOrigin.PLUS, IrStatementOrigin.MINUS, IrStatementOrigin.MUL, IrStatementOrigin.DIV, IrStatementOrigin.PERC, IrStatementOrigin.RANGE,
IrOperator.EXCL, IrOperator.UMINUS, IrOperator.UPLUS) IrStatementOrigin.EXCL, IrStatementOrigin.UMINUS, IrStatementOrigin.UPLUS)
val COMPARISON_OPERATORS = val COMPARISON_OPERATORS =
setOf(IrOperator.LT, IrOperator.LTEQ, IrOperator.GT, IrOperator.GTEQ) setOf(IrStatementOrigin.LT, IrStatementOrigin.LTEQ, IrStatementOrigin.GT, IrStatementOrigin.GTEQ)
val EQUALITY_OPERATORS = val EQUALITY_OPERATORS =
setOf(IrOperator.EQEQ, IrOperator.EXCLEQ) setOf(IrStatementOrigin.EQEQ, IrStatementOrigin.EXCLEQ)
val IDENTITY_OPERATORS = val IDENTITY_OPERATORS =
setOf(IrOperator.EQEQEQ, IrOperator.EXCLEQEQ) setOf(IrStatementOrigin.EQEQEQ, IrStatementOrigin.EXCLEQEQ)
val IN_OPERATORS = val IN_OPERATORS =
setOf(IrOperator.IN, IrOperator.NOT_IN) setOf(IrStatementOrigin.IN, IrStatementOrigin.NOT_IN)
val BINARY_BOOLEAN_OPERATORS = val BINARY_BOOLEAN_OPERATORS =
setOf(IrOperator.ANDAND, IrOperator.OROR) setOf(IrStatementOrigin.ANDAND, IrStatementOrigin.OROR)
val INCREMENT_DECREMENT_OPERATORS = val INCREMENT_DECREMENT_OPERATORS =
setOf(IrOperator.PREFIX_INCR, IrOperator.PREFIX_DECR, IrOperator.POSTFIX_INCR, IrOperator.POSTFIX_DECR) setOf(IrStatementOrigin.PREFIX_INCR, IrStatementOrigin.PREFIX_DECR, IrStatementOrigin.POSTFIX_INCR, IrStatementOrigin.POSTFIX_DECR)
val POSTFIX_INCREMENT_DECREMENT_OPERATORS = val POSTFIX_INCREMENT_DECREMENT_OPERATORS =
setOf(IrOperator.POSTFIX_INCR, IrOperator.POSTFIX_DECR) setOf(IrStatementOrigin.POSTFIX_INCR, IrStatementOrigin.POSTFIX_DECR)
@@ -55,7 +55,7 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat
return when (irOperator) { return when (irOperator) {
null -> throw AssertionError("Unexpected postfix operator: $ktOperator") null -> throw AssertionError("Unexpected postfix operator: $ktOperator")
in INCREMENT_DECREMENT_OPERATORS -> AssignmentGenerator(statementGenerator).generatePostfixIncrementDecrement(expression, irOperator) in INCREMENT_DECREMENT_OPERATORS -> AssignmentGenerator(statementGenerator).generatePostfixIncrementDecrement(expression, irOperator)
IrOperator.EXCLEXCL -> generateExclExclOperator(expression, irOperator) IrStatementOrigin.EXCLEXCL -> generateExclExclOperator(expression, irOperator)
else -> createDummyExpression(expression, ktOperator.toString()) else -> createDummyExpression(expression, ktOperator.toString())
} }
} }
@@ -97,9 +97,9 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat
return when (irOperator) { return when (irOperator) {
null -> throw AssertionError("Unexpected infix operator: $ktOperator") null -> throw AssertionError("Unexpected infix operator: $ktOperator")
IrOperator.EQ -> AssignmentGenerator(statementGenerator).generateAssignment(expression) IrStatementOrigin.EQ -> AssignmentGenerator(statementGenerator).generateAssignment(expression)
in AUGMENTED_ASSIGNMENTS -> AssignmentGenerator(statementGenerator).generateAugmentedAssignment(expression, irOperator) in AUGMENTED_ASSIGNMENTS -> AssignmentGenerator(statementGenerator).generateAugmentedAssignment(expression, irOperator)
IrOperator.ELVIS -> generateElvis(expression) IrStatementOrigin.ELVIS -> generateElvis(expression)
in OPERATORS_DESUGARED_TO_CALLS -> generateBinaryOperatorAsCall(expression, irOperator) in OPERATORS_DESUGARED_TO_CALLS -> generateBinaryOperatorAsCall(expression, irOperator)
in COMPARISON_OPERATORS -> generateComparisonOperator(expression, irOperator) in COMPARISON_OPERATORS -> generateComparisonOperator(expression, irOperator)
in EQUALITY_OPERATORS -> generateEqualityOperator(expression, irOperator) in EQUALITY_OPERATORS -> generateEqualityOperator(expression, irOperator)
@@ -116,35 +116,35 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat
val irArgument0 = statementGenerator.generateExpression(expression.left!!) val irArgument0 = statementGenerator.generateExpression(expression.left!!)
val irArgument1 = statementGenerator.generateExpression(expression.right!!) val irArgument1 = statementGenerator.generateExpression(expression.right!!)
return irBlock(expression, IrOperator.ELVIS, resultType) { return irBlock(expression, IrStatementOrigin.ELVIS, resultType) {
val temporary = defineTemporary(irArgument0, "elvis_lhs") val temporary = defineTemporary(irArgument0, "elvis_lhs")
+irIfNull(resultType, irGet(temporary), irArgument1, irGet(temporary)) +irIfNull(resultType, irGet(temporary), irArgument1, irGet(temporary))
} }
} }
private fun generateBinaryBooleanOperator(expression: KtBinaryExpression, irOperator: IrOperator): IrExpression { private fun generateBinaryBooleanOperator(expression: KtBinaryExpression, irOperator: IrStatementOrigin): IrExpression {
val irArgument0 = statementGenerator.generateExpression(expression.left!!) val irArgument0 = statementGenerator.generateExpression(expression.left!!)
val irArgument1 = statementGenerator.generateExpression(expression.right!!) val irArgument1 = statementGenerator.generateExpression(expression.right!!)
return when (irOperator) { return when (irOperator) {
IrOperator.OROR -> IrStatementOrigin.OROR ->
context.oror(expression.startOffset, expression.endOffset, irArgument0, irArgument1) context.oror(expression.startOffset, expression.endOffset, irArgument0, irArgument1)
IrOperator.ANDAND -> IrStatementOrigin.ANDAND ->
context.andand(expression.startOffset, expression.endOffset, irArgument0, irArgument1) context.andand(expression.startOffset, expression.endOffset, irArgument0, irArgument1)
else -> else ->
throw AssertionError("Unexpected binary boolean operator $irOperator") throw AssertionError("Unexpected binary boolean operator $irOperator")
} }
} }
private fun generateInOperator(expression: KtBinaryExpression, irOperator: IrOperator): IrExpression { private fun generateInOperator(expression: KtBinaryExpression, irOperator: IrStatementOrigin): IrExpression {
val containsCall = getResolvedCall(expression)!! val containsCall = getResolvedCall(expression)!!
val irContainsCall = CallGenerator(statementGenerator).generateCall(expression, statementGenerator.pregenerateCall(containsCall), irOperator) val irContainsCall = CallGenerator(statementGenerator).generateCall(expression, statementGenerator.pregenerateCall(containsCall), irOperator)
return when (irOperator) { return when (irOperator) {
IrOperator.IN -> IrStatementOrigin.IN ->
irContainsCall irContainsCall
IrOperator.NOT_IN -> IrStatementOrigin.NOT_IN ->
IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, IrOperator.NOT_IN, context.irBuiltIns.booleanNot, IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, IrStatementOrigin.NOT_IN, context.irBuiltIns.booleanNot,
irContainsCall) irContainsCall)
else -> else ->
throw AssertionError("Unexpected in-operator $irOperator") throw AssertionError("Unexpected in-operator $irOperator")
@@ -152,7 +152,7 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat
} }
private fun generateIdentityOperator(expression: KtBinaryExpression, irOperator: IrOperator): IrExpression { private fun generateIdentityOperator(expression: KtBinaryExpression, irOperator: IrStatementOrigin): IrExpression {
val irArgument0 = statementGenerator.generateExpression(expression.left!!) val irArgument0 = statementGenerator.generateExpression(expression.left!!)
val irArgument1 = statementGenerator.generateExpression(expression.right!!) val irArgument1 = statementGenerator.generateExpression(expression.right!!)
@@ -161,10 +161,10 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat
irArgument0, irArgument1) irArgument0, irArgument1)
return when (irOperator) { return when (irOperator) {
IrOperator.EQEQEQ -> IrStatementOrigin.EQEQEQ ->
irIdentityEquals irIdentityEquals
IrOperator.EXCLEQEQ -> IrStatementOrigin.EXCLEQEQ ->
IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, IrOperator.EXCLEQEQ, context.irBuiltIns.booleanNot, IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, IrStatementOrigin.EXCLEQEQ, context.irBuiltIns.booleanNot,
irIdentityEquals) irIdentityEquals)
else -> else ->
throw AssertionError("Unexpected identity operator $irOperator") throw AssertionError("Unexpected identity operator $irOperator")
@@ -172,7 +172,7 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat
} }
private fun generateEqualityOperator(expression: KtBinaryExpression, irOperator: IrOperator): IrExpression { private fun generateEqualityOperator(expression: KtBinaryExpression, irOperator: IrStatementOrigin): IrExpression {
val irArgument0 = statementGenerator.generateExpression(expression.left!!) val irArgument0 = statementGenerator.generateExpression(expression.left!!)
val irArgument1 = statementGenerator.generateExpression(expression.right!!) val irArgument1 = statementGenerator.generateExpression(expression.right!!)
@@ -180,10 +180,10 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat
irOperator, context.irBuiltIns.eqeq, irArgument0, irArgument1) irOperator, context.irBuiltIns.eqeq, irArgument0, irArgument1)
return when (irOperator) { return when (irOperator) {
IrOperator.EQEQ -> IrStatementOrigin.EQEQ ->
irEquals irEquals
IrOperator.EXCLEQ -> IrStatementOrigin.EXCLEQ ->
IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, IrOperator.EXCLEQ, IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, IrStatementOrigin.EXCLEQ,
context.irBuiltIns.booleanNot, irEquals) context.irBuiltIns.booleanNot, irEquals)
else -> else ->
throw AssertionError("Unexpected equality operator $irOperator") throw AssertionError("Unexpected equality operator $irOperator")
@@ -191,41 +191,41 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat
} }
private fun generateComparisonOperator(expression: KtBinaryExpression, irOperator: IrOperator): IrExpression { private fun generateComparisonOperator(expression: KtBinaryExpression, origin: IrStatementOrigin): IrExpression {
val compareToCall = getResolvedCall(expression)!! val compareToCall = getResolvedCall(expression)!!
val irCompareToCall = CallGenerator(statementGenerator).generateCall(expression, statementGenerator.pregenerateCall(compareToCall), irOperator) val irCompareToCall = CallGenerator(statementGenerator).generateCall(expression, statementGenerator.pregenerateCall(compareToCall), origin)
val compareToZeroDescriptor = when (irOperator) { val compareToZeroDescriptor = when (origin) {
IrOperator.LT -> context.irBuiltIns.lt0 IrStatementOrigin.LT -> context.irBuiltIns.lt0
IrOperator.LTEQ -> context.irBuiltIns.lteq0 IrStatementOrigin.LTEQ -> context.irBuiltIns.lteq0
IrOperator.GT -> context.irBuiltIns.gt0 IrStatementOrigin.GT -> context.irBuiltIns.gt0
IrOperator.GTEQ -> context.irBuiltIns.gteq0 IrStatementOrigin.GTEQ -> context.irBuiltIns.gteq0
else -> throw AssertionError("Unexpected comparison operator: $irOperator") else -> throw AssertionError("Unexpected comparison operator: $origin")
} }
return IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, irOperator, compareToZeroDescriptor, irCompareToCall) return IrUnaryPrimitiveImpl(expression.startOffset, expression.endOffset, origin, compareToZeroDescriptor, irCompareToCall)
} }
private fun generateExclExclOperator(expression: KtPostfixExpression, irOperator: IrOperator): IrExpression { private fun generateExclExclOperator(expression: KtPostfixExpression, origin: IrStatementOrigin): IrExpression {
val ktArgument = expression.baseExpression!! val ktArgument = expression.baseExpression!!
val irArgument = statementGenerator.generateExpression(ktArgument) val irArgument = statementGenerator.generateExpression(ktArgument)
val ktOperator = expression.operationReference val ktOperator = expression.operationReference
val resultType = irArgument.type.makeNotNullable() val resultType = irArgument.type.makeNotNullable()
return irBlock(ktOperator, irOperator, resultType) { return irBlock(ktOperator, origin, resultType) {
val temporary = defineTemporary(irArgument, "notnull") val temporary = defineTemporary(irArgument, "notnull")
+irIfNull(resultType, irGet(temporary), irThrowNpe(irOperator), irGet(temporary)) +irIfNull(resultType, irGet(temporary), irThrowNpe(origin), irGet(temporary))
} }
} }
private fun generateBinaryOperatorAsCall(expression: KtBinaryExpression, irOperator: IrOperator?): IrExpression { private fun generateBinaryOperatorAsCall(expression: KtBinaryExpression, origin: IrStatementOrigin?): IrExpression {
val operatorCall = getResolvedCall(expression)!! val operatorCall = getResolvedCall(expression)!!
return CallGenerator(statementGenerator).generateCall(expression, statementGenerator.pregenerateCall(operatorCall), irOperator) return CallGenerator(statementGenerator).generateCall(expression, statementGenerator.pregenerateCall(operatorCall), origin)
} }
private fun generatePrefixOperatorAsCall(expression: KtPrefixExpression, irOperator: IrOperator): IrExpression { private fun generatePrefixOperatorAsCall(expression: KtPrefixExpression, origin: IrStatementOrigin): IrExpression {
val resolvedCall = getResolvedCall(expression)!! val resolvedCall = getResolvedCall(expression)!!
if (expression.baseExpression is KtConstantExpression) { if (expression.baseExpression is KtConstantExpression) {
@@ -237,6 +237,6 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat
} }
} }
return CallGenerator(statementGenerator).generateCall(expression, statementGenerator.pregenerateCall(resolvedCall), irOperator) return CallGenerator(statementGenerator).generateCall(expression, statementGenerator.pregenerateCall(resolvedCall), origin)
} }
} }
@@ -21,44 +21,44 @@ import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns
import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.*
import org.jetbrains.kotlin.ir.expressions.impl.* import org.jetbrains.kotlin.ir.expressions.impl.*
fun primitiveOp1(startOffset: Int, endOffset: Int, primitiveOpDescriptor: CallableDescriptor, irOperator: IrOperator, fun primitiveOp1(startOffset: Int, endOffset: Int, primitiveOpDescriptor: CallableDescriptor, origin: IrStatementOrigin,
argument: IrExpression): IrExpression = argument: IrExpression): IrExpression =
IrUnaryPrimitiveImpl(startOffset, endOffset, irOperator, primitiveOpDescriptor, argument) IrUnaryPrimitiveImpl(startOffset, endOffset, origin, primitiveOpDescriptor, argument)
fun primitiveOp2(startOffset: Int, endOffset: Int, primitiveOpDescriptor: CallableDescriptor, irOperator: IrOperator, fun primitiveOp2(startOffset: Int, endOffset: Int, primitiveOpDescriptor: CallableDescriptor, origin: IrStatementOrigin,
argument1: IrExpression, argument2: IrExpression): IrExpression = argument1: IrExpression, argument2: IrExpression): IrExpression =
IrBinaryPrimitiveImpl(startOffset, endOffset, irOperator, primitiveOpDescriptor, argument1, argument2) IrBinaryPrimitiveImpl(startOffset, endOffset, origin, primitiveOpDescriptor, argument1, argument2)
fun GeneratorContext.constNull(startOffset: Int, endOffset: Int): IrExpression = fun GeneratorContext.constNull(startOffset: Int, endOffset: Int): IrExpression =
IrConstImpl.constNull(startOffset, endOffset, builtIns.nullableNothingType) IrConstImpl.constNull(startOffset, endOffset, builtIns.nullableNothingType)
fun GeneratorContext.equalsNull(startOffset: Int, endOffset: Int, argument: IrExpression): IrExpression = fun GeneratorContext.equalsNull(startOffset: Int, endOffset: Int, argument: IrExpression): IrExpression =
primitiveOp2(startOffset, endOffset, irBuiltIns.eqeq, IrOperator.EQEQ, primitiveOp2(startOffset, endOffset, irBuiltIns.eqeq, IrStatementOrigin.EQEQ,
argument, constNull(startOffset, endOffset)) argument, constNull(startOffset, endOffset))
fun GeneratorContext.eqeqeq(startOffset: Int, endOffset: Int, argument1: IrExpression, argument2: IrExpression): IrExpression = fun GeneratorContext.eqeqeq(startOffset: Int, endOffset: Int, argument1: IrExpression, argument2: IrExpression): IrExpression =
primitiveOp2(startOffset, endOffset, irBuiltIns.eqeqeq, IrOperator.EQEQEQ, argument1, argument2) primitiveOp2(startOffset, endOffset, irBuiltIns.eqeqeq, IrStatementOrigin.EQEQEQ, argument1, argument2)
fun GeneratorContext.throwNpe(startOffset: Int, endOffset: Int, operator: IrOperator): IrExpression = fun GeneratorContext.throwNpe(startOffset: Int, endOffset: Int, origin: IrStatementOrigin): IrExpression =
IrNullaryPrimitiveImpl(startOffset, endOffset, operator, irBuiltIns.throwNpe) IrNullaryPrimitiveImpl(startOffset, endOffset, origin, irBuiltIns.throwNpe)
// a || b == if (a) true else b // a || b == if (a) true else b
fun GeneratorContext.oror(startOffset: Int, endOffset: Int, a: IrExpression, b: IrExpression, operator: IrOperator = IrOperator.OROR): IrWhen = fun GeneratorContext.oror(startOffset: Int, endOffset: Int, a: IrExpression, b: IrExpression, origin: IrStatementOrigin = IrStatementOrigin.OROR): IrWhen =
IrIfThenElseImpl(startOffset, endOffset, builtIns.booleanType, IrIfThenElseImpl(startOffset, endOffset, builtIns.booleanType,
a, IrConstImpl.constTrue(b.startOffset, b.endOffset, b.type), b, a, IrConstImpl.constTrue(b.startOffset, b.endOffset, b.type), b,
operator) origin)
fun GeneratorContext.oror(a: IrExpression, b: IrExpression, operator: IrOperator = IrOperator.OROR): IrWhen = fun GeneratorContext.oror(a: IrExpression, b: IrExpression, origin: IrStatementOrigin = IrStatementOrigin.OROR): IrWhen =
oror(b.startOffset, b.endOffset, a, b, operator) oror(b.startOffset, b.endOffset, a, b, origin)
fun GeneratorContext.whenComma(a: IrExpression, b: IrExpression): IrWhen = fun GeneratorContext.whenComma(a: IrExpression, b: IrExpression): IrWhen =
oror(a, b, IrOperator.WHEN_COMMA) oror(a, b, IrStatementOrigin.WHEN_COMMA)
// a && b == if (a) b else false // a && b == if (a) b else false
fun GeneratorContext.andand(startOffset: Int, endOffset: Int, a: IrExpression, b: IrExpression, operator: IrOperator = IrOperator.ANDAND): IrWhen = fun GeneratorContext.andand(startOffset: Int, endOffset: Int, a: IrExpression, b: IrExpression, origin: IrStatementOrigin = IrStatementOrigin.ANDAND): IrWhen =
IrIfThenElseImpl(startOffset, endOffset, builtIns.booleanType, IrIfThenElseImpl(startOffset, endOffset, builtIns.booleanType,
a, b, IrConstImpl.constFalse(b.startOffset, b.endOffset, b.type), a, b, IrConstImpl.constFalse(b.startOffset, b.endOffset, b.type),
operator) origin)
fun GeneratorContext.andand(a: IrExpression, b: IrExpression, operator: IrOperator = IrOperator.ANDAND): IrWhen = fun GeneratorContext.andand(a: IrExpression, b: IrExpression, origin: IrStatementOrigin = IrStatementOrigin.ANDAND): IrWhen =
andand(b.startOffset, b.endOffset, a, b, operator) andand(b.startOffset, b.endOffset, a, b, origin)
@@ -28,7 +28,7 @@ import org.jetbrains.kotlin.ir.declarations.impl.IrFieldImpl
import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
import org.jetbrains.kotlin.ir.declarations.impl.IrPropertyImpl import org.jetbrains.kotlin.ir.declarations.impl.IrPropertyImpl
import org.jetbrains.kotlin.ir.expressions.IrBlockBody import org.jetbrains.kotlin.ir.expressions.IrBlockBody
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.impl.* import org.jetbrains.kotlin.ir.expressions.impl.*
import org.jetbrains.kotlin.psi.KtElement import org.jetbrains.kotlin.psi.KtElement
import org.jetbrains.kotlin.psi.KtParameter import org.jetbrains.kotlin.psi.KtParameter
@@ -59,7 +59,7 @@ class PropertyGenerator(val declarationGenerator: DeclarationGenerator) : Genera
val irField = IrFieldImpl(ktParameter.startOffset, ktParameter.endOffset, IrDeclarationOrigin.PROPERTY_BACKING_FIELD, propertyDescriptor) val irField = IrFieldImpl(ktParameter.startOffset, ktParameter.endOffset, IrDeclarationOrigin.PROPERTY_BACKING_FIELD, propertyDescriptor)
val irGetParameter = IrGetVariableImpl(ktParameter.startOffset, ktParameter.endOffset, val irGetParameter = IrGetVariableImpl(ktParameter.startOffset, ktParameter.endOffset,
valueParameterDescriptor, IrOperator.INITIALIZE_PROPERTY_FROM_PARAMETER) valueParameterDescriptor, IrStatementOrigin.INITIALIZE_PROPERTY_FROM_PARAMETER)
irField.initializer = IrExpressionBodyImpl(ktParameter.startOffset, ktParameter.endOffset, irGetParameter) irField.initializer = IrExpressionBodyImpl(ktParameter.startOffset, ktParameter.endOffset, irGetParameter)
irProperty.backingField = irField irProperty.backingField = irField
@@ -94,7 +94,7 @@ class StatementGenerator(
override fun visitDestructuringDeclaration(multiDeclaration: KtDestructuringDeclaration, data: Nothing?): IrStatement { override fun visitDestructuringDeclaration(multiDeclaration: KtDestructuringDeclaration, data: Nothing?): IrStatement {
val irBlock = IrCompositeImpl(multiDeclaration.startOffset, multiDeclaration.endOffset, val irBlock = IrCompositeImpl(multiDeclaration.startOffset, multiDeclaration.endOffset,
context.builtIns.unitType, IrOperator.DESTRUCTURING_DECLARATION) context.builtIns.unitType, IrStatementOrigin.DESTRUCTURING_DECLARATION)
val ktInitializer = multiDeclaration.initializer!! val ktInitializer = multiDeclaration.initializer!!
val containerValue = scope.createTemporaryVariableInBlock(ktInitializer.genExpr(), irBlock, "container") val containerValue = scope.createTemporaryVariableInBlock(ktInitializer.genExpr(), irBlock, "container")
@@ -113,9 +113,9 @@ class StatementGenerator(
val componentVariable = getOrFail(BindingContext.VARIABLE, ktEntry) val componentVariable = getOrFail(BindingContext.VARIABLE, ktEntry)
val irComponentCall = callGenerator.generateCall(ktEntry.startOffset, ktEntry.endOffset, componentSubstitutedCall, val irComponentCall = callGenerator.generateCall(ktEntry.startOffset, ktEntry.endOffset, componentSubstitutedCall,
IrOperator.COMPONENT_N.withIndex(index + 1)) IrStatementOrigin.COMPONENT_N.withIndex(index + 1))
val irComponentVar = IrVariableImpl(ktEntry.startOffset, ktEntry.endOffset, IrDeclarationOrigin.DEFINED, val irComponentVar = IrVariableImpl(ktEntry.startOffset, ktEntry.endOffset, IrDeclarationOrigin.DEFINED,
componentVariable, irComponentCall) componentVariable, irComponentCall)
irBlock.addStatement(irComponentVar) irBlock.addStatement(irComponentVar)
} }
} }
@@ -232,7 +232,7 @@ class StatementGenerator(
if (resolvedCall != null) { if (resolvedCall != null) {
if (resolvedCall is VariableAsFunctionResolvedCall) { if (resolvedCall is VariableAsFunctionResolvedCall) {
val variableCall = pregenerateCall(resolvedCall.variableCall) val variableCall = pregenerateCall(resolvedCall.variableCall)
return CallGenerator(this).generateCall(expression, variableCall, IrOperator.VARIABLE_AS_FUNCTION) return CallGenerator(this).generateCall(expression, variableCall, IrStatementOrigin.VARIABLE_AS_FUNCTION)
} }
val descriptor = resolvedCall.resultingDescriptor val descriptor = resolvedCall.resultingDescriptor
@@ -289,7 +289,7 @@ class StatementGenerator(
if (resolvedCall is VariableAsFunctionResolvedCall) { if (resolvedCall is VariableAsFunctionResolvedCall) {
val functionCall = pregenerateCall(resolvedCall.functionCall) val functionCall = pregenerateCall(resolvedCall.functionCall)
return CallGenerator(this).generateCall(expression, functionCall, IrOperator.INVOKE) return CallGenerator(this).generateCall(expression, functionCall, IrStatementOrigin.INVOKE)
} }
return CallGenerator(this).generateCall(expression.startOffset, expression.endOffset, pregenerateCall(resolvedCall)) return CallGenerator(this).generateCall(expression.startOffset, expression.endOffset, pregenerateCall(resolvedCall))
@@ -299,7 +299,7 @@ class StatementGenerator(
val indexedGetCall = getOrFail(BindingContext.INDEXED_LVALUE_GET, expression) val indexedGetCall = getOrFail(BindingContext.INDEXED_LVALUE_GET, expression)
return CallGenerator(this).generateCall(expression.startOffset, expression.endOffset, return CallGenerator(this).generateCall(expression.startOffset, expression.endOffset,
pregenerateCall(indexedGetCall), IrOperator.GET_ARRAY_ELEMENT) pregenerateCall(indexedGetCall), IrStatementOrigin.GET_ARRAY_ELEMENT)
} }
override fun visitDotQualifiedExpression(expression: KtDotQualifiedExpression, data: Nothing?): IrStatement = override fun visitDotQualifiedExpression(expression: KtDotQualifiedExpression, data: Nothing?): IrStatement =
@@ -379,7 +379,7 @@ class StatementGenerator(
override fun visitTypeAlias(typeAlias: KtTypeAlias, data: Nothing?): IrStatement = override fun visitTypeAlias(typeAlias: KtTypeAlias, data: Nothing?): IrStatement =
IrTypeAliasImpl(typeAlias.startOffset, typeAlias.endOffset, IrDeclarationOrigin.DEFINED, IrTypeAliasImpl(typeAlias.startOffset, typeAlias.endOffset, IrDeclarationOrigin.DEFINED,
getOrFail(BindingContext.TYPE_ALIAS, typeAlias)) getOrFail(BindingContext.TYPE_ALIAS, typeAlias))
override fun visitClassLiteralExpression(expression: KtClassLiteralExpression, data: Nothing?): IrStatement = override fun visitClassLiteralExpression(expression: KtClassLiteralExpression, data: Nothing?): IrStatement =
ReflectionReferencesGenerator(this).generateClassLiteral(expression) ReflectionReferencesGenerator(this).generateClassLiteral(expression)
@@ -31,16 +31,16 @@ class ArrayAccessAssignmentReceiver(
val callGenerator: CallGenerator, val callGenerator: CallGenerator,
val startOffset: Int, val startOffset: Int,
val endOffset: Int, val endOffset: Int,
val operator: IrOperator val origin: IrStatementOrigin
) : AssignmentReceiver { ) : AssignmentReceiver {
private val type: KotlinType = indexedGetCall?.let { it.descriptor.returnType!! } ?: private val type: KotlinType = indexedGetCall?.let { it.descriptor.returnType!! } ?:
indexedSetCall?.let { it.descriptor.valueParameters.last().type } ?: indexedSetCall?.let { it.descriptor.valueParameters.last().type } ?:
throw AssertionError("Array access should have either indexed-get call or indexed-set call") throw AssertionError("Array access should have either indexed-get call or indexed-set call")
override fun assign(withLValue: (LValue) -> IrExpression): IrExpression { override fun assign(withLValue: (LValue) -> IrExpression): IrExpression {
val hasResult = operator.isAssignmentOperatorWithResult() val hasResult = origin.isAssignmentOperatorWithResult()
val resultType = if (hasResult) type else callGenerator.context.builtIns.unitType val resultType = if (hasResult) type else callGenerator.context.builtIns.unitType
val irBlock = IrBlockImpl(startOffset, endOffset, resultType, operator) val irBlock = IrBlockImpl(startOffset, endOffset, resultType, origin)
val irArrayValue = callGenerator.scope.createTemporaryVariableInBlock(irArray, irBlock, "array") val irArrayValue = callGenerator.scope.createTemporaryVariableInBlock(irArray, irBlock, "array")
@@ -50,7 +50,7 @@ class ArrayAccessAssignmentReceiver(
indexedGetCall?.fillArrayAndIndexArguments(irArrayValue, irIndexValues) indexedGetCall?.fillArrayAndIndexArguments(irArrayValue, irIndexValues)
indexedSetCall?.fillArrayAndIndexArguments(irArrayValue, irIndexValues) indexedSetCall?.fillArrayAndIndexArguments(irArrayValue, irIndexValues)
val irLValue = LValueWithGetterAndSetterCalls(callGenerator, indexedGetCall, indexedSetCall, type, startOffset, endOffset, operator) val irLValue = LValueWithGetterAndSetterCalls(callGenerator, indexedGetCall, indexedSetCall, type, startOffset, endOffset, origin)
irBlock.inlineStatement(withLValue(irLValue)) irBlock.inlineStatement(withLValue(irLValue))
return irBlock return irBlock
@@ -63,7 +63,7 @@ class ArrayAccessAssignmentReceiver(
indexedSetCall.irValueArgumentsByIndex[i] = irIndex indexedSetCall.irValueArgumentsByIndex[i] = irIndex
} }
indexedSetCall.lastArgument = value indexedSetCall.lastArgument = value
return callGenerator.generateCall(startOffset, endOffset, indexedSetCall, IrOperator.EQ) return callGenerator.generateCall(startOffset, endOffset, indexedSetCall, IrStatementOrigin.EQ)
} }
private fun CallBuilder.fillArrayAndIndexArguments(arrayValue: IntermediateValue, indexValues: List<IntermediateValue>) { private fun CallBuilder.fillArrayAndIndexArguments(arrayValue: IntermediateValue, indexValues: List<IntermediateValue>) {
@@ -27,15 +27,15 @@ class BackingFieldLValue(
val endOffset: Int, val endOffset: Int,
val descriptor: PropertyDescriptor, val descriptor: PropertyDescriptor,
val receiver: IntermediateValue?, val receiver: IntermediateValue?,
val operator: IrOperator? val origin: IrStatementOrigin?
) : LValue, AssignmentReceiver { ) : LValue, AssignmentReceiver {
override val type: KotlinType get() = descriptor.type override val type: KotlinType get() = descriptor.type
override fun store(irExpression: IrExpression): IrExpression = override fun store(irExpression: IrExpression): IrExpression =
IrSetFieldImpl(startOffset, endOffset, descriptor, receiver?.load(), irExpression, operator) IrSetFieldImpl(startOffset, endOffset, descriptor, receiver?.load(), irExpression, origin)
override fun load(): IrExpression = override fun load(): IrExpression =
IrGetFieldImpl(startOffset, endOffset, descriptor, receiver?.load(), operator) IrGetFieldImpl(startOffset, endOffset, descriptor, receiver?.load(), origin)
override fun assign(withLValue: (LValue) -> IrExpression): IrExpression = override fun assign(withLValue: (LValue) -> IrExpression): IrExpression =
withLValue(this) withLValue(this)
@@ -19,22 +19,22 @@ package org.jetbrains.kotlin.psi2ir.intermediate
import org.jetbrains.kotlin.descriptors.VariableDescriptorWithAccessors import org.jetbrains.kotlin.descriptors.VariableDescriptorWithAccessors
import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
class DelegatedLocalPropertyLValue( class DelegatedLocalPropertyLValue(
val startOffset: Int, val startOffset: Int,
val endOffset: Int, val endOffset: Int,
val descriptor: VariableDescriptorWithAccessors, val descriptor: VariableDescriptorWithAccessors,
val irOperator: IrOperator? = null val origin: IrStatementOrigin? = null
) : LValue, AssignmentReceiver { ) : LValue, AssignmentReceiver {
override val type: KotlinType get() = descriptor.type override val type: KotlinType get() = descriptor.type
override fun load(): IrExpression = override fun load(): IrExpression =
IrCallImpl(startOffset, endOffset, descriptor.type, descriptor.getter!!, irOperator) IrCallImpl(startOffset, endOffset, descriptor.type, descriptor.getter!!, origin)
override fun store(irExpression: IrExpression): IrExpression = override fun store(irExpression: IrExpression): IrExpression =
IrCallImpl(startOffset, endOffset, descriptor.type, descriptor.setter!!, irOperator).apply { IrCallImpl(startOffset, endOffset, descriptor.type, descriptor.setter!!, origin).apply {
putArgument(0, irExpression) putArgument(0, irExpression)
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.psi2ir.intermediate
import org.jetbrains.kotlin.descriptors.CallableDescriptor import org.jetbrains.kotlin.descriptors.CallableDescriptor
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.psi2ir.generators.CallGenerator import org.jetbrains.kotlin.psi2ir.generators.CallGenerator
import org.jetbrains.kotlin.psi2ir.intermediate.CallBuilder import org.jetbrains.kotlin.psi2ir.intermediate.CallBuilder
import org.jetbrains.kotlin.psi2ir.intermediate.argumentsCount import org.jetbrains.kotlin.psi2ir.intermediate.argumentsCount
@@ -31,7 +31,7 @@ class LValueWithGetterAndSetterCalls(
override val type: KotlinType, override val type: KotlinType,
val startOffset: Int, val startOffset: Int,
val endOffset: Int, val endOffset: Int,
val operator: IrOperator? = null val origin: IrStatementOrigin? = null
) : LValue { ) : LValue {
private val descriptor: CallableDescriptor = private val descriptor: CallableDescriptor =
getterCall?.descriptor ?: setterCall?.descriptor ?: getterCall?.descriptor ?: setterCall?.descriptor ?:
@@ -44,7 +44,7 @@ class LValueWithGetterAndSetterCalls(
if (getterCall == null) throw AssertionError("No getter call for $descriptor") if (getterCall == null) throw AssertionError("No getter call for $descriptor")
if (getterInstantiated) throw AssertionError("Getter for $descriptor has already been instantiated") if (getterInstantiated) throw AssertionError("Getter for $descriptor has already been instantiated")
getterInstantiated = true getterInstantiated = true
return callGenerator.generateCall(startOffset, endOffset, getterCall, operator) return callGenerator.generateCall(startOffset, endOffset, getterCall, origin)
} }
override fun store(irExpression: IrExpression): IrExpression { override fun store(irExpression: IrExpression): IrExpression {
@@ -52,7 +52,7 @@ class LValueWithGetterAndSetterCalls(
if (setterInstantiated) throw AssertionError("Setter for $descriptor has already been instantiated") if (setterInstantiated) throw AssertionError("Setter for $descriptor has already been instantiated")
setterInstantiated = true setterInstantiated = true
setterCall.irValueArgumentsByIndex[setterCall.argumentsCount - 1] = irExpression setterCall.irValueArgumentsByIndex[setterCall.argumentsCount - 1] = irExpression
return callGenerator.generateCall(startOffset, endOffset, setterCall, operator) return callGenerator.generateCall(startOffset, endOffset, setterCall, origin)
} }
} }
@@ -17,7 +17,7 @@
package org.jetbrains.kotlin.psi2ir.intermediate package org.jetbrains.kotlin.psi2ir.intermediate
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.psi2ir.generators.CallGenerator import org.jetbrains.kotlin.psi2ir.generators.CallGenerator
import org.jetbrains.kotlin.psi2ir.generators.StatementGenerator import org.jetbrains.kotlin.psi2ir.generators.StatementGenerator
import org.jetbrains.kotlin.psi2ir.intermediate.CallBuilder import org.jetbrains.kotlin.psi2ir.intermediate.CallBuilder
@@ -28,14 +28,14 @@ class OnceCallValue(
val endOffset: Int, val endOffset: Int,
val statementGenerator: StatementGenerator, val statementGenerator: StatementGenerator,
val call: CallBuilder, val call: CallBuilder,
val operator: IrOperator? = null val origin: IrStatementOrigin? = null
): IntermediateValue { ): IntermediateValue {
private var instantiated = false private var instantiated = false
override fun load(): IrExpression { override fun load(): IrExpression {
if (instantiated) throw AssertionError("Value for call ${call.descriptor} has already been instantiated") if (instantiated) throw AssertionError("Value for call ${call.descriptor} has already been instantiated")
instantiated = true instantiated = true
return CallGenerator(statementGenerator).generateCall(startOffset, endOffset, call, operator) return CallGenerator(statementGenerator).generateCall(startOffset, endOffset, call, origin)
} }
override val type: KotlinType get() = call.descriptor.returnType!! override val type: KotlinType get() = call.descriptor.returnType!!
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.psi2ir.intermediate
import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.impl.IrIfThenElseImpl import org.jetbrains.kotlin.ir.expressions.impl.IrIfThenElseImpl
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.psi2ir.generators.GeneratorWithScope import org.jetbrains.kotlin.psi2ir.generators.GeneratorWithScope
import org.jetbrains.kotlin.psi2ir.generators.constNull import org.jetbrains.kotlin.psi2ir.generators.constNull
import org.jetbrains.kotlin.psi2ir.generators.equalsNull import org.jetbrains.kotlin.psi2ir.generators.equalsNull
@@ -51,15 +51,15 @@ class SafeCallReceiver(
val irResult = withDispatchAndExtensionReceivers(dispatchReceiverValue, extensionReceiverValue) val irResult = withDispatchAndExtensionReceivers(dispatchReceiverValue, extensionReceiverValue)
val resultType = irResult.type.makeNullable() val resultType = irResult.type.makeNullable()
val irBlock = IrBlockImpl(startOffset, endOffset, resultType, IrOperator.SAFE_CALL) val irBlock = IrBlockImpl(startOffset, endOffset, resultType, IrStatementOrigin.SAFE_CALL)
irBlock.addStatement(irTmp) irBlock.addStatement(irTmp)
val irIfThenElse = IrIfThenElseImpl(startOffset, endOffset, resultType, val irIfThenElse = IrIfThenElseImpl(startOffset, endOffset, resultType,
generator.context.equalsNull(startOffset, endOffset, safeReceiverValue.load()), generator.context.equalsNull(startOffset, endOffset, safeReceiverValue.load()),
generator.context.constNull(startOffset, endOffset), generator.context.constNull(startOffset, endOffset),
irResult, irResult,
IrOperator.SAFE_CALL) IrStatementOrigin.SAFE_CALL)
irBlock.addStatement(irIfThenElse) irBlock.addStatement(irIfThenElse)
return irBlock return irBlock
@@ -29,7 +29,7 @@ class SimplePropertyLValue(
val scope: Scope, val scope: Scope,
val startOffset: Int, val startOffset: Int,
val endOffset: Int, val endOffset: Int,
val irOperator: IrOperator?, val origin: IrStatementOrigin?,
val descriptor: PropertyDescriptor, val descriptor: PropertyDescriptor,
val callReceiver: CallReceiver, val callReceiver: CallReceiver,
val superQualifier: ClassDescriptor? val superQualifier: ClassDescriptor?
@@ -42,10 +42,10 @@ class SimplePropertyLValue(
IrGetterCallImpl(startOffset, endOffset, getter, IrGetterCallImpl(startOffset, endOffset, getter,
dispatchReceiverValue?.load(), dispatchReceiverValue?.load(),
extensionReceiverValue?.load(), extensionReceiverValue?.load(),
irOperator, origin,
superQualifier) superQualifier)
} ?: IrGetFieldImpl(startOffset, endOffset, descriptor, } ?: IrGetFieldImpl(startOffset, endOffset, descriptor,
dispatchReceiverValue?.load(), irOperator, superQualifier) dispatchReceiverValue?.load(), origin, superQualifier)
} }
override fun store(irExpression: IrExpression) = override fun store(irExpression: IrExpression) =
@@ -55,10 +55,10 @@ class SimplePropertyLValue(
dispatchReceiverValue?.load(), dispatchReceiverValue?.load(),
extensionReceiverValue?.load(), extensionReceiverValue?.load(),
irExpression, irExpression,
irOperator, origin,
superQualifier) superQualifier)
} ?: IrSetFieldImpl(startOffset, endOffset, descriptor, } ?: IrSetFieldImpl(startOffset, endOffset, descriptor,
dispatchReceiverValue?.load(), irExpression, irOperator, superQualifier) dispatchReceiverValue?.load(), irExpression, origin, superQualifier)
} }
override fun assign(withLValue: (LValue) -> IrExpression) = override fun assign(withLValue: (LValue) -> IrExpression) =
@@ -74,12 +74,12 @@ class SimplePropertyLValue(
val extensionReceiverValue2 = extensionReceiverTmp?.let { VariableLValue(it) } val extensionReceiverValue2 = extensionReceiverTmp?.let { VariableLValue(it) }
val irResultExpression = withLValue( val irResultExpression = withLValue(
SimplePropertyLValue(context, scope, startOffset, endOffset, irOperator, descriptor, SimplePropertyLValue(context, scope, startOffset, endOffset, origin, descriptor,
SimpleCallReceiver(dispatchReceiverValue2, extensionReceiverValue2), SimpleCallReceiver(dispatchReceiverValue2, extensionReceiverValue2),
superQualifier) superQualifier)
) )
val irBlock = IrBlockImpl(startOffset, endOffset, irResultExpression.type, irOperator) val irBlock = IrBlockImpl(startOffset, endOffset, irResultExpression.type, origin)
irBlock.addIfNotNull(dispatchReceiverTmp) irBlock.addIfNotNull(dispatchReceiverTmp)
irBlock.addIfNotNull(extensionReceiverTmp) irBlock.addIfNotNull(extensionReceiverTmp)
irBlock.addStatement(irResultExpression) irBlock.addStatement(irResultExpression)
@@ -19,28 +19,27 @@ package org.jetbrains.kotlin.psi2ir.intermediate
import org.jetbrains.kotlin.descriptors.VariableDescriptor import org.jetbrains.kotlin.descriptors.VariableDescriptor
import org.jetbrains.kotlin.ir.declarations.IrVariable import org.jetbrains.kotlin.ir.declarations.IrVariable
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.impl.IrGetVariableImpl import org.jetbrains.kotlin.ir.expressions.impl.IrGetVariableImpl
import org.jetbrains.kotlin.ir.expressions.IrOperator
import org.jetbrains.kotlin.ir.expressions.impl.IrSetVariableImpl import org.jetbrains.kotlin.ir.expressions.impl.IrSetVariableImpl
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.typeUtil.builtIns
class VariableLValue( class VariableLValue(
val startOffset: Int, val startOffset: Int,
val endOffset: Int, val endOffset: Int,
val descriptor: VariableDescriptor, val descriptor: VariableDescriptor,
val irOperator: IrOperator? = null val origin: IrStatementOrigin? = null
) : LValue, AssignmentReceiver { ) : LValue, AssignmentReceiver {
constructor(irVariable: IrVariable, irOperator: IrOperator? = null) : this( constructor(irVariable: IrVariable, origin: IrStatementOrigin? = null) : this(
irVariable.startOffset, irVariable.endOffset, irVariable.descriptor, irOperator) irVariable.startOffset, irVariable.endOffset, irVariable.descriptor, origin)
override val type: KotlinType get() = descriptor.type override val type: KotlinType get() = descriptor.type
override fun load(): IrExpression = override fun load(): IrExpression =
IrGetVariableImpl(startOffset, endOffset, descriptor, irOperator) IrGetVariableImpl(startOffset, endOffset, descriptor, origin)
override fun store(irExpression: IrExpression): IrExpression = override fun store(irExpression: IrExpression): IrExpression =
IrSetVariableImpl(startOffset, endOffset, descriptor, irExpression, irOperator) IrSetVariableImpl(startOffset, endOffset, descriptor, irExpression, origin)
override fun assign(withLValue: (LValue) -> IrExpression): IrExpression = override fun assign(withLValue: (LValue) -> IrExpression): IrExpression =
withLValue(this) withLValue(this)
@@ -36,10 +36,10 @@ class InlineDesugaredBlocks : IrElementVisitorVoid {
} }
override fun visitBlock(expression: IrBlock) { override fun visitBlock(expression: IrBlock) {
val transformedBlock = IrBlockImpl(expression.startOffset, expression.endOffset, expression.type, expression.operator) val transformedBlock = IrBlockImpl(expression.startOffset, expression.endOffset, expression.type, expression.origin)
for (statement in expression.statements) { for (statement in expression.statements) {
statement.acceptVoid(this) statement.acceptVoid(this)
if (statement is IrBlock && statement.operator != null) { if (statement is IrBlock && statement.origin != null) {
statement.statements.forEach { statement.statements.forEach {
transformedBlock.addStatement(it.detach()) transformedBlock.addStatement(it.detach())
} }
@@ -43,17 +43,3 @@ enum class IrDeclarationKind {
DUMMY; DUMMY;
} }
enum class IrDeclarationOrigin {
DEFINED,
PROPERTY_BACKING_FIELD,
DEFAULT_PROPERTY_ACCESSOR,
DELEGATE,
DELEGATED_PROPERTY_ACCESSOR,
DELEGATED_MEMBER,
CLASS_FOR_ENUM_ENTRY,
ENUM_CLASS_SPECIAL_MEMBER,
GENERATED_DATA_CLASS_MEMBER,
LOCAL_FUNCTION_FOR_LAMBDA,
IR_TEMPORARY_VARIABLE,
}
@@ -0,0 +1,35 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.ir.declarations
interface IrDeclarationOrigin {
object DEFINED : IrDeclarationOriginImpl("DEFINED")
object PROPERTY_BACKING_FIELD : IrDeclarationOriginImpl("PROPERTY_BACKING_FIELD")
object DEFAULT_PROPERTY_ACCESSOR : IrDeclarationOriginImpl("DEFAULT_PROPERTY_ACCESSOR")
object DELEGATE : IrDeclarationOriginImpl("DELEGATE")
object DELEGATED_PROPERTY_ACCESSOR : IrDeclarationOriginImpl("DELEGATED_PROPERTY_ACCESSOR")
object DELEGATED_MEMBER : IrDeclarationOriginImpl("DELEGATED_MEMBER")
object CLASS_FOR_ENUM_ENTRY : IrDeclarationOriginImpl("CLASS_FOR_ENUM_ENTRY")
object ENUM_CLASS_SPECIAL_MEMBER : IrDeclarationOriginImpl("ENUM_CLASS_SPECIAL_MEMBER")
object GENERATED_DATA_CLASS_MEMBER : IrDeclarationOriginImpl("GENERATED_DATA_CLASS_MEMBER")
object LOCAL_FUNCTION_FOR_LAMBDA : IrDeclarationOriginImpl("LOCAL_FUNCTION_FOR_LAMBDA")
object IR_TEMPORARY_VARIABLE : IrDeclarationOriginImpl("IR_TEMPORARY_VARIABLE")
}
abstract class IrDeclarationOriginImpl(val name: String): IrDeclarationOrigin {
override fun toString(): String = name
}
@@ -17,7 +17,7 @@
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
interface IrContainerExpression : IrExpression, IrStatementContainer { interface IrContainerExpression : IrExpression, IrStatementContainer {
val operator: IrOperator? val origin: IrStatementOrigin?
val isTransparentScope: Boolean val isTransparentScope: Boolean
} }
@@ -23,7 +23,7 @@ interface IrFieldAccessExpression : IrDeclarationReference {
override val descriptor: PropertyDescriptor override val descriptor: PropertyDescriptor
val superQualifier: ClassDescriptor? val superQualifier: ClassDescriptor?
var receiver: IrExpression? var receiver: IrExpression?
val operator: IrOperator? val origin: IrStatementOrigin?
} }
interface IrGetField : IrFieldAccessExpression interface IrGetField : IrFieldAccessExpression
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.descriptors.CallableDescriptor
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
interface IrGeneralCall : IrMemberAccessExpression { interface IrGeneralCall : IrMemberAccessExpression {
val operator: IrOperator? val origin: IrStatementOrigin?
override val descriptor: CallableDescriptor override val descriptor: CallableDescriptor
fun getArgument(index: Int): IrExpression? fun getArgument(index: Int): IrExpression?
@@ -17,7 +17,7 @@
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
interface IrLoop : IrExpression { interface IrLoop : IrExpression {
val operator: IrOperator? val origin: IrStatementOrigin?
var body: IrExpression? var body: IrExpression?
var condition: IrExpression var condition: IrExpression
val label: String? val label: String?
@@ -1,117 +0,0 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.ir.expressions
interface IrOperator {
abstract class IrOperatorImpl(val debugName: String): IrOperator {
override fun toString(): String = debugName
}
object SAFE_CALL : IrOperatorImpl("SAFE_CALL")
object UMINUS : IrOperatorImpl("UMINUS")
object UPLUS : IrOperatorImpl("UPLUS")
object EXCL : IrOperatorImpl("EXCL")
object EXCLEXCL : IrOperatorImpl("EXCLEXCL")
object ELVIS : IrOperatorImpl("ELVIS")
object LT : IrOperatorImpl("LT")
object GT : IrOperatorImpl("GT")
object LTEQ : IrOperatorImpl("LTEQ")
object GTEQ : IrOperatorImpl("GTEQ")
object EQEQ : IrOperatorImpl("EQEQ")
object EQEQEQ : IrOperatorImpl("EQEQEQ")
object EXCLEQ : IrOperatorImpl("EXCLEQ")
object EXCLEQEQ : IrOperatorImpl("EXCLEQEQ")
object IN : IrOperatorImpl("IN")
object NOT_IN : IrOperatorImpl("NOT_IN")
object ANDAND : IrOperatorImpl("ANDAND")
object OROR : IrOperatorImpl("OROR")
object PLUS : IrOperatorImpl("PLUS")
object MINUS : IrOperatorImpl("MINUS")
object MUL : IrOperatorImpl("MUL")
object DIV : IrOperatorImpl("DIV")
object PERC : IrOperatorImpl("PERC")
object RANGE : IrOperatorImpl("RANGE")
object INVOKE : IrOperatorImpl("INVOKE")
object VARIABLE_AS_FUNCTION : IrOperatorImpl("VARIABLE_AS_FUNCTION")
object GET_ARRAY_ELEMENT : IrOperatorImpl("GET_ARRAY_ELEMENT")
object PREFIX_INCR : IrOperatorImpl("PREFIX_INCR")
object PREFIX_DECR : IrOperatorImpl("PREFIX_DECR")
object POSTFIX_INCR : IrOperatorImpl("POSTFIX_INCR")
object POSTFIX_DECR : IrOperatorImpl("POSTFIX_DECR")
object EQ : IrOperatorImpl("EQ")
object PLUSEQ : IrOperatorImpl("PLUSEQ")
object MINUSEQ : IrOperatorImpl("MINUSEQ")
object MULTEQ : IrOperatorImpl("MULTEQ")
object DIVEQ : IrOperatorImpl("DIVEQ")
object PERCEQ : IrOperatorImpl("PERCEQ")
object ARGUMENTS_REORDERING_FOR_CALL : IrOperatorImpl("ARGUMENTS_REORDERING_FOR_CALL")
object DESTRUCTURING_DECLARATION : IrOperatorImpl("DESTRUCTURING_DECLARATION")
object GET_PROPERTY : IrOperatorImpl("GET_PROPERTY")
object GET_LOCAL_PROPERTY : IrOperatorImpl("GET_LOCAL_PROPERTY")
object IF : IrOperatorImpl("IF")
object WHEN : IrOperatorImpl("WHEN")
object WHEN_COMMA : IrOperatorImpl("WHEN_COMMA")
object WHILE_LOOP : IrOperatorImpl("WHILE_LOOP")
object DO_WHILE_LOOP : IrOperatorImpl("DO_WHILE_LOOP")
object FOR_LOOP : IrOperatorImpl("FOR_LOOP")
object FOR_LOOP_ITERATOR : IrOperatorImpl("FOR_LOOP_ITERATOR")
object FOR_LOOP_INNER_WHILE : IrOperatorImpl("FOR_LOOP_INNER_WHILE")
object FOR_LOOP_HAS_NEXT : IrOperatorImpl("FOR_LOOP_HAS_NEXT")
object FOR_LOOP_NEXT : IrOperatorImpl("FOR_LOOP_NEXT")
object LAMBDA : IrOperatorImpl("LAMBDA")
object ANONYMOUS_FUNCTION : IrOperatorImpl("ANONYMOUS_FUNCTION")
object OBJECT_LITERAL : IrOperatorImpl("OBJECT_LITERAL")
object INITIALIZE_PROPERTY_FROM_PARAMETER : IrOperatorImpl("INITIALIZE_PROPERTY_FROM_PARAMETER")
object PROPERTY_REFERENCE_FOR_DELEGATE : IrOperatorImpl("PROPERTY_REFERENCE_FOR_DELEGATE")
data class COMPONENT_N private constructor(val index: Int) : IrOperatorImpl("COMPONENT_$index") {
companion object {
private val precreatedComponents = Array(32) { i -> COMPONENT_N(i + 1) }
fun withIndex(index: Int) =
if (index < precreatedComponents.size)
precreatedComponents[index - 1]
else
COMPONENT_N(index)
}
}
}
fun IrOperator.isAssignmentOperatorWithResult() =
when (this) {
IrOperator.PREFIX_INCR, IrOperator.PREFIX_DECR,
IrOperator.POSTFIX_INCR, IrOperator.POSTFIX_DECR ->
true
else ->
false
}
@@ -0,0 +1,117 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.ir.expressions
interface IrStatementOrigin {
abstract class IrStatementOriginImpl(val debugName: String): IrStatementOrigin {
override fun toString(): String = debugName
}
object SAFE_CALL : IrStatementOriginImpl("SAFE_CALL")
object UMINUS : IrStatementOriginImpl("UMINUS")
object UPLUS : IrStatementOriginImpl("UPLUS")
object EXCL : IrStatementOriginImpl("EXCL")
object EXCLEXCL : IrStatementOriginImpl("EXCLEXCL")
object ELVIS : IrStatementOriginImpl("ELVIS")
object LT : IrStatementOriginImpl("LT")
object GT : IrStatementOriginImpl("GT")
object LTEQ : IrStatementOriginImpl("LTEQ")
object GTEQ : IrStatementOriginImpl("GTEQ")
object EQEQ : IrStatementOriginImpl("EQEQ")
object EQEQEQ : IrStatementOriginImpl("EQEQEQ")
object EXCLEQ : IrStatementOriginImpl("EXCLEQ")
object EXCLEQEQ : IrStatementOriginImpl("EXCLEQEQ")
object IN : IrStatementOriginImpl("IN")
object NOT_IN : IrStatementOriginImpl("NOT_IN")
object ANDAND : IrStatementOriginImpl("ANDAND")
object OROR : IrStatementOriginImpl("OROR")
object PLUS : IrStatementOriginImpl("PLUS")
object MINUS : IrStatementOriginImpl("MINUS")
object MUL : IrStatementOriginImpl("MUL")
object DIV : IrStatementOriginImpl("DIV")
object PERC : IrStatementOriginImpl("PERC")
object RANGE : IrStatementOriginImpl("RANGE")
object INVOKE : IrStatementOriginImpl("INVOKE")
object VARIABLE_AS_FUNCTION : IrStatementOriginImpl("VARIABLE_AS_FUNCTION")
object GET_ARRAY_ELEMENT : IrStatementOriginImpl("GET_ARRAY_ELEMENT")
object PREFIX_INCR : IrStatementOriginImpl("PREFIX_INCR")
object PREFIX_DECR : IrStatementOriginImpl("PREFIX_DECR")
object POSTFIX_INCR : IrStatementOriginImpl("POSTFIX_INCR")
object POSTFIX_DECR : IrStatementOriginImpl("POSTFIX_DECR")
object EQ : IrStatementOriginImpl("EQ")
object PLUSEQ : IrStatementOriginImpl("PLUSEQ")
object MINUSEQ : IrStatementOriginImpl("MINUSEQ")
object MULTEQ : IrStatementOriginImpl("MULTEQ")
object DIVEQ : IrStatementOriginImpl("DIVEQ")
object PERCEQ : IrStatementOriginImpl("PERCEQ")
object ARGUMENTS_REORDERING_FOR_CALL : IrStatementOriginImpl("ARGUMENTS_REORDERING_FOR_CALL")
object DESTRUCTURING_DECLARATION : IrStatementOriginImpl("DESTRUCTURING_DECLARATION")
object GET_PROPERTY : IrStatementOriginImpl("GET_PROPERTY")
object GET_LOCAL_PROPERTY : IrStatementOriginImpl("GET_LOCAL_PROPERTY")
object IF : IrStatementOriginImpl("IF")
object WHEN : IrStatementOriginImpl("WHEN")
object WHEN_COMMA : IrStatementOriginImpl("WHEN_COMMA")
object WHILE_LOOP : IrStatementOriginImpl("WHILE_LOOP")
object DO_WHILE_LOOP : IrStatementOriginImpl("DO_WHILE_LOOP")
object FOR_LOOP : IrStatementOriginImpl("FOR_LOOP")
object FOR_LOOP_ITERATOR : IrStatementOriginImpl("FOR_LOOP_ITERATOR")
object FOR_LOOP_INNER_WHILE : IrStatementOriginImpl("FOR_LOOP_INNER_WHILE")
object FOR_LOOP_HAS_NEXT : IrStatementOriginImpl("FOR_LOOP_HAS_NEXT")
object FOR_LOOP_NEXT : IrStatementOriginImpl("FOR_LOOP_NEXT")
object LAMBDA : IrStatementOriginImpl("LAMBDA")
object ANONYMOUS_FUNCTION : IrStatementOriginImpl("ANONYMOUS_FUNCTION")
object OBJECT_LITERAL : IrStatementOriginImpl("OBJECT_LITERAL")
object INITIALIZE_PROPERTY_FROM_PARAMETER : IrStatementOriginImpl("INITIALIZE_PROPERTY_FROM_PARAMETER")
object PROPERTY_REFERENCE_FOR_DELEGATE : IrStatementOriginImpl("PROPERTY_REFERENCE_FOR_DELEGATE")
data class COMPONENT_N private constructor(val index: Int) : IrStatementOriginImpl("COMPONENT_$index") {
companion object {
private val precreatedComponents = Array(32) { i -> COMPONENT_N(i + 1) }
fun withIndex(index: Int) =
if (index < precreatedComponents.size)
precreatedComponents[index - 1]
else
COMPONENT_N(index)
}
}
}
fun IrStatementOrigin.isAssignmentOperatorWithResult() =
when (this) {
IrStatementOrigin.PREFIX_INCR, IrStatementOrigin.PREFIX_DECR,
IrStatementOrigin.POSTFIX_INCR, IrStatementOrigin.POSTFIX_DECR ->
true
else ->
false
}
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.descriptors.VariableDescriptor
interface IrVariableAccessExpression : IrDeclarationReference { interface IrVariableAccessExpression : IrDeclarationReference {
override val descriptor: VariableDescriptor override val descriptor: VariableDescriptor
val operator: IrOperator? val origin: IrStatementOrigin?
} }
interface IrGetVariable : IrVariableAccessExpression, IrExpressionWithCopy { interface IrGetVariable : IrVariableAccessExpression, IrExpressionWithCopy {
@@ -17,7 +17,7 @@
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
interface IrWhen : IrExpression { interface IrWhen : IrExpression {
val operator: IrOperator? val origin: IrStatementOrigin?
val branchesCount: Int val branchesCount: Int
fun getNthCondition(n: Int): IrExpression? fun getNthCondition(n: Int): IrExpression?
fun getNthResult(n: Int): IrExpression? fun getNthResult(n: Int): IrExpression?
@@ -19,14 +19,14 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.IrStatement
import org.jetbrains.kotlin.ir.detach import org.jetbrains.kotlin.ir.detach
import org.jetbrains.kotlin.ir.expressions.IrBlock import org.jetbrains.kotlin.ir.expressions.IrBlock
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
class IrBlockImpl(startOffset: Int, endOffset: Int, type: KotlinType, operator: IrOperator? = null): class IrBlockImpl(startOffset: Int, endOffset: Int, type: KotlinType, origin: IrStatementOrigin? = null):
IrContainerExpressionBase(startOffset, endOffset, type, operator), IrBlock { IrContainerExpressionBase(startOffset, endOffset, type, origin), IrBlock {
constructor(startOffset: Int, endOffset: Int, type: KotlinType, operator: IrOperator?, statements: List<IrStatement>) : constructor(startOffset: Int, endOffset: Int, type: KotlinType, origin: IrStatementOrigin?, statements: List<IrStatement>) :
this(startOffset, endOffset, type, operator) { this(startOffset, endOffset, type, origin) {
addAll(statements) addAll(statements)
} }
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.descriptors.CallableDescriptor import org.jetbrains.kotlin.descriptors.CallableDescriptor
import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.ir.expressions.IrCall import org.jetbrains.kotlin.ir.expressions.IrCall
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
@@ -28,7 +28,7 @@ class IrCallImpl(
endOffset: Int, endOffset: Int,
type: KotlinType, type: KotlinType,
override val descriptor: CallableDescriptor, override val descriptor: CallableDescriptor,
override val operator: IrOperator? = null, override val origin: IrStatementOrigin? = null,
override val superQualifier: ClassDescriptor? = null override val superQualifier: ClassDescriptor? = null
) : IrGeneralCallBase(startOffset, endOffset, type, descriptor.valueParameters.size), IrCall { ) : IrGeneralCallBase(startOffset, endOffset, type, descriptor.valueParameters.size), IrCall {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.descriptors.CallableDescriptor import org.jetbrains.kotlin.descriptors.CallableDescriptor
import org.jetbrains.kotlin.ir.expressions.IrCallableReference import org.jetbrains.kotlin.ir.expressions.IrCallableReference
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
@@ -27,8 +27,8 @@ class IrCallableReferenceImpl(
endOffset: Int, endOffset: Int,
type: KotlinType, type: KotlinType,
override val descriptor: CallableDescriptor, override val descriptor: CallableDescriptor,
override val operator: IrOperator? = null override val origin: IrStatementOrigin? = null
) : IrGeneralCallBase(startOffset, endOffset, type, descriptor.valueParameters.size, operator), IrCallableReference { ) : IrGeneralCallBase(startOffset, endOffset, type, descriptor.valueParameters.size, origin), IrCallableReference {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R { override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
return visitor.visitCallableReference(this, data) return visitor.visitCallableReference(this, data)
} }
@@ -18,15 +18,15 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.IrStatement
import org.jetbrains.kotlin.ir.expressions.IrComposite import org.jetbrains.kotlin.ir.expressions.IrComposite
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
class IrCompositeImpl(startOffset: Int, endOffset: Int, type: KotlinType, operator: IrOperator? = null) : class IrCompositeImpl(startOffset: Int, endOffset: Int, type: KotlinType, origin: IrStatementOrigin? = null) :
IrContainerExpressionBase(startOffset, endOffset, type, operator), IrComposite { IrContainerExpressionBase(startOffset, endOffset, type, origin), IrComposite {
constructor(startOffset: Int, endOffset: Int, type: KotlinType, operator: IrOperator?, statements: List<IrStatement>) : constructor(startOffset: Int, endOffset: Int, type: KotlinType, origin: IrStatementOrigin?, statements: List<IrStatement>) :
this(startOffset, endOffset, type, operator) { this(startOffset, endOffset, type, origin) {
addAll(statements) addAll(statements)
} }
@@ -17,12 +17,12 @@
package org.jetbrains.kotlin.ir.expressions.impl package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.IrContainerExpression import org.jetbrains.kotlin.ir.expressions.IrContainerExpression
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
import java.util.* import java.util.*
abstract class IrContainerExpressionBase(startOffset: Int, endOffset: Int, type: KotlinType, override val operator: IrOperator? = null): abstract class IrContainerExpressionBase(startOffset: Int, endOffset: Int, type: KotlinType, override val origin: IrStatementOrigin? = null):
IrExpressionBase(startOffset, endOffset, type), IrContainerExpression { IrExpressionBase(startOffset, endOffset, type), IrContainerExpression {
override val statements: MutableList<IrStatement> = ArrayList(2) override val statements: MutableList<IrStatement> = ArrayList(2)
@@ -19,24 +19,16 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.ir.expressions.IrDoWhileLoop import org.jetbrains.kotlin.ir.expressions.IrDoWhileLoop
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.impl.IrLoopBase import org.jetbrains.kotlin.ir.expressions.impl.IrLoopBase
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
class IrDoWhileLoopImpl( class IrDoWhileLoopImpl(startOffset: Int, endOffset: Int, type : KotlinType, origin: IrStatementOrigin?) :
startOffset: Int, IrLoopBase(startOffset, endOffset, type, origin), IrDoWhileLoop {
endOffset: Int,
type : KotlinType,
operator: IrOperator?
) : IrLoopBase(startOffset, endOffset, type, operator), IrDoWhileLoop {
constructor( constructor(
startOffset: Int, startOffset: Int, endOffset: Int, type: KotlinType, origin: IrStatementOrigin?,
endOffset: Int, body: IrExpression, condition: IrExpression
type: KotlinType, ) : this(startOffset, endOffset, type, origin) {
operator: IrOperator?,
body: IrExpression,
condition: IrExpression
) : this(startOffset, endOffset, type, operator) {
this.condition = condition this.condition = condition
this.body = body this.body = body
} }
@@ -19,12 +19,12 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.IrStatement
import org.jetbrains.kotlin.ir.expressions.IrBlock import org.jetbrains.kotlin.ir.expressions.IrBlock
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.throwNoSuchSlot import org.jetbrains.kotlin.ir.throwNoSuchSlot
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
class IrEmptyBlockImpl(startOffset: Int, endOffset: Int, type: KotlinType, override val operator: IrOperator? = null) : class IrEmptyBlockImpl(startOffset: Int, endOffset: Int, type: KotlinType, override val origin: IrStatementOrigin? = null) :
IrExpressionBase(startOffset, endOffset, type), IrBlock { IrExpressionBase(startOffset, endOffset, type), IrBlock {
override val statements: List<IrStatement> get() = emptyList() override val statements: List<IrStatement> get() = emptyList()
@@ -21,15 +21,12 @@ import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrFieldAccessExpression import org.jetbrains.kotlin.ir.expressions.IrFieldAccessExpression
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
abstract class IrFieldExpressionBase( abstract class IrFieldExpressionBase(
startOffset: Int, startOffset: Int, endOffset: Int, descriptor: PropertyDescriptor, type: KotlinType,
endOffset: Int, override val origin: IrStatementOrigin? = null,
descriptor: PropertyDescriptor,
type: KotlinType,
override val operator: IrOperator? = null,
override val superQualifier: ClassDescriptor? = null override val superQualifier: ClassDescriptor? = null
) : IrDeclarationReferenceBase<PropertyDescriptor>(startOffset, endOffset, type, descriptor), IrFieldAccessExpression { ) : IrDeclarationReferenceBase<PropertyDescriptor>(startOffset, endOffset, type, descriptor), IrFieldAccessExpression {
override final var receiver: IrExpression? = null override final var receiver: IrExpression? = null
@@ -22,16 +22,14 @@ import org.jetbrains.kotlin.ir.detach
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrGeneralCall import org.jetbrains.kotlin.ir.expressions.IrGeneralCall
import org.jetbrains.kotlin.ir.expressions.impl.IrMemberAccessExpressionBase import org.jetbrains.kotlin.ir.expressions.impl.IrMemberAccessExpressionBase
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
abstract class IrGeneralCallBase( abstract class IrGeneralCallBase(
startOffset: Int, startOffset: Int, endOffset: Int, type: KotlinType,
endOffset: Int,
type: KotlinType,
numArguments: Int, numArguments: Int,
override val operator: IrOperator? = null override val origin: IrStatementOrigin? = null
) : IrMemberAccessExpressionBase(startOffset, endOffset, type), IrGeneralCall { ) : IrMemberAccessExpressionBase(startOffset, endOffset, type), IrGeneralCall {
protected val argumentsByParameterIndex = protected val argumentsByParameterIndex =
arrayOfNulls<IrExpression>(numArguments) arrayOfNulls<IrExpression>(numArguments)
@@ -21,24 +21,19 @@ import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrGetField import org.jetbrains.kotlin.ir.expressions.IrGetField
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
class IrGetFieldImpl( class IrGetFieldImpl(
startOffset: Int, startOffset: Int, endOffset: Int, descriptor: PropertyDescriptor,
endOffset: Int, origin: IrStatementOrigin? = null,
descriptor: PropertyDescriptor,
operator: IrOperator? = null,
superQualifier: ClassDescriptor? = null superQualifier: ClassDescriptor? = null
) : IrFieldExpressionBase(startOffset, endOffset, descriptor, descriptor.type, operator, superQualifier), IrGetField { ) : IrFieldExpressionBase(startOffset, endOffset, descriptor, descriptor.type, origin, superQualifier), IrGetField {
constructor( constructor(
startOffset: Int, startOffset: Int, endOffset: Int, descriptor: PropertyDescriptor, receiver: IrExpression?,
endOffset: Int, origin: IrStatementOrigin? = null,
descriptor: PropertyDescriptor,
receiver: IrExpression?,
operator: IrOperator? = null,
superQualifier: ClassDescriptor? = null superQualifier: ClassDescriptor? = null
) : this(startOffset, endOffset, descriptor, operator, superQualifier) { ) : this(startOffset, endOffset, descriptor, origin, superQualifier) {
this.receiver = receiver this.receiver = receiver
} }
@@ -18,19 +18,17 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.descriptors.VariableDescriptor import org.jetbrains.kotlin.descriptors.VariableDescriptor
import org.jetbrains.kotlin.ir.expressions.IrGetVariable import org.jetbrains.kotlin.ir.expressions.IrGetVariable
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.impl.IrTerminalDeclarationReferenceBase import org.jetbrains.kotlin.ir.expressions.impl.IrTerminalDeclarationReferenceBase
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
class IrGetVariableImpl( class IrGetVariableImpl(
startOffset: Int, startOffset: Int, endOffset: Int, descriptor: VariableDescriptor,
endOffset: Int, override val origin: IrStatementOrigin? = null
descriptor: VariableDescriptor,
override val operator: IrOperator? = null
) : IrTerminalDeclarationReferenceBase<VariableDescriptor>(startOffset, endOffset, descriptor.type, descriptor), IrGetVariable { ) : IrTerminalDeclarationReferenceBase<VariableDescriptor>(startOffset, endOffset, descriptor.type, descriptor), IrGetVariable {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitGetVariable(this, data) visitor.visitGetVariable(this, data)
override fun copy(): IrGetVariable = override fun copy(): IrGetVariable =
IrGetVariableImpl(startOffset, endOffset, descriptor, operator) IrGetVariableImpl(startOffset, endOffset, descriptor, origin)
} }
@@ -18,26 +18,22 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.IrWhen import org.jetbrains.kotlin.ir.expressions.IrWhen
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
class IrIfThenElseImpl( class IrIfThenElseImpl(
startOffset: Int, startOffset: Int, endOffset: Int, type: KotlinType,
endOffset: Int, override val origin: IrStatementOrigin? = null
type: KotlinType,
override val operator: IrOperator? = null
) : IrExpressionBase(startOffset, endOffset, type), IrWhen { ) : IrExpressionBase(startOffset, endOffset, type), IrWhen {
constructor( constructor(
startOffset: Int, startOffset: Int, endOffset: Int, type: KotlinType,
endOffset: Int,
type: KotlinType,
condition: IrExpression, condition: IrExpression,
thenBranch: IrExpression, thenBranch: IrExpression,
elseBranch: IrExpression? = null, elseBranch: IrExpression? = null,
operator: IrOperator? = null origin: IrStatementOrigin? = null
) : this(startOffset, endOffset, type, operator) { ) : this(startOffset, endOffset, type, origin) {
this.condition = condition this.condition = condition
this.thenBranch = thenBranch this.thenBranch = thenBranch
this.elseBranch = elseBranch this.elseBranch = elseBranch
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrLoop import org.jetbrains.kotlin.ir.expressions.IrLoop
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBase import org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBase
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
@@ -27,7 +27,7 @@ abstract class IrLoopBase(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
type: KotlinType, type: KotlinType,
override val operator: IrOperator? override val origin: IrStatementOrigin?
) : IrExpressionBase(startOffset, endOffset, type), IrLoop { ) : IrExpressionBase(startOffset, endOffset, type), IrLoop {
override var label: String? = null override var label: String? = null
@@ -21,7 +21,7 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrCall import org.jetbrains.kotlin.ir.expressions.IrCall
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import java.lang.AssertionError import java.lang.AssertionError
import java.lang.UnsupportedOperationException import java.lang.UnsupportedOperationException
@@ -29,7 +29,7 @@ import java.lang.UnsupportedOperationException
abstract class IrPrimitiveCallBase( abstract class IrPrimitiveCallBase(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
override val operator: IrOperator, override val origin: IrStatementOrigin,
override val descriptor: CallableDescriptor override val descriptor: CallableDescriptor
) : IrExpressionBase(startOffset, endOffset, descriptor.returnType!!), IrCall { ) : IrExpressionBase(startOffset, endOffset, descriptor.returnType!!), IrCall {
override val superQualifier: ClassDescriptor? get() = null override val superQualifier: ClassDescriptor? get() = null
@@ -56,12 +56,8 @@ abstract class IrPrimitiveCallBase(
} }
} }
class IrNullaryPrimitiveImpl constructor( class IrNullaryPrimitiveImpl constructor(startOffset: Int, endOffset: Int, origin: IrStatementOrigin, descriptor: CallableDescriptor) :
startOffset: Int, IrPrimitiveCallBase(startOffset, endOffset, origin, descriptor) {
endOffset: Int,
operator: IrOperator,
descriptor: CallableDescriptor
) : IrPrimitiveCallBase(startOffset, endOffset, operator, descriptor) {
override fun getChild(slot: Int): IrElement? = null override fun getChild(slot: Int): IrElement? = null
override fun replaceChild(slot: Int, newChild: IrElement) { override fun replaceChild(slot: Int, newChild: IrElement) {
@@ -73,19 +69,11 @@ class IrNullaryPrimitiveImpl constructor(
} }
} }
class IrUnaryPrimitiveImpl private constructor( class IrUnaryPrimitiveImpl private constructor(startOffset: Int, endOffset: Int, origin: IrStatementOrigin, descriptor: CallableDescriptor) :
startOffset: Int, IrPrimitiveCallBase(startOffset, endOffset, origin, descriptor) {
endOffset: Int, constructor(startOffset: Int, endOffset: Int, origin: IrStatementOrigin, descriptor: CallableDescriptor,
operator: IrOperator, argument: IrExpression
descriptor: CallableDescriptor ) : this(startOffset, endOffset, origin, descriptor) {
) : IrPrimitiveCallBase(startOffset, endOffset, operator, descriptor) {
constructor(
startOffset: Int,
endOffset: Int,
operator: IrOperator,
descriptor: CallableDescriptor,
argument: IrExpression
) : this(startOffset, endOffset, operator, descriptor) {
this.argument = argument this.argument = argument
} }
@@ -116,20 +104,12 @@ class IrUnaryPrimitiveImpl private constructor(
} }
} }
class IrBinaryPrimitiveImpl( class IrBinaryPrimitiveImpl(startOffset: Int, endOffset: Int, origin: IrStatementOrigin, descriptor: CallableDescriptor) :
startOffset: Int, IrPrimitiveCallBase(startOffset, endOffset, origin, descriptor) {
endOffset: Int,
operator: IrOperator,
descriptor: CallableDescriptor
) : IrPrimitiveCallBase(startOffset, endOffset, operator, descriptor) {
constructor( constructor(
startOffset: Int, startOffset: Int, endOffset: Int, origin: IrStatementOrigin, descriptor: CallableDescriptor,
endOffset: Int, argument0: IrExpression, argument1: IrExpression
operator: IrOperator, ) : this(startOffset, endOffset, origin, descriptor) {
descriptor: CallableDescriptor,
argument0: IrExpression,
argument1: IrExpression
) : this(startOffset, endOffset, operator, descriptor) {
this.argument0 = argument0 this.argument0 = argument0
this.argument1 = argument1 this.argument1 = argument1
} }
@@ -21,15 +21,14 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrCall import org.jetbrains.kotlin.ir.expressions.IrCall
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.impl.IrMemberAccessExpressionBase import org.jetbrains.kotlin.ir.expressions.impl.IrMemberAccessExpressionBase
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrPropertyAccessorCallBase( abstract class IrPropertyAccessorCallBase(
startOffset: Int, startOffset: Int, endOffset: Int,
endOffset: Int,
override val descriptor: CallableDescriptor, override val descriptor: CallableDescriptor,
override val operator: IrOperator? = null, override val origin: IrStatementOrigin? = null,
override val superQualifier: ClassDescriptor? = null override val superQualifier: ClassDescriptor? = null
) : IrMemberAccessExpressionBase(startOffset, endOffset, descriptor.returnType!!), IrCall { ) : IrMemberAccessExpressionBase(startOffset, endOffset, descriptor.returnType!!), IrCall {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R { override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
@@ -37,22 +36,16 @@ abstract class IrPropertyAccessorCallBase(
} }
} }
class IrGetterCallImpl( class IrGetterCallImpl(startOffset: Int, endOffset: Int, descriptor: CallableDescriptor,
startOffset: Int, origin: IrStatementOrigin? = null,
endOffset: Int, superQualifier: ClassDescriptor? = null
descriptor: CallableDescriptor, ) : IrPropertyAccessorCallBase(startOffset, endOffset, descriptor, origin, superQualifier), IrCall {
operator: IrOperator? = null, constructor(startOffset: Int, endOffset: Int, descriptor: CallableDescriptor,
superQualifier: ClassDescriptor? = null dispatchReceiver: IrExpression?,
) : IrPropertyAccessorCallBase(startOffset, endOffset, descriptor, operator, superQualifier), IrCall { extensionReceiver: IrExpression?,
constructor( origin: IrStatementOrigin? = null,
startOffset: Int, superQualifier: ClassDescriptor? = null
endOffset: Int, ) : this(startOffset, endOffset, descriptor, origin, superQualifier) {
descriptor: CallableDescriptor,
dispatchReceiver: IrExpression?,
extensionReceiver: IrExpression?,
operator: IrOperator? = null,
superQualifier: ClassDescriptor? = null
) : this(startOffset, endOffset, descriptor, operator, superQualifier) {
this.dispatchReceiver = dispatchReceiver this.dispatchReceiver = dispatchReceiver
this.extensionReceiver = extensionReceiver this.extensionReceiver = extensionReceiver
} }
@@ -68,23 +61,17 @@ class IrGetterCallImpl(
} }
} }
class IrSetterCallImpl( class IrSetterCallImpl(startOffset: Int, endOffset: Int, descriptor: CallableDescriptor,
startOffset: Int, origin: IrStatementOrigin? = null,
endOffset: Int, superQualifier: ClassDescriptor? = null
descriptor: CallableDescriptor, ) : IrPropertyAccessorCallBase(startOffset, endOffset, descriptor, origin, superQualifier), IrCall {
operator: IrOperator? = null, constructor(startOffset: Int, endOffset: Int, descriptor: CallableDescriptor,
superQualifier: ClassDescriptor? = null dispatchReceiver: IrExpression?,
) : IrPropertyAccessorCallBase(startOffset, endOffset, descriptor, operator, superQualifier), IrCall { extensionReceiver: IrExpression?,
constructor( argument: IrExpression,
startOffset: Int, origin: IrStatementOrigin? = null,
endOffset: Int, superQualifier: ClassDescriptor? = null
descriptor: CallableDescriptor, ) : this(startOffset, endOffset, descriptor, origin, superQualifier) {
dispatchReceiver: IrExpression?,
extensionReceiver: IrExpression?,
argument: IrExpression,
operator: IrOperator? = null,
superQualifier: ClassDescriptor? = null
) : this(startOffset, endOffset, descriptor, operator, superQualifier) {
this.dispatchReceiver = dispatchReceiver this.dispatchReceiver = dispatchReceiver
this.extensionReceiver = extensionReceiver this.extensionReceiver = extensionReceiver
putArgument(SETTER_ARGUMENT_INDEX, argument) putArgument(SETTER_ARGUMENT_INDEX, argument)
@@ -20,28 +20,25 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.IrSetField import org.jetbrains.kotlin.ir.expressions.IrSetField
import org.jetbrains.kotlin.ir.expressions.impl.IrFieldExpressionBase import org.jetbrains.kotlin.ir.expressions.impl.IrFieldExpressionBase
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.typeUtil.builtIns import org.jetbrains.kotlin.types.typeUtil.builtIns
class IrSetFieldImpl( class IrSetFieldImpl(
startOffset: Int, startOffset: Int, endOffset: Int,
endOffset: Int,
descriptor: PropertyDescriptor, descriptor: PropertyDescriptor,
operator: IrOperator? = null, origin: IrStatementOrigin? = null,
superQualifier: ClassDescriptor? = null superQualifier: ClassDescriptor? = null
) : IrFieldExpressionBase(startOffset, endOffset, descriptor, descriptor.type.builtIns.unitType, operator, superQualifier), IrSetField { ) : IrFieldExpressionBase(startOffset, endOffset, descriptor, descriptor.type.builtIns.unitType, origin, superQualifier), IrSetField {
constructor( constructor(
startOffset: Int, startOffset: Int, endOffset: Int, descriptor: PropertyDescriptor,
endOffset: Int,
descriptor: PropertyDescriptor,
receiver: IrExpression?, receiver: IrExpression?,
value: IrExpression, value: IrExpression,
operator: IrOperator? = null, origin: IrStatementOrigin? = null,
superQualifier: ClassDescriptor? = null superQualifier: ClassDescriptor? = null
) : this(startOffset, endOffset, descriptor, operator, superQualifier) { ) : this(startOffset, endOffset, descriptor, origin, superQualifier) {
this.receiver = receiver this.receiver = receiver
this.value = value this.value = value
} }
@@ -19,25 +19,22 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.descriptors.VariableDescriptor import org.jetbrains.kotlin.descriptors.VariableDescriptor
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.IrSetVariable import org.jetbrains.kotlin.ir.expressions.IrSetVariable
import org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBase import org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBase
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
class IrSetVariableImpl( class IrSetVariableImpl(
startOffset: Int, startOffset: Int, endOffset: Int,
endOffset: Int,
override val descriptor: VariableDescriptor, override val descriptor: VariableDescriptor,
override val operator: IrOperator? override val origin: IrStatementOrigin?
) : IrExpressionBase(startOffset, endOffset, descriptor.builtIns.unitType), IrSetVariable { ) : IrExpressionBase(startOffset, endOffset, descriptor.builtIns.unitType), IrSetVariable {
constructor( constructor(
startOffset: Int, startOffset: Int, endOffset: Int, descriptor: VariableDescriptor,
endOffset: Int,
descriptor: VariableDescriptor,
value: IrExpression, value: IrExpression,
operator: IrOperator? origin: IrStatementOrigin?
) : this(startOffset, endOffset, descriptor, operator) { ) : this(startOffset, endOffset, descriptor, origin) {
this.value = value this.value = value
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.IrWhen import org.jetbrains.kotlin.ir.expressions.IrWhen
import org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBase import org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBase
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
@@ -29,7 +29,7 @@ class IrWhenImpl(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
type: KotlinType, type: KotlinType,
override val operator: IrOperator? = null override val origin: IrStatementOrigin? = null
) : IrExpressionBase(startOffset, endOffset, type), IrWhen { ) : IrExpressionBase(startOffset, endOffset, type), IrWhen {
private val branchParts = ArrayList<IrExpression>() private val branchParts = ArrayList<IrExpression>()
@@ -16,31 +16,13 @@
package org.jetbrains.kotlin.ir.expressions.impl package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.expressions.IrOperator
import org.jetbrains.kotlin.ir.expressions.IrWhileLoop import org.jetbrains.kotlin.ir.expressions.IrWhileLoop
import org.jetbrains.kotlin.ir.expressions.impl.IrLoopBase
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
class IrWhileLoopImpl( class IrWhileLoopImpl(startOffset: Int, endOffset: Int, type: KotlinType, origin: IrStatementOrigin?) :
startOffset: Int, IrLoopBase(startOffset, endOffset, type, origin), IrWhileLoop {
endOffset: Int,
type: KotlinType,
operator: IrOperator?
) : IrLoopBase(startOffset, endOffset, type, operator), IrWhileLoop {
constructor(
startOffset: Int,
endOffset: Int,
type: KotlinType,
operator: IrOperator?,
condition: IrExpression,
body: IrExpression
) : this(startOffset, endOffset, type, operator) {
this.condition = condition
this.body = body
}
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R { override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
return visitor.visitWhileLoop(this, data) return visitor.visitWhileLoop(this, data)
} }
@@ -94,10 +94,10 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
"SPREAD_ELEMENT" "SPREAD_ELEMENT"
override fun visitBlock(expression: IrBlock, data: Nothing?): String = override fun visitBlock(expression: IrBlock, data: Nothing?): String =
"BLOCK type=${expression.type.render()} operator=${expression.operator}" "BLOCK type=${expression.type.render()} origin=${expression.origin}"
override fun visitComposite(expression: IrComposite, data: Nothing?): String = override fun visitComposite(expression: IrComposite, data: Nothing?): String =
"COMPOSITE type=${expression.type.render()} operator=${expression.operator}" "COMPOSITE type=${expression.type.render()} origin=${expression.origin}"
override fun visitReturn(expression: IrReturn, data: Nothing?): String = override fun visitReturn(expression: IrReturn, data: Nothing?): String =
"RETURN type=${expression.type.render()} from='${expression.returnTarget.ref()}'" "RETURN type=${expression.type.render()} from='${expression.returnTarget.ref()}'"
@@ -110,7 +110,7 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
override fun visitCall(expression: IrCall, data: Nothing?): String = override fun visitCall(expression: IrCall, data: Nothing?): String =
"CALL '${expression.descriptor.ref()}' ${expression.renderSuperQualifier()}" + "CALL '${expression.descriptor.ref()}' ${expression.renderSuperQualifier()}" +
"type=${expression.type.render()} operator=${expression.operator}" "type=${expression.type.render()} origin=${expression.origin}"
private fun IrCall.renderSuperQualifier(): String = private fun IrCall.renderSuperQualifier(): String =
superQualifier?.let { "superQualifier=${it.name} " } ?: "" superQualifier?.let { "superQualifier=${it.name} " } ?: ""
@@ -129,16 +129,16 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
"INSTANCE_INITIALIZER_CALL classDescriptor='${expression.classDescriptor.ref()}'" "INSTANCE_INITIALIZER_CALL classDescriptor='${expression.classDescriptor.ref()}'"
override fun visitGetVariable(expression: IrGetVariable, data: Nothing?): String = override fun visitGetVariable(expression: IrGetVariable, data: Nothing?): String =
"GET_VAR '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" "GET_VAR '${expression.descriptor.ref()}' type=${expression.type.render()} origin=${expression.origin}"
override fun visitSetVariable(expression: IrSetVariable, data: Nothing?): String = override fun visitSetVariable(expression: IrSetVariable, data: Nothing?): String =
"SET_VAR '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" "SET_VAR '${expression.descriptor.ref()}' type=${expression.type.render()} origin=${expression.origin}"
override fun visitGetField(expression: IrGetField, data: Nothing?): String = override fun visitGetField(expression: IrGetField, data: Nothing?): String =
"GET_BACKING_FIELD '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" "GET_BACKING_FIELD '${expression.descriptor.ref()}' type=${expression.type.render()} origin=${expression.origin}"
override fun visitSetField(expression: IrSetField, data: Nothing?): String = override fun visitSetField(expression: IrSetField, data: Nothing?): String =
"SET_BACKING_FIELD '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" "SET_BACKING_FIELD '${expression.descriptor.ref()}' type=${expression.type.render()} origin=${expression.origin}"
override fun visitGetObjectValue(expression: IrGetObjectValue, data: Nothing?): String = override fun visitGetObjectValue(expression: IrGetObjectValue, data: Nothing?): String =
"GET_OBJECT '${expression.descriptor.ref()}' type=${expression.type.render()}" "GET_OBJECT '${expression.descriptor.ref()}' type=${expression.type.render()}"
@@ -150,16 +150,16 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
"STRING_CONCATENATION type=${expression.type.render()}" "STRING_CONCATENATION type=${expression.type.render()}"
override fun visitTypeOperator(expression: IrTypeOperatorCall, data: Nothing?): String = override fun visitTypeOperator(expression: IrTypeOperatorCall, data: Nothing?): String =
"TYPE_OP operator=${expression.operator} typeOperand=${expression.typeOperand.render()}" "TYPE_OP origin=${expression.operator} typeOperand=${expression.typeOperand.render()}"
override fun visitWhen(expression: IrWhen, data: Nothing?): String = override fun visitWhen(expression: IrWhen, data: Nothing?): String =
"WHEN type=${expression.type.render()} operator=${expression.operator}" "WHEN type=${expression.type.render()} origin=${expression.origin}"
override fun visitWhileLoop(loop: IrWhileLoop, data: Nothing?): String = override fun visitWhileLoop(loop: IrWhileLoop, data: Nothing?): String =
"WHILE label=${loop.label} operator=${loop.operator}" "WHILE label=${loop.label} origin=${loop.origin}"
override fun visitDoWhileLoop(loop: IrDoWhileLoop, data: Nothing?): String = override fun visitDoWhileLoop(loop: IrDoWhileLoop, data: Nothing?): String =
"DO_WHILE label=${loop.label} operator=${loop.operator}" "DO_WHILE label=${loop.label} origin=${loop.origin}"
override fun visitBreak(jump: IrBreak, data: Nothing?): String = override fun visitBreak(jump: IrBreak, data: Nothing?): String =
"BREAK label=${jump.label} loop.label=${jump.loop.label} depth=${jump.getDepth()}" "BREAK label=${jump.label} loop.label=${jump.loop.label} depth=${jump.getDepth()}"
@@ -171,7 +171,7 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
"THROW type=${expression.type.render()}" "THROW type=${expression.type.render()}"
override fun visitCallableReference(expression: IrCallableReference, data: Nothing?): String = override fun visitCallableReference(expression: IrCallableReference, data: Nothing?): String =
"CALLABLE_REFERENCE '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" "CALLABLE_REFERENCE '${expression.descriptor.ref()}' type=${expression.type.render()} origin=${expression.origin}"
override fun visitClassReference(expression: IrClassReference, data: Nothing?): String = override fun visitClassReference(expression: IrClassReference, data: Nothing?): String =
"CLASS_REFERENCE '${expression.descriptor.ref()}' type=${expression.type.render()}" "CLASS_REFERENCE '${expression.descriptor.ref()}' type=${expression.type.render()}"
@@ -7,52 +7,52 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Base' type=Base receiver: THIS of 'Base' type=Base
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int' RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'Base' type=Base receiver: THIS of 'Base' type=Base
CLASS CLASS Test1 CLASS CLASS Test1
CONSTRUCTOR public constructor Test1(xx: kotlin.Int, yy: kotlin.Int) CONSTRUCTOR public constructor Test1(xx: kotlin.Int, yy: kotlin.Int)
BLOCK_BODY BLOCK_BODY
BLOCK type=Base operator=ARGUMENTS_REORDERING_FOR_CALL BLOCK type=Base origin=ARGUMENTS_REORDERING_FOR_CALL
VAR IR_TEMPORARY_VARIABLE val tmp0_y: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp0_y: kotlin.Int
GET_VAR 'value-parameter yy: Int' type=kotlin.Int operator=null GET_VAR 'value-parameter yy: Int' type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE val tmp1_x: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp1_x: kotlin.Int
GET_VAR 'value-parameter xx: Int' type=kotlin.Int operator=null GET_VAR 'value-parameter xx: Int' type=kotlin.Int origin=null
DELEGATING_CONSTRUCTOR_CALL 'constructor Base(Int, Int)' DELEGATING_CONSTRUCTOR_CALL 'constructor Base(Int, Int)'
x: GET_VAR 'tmp1_x: Int' type=kotlin.Int operator=null x: GET_VAR 'tmp1_x: Int' type=kotlin.Int origin=null
y: GET_VAR 'tmp0_y: Int' type=kotlin.Int operator=null y: GET_VAR 'tmp0_y: Int' type=kotlin.Int origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='Test1' INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
CLASS CLASS Test2 CLASS CLASS Test2
CONSTRUCTOR public constructor Test2(xx: kotlin.Int, yy: kotlin.Int) CONSTRUCTOR public constructor Test2(xx: kotlin.Int, yy: kotlin.Int)
BLOCK_BODY BLOCK_BODY
BLOCK type=Base operator=ARGUMENTS_REORDERING_FOR_CALL BLOCK type=Base origin=ARGUMENTS_REORDERING_FOR_CALL
VAR IR_TEMPORARY_VARIABLE val tmp0_y: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp0_y: kotlin.Int
GET_VAR 'value-parameter yy: Int' type=kotlin.Int operator=null GET_VAR 'value-parameter yy: Int' type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE val tmp1_x: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp1_x: kotlin.Int
GET_VAR 'value-parameter xx: Int' type=kotlin.Int operator=null GET_VAR 'value-parameter xx: Int' type=kotlin.Int origin=null
DELEGATING_CONSTRUCTOR_CALL 'constructor Base(Int, Int)' DELEGATING_CONSTRUCTOR_CALL 'constructor Base(Int, Int)'
x: GET_VAR 'tmp1_x: Int' type=kotlin.Int operator=null x: GET_VAR 'tmp1_x: Int' type=kotlin.Int origin=null
y: GET_VAR 'tmp0_y: Int' type=kotlin.Int operator=null y: GET_VAR 'tmp0_y: Int' type=kotlin.Int origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='Test2' INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
CONSTRUCTOR public constructor Test2(xxx: kotlin.Int, yyy: kotlin.Int, a: kotlin.Any) CONSTRUCTOR public constructor Test2(xxx: kotlin.Int, yyy: kotlin.Int, a: kotlin.Any)
BLOCK_BODY BLOCK_BODY
BLOCK type=Test2 operator=ARGUMENTS_REORDERING_FOR_CALL BLOCK type=Test2 origin=ARGUMENTS_REORDERING_FOR_CALL
VAR IR_TEMPORARY_VARIABLE val tmp0_yy: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp0_yy: kotlin.Int
GET_VAR 'value-parameter yyy: Int' type=kotlin.Int operator=null GET_VAR 'value-parameter yyy: Int' type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE val tmp1_xx: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp1_xx: kotlin.Int
GET_VAR 'value-parameter xxx: Int' type=kotlin.Int operator=null GET_VAR 'value-parameter xxx: Int' type=kotlin.Int origin=null
DELEGATING_CONSTRUCTOR_CALL 'constructor Test2(Int, Int)' DELEGATING_CONSTRUCTOR_CALL 'constructor Test2(Int, Int)'
xx: GET_VAR 'tmp1_xx: Int' type=kotlin.Int operator=null xx: GET_VAR 'tmp1_xx: Int' type=kotlin.Int origin=null
yy: GET_VAR 'tmp0_yy: Int' type=kotlin.Int operator=null yy: GET_VAR 'tmp0_yy: Int' type=kotlin.Int origin=null
+15 -15
View File
@@ -9,26 +9,26 @@ FILE /classMembers.kt
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int' RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
PROPERTY public final var z: kotlin.Int PROPERTY public final var z: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final var z: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final var z: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter z: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter z: Int = ...' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z>(): Int' RETURN type=kotlin.Nothing from='<get-z>(): Int'
GET_BACKING_FIELD 'z: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'z: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-z>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-z>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'z: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'z: Int' type=kotlin.Unit origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
CONSTRUCTOR public constructor C() CONSTRUCTOR public constructor C()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor C(Int, Int, Int = ...)' DELEGATING_CONSTRUCTOR_CALL 'constructor C(Int, Int, Int = ...)'
@@ -42,7 +42,7 @@ FILE /classMembers.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-property>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-property>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-property>(): Int' RETURN type=kotlin.Nothing from='<get-property>(): Int'
GET_BACKING_FIELD 'property: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'property: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
PROPERTY public final val propertyWithGet: kotlin.Int PROPERTY public final val propertyWithGet: kotlin.Int
FUN public final fun <get-propertyWithGet>(): kotlin.Int FUN public final fun <get-propertyWithGet>(): kotlin.Int
@@ -53,20 +53,20 @@ FILE /classMembers.kt
FUN public final fun <get-propertyWithGetAndSet>(): kotlin.Int FUN public final fun <get-propertyWithGetAndSet>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-propertyWithGetAndSet>(): Int' RETURN type=kotlin.Nothing from='<get-propertyWithGetAndSet>(): Int'
CALL '<get-z>(): Int' type=kotlin.Int operator=GET_PROPERTY CALL '<get-z>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'C' type=C $this: THIS of 'C' type=C
FUN public final fun <set-propertyWithGetAndSet>(value: kotlin.Int): kotlin.Unit FUN public final fun <set-propertyWithGetAndSet>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL '<set-z>(Int): Unit' type=kotlin.Unit operator=EQ CALL '<set-z>(Int): Unit' type=kotlin.Unit origin=EQ
$this: THIS of 'C' type=C $this: THIS of 'C' type=C
<set-?>: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null <set-?>: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
FUN public final fun function(): kotlin.Unit FUN public final fun function(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='1' message: CONST String type=kotlin.String value='1'
FUN public final fun kotlin.Int.memberExtensionFunction(): kotlin.Unit FUN public final fun kotlin.Int.memberExtensionFunction(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='2' message: CONST String type=kotlin.String value='2'
CLASS CLASS NestedClass CLASS CLASS NestedClass
CONSTRUCTOR public constructor NestedClass() CONSTRUCTOR public constructor NestedClass()
@@ -75,18 +75,18 @@ FILE /classMembers.kt
INSTANCE_INITIALIZER_CALL classDescriptor='NestedClass' INSTANCE_INITIALIZER_CALL classDescriptor='NestedClass'
FUN public final fun function(): kotlin.Unit FUN public final fun function(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='3' message: CONST String type=kotlin.String value='3'
FUN public final fun kotlin.Int.memberExtensionFunction(): kotlin.Unit FUN public final fun kotlin.Int.memberExtensionFunction(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='4' message: CONST String type=kotlin.String value='4'
CLASS INTERFACE NestedInterface CLASS INTERFACE NestedInterface
FUN public abstract fun foo(): kotlin.Unit FUN public abstract fun foo(): kotlin.Unit
FUN public open fun bar(): kotlin.Unit FUN public open fun bar(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='bar(): Unit' RETURN type=kotlin.Nothing from='bar(): Unit'
CALL 'foo(): Unit' type=kotlin.Unit operator=null CALL 'foo(): Unit' type=kotlin.Unit origin=null
$this: THIS of 'NestedInterface' type=C.NestedInterface $this: THIS of 'NestedInterface' type=C.NestedInterface
CLASS OBJECT companion object of C CLASS OBJECT companion object of C
CONSTRUCTOR private constructor Companion() CONSTRUCTOR private constructor Companion()
+58 -58
View File
@@ -7,136 +7,136 @@ FILE /dataClasses.kt
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test1' type=Test1 receiver: THIS of 'Test1' type=Test1
PROPERTY public final val y: kotlin.String PROPERTY public final val y: kotlin.String
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.String FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.String
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter y: String' type=kotlin.String operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter y: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.String FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): String' RETURN type=kotlin.Nothing from='<get-y>(): String'
GET_BACKING_FIELD 'y: String' type=kotlin.String operator=null GET_BACKING_FIELD 'y: String' type=kotlin.String origin=null
receiver: THIS of 'Test1' type=Test1 receiver: THIS of 'Test1' type=Test1
PROPERTY public final val z: kotlin.Any PROPERTY public final val z: kotlin.Any
FIELD PROPERTY_BACKING_FIELD public final val z: kotlin.Any FIELD PROPERTY_BACKING_FIELD public final val z: kotlin.Any
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter z: Any' type=kotlin.Any operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter z: Any' type=kotlin.Any origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Any FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Any
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z>(): Any' RETURN type=kotlin.Nothing from='<get-z>(): Any'
GET_BACKING_FIELD 'z: Any' type=kotlin.Any operator=null GET_BACKING_FIELD 'z: Any' type=kotlin.Any origin=null
receiver: THIS of 'Test1' type=Test1 receiver: THIS of 'Test1' type=Test1
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Int FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='component1(): Int' RETURN type=kotlin.Nothing from='component1(): Int'
CALL '<get-x>(): Int' type=kotlin.Int operator=GET_PROPERTY CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component2(): kotlin.String FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component2(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='component2(): String' RETURN type=kotlin.Nothing from='component2(): String'
CALL '<get-y>(): String' type=kotlin.String operator=GET_PROPERTY CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component3(): kotlin.Any FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component3(): kotlin.Any
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='component3(): Any' RETURN type=kotlin.Nothing from='component3(): Any'
CALL '<get-z>(): Any' type=kotlin.Any operator=GET_PROPERTY CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: kotlin.Int = ..., y: kotlin.String = ..., z: kotlin.Any = ...): Test1 FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: kotlin.Int = ..., y: kotlin.String = ..., z: kotlin.Any = ...): Test1
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='copy(Int = ..., String = ..., Any = ...): Test1' RETURN type=kotlin.Nothing from='copy(Int = ..., String = ..., Any = ...): Test1'
CALL 'constructor Test1(Int, String, Any)' type=Test1 operator=null CALL 'constructor Test1(Int, String, Any)' type=Test1 origin=null
x: GET_VAR 'value-parameter x: Int = ...' type=kotlin.Int operator=null x: GET_VAR 'value-parameter x: Int = ...' type=kotlin.Int origin=null
y: GET_VAR 'value-parameter y: String = ...' type=kotlin.String operator=null y: GET_VAR 'value-parameter y: String = ...' type=kotlin.String origin=null
z: GET_VAR 'value-parameter z: Any = ...' type=kotlin.Any operator=null z: GET_VAR 'value-parameter z: Any = ...' type=kotlin.Any origin=null
FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='toString(): String' RETURN type=kotlin.Nothing from='toString(): String'
STRING_CONCATENATION type=kotlin.String STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value='Test1(' CONST String type=kotlin.String value='Test1('
CONST String type=kotlin.String value='x=' CONST String type=kotlin.String value='x='
CALL '<get-x>(): Int' type=kotlin.Int operator=GET_PROPERTY CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
CONST String type=kotlin.String value=', ' CONST String type=kotlin.String value=', '
CONST String type=kotlin.String value='y=' CONST String type=kotlin.String value='y='
CALL '<get-y>(): String' type=kotlin.String operator=GET_PROPERTY CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
CONST String type=kotlin.String value=', ' CONST String type=kotlin.String value=', '
CONST String type=kotlin.String value='z=' CONST String type=kotlin.String value='z='
CALL '<get-z>(): Any' type=kotlin.Any operator=GET_PROPERTY CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
CONST String type=kotlin.String value=')' CONST String type=kotlin.String value=')'
FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int
BLOCK_BODY BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE val tmp0_result: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp0_result: kotlin.Int
CONST Int type=kotlin.Int value='0' CONST Int type=kotlin.Int value='0'
SET_VAR 'tmp0_result: Int' type=kotlin.Unit operator=EQ SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'hashCode(): Int' type=kotlin.Int operator=null CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-x>(): Int' type=kotlin.Int operator=GET_PROPERTY $this: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
SET_VAR 'tmp0_result: Int' type=kotlin.Unit operator=EQ SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'plus(Int): Int' type=kotlin.Int operator=null CALL 'plus(Int): Int' type=kotlin.Int origin=null
$this: CALL 'times(Int): Int' type=kotlin.Int operator=null $this: CALL 'times(Int): Int' type=kotlin.Int origin=null
$this: GET_VAR 'tmp0_result: Int' type=kotlin.Int operator=null $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value='31' other: CONST Int type=kotlin.Int value='31'
other: CALL 'hashCode(): Int' type=kotlin.Int operator=null other: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-y>(): String' type=kotlin.String operator=GET_PROPERTY $this: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
SET_VAR 'tmp0_result: Int' type=kotlin.Unit operator=EQ SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'plus(Int): Int' type=kotlin.Int operator=null CALL 'plus(Int): Int' type=kotlin.Int origin=null
$this: CALL 'times(Int): Int' type=kotlin.Int operator=null $this: CALL 'times(Int): Int' type=kotlin.Int origin=null
$this: GET_VAR 'tmp0_result: Int' type=kotlin.Int operator=null $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value='31' other: CONST Int type=kotlin.Int value='31'
other: CALL 'hashCode(): Int' type=kotlin.Int operator=null other: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-z>(): Any' type=kotlin.Any operator=GET_PROPERTY $this: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
RETURN type=kotlin.Nothing from='hashCode(): Int' RETURN type=kotlin.Nothing from='hashCode(): Int'
GET_VAR 'tmp0_result: Int' type=kotlin.Int operator=null GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean
BLOCK_BODY BLOCK_BODY
WHEN type=kotlin.Unit operator=null WHEN type=kotlin.Unit origin=null
if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQEQ if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ
arg0: THIS of 'Test1' type=Test1 arg0: THIS of 'Test1' type=Test1
arg1: GET_VAR 'value-parameter other: Any?' type=kotlin.Any? operator=null arg1: GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value='true' CONST Boolean type=kotlin.Boolean value='true'
WHEN type=kotlin.Unit operator=null WHEN type=kotlin.Unit origin=null
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=Test1 if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=Test1
GET_VAR 'value-parameter other: Any?' type=kotlin.Any? operator=null GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value='false' CONST Boolean type=kotlin.Boolean value='false'
VAR IR_TEMPORARY_VARIABLE val tmp0_other_with_cast: Test1 VAR IR_TEMPORARY_VARIABLE val tmp0_other_with_cast: Test1
TYPE_OP operator=CAST typeOperand=Test1 TYPE_OP origin=CAST typeOperand=Test1
GET_VAR 'value-parameter other: Any?' type=kotlin.Any? operator=null GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
WHEN type=kotlin.Unit operator=null WHEN type=kotlin.Unit origin=null
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean operator=EXCLEQ if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EXCLEQ arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-x>(): Int' type=kotlin.Int operator=GET_PROPERTY arg0: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
arg1: CALL '<get-x>(): Int' type=kotlin.Int operator=GET_PROPERTY arg1: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 operator=null $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value='false' CONST Boolean type=kotlin.Boolean value='false'
WHEN type=kotlin.Unit operator=null WHEN type=kotlin.Unit origin=null
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean operator=EXCLEQ if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EXCLEQ arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-y>(): String' type=kotlin.String operator=GET_PROPERTY arg0: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
arg1: CALL '<get-y>(): String' type=kotlin.String operator=GET_PROPERTY arg1: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 operator=null $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value='false' CONST Boolean type=kotlin.Boolean value='false'
WHEN type=kotlin.Unit operator=null WHEN type=kotlin.Unit origin=null
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean operator=EXCLEQ if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EXCLEQ arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-z>(): Any' type=kotlin.Any operator=GET_PROPERTY arg0: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: THIS of 'Test1' type=Test1 $this: THIS of 'Test1' type=Test1
arg1: CALL '<get-z>(): Any' type=kotlin.Any operator=GET_PROPERTY arg1: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 operator=null $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value='false' CONST Boolean type=kotlin.Boolean value='false'
RETURN type=kotlin.Nothing from='equals(Any?): Boolean' RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
@@ -24,7 +24,7 @@ FILE /delegatedImplementation.kt
FUN public fun otherImpl(x0: kotlin.String, y0: kotlin.Int): IOther FUN public fun otherImpl(x0: kotlin.String, y0: kotlin.Int): IOther
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='otherImpl(String, Int): IOther' RETURN type=kotlin.Nothing from='otherImpl(String, Int): IOther'
BLOCK type=otherImpl.<no name provided> operator=OBJECT_LITERAL BLOCK type=otherImpl.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS <no name provided> CLASS CLASS <no name provided>
CONSTRUCTOR public constructor <no name provided>() CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY BLOCK_BODY
@@ -33,26 +33,26 @@ FILE /delegatedImplementation.kt
PROPERTY public open override val x: kotlin.String PROPERTY public open override val x: kotlin.String
FIELD PROPERTY_BACKING_FIELD public open override val x: kotlin.String FIELD PROPERTY_BACKING_FIELD public open override val x: kotlin.String
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x0: String' type=kotlin.String operator=null GET_VAR 'value-parameter x0: String' type=kotlin.String origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public open override fun <get-x>(): kotlin.String FUN DEFAULT_PROPERTY_ACCESSOR public open override fun <get-x>(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): String' RETURN type=kotlin.Nothing from='<get-x>(): String'
GET_BACKING_FIELD 'x: String' type=kotlin.String operator=null GET_BACKING_FIELD 'x: String' type=kotlin.String origin=null
receiver: THIS of '<no name provided>' type=otherImpl.<no name provided> receiver: THIS of '<no name provided>' type=otherImpl.<no name provided>
PROPERTY public open override var y: kotlin.Int PROPERTY public open override var y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public open override var y: kotlin.Int FIELD PROPERTY_BACKING_FIELD public open override var y: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter y0: Int' type=kotlin.Int operator=null GET_VAR 'value-parameter y0: Int' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public open override fun <get-y>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public open override fun <get-y>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int' RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of '<no name provided>' type=otherImpl.<no name provided> receiver: THIS of '<no name provided>' type=otherImpl.<no name provided>
FUN DEFAULT_PROPERTY_ACCESSOR public open override fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public open override fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'y: Int' type=kotlin.Unit origin=null
receiver: THIS of '<no name provided>' type=otherImpl.<no name provided> receiver: THIS of '<no name provided>' type=otherImpl.<no name provided>
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY public open override val kotlin.Byte.z1: kotlin.Int PROPERTY public open override val kotlin.Byte.z1: kotlin.Int
FUN public open override fun kotlin.Byte.<get-z1>(): kotlin.Int FUN public open override fun kotlin.Byte.<get-z1>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
@@ -65,7 +65,7 @@ FILE /delegatedImplementation.kt
CONST Int type=kotlin.Int value='2' CONST Int type=kotlin.Int value='2'
FUN public open override fun kotlin.Byte.<set-z2>(value: kotlin.Int): kotlin.Unit FUN public open override fun kotlin.Byte.<set-z2>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'constructor <no name provided>()' type=otherImpl.<no name provided> operator=OBJECT_LITERAL CALL 'constructor <no name provided>()' type=otherImpl.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS Test1 CLASS CLASS Test1
CONSTRUCTOR public constructor Test1() CONSTRUCTOR public constructor Test1()
BLOCK_BODY BLOCK_BODY
@@ -77,18 +77,18 @@ FILE /delegatedImplementation.kt
FUN DELEGATED_MEMBER public open override fun bar(): kotlin.Int FUN DELEGATED_MEMBER public open override fun bar(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='bar(): Int' RETURN type=kotlin.Nothing from='bar(): Int'
CALL 'bar(): Int' type=kotlin.Int operator=null CALL 'bar(): Int' type=kotlin.Int origin=null
$this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl operator=null $this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
FUN DELEGATED_MEMBER public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit FUN DELEGATED_MEMBER public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'foo(Int, String): Unit' type=kotlin.Unit operator=null CALL 'foo(Int, String): Unit' type=kotlin.Unit origin=null
$this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl operator=null $this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
x: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
s: GET_VAR 'value-parameter s: String' type=kotlin.String operator=null s: GET_VAR 'value-parameter s: String' type=kotlin.String origin=null
FUN DELEGATED_MEMBER public open override fun kotlin.String.qux(): kotlin.Unit FUN DELEGATED_MEMBER public open override fun kotlin.String.qux(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'qux() on String: Unit' type=kotlin.Unit operator=null CALL 'qux() on String: Unit' type=kotlin.Unit origin=null
$this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl operator=null $this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
$receiver: $RECEIVER of 'qux() on String: Unit' type=kotlin.String $receiver: $RECEIVER of 'qux() on String: Unit' type=kotlin.String
CLASS CLASS Test2 CLASS CLASS Test2
CONSTRUCTOR public constructor Test2() CONSTRUCTOR public constructor Test2()
@@ -101,58 +101,58 @@ FILE /delegatedImplementation.kt
FUN DELEGATED_MEMBER public open override fun bar(): kotlin.Int FUN DELEGATED_MEMBER public open override fun bar(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='bar(): Int' RETURN type=kotlin.Nothing from='bar(): Int'
CALL 'bar(): Int' type=kotlin.Int operator=null CALL 'bar(): Int' type=kotlin.Int origin=null
$this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl operator=null $this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
FUN DELEGATED_MEMBER public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit FUN DELEGATED_MEMBER public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'foo(Int, String): Unit' type=kotlin.Unit operator=null CALL 'foo(Int, String): Unit' type=kotlin.Unit origin=null
$this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl operator=null $this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
x: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
s: GET_VAR 'value-parameter s: String' type=kotlin.String operator=null s: GET_VAR 'value-parameter s: String' type=kotlin.String origin=null
FUN DELEGATED_MEMBER public open override fun kotlin.String.qux(): kotlin.Unit FUN DELEGATED_MEMBER public open override fun kotlin.String.qux(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'qux() on String: Unit' type=kotlin.Unit operator=null CALL 'qux() on String: Unit' type=kotlin.Unit origin=null
$this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl operator=null $this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
$receiver: $RECEIVER of 'qux() on String: Unit' type=kotlin.String $receiver: $RECEIVER of 'qux() on String: Unit' type=kotlin.String
FIELD DELEGATE val `Test2$IOther$delegate`: IOther FIELD DELEGATE val `Test2$IOther$delegate`: IOther
EXPRESSION_BODY EXPRESSION_BODY
CALL 'otherImpl(String, Int): IOther' type=IOther operator=null CALL 'otherImpl(String, Int): IOther' type=IOther origin=null
x0: CONST String type=kotlin.String value='' x0: CONST String type=kotlin.String value=''
y0: CONST Int type=kotlin.Int value='42' y0: CONST Int type=kotlin.Int value='42'
PROPERTY DELEGATED_MEMBER public open override val kotlin.Byte.z1: kotlin.Int PROPERTY DELEGATED_MEMBER public open override val kotlin.Byte.z1: kotlin.Int
FUN DELEGATED_MEMBER public open override fun kotlin.Byte.<get-z1>(): kotlin.Int FUN DELEGATED_MEMBER public open override fun kotlin.Byte.<get-z1>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int' RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int'
CALL '<get-z1>() on Byte: Int' type=kotlin.Int operator=null CALL '<get-z1>() on Byte: Int' type=kotlin.Int origin=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther origin=null
$receiver: $RECEIVER of 'z1: Int on Byte' type=kotlin.Byte $receiver: $RECEIVER of 'z1: Int on Byte' type=kotlin.Byte
PROPERTY DELEGATED_MEMBER public open override val x: kotlin.String PROPERTY DELEGATED_MEMBER public open override val x: kotlin.String
FUN DELEGATED_MEMBER public open override fun <get-x>(): kotlin.String FUN DELEGATED_MEMBER public open override fun <get-x>(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): String' RETURN type=kotlin.Nothing from='<get-x>(): String'
CALL '<get-x>(): String' type=kotlin.String operator=null CALL '<get-x>(): String' type=kotlin.String origin=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther origin=null
PROPERTY DELEGATED_MEMBER public open override var kotlin.Byte.z2: kotlin.Int PROPERTY DELEGATED_MEMBER public open override var kotlin.Byte.z2: kotlin.Int
FUN DELEGATED_MEMBER public open override fun kotlin.Byte.<get-z2>(): kotlin.Int FUN DELEGATED_MEMBER public open override fun kotlin.Byte.<get-z2>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int' RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int'
CALL '<get-z2>() on Byte: Int' type=kotlin.Int operator=null CALL '<get-z2>() on Byte: Int' type=kotlin.Int origin=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther origin=null
$receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte $receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte
FUN DELEGATED_MEMBER public open override fun kotlin.Byte.<set-z2>(<set-?>: kotlin.Int): kotlin.Unit FUN DELEGATED_MEMBER public open override fun kotlin.Byte.<set-z2>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL '<set-z2>(Int) on Byte: Unit' type=kotlin.Unit operator=null CALL '<set-z2>(Int) on Byte: Unit' type=kotlin.Unit origin=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther origin=null
$receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte $receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte
<set-?>: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null <set-?>: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY DELEGATED_MEMBER public open override var y: kotlin.Int PROPERTY DELEGATED_MEMBER public open override var y: kotlin.Int
FUN DELEGATED_MEMBER public open override fun <get-y>(): kotlin.Int FUN DELEGATED_MEMBER public open override fun <get-y>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int' RETURN type=kotlin.Nothing from='<get-y>(): Int'
CALL '<get-y>(): Int' type=kotlin.Int operator=null CALL '<get-y>(): Int' type=kotlin.Int origin=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther origin=null
FUN DELEGATED_MEMBER public open override fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit FUN DELEGATED_MEMBER public open override fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL '<set-y>(Int): Unit' type=kotlin.Unit operator=null CALL '<set-y>(Int): Unit' type=kotlin.Unit origin=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther origin=null
<set-?>: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null <set-?>: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
@@ -21,7 +21,7 @@ FILE /delegatedImplementationWithExplicitOverride.kt
GET_OBJECT 'FooBarImpl' type=FooBarImpl GET_OBJECT 'FooBarImpl' type=FooBarImpl
FUN DELEGATED_MEMBER public open override fun foo(): kotlin.Unit FUN DELEGATED_MEMBER public open override fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'foo(): Unit' type=kotlin.Unit operator=null CALL 'foo(): Unit' type=kotlin.Unit origin=null
$this: GET_VAR '`C$IFooBar$delegate`: FooBarImpl' type=FooBarImpl operator=null $this: GET_VAR '`C$IFooBar$delegate`: FooBarImpl' type=FooBarImpl origin=null
FUN public open override fun bar(): kotlin.Unit FUN public open override fun bar(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
+10 -10
View File
@@ -20,11 +20,11 @@ FILE /enum.kt
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestEnum2' type=TestEnum2 receiver: THIS of 'TestEnum2' type=TestEnum2
ENUM_ENTRY enum entry TEST1 ENUM_ENTRY enum entry TEST1
init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)' TEST1 init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)' TEST1
@@ -53,7 +53,7 @@ FILE /enum.kt
INSTANCE_INITIALIZER_CALL classDescriptor='TEST' INSTANCE_INITIALIZER_CALL classDescriptor='TEST'
FUN public open override fun foo(): kotlin.Unit FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='Hello, world!' message: CONST String type=kotlin.String value='Hello, world!'
FUN public abstract fun foo(): kotlin.Unit FUN public abstract fun foo(): kotlin.Unit
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array<TestEnum3> FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array<TestEnum3>
@@ -68,11 +68,11 @@ FILE /enum.kt
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestEnum4' type=TestEnum4 receiver: THIS of 'TestEnum4' type=TestEnum4
ENUM_ENTRY enum entry TEST1 ENUM_ENTRY enum entry TEST1
init: ENUM_CONSTRUCTOR_CALL 'constructor TEST1()' TEST1 init: ENUM_CONSTRUCTOR_CALL 'constructor TEST1()' TEST1
@@ -84,7 +84,7 @@ FILE /enum.kt
INSTANCE_INITIALIZER_CALL classDescriptor='TEST1' INSTANCE_INITIALIZER_CALL classDescriptor='TEST1'
FUN public open override fun foo(): kotlin.Unit FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: GET_ENUM_VALUE 'TEST1' type=TestEnum4 message: GET_ENUM_VALUE 'TEST1' type=TestEnum4
ENUM_ENTRY enum entry TEST2 ENUM_ENTRY enum entry TEST2
init: ENUM_CONSTRUCTOR_CALL 'constructor TEST2()' TEST2 init: ENUM_CONSTRUCTOR_CALL 'constructor TEST2()' TEST2
@@ -99,17 +99,17 @@ FILE /enum.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z>(): Int' RETURN type=kotlin.Nothing from='<get-z>(): Int'
GET_BACKING_FIELD 'z: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'z: Int' type=kotlin.Int origin=null
receiver: THIS of 'TEST2' type=TestEnum4.TEST2 receiver: THIS of 'TEST2' type=TestEnum4.TEST2
ANONYMOUS_INITIALIZER TEST2 ANONYMOUS_INITIALIZER TEST2
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'z: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'z: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TEST2' type=TestEnum4.TEST2 receiver: THIS of 'TEST2' type=TestEnum4.TEST2
value: CALL '<get-x>(): Int' type=kotlin.Int operator=GET_PROPERTY value: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'TEST2' type=TestEnum4.TEST2 $this: THIS of 'TEST2' type=TestEnum4.TEST2
FUN public open override fun foo(): kotlin.Unit FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: GET_ENUM_VALUE 'TEST2' type=TestEnum4 message: GET_ENUM_VALUE 'TEST2' type=TestEnum4
FUN public abstract fun foo(): kotlin.Unit FUN public abstract fun foo(): kotlin.Unit
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array<TestEnum4> FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array<TestEnum4>
+9 -9
View File
@@ -6,7 +6,7 @@ FILE /initBlock.kt
INSTANCE_INITIALIZER_CALL classDescriptor='Test1' INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
ANONYMOUS_INITIALIZER Test1 ANONYMOUS_INITIALIZER Test1
BLOCK_BODY BLOCK_BODY
CALL 'println(): Unit' type=kotlin.Unit operator=null CALL 'println(): Unit' type=kotlin.Unit origin=null
CLASS CLASS Test2 CLASS CLASS Test2
CONSTRUCTOR public constructor Test2(x: kotlin.Int) CONSTRUCTOR public constructor Test2(x: kotlin.Int)
BLOCK_BODY BLOCK_BODY
@@ -15,19 +15,19 @@ FILE /initBlock.kt
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test2' type=Test2 receiver: THIS of 'Test2' type=Test2
ANONYMOUS_INITIALIZER Test2 ANONYMOUS_INITIALIZER Test2
BLOCK_BODY BLOCK_BODY
CALL 'println(): Unit' type=kotlin.Unit operator=null CALL 'println(): Unit' type=kotlin.Unit origin=null
CLASS CLASS Test3 CLASS CLASS Test3
ANONYMOUS_INITIALIZER Test3 ANONYMOUS_INITIALIZER Test3
BLOCK_BODY BLOCK_BODY
CALL 'println(): Unit' type=kotlin.Unit operator=null CALL 'println(): Unit' type=kotlin.Unit origin=null
CONSTRUCTOR public constructor Test3() CONSTRUCTOR public constructor Test3()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
@@ -35,7 +35,7 @@ FILE /initBlock.kt
CLASS CLASS Test4 CLASS CLASS Test4
ANONYMOUS_INITIALIZER Test4 ANONYMOUS_INITIALIZER Test4
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='1' message: CONST String type=kotlin.String value='1'
CONSTRUCTOR public constructor Test4() CONSTRUCTOR public constructor Test4()
BLOCK_BODY BLOCK_BODY
@@ -43,7 +43,7 @@ FILE /initBlock.kt
INSTANCE_INITIALIZER_CALL classDescriptor='Test4' INSTANCE_INITIALIZER_CALL classDescriptor='Test4'
ANONYMOUS_INITIALIZER Test4 ANONYMOUS_INITIALIZER Test4
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='2' message: CONST String type=kotlin.String value='2'
CLASS CLASS Test5 CLASS CLASS Test5
CONSTRUCTOR public constructor Test5() CONSTRUCTOR public constructor Test5()
@@ -52,7 +52,7 @@ FILE /initBlock.kt
INSTANCE_INITIALIZER_CALL classDescriptor='Test5' INSTANCE_INITIALIZER_CALL classDescriptor='Test5'
ANONYMOUS_INITIALIZER Test5 ANONYMOUS_INITIALIZER Test5
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='1' message: CONST String type=kotlin.String value='1'
CLASS CLASS TestInner CLASS CLASS TestInner
CONSTRUCTOR public constructor TestInner() CONSTRUCTOR public constructor TestInner()
@@ -61,5 +61,5 @@ FILE /initBlock.kt
INSTANCE_INITIALIZER_CALL classDescriptor='TestInner' INSTANCE_INITIALIZER_CALL classDescriptor='TestInner'
ANONYMOUS_INITIALIZER TestInner ANONYMOUS_INITIALIZER TestInner
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='2' message: CONST String type=kotlin.String value='2'
+5 -5
View File
@@ -7,11 +7,11 @@ FILE /initVal.kt
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitValFromParameter' type=TestInitValFromParameter receiver: THIS of 'TestInitValFromParameter' type=TestInitValFromParameter
CLASS CLASS TestInitValInClass CLASS CLASS TestInitValInClass
CONSTRUCTOR public constructor TestInitValInClass() CONSTRUCTOR public constructor TestInitValInClass()
@@ -25,7 +25,7 @@ FILE /initVal.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitValInClass' type=TestInitValInClass receiver: THIS of 'TestInitValInClass' type=TestInitValInClass
CLASS CLASS TestInitValInInitBlock CLASS CLASS TestInitValInInitBlock
CONSTRUCTOR public constructor TestInitValInInitBlock() CONSTRUCTOR public constructor TestInitValInInitBlock()
@@ -37,10 +37,10 @@ FILE /initVal.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitValInInitBlock' type=TestInitValInInitBlock receiver: THIS of 'TestInitValInInitBlock' type=TestInitValInInitBlock
ANONYMOUS_INITIALIZER TestInitValInInitBlock ANONYMOUS_INITIALIZER TestInitValInInitBlock
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TestInitValInInitBlock' type=TestInitValInInitBlock receiver: THIS of 'TestInitValInInitBlock' type=TestInitValInInitBlock
value: CONST Int type=kotlin.Int value='0' value: CONST Int type=kotlin.Int value='0'
+22 -22
View File
@@ -7,17 +7,17 @@ FILE /initVar.kt
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarFromParameter' type=TestInitVarFromParameter receiver: THIS of 'TestInitVarFromParameter' type=TestInitVarFromParameter
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TestInitVarFromParameter' type=TestInitVarFromParameter receiver: THIS of 'TestInitVarFromParameter' type=TestInitVarFromParameter
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
CLASS CLASS TestInitVarInClass CLASS CLASS TestInitVarInClass
CONSTRUCTOR public constructor TestInitVarInClass() CONSTRUCTOR public constructor TestInitVarInClass()
BLOCK_BODY BLOCK_BODY
@@ -30,13 +30,13 @@ FILE /initVar.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarInClass' type=TestInitVarInClass receiver: THIS of 'TestInitVarInClass' type=TestInitVarInClass
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TestInitVarInClass' type=TestInitVarInClass receiver: THIS of 'TestInitVarInClass' type=TestInitVarInClass
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
CLASS CLASS TestInitVarInInitBlock CLASS CLASS TestInitVarInInitBlock
CONSTRUCTOR public constructor TestInitVarInInitBlock() CONSTRUCTOR public constructor TestInitVarInInitBlock()
BLOCK_BODY BLOCK_BODY
@@ -47,16 +47,16 @@ FILE /initVar.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock receiver: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock receiver: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
ANONYMOUS_INITIALIZER TestInitVarInInitBlock ANONYMOUS_INITIALIZER TestInitVarInInitBlock
BLOCK_BODY BLOCK_BODY
CALL '<set-x>(Int): Unit' type=kotlin.Unit operator=EQ CALL '<set-x>(Int): Unit' type=kotlin.Unit origin=EQ
$this: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock $this: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock
<set-?>: CONST Int type=kotlin.Int value='0' <set-?>: CONST Int type=kotlin.Int value='0'
CLASS CLASS TestInitVarWithCustomSetter CLASS CLASS TestInitVarWithCustomSetter
@@ -71,27 +71,27 @@ FILE /initVar.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarWithCustomSetter' type=TestInitVarWithCustomSetter receiver: THIS of 'TestInitVarWithCustomSetter' type=TestInitVarWithCustomSetter
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ SET_BACKING_FIELD 'x: Int' type=kotlin.Unit origin=EQ
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
CLASS CLASS TestInitVarWithCustomSetterWithExplicitCtor CLASS CLASS TestInitVarWithCustomSetterWithExplicitCtor
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarWithCustomSetterWithExplicitCtor' type=TestInitVarWithCustomSetterWithExplicitCtor receiver: THIS of 'TestInitVarWithCustomSetterWithExplicitCtor' type=TestInitVarWithCustomSetterWithExplicitCtor
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ SET_BACKING_FIELD 'x: Int' type=kotlin.Unit origin=EQ
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
ANONYMOUS_INITIALIZER TestInitVarWithCustomSetterWithExplicitCtor ANONYMOUS_INITIALIZER TestInitVarWithCustomSetterWithExplicitCtor
BLOCK_BODY BLOCK_BODY
CALL '<set-x>(Int): Unit' type=kotlin.Unit operator=EQ CALL '<set-x>(Int): Unit' type=kotlin.Unit origin=EQ
$this: THIS of 'TestInitVarWithCustomSetterWithExplicitCtor' type=TestInitVarWithCustomSetterWithExplicitCtor $this: THIS of 'TestInitVarWithCustomSetterWithExplicitCtor' type=TestInitVarWithCustomSetterWithExplicitCtor
value: CONST Int type=kotlin.Int value='0' value: CONST Int type=kotlin.Int value='0'
CONSTRUCTOR public constructor TestInitVarWithCustomSetterWithExplicitCtor() CONSTRUCTOR public constructor TestInitVarWithCustomSetterWithExplicitCtor()
@@ -104,16 +104,16 @@ FILE /initVar.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitVarWithCustomSetterInCtor' type=TestInitVarWithCustomSetterInCtor receiver: THIS of 'TestInitVarWithCustomSetterInCtor' type=TestInitVarWithCustomSetterInCtor
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ SET_BACKING_FIELD 'x: Int' type=kotlin.Unit origin=EQ
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
CONSTRUCTOR public constructor TestInitVarWithCustomSetterInCtor() CONSTRUCTOR public constructor TestInitVarWithCustomSetterInCtor()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetterInCtor' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetterInCtor'
CALL '<set-x>(Int): Unit' type=kotlin.Unit operator=EQ CALL '<set-x>(Int): Unit' type=kotlin.Unit origin=EQ
$this: THIS of 'TestInitVarWithCustomSetterInCtor' type=TestInitVarWithCustomSetterInCtor $this: THIS of 'TestInitVarWithCustomSetterInCtor' type=TestInitVarWithCustomSetterInCtor
value: CONST Int type=kotlin.Int value='42' value: CONST Int type=kotlin.Int value='42'
+2 -2
View File
@@ -8,5 +8,5 @@ FILE /localClasses.kt
INSTANCE_INITIALIZER_CALL classDescriptor='LocalClass' INSTANCE_INITIALIZER_CALL classDescriptor='LocalClass'
FUN public final fun foo(): kotlin.Unit FUN public final fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'foo(): Unit' type=kotlin.Unit operator=null CALL 'foo(): Unit' type=kotlin.Unit origin=null
$this: CALL 'constructor LocalClass()' type=outer.LocalClass operator=null $this: CALL 'constructor LocalClass()' type=outer.LocalClass origin=null
@@ -4,21 +4,21 @@ FILE /objectLiteralExpressions.kt
PROPERTY public val test1: kotlin.Any PROPERTY public val test1: kotlin.Any
FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.Any FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.Any
EXPRESSION_BODY EXPRESSION_BODY
BLOCK type=test1.<no name provided> operator=OBJECT_LITERAL BLOCK type=test1.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS <no name provided> CLASS CLASS <no name provided>
CONSTRUCTOR public constructor <no name provided>() CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>' INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
CALL 'constructor <no name provided>()' type=test1.<no name provided> operator=OBJECT_LITERAL CALL 'constructor <no name provided>()' type=test1.<no name provided> origin=OBJECT_LITERAL
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): kotlin.Any FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): kotlin.Any
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): Any' RETURN type=kotlin.Nothing from='<get-test1>(): Any'
GET_BACKING_FIELD 'test1: Any' type=kotlin.Any operator=null GET_BACKING_FIELD 'test1: Any' type=kotlin.Any origin=null
PROPERTY public val test2: IFoo PROPERTY public val test2: IFoo
FIELD PROPERTY_BACKING_FIELD public val test2: IFoo FIELD PROPERTY_BACKING_FIELD public val test2: IFoo
EXPRESSION_BODY EXPRESSION_BODY
BLOCK type=test2.<no name provided> operator=OBJECT_LITERAL BLOCK type=test2.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS <no name provided> CLASS CLASS <no name provided>
CONSTRUCTOR public constructor <no name provided>() CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY BLOCK_BODY
@@ -26,13 +26,13 @@ FILE /objectLiteralExpressions.kt
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>' INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
FUN public open override fun foo(): kotlin.Unit FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='foo' message: CONST String type=kotlin.String value='foo'
CALL 'constructor <no name provided>()' type=test2.<no name provided> operator=OBJECT_LITERAL CALL 'constructor <no name provided>()' type=test2.<no name provided> origin=OBJECT_LITERAL
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): IFoo FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): IFoo
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): IFoo' RETURN type=kotlin.Nothing from='<get-test2>(): IFoo'
GET_BACKING_FIELD 'test2: IFoo' type=IFoo operator=null GET_BACKING_FIELD 'test2: IFoo' type=IFoo origin=null
CLASS CLASS Outer CLASS CLASS Outer
CONSTRUCTOR public constructor Outer() CONSTRUCTOR public constructor Outer()
BLOCK_BODY BLOCK_BODY
@@ -46,7 +46,7 @@ FILE /objectLiteralExpressions.kt
FUN public final fun test3(): Outer.Inner FUN public final fun test3(): Outer.Inner
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='test3(): Outer.Inner' RETURN type=kotlin.Nothing from='test3(): Outer.Inner'
BLOCK type=Outer.test3.<no name provided> operator=OBJECT_LITERAL BLOCK type=Outer.test3.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS <no name provided> CLASS CLASS <no name provided>
CONSTRUCTOR public constructor <no name provided>() CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY BLOCK_BODY
@@ -55,13 +55,13 @@ FILE /objectLiteralExpressions.kt
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>' INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
FUN public open override fun foo(): kotlin.Unit FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='foo' message: CONST String type=kotlin.String value='foo'
CALL 'constructor <no name provided>()' type=Outer.test3.<no name provided> operator=OBJECT_LITERAL CALL 'constructor <no name provided>()' type=Outer.test3.<no name provided> origin=OBJECT_LITERAL
FUN public fun Outer.test4(): Outer.Inner FUN public fun Outer.test4(): Outer.Inner
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='test4() on Outer: Outer.Inner' RETURN type=kotlin.Nothing from='test4() on Outer: Outer.Inner'
BLOCK type=test4.<no name provided> operator=OBJECT_LITERAL BLOCK type=test4.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS <no name provided> CLASS CLASS <no name provided>
CONSTRUCTOR public constructor <no name provided>() CONSTRUCTOR public constructor <no name provided>()
BLOCK_BODY BLOCK_BODY
@@ -70,6 +70,6 @@ FILE /objectLiteralExpressions.kt
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>' INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
FUN public open override fun foo(): kotlin.Unit FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='foo' message: CONST String type=kotlin.String value='foo'
CALL 'constructor <no name provided>()' type=test4.<no name provided> operator=OBJECT_LITERAL CALL 'constructor <no name provided>()' type=test4.<no name provided> origin=OBJECT_LITERAL
@@ -16,18 +16,18 @@ FILE /objectWithInitializers.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test' type=Test receiver: THIS of 'Test' type=Test
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int' RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test' type=Test receiver: THIS of 'Test' type=Test
ANONYMOUS_INITIALIZER Test ANONYMOUS_INITIALIZER Test
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'y: Int' type=kotlin.Unit origin=null
receiver: THIS of 'Test' type=Test receiver: THIS of 'Test' type=Test
value: CALL '<get-x>(): Int' type=kotlin.Int operator=GET_PROPERTY value: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'Test' type=Test $this: THIS of 'Test' type=Test
+13 -13
View File
@@ -7,20 +7,20 @@ FILE /primaryConstructor.kt
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test1' type=Test1 receiver: THIS of 'Test1' type=Test1
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int' RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test1' type=Test1 receiver: THIS of 'Test1' type=Test1
CLASS CLASS Test2 CLASS CLASS Test2
CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.Int) CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.Int)
@@ -30,20 +30,20 @@ FILE /primaryConstructor.kt
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int' RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test2' type=Test2 receiver: THIS of 'Test2' type=Test2
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test2' type=Test2 receiver: THIS of 'Test2' type=Test2
CLASS CLASS Test3 CLASS CLASS Test3
CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.Int) CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.Int)
@@ -53,21 +53,21 @@ FILE /primaryConstructor.kt
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int' RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test3' type=Test3 receiver: THIS of 'Test3' type=Test3
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test3' type=Test3 receiver: THIS of 'Test3' type=Test3
ANONYMOUS_INITIALIZER Test3 ANONYMOUS_INITIALIZER Test3
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'Test3' type=Test3 receiver: THIS of 'Test3' type=Test3
value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
@@ -22,23 +22,23 @@ FILE /primaryConstructorWithSuperConstructorCall.kt
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestWithDelegatingConstructor' type=TestWithDelegatingConstructor receiver: THIS of 'TestWithDelegatingConstructor' type=TestWithDelegatingConstructor
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int' RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestWithDelegatingConstructor' type=TestWithDelegatingConstructor receiver: THIS of 'TestWithDelegatingConstructor' type=TestWithDelegatingConstructor
CONSTRUCTOR public constructor TestWithDelegatingConstructor(x: kotlin.Int) CONSTRUCTOR public constructor TestWithDelegatingConstructor(x: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor TestWithDelegatingConstructor(Int, Int)' DELEGATING_CONSTRUCTOR_CALL 'constructor TestWithDelegatingConstructor(Int, Int)'
x: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
y: CONST Int type=kotlin.Int value='0' y: CONST Int type=kotlin.Int value='0'
@@ -22,16 +22,16 @@ FILE /qualifiedSuperCalls.kt
INSTANCE_INITIALIZER_CALL classDescriptor='CBoth' INSTANCE_INITIALIZER_CALL classDescriptor='CBoth'
FUN public open override fun foo(): kotlin.Unit FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'foo(): Unit' superQualifier=ILeft type=kotlin.Unit operator=null CALL 'foo(): Unit' superQualifier=ILeft type=kotlin.Unit origin=null
$this: THIS of 'CBoth' type=ILeft $this: THIS of 'CBoth' type=ILeft
CALL 'foo(): Unit' superQualifier=IRight type=kotlin.Unit operator=null CALL 'foo(): Unit' superQualifier=IRight type=kotlin.Unit origin=null
$this: THIS of 'CBoth' type=IRight $this: THIS of 'CBoth' type=IRight
PROPERTY public open override val bar: kotlin.Int PROPERTY public open override val bar: kotlin.Int
FUN public open override fun <get-bar>(): kotlin.Int FUN public open override fun <get-bar>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): Int' RETURN type=kotlin.Nothing from='<get-bar>(): Int'
CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS
$this: CALL '<get-bar>(): Int' superQualifier=ILeft type=kotlin.Int operator=GET_PROPERTY $this: CALL '<get-bar>(): Int' superQualifier=ILeft type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'CBoth' type=ILeft $this: THIS of 'CBoth' type=ILeft
other: CALL '<get-bar>(): Int' superQualifier=IRight type=kotlin.Int operator=GET_PROPERTY other: CALL '<get-bar>(): Int' superQualifier=IRight type=kotlin.Int origin=GET_PROPERTY
$this: THIS of 'CBoth' type=IRight $this: THIS of 'CBoth' type=IRight
+6 -6
View File
@@ -12,11 +12,11 @@ FILE /sealedClasses.kt
PROPERTY public final val number: kotlin.Double PROPERTY public final val number: kotlin.Double
FIELD PROPERTY_BACKING_FIELD public final val number: kotlin.Double FIELD PROPERTY_BACKING_FIELD public final val number: kotlin.Double
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter number: Double' type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter number: Double' type=kotlin.Double origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-number>(): kotlin.Double FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-number>(): kotlin.Double
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-number>(): Double' RETURN type=kotlin.Nothing from='<get-number>(): Double'
GET_BACKING_FIELD 'number: Double' type=kotlin.Double operator=null GET_BACKING_FIELD 'number: Double' type=kotlin.Double origin=null
receiver: THIS of 'Const' type=Expr.Const receiver: THIS of 'Const' type=Expr.Const
CLASS CLASS Sum CLASS CLASS Sum
CONSTRUCTOR public constructor Sum(e1: Expr, e2: Expr) CONSTRUCTOR public constructor Sum(e1: Expr, e2: Expr)
@@ -26,20 +26,20 @@ FILE /sealedClasses.kt
PROPERTY public final val e1: Expr PROPERTY public final val e1: Expr
FIELD PROPERTY_BACKING_FIELD public final val e1: Expr FIELD PROPERTY_BACKING_FIELD public final val e1: Expr
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter e1: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter e1: Expr' type=Expr origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-e1>(): Expr FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-e1>(): Expr
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-e1>(): Expr' RETURN type=kotlin.Nothing from='<get-e1>(): Expr'
GET_BACKING_FIELD 'e1: Expr' type=Expr operator=null GET_BACKING_FIELD 'e1: Expr' type=Expr origin=null
receiver: THIS of 'Sum' type=Expr.Sum receiver: THIS of 'Sum' type=Expr.Sum
PROPERTY public final val e2: Expr PROPERTY public final val e2: Expr
FIELD PROPERTY_BACKING_FIELD public final val e2: Expr FIELD PROPERTY_BACKING_FIELD public final val e2: Expr
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter e2: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter e2: Expr' type=Expr origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-e2>(): Expr FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-e2>(): Expr
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-e2>(): Expr' RETURN type=kotlin.Nothing from='<get-e2>(): Expr'
GET_BACKING_FIELD 'e2: Expr' type=Expr operator=null GET_BACKING_FIELD 'e2: Expr' type=Expr origin=null
receiver: THIS of 'Sum' type=Expr.Sum receiver: THIS of 'Sum' type=Expr.Sum
CLASS OBJECT NotANumber CLASS OBJECT NotANumber
CONSTRUCTOR private constructor NotANumber() CONSTRUCTOR private constructor NotANumber()
@@ -12,7 +12,7 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestProperty' type=TestProperty receiver: THIS of 'TestProperty' type=TestProperty
CONSTRUCTOR public constructor TestProperty() CONSTRUCTOR public constructor TestProperty()
BLOCK_BODY BLOCK_BODY
@@ -24,11 +24,11 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'TestInitBlock' type=TestInitBlock receiver: THIS of 'TestInitBlock' type=TestInitBlock
ANONYMOUS_INITIALIZER TestInitBlock ANONYMOUS_INITIALIZER TestInitBlock
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'TestInitBlock' type=TestInitBlock receiver: THIS of 'TestInitBlock' type=TestInitBlock
value: CONST Int type=kotlin.Int value='0' value: CONST Int type=kotlin.Int value='0'
CONSTRUCTOR public constructor TestInitBlock() CONSTRUCTOR public constructor TestInitBlock()
+3 -3
View File
@@ -13,7 +13,7 @@ FILE /superCalls.kt
FUN DEFAULT_PROPERTY_ACCESSOR public open fun <get-bar>(): kotlin.String FUN DEFAULT_PROPERTY_ACCESSOR public open fun <get-bar>(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): String' RETURN type=kotlin.Nothing from='<get-bar>(): String'
GET_BACKING_FIELD 'bar: String' type=kotlin.String operator=null GET_BACKING_FIELD 'bar: String' type=kotlin.String origin=null
receiver: THIS of 'Base' type=Base receiver: THIS of 'Base' type=Base
CLASS CLASS Derived CLASS CLASS Derived
CONSTRUCTOR public constructor Derived() CONSTRUCTOR public constructor Derived()
@@ -22,11 +22,11 @@ FILE /superCalls.kt
INSTANCE_INITIALIZER_CALL classDescriptor='Derived' INSTANCE_INITIALIZER_CALL classDescriptor='Derived'
FUN public open override fun foo(): kotlin.Unit FUN public open override fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'foo(): Unit' superQualifier=Base type=kotlin.Unit operator=null CALL 'foo(): Unit' superQualifier=Base type=kotlin.Unit origin=null
$this: THIS of 'Derived' type=Base $this: THIS of 'Derived' type=Base
PROPERTY public open override val bar: kotlin.String PROPERTY public open override val bar: kotlin.String
FUN public open override fun <get-bar>(): kotlin.String FUN public open override fun <get-bar>(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): String' RETURN type=kotlin.Nothing from='<get-bar>(): String'
CALL '<get-bar>(): String' superQualifier=Base type=kotlin.String operator=GET_PROPERTY CALL '<get-bar>(): String' superQualifier=Base type=kotlin.String origin=GET_PROPERTY
$this: THIS of 'Derived' type=Base $this: THIS of 'Derived' type=Base
@@ -11,7 +11,7 @@ FILE /classLevelProperties.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test1>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test1>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): Int' RETURN type=kotlin.Nothing from='<get-test1>(): Int'
GET_BACKING_FIELD 'test1: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test1: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
PROPERTY public final val test2: kotlin.Int PROPERTY public final val test2: kotlin.Int
FUN public final fun <get-test2>(): kotlin.Int FUN public final fun <get-test2>(): kotlin.Int
@@ -25,13 +25,13 @@ FILE /classLevelProperties.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test3>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test3>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): Int' RETURN type=kotlin.Nothing from='<get-test3>(): Int'
GET_BACKING_FIELD 'test3: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test3: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-test3>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-test3>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'test3: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'test3: Int' type=kotlin.Unit origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY public final var test4: kotlin.Int PROPERTY public final var test4: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final var test4: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final var test4: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
@@ -39,12 +39,12 @@ FILE /classLevelProperties.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test4>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test4>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test4>(): Int' RETURN type=kotlin.Nothing from='<get-test4>(): Int'
GET_BACKING_FIELD 'test4: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test4: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
FUN public final fun <set-test4>(value: kotlin.Int): kotlin.Unit FUN public final fun <set-test4>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'test4: Int' type=kotlin.Unit operator=EQ SET_BACKING_FIELD 'test4: Int' type=kotlin.Unit origin=EQ
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
PROPERTY public final var test5: kotlin.Int PROPERTY public final var test5: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final var test5: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final var test5: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
@@ -52,13 +52,13 @@ FILE /classLevelProperties.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test5>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test5>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test5>(): Int' RETURN type=kotlin.Nothing from='<get-test5>(): Int'
GET_BACKING_FIELD 'test5: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test5: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
FUN private final fun <set-test5>(<set-?>: kotlin.Int): kotlin.Unit FUN private final fun <set-test5>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'test5: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'test5: Int' type=kotlin.Unit origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY public final val test6: kotlin.Int = 1 PROPERTY public final val test6: kotlin.Int = 1
FIELD PROPERTY_BACKING_FIELD public final val test6: kotlin.Int = 1 FIELD PROPERTY_BACKING_FIELD public final val test6: kotlin.Int = 1
EXPRESSION_BODY EXPRESSION_BODY
@@ -66,44 +66,44 @@ FILE /classLevelProperties.kt
FUN public final fun <get-test6>(): kotlin.Int FUN public final fun <get-test6>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test6>(): Int' RETURN type=kotlin.Nothing from='<get-test6>(): Int'
GET_BACKING_FIELD 'test6: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test6: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
PROPERTY public final val test7: kotlin.Int PROPERTY public final val test7: kotlin.Int
FIELD DELEGATE val `test7$delegate`: kotlin.Lazy<kotlin.Int> FIELD DELEGATE val `test7$delegate`: kotlin.Lazy<kotlin.Int>
EXPRESSION_BODY EXPRESSION_BODY
CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> origin=null
initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Int' RETURN type=kotlin.Nothing from='<anonymous>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int origin=LAMBDA
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test7>(): kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test7>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test7>(): Int' RETURN type=kotlin.Nothing from='<get-test7>(): Int'
CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int origin=null
$receiver: GET_BACKING_FIELD '`test7$delegate`: Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null $receiver: GET_BACKING_FIELD '`test7$delegate`: Lazy<Int>' type=kotlin.Lazy<kotlin.Int> origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
thisRef: THIS of 'C' type=C thisRef: THIS of 'C' type=C
property: CALLABLE_REFERENCE 'test7: Int' type=kotlin.reflect.KProperty1<C, kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test7: Int' type=kotlin.reflect.KProperty1<C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
PROPERTY public final var test8: kotlin.Int PROPERTY public final var test8: kotlin.Int
FIELD DELEGATE val `test8$delegate`: java.util.HashMap<kotlin.String, kotlin.Int> FIELD DELEGATE val `test8$delegate`: java.util.HashMap<kotlin.String, kotlin.Int>
EXPRESSION_BODY EXPRESSION_BODY
CALL 'hashMapOf(vararg Pair<String, Int>): HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null CALL 'hashMapOf(vararg Pair<String, Int>): HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test8>(): kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test8>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test8>(): Int' RETURN type=kotlin.Nothing from='<get-test8>(): Int'
CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Int>: Int' type=kotlin.Int origin=null
$receiver: GET_BACKING_FIELD '`test8$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null $receiver: GET_BACKING_FIELD '`test8$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
thisRef: THIS of 'C' type=C thisRef: THIS of 'C' type=C
property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty1<C, kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty1<C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <set-test8>(<set-?>: kotlin.Int): kotlin.Unit FUN DELEGATED_PROPERTY_ACCESSOR public final fun <set-test8>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<set-test8>(Int): Unit' RETURN type=kotlin.Nothing from='<set-test8>(Int): Unit'
CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap<in String, in Int>: Unit' type=kotlin.Unit operator=null CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap<in String, in Int>: Unit' type=kotlin.Unit origin=null
$receiver: GET_BACKING_FIELD '`test8$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null $receiver: GET_BACKING_FIELD '`test8$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
thisRef: THIS of 'C' type=C thisRef: THIS of 'C' type=C
property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty1<C, kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty1<C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
@@ -2,20 +2,20 @@ FILE /delegatedProperties.kt
PROPERTY public val test1: kotlin.Int PROPERTY public val test1: kotlin.Int
FIELD DELEGATE val `test1$delegate`: kotlin.Lazy<kotlin.Int> FIELD DELEGATE val `test1$delegate`: kotlin.Lazy<kotlin.Int>
EXPRESSION_BODY EXPRESSION_BODY
CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> origin=null
initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Int' RETURN type=kotlin.Nothing from='<anonymous>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int origin=LAMBDA
FUN DELEGATED_PROPERTY_ACCESSOR public fun <get-test1>(): kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR public fun <get-test1>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): Int' RETURN type=kotlin.Nothing from='<get-test1>(): Int'
CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int origin=null
$receiver: GET_BACKING_FIELD '`test1$delegate`: Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null $receiver: GET_BACKING_FIELD '`test1$delegate`: Lazy<Int>' type=kotlin.Lazy<kotlin.Int> origin=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'test1: Int' type=kotlin.reflect.KProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test1: Int' type=kotlin.reflect.KProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
CLASS CLASS C CLASS CLASS C
CONSTRUCTOR public constructor C(map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>) CONSTRUCTOR public constructor C(map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>)
BLOCK_BODY BLOCK_BODY
@@ -24,68 +24,68 @@ FILE /delegatedProperties.kt
PROPERTY public final val map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any> PROPERTY public final val map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
FIELD PROPERTY_BACKING_FIELD public final val map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any> FIELD PROPERTY_BACKING_FIELD public final val map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter map: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter map: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-map>(): kotlin.collections.MutableMap<kotlin.String, kotlin.Any> FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-map>(): kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-map>(): MutableMap<String, Any>' RETURN type=kotlin.Nothing from='<get-map>(): MutableMap<String, Any>'
GET_BACKING_FIELD 'map: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=null GET_BACKING_FIELD 'map: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
PROPERTY public final val test2: kotlin.Int PROPERTY public final val test2: kotlin.Int
FIELD DELEGATE val `test2$delegate`: kotlin.Lazy<kotlin.Int> FIELD DELEGATE val `test2$delegate`: kotlin.Lazy<kotlin.Int>
EXPRESSION_BODY EXPRESSION_BODY
CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> origin=null
initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Int' RETURN type=kotlin.Nothing from='<anonymous>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int origin=LAMBDA
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test2>(): kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test2>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): Int' RETURN type=kotlin.Nothing from='<get-test2>(): Int'
CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int origin=null
$receiver: GET_BACKING_FIELD '`test2$delegate`: Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null $receiver: GET_BACKING_FIELD '`test2$delegate`: Lazy<Int>' type=kotlin.Lazy<kotlin.Int> origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
thisRef: THIS of 'C' type=C thisRef: THIS of 'C' type=C
property: CALLABLE_REFERENCE 'test2: Int' type=kotlin.reflect.KProperty1<C, kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test2: Int' type=kotlin.reflect.KProperty1<C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
PROPERTY public final var test3: kotlin.Any PROPERTY public final var test3: kotlin.Any
FIELD DELEGATE val `test3$delegate`: kotlin.collections.MutableMap<kotlin.String, kotlin.Any> FIELD DELEGATE val `test3$delegate`: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
EXPRESSION_BODY EXPRESSION_BODY
CALL '<get-map>(): MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=GET_PROPERTY CALL '<get-map>(): MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=GET_PROPERTY
$this: THIS of 'C' type=C $this: THIS of 'C' type=C
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test3>(): kotlin.Any FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test3>(): kotlin.Any
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): Any' RETURN type=kotlin.Nothing from='<get-test3>(): Any'
CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Any>: Any' type=kotlin.Any operator=null CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Any>: Any' type=kotlin.Any origin=null
$receiver: GET_BACKING_FIELD '`test3$delegate`: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=null $receiver: GET_BACKING_FIELD '`test3$delegate`: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
thisRef: THIS of 'C' type=C thisRef: THIS of 'C' type=C
property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> origin=PROPERTY_REFERENCE_FOR_DELEGATE
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <set-test3>(<set-?>: kotlin.Any): kotlin.Unit FUN DELEGATED_PROPERTY_ACCESSOR public final fun <set-test3>(<set-?>: kotlin.Any): kotlin.Unit
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<set-test3>(Any): Unit' RETURN type=kotlin.Nothing from='<set-test3>(Any): Unit'
CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap<in String, in Any>: Unit' type=kotlin.Unit operator=null CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap<in String, in Any>: Unit' type=kotlin.Unit origin=null
$receiver: GET_BACKING_FIELD '`test3$delegate`: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=null $receiver: GET_BACKING_FIELD '`test3$delegate`: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
thisRef: THIS of 'C' type=C thisRef: THIS of 'C' type=C
property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> origin=PROPERTY_REFERENCE_FOR_DELEGATE
value: GET_VAR 'value-parameter <set-?>: Any' type=kotlin.Any operator=null value: GET_VAR 'value-parameter <set-?>: Any' type=kotlin.Any origin=null
PROPERTY public var test4: kotlin.Any PROPERTY public var test4: kotlin.Any
FIELD DELEGATE val `test4$delegate`: java.util.HashMap<kotlin.String, kotlin.Any> FIELD DELEGATE val `test4$delegate`: java.util.HashMap<kotlin.String, kotlin.Any>
EXPRESSION_BODY EXPRESSION_BODY
CALL 'hashMapOf(vararg Pair<String, Any>): HashMap<String, Any>' type=java.util.HashMap<kotlin.String, kotlin.Any> operator=null CALL 'hashMapOf(vararg Pair<String, Any>): HashMap<String, Any>' type=java.util.HashMap<kotlin.String, kotlin.Any> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR public fun <get-test4>(): kotlin.Any FUN DELEGATED_PROPERTY_ACCESSOR public fun <get-test4>(): kotlin.Any
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test4>(): Any' RETURN type=kotlin.Nothing from='<get-test4>(): Any'
CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Any>: Any' type=kotlin.Any operator=null CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Any>: Any' type=kotlin.Any origin=null
$receiver: GET_BACKING_FIELD '`test4$delegate`: HashMap<String, Any>' type=java.util.HashMap<kotlin.String, kotlin.Any> operator=null $receiver: GET_BACKING_FIELD '`test4$delegate`: HashMap<String, Any>' type=java.util.HashMap<kotlin.String, kotlin.Any> origin=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'test4: Any' type=kotlin.reflect.KMutableProperty0<kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test4: Any' type=kotlin.reflect.KMutableProperty0<kotlin.Any> origin=PROPERTY_REFERENCE_FOR_DELEGATE
FUN DELEGATED_PROPERTY_ACCESSOR public fun <set-test4>(<set-?>: kotlin.Any): kotlin.Unit FUN DELEGATED_PROPERTY_ACCESSOR public fun <set-test4>(<set-?>: kotlin.Any): kotlin.Unit
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<set-test4>(Any): Unit' RETURN type=kotlin.Nothing from='<set-test4>(Any): Unit'
CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap<in String, in Any>: Unit' type=kotlin.Unit operator=null CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap<in String, in Any>: Unit' type=kotlin.Unit origin=null
$receiver: GET_BACKING_FIELD '`test4$delegate`: HashMap<String, Any>' type=java.util.HashMap<kotlin.String, kotlin.Any> operator=null $receiver: GET_BACKING_FIELD '`test4$delegate`: HashMap<String, Any>' type=java.util.HashMap<kotlin.String, kotlin.Any> origin=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'test4: Any' type=kotlin.reflect.KMutableProperty0<kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test4: Any' type=kotlin.reflect.KMutableProperty0<kotlin.Any> origin=PROPERTY_REFERENCE_FOR_DELEGATE
value: GET_VAR 'value-parameter <set-?>: Any' type=kotlin.Any operator=null value: GET_VAR 'value-parameter <set-?>: Any' type=kotlin.Any origin=null
@@ -10,4 +10,4 @@ FILE /fileWithAnnotations.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-bar>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-bar>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): Int' RETURN type=kotlin.Nothing from='<get-bar>(): Int'
GET_BACKING_FIELD 'bar: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'bar: Int' type=kotlin.Int origin=null
@@ -3,53 +3,53 @@ FILE /localDelegatedProperties.kt
BLOCK_BODY BLOCK_BODY
LOCAL_DELEGATED_PROPERTY val x: kotlin.Int LOCAL_DELEGATED_PROPERTY val x: kotlin.Int
VAR DELEGATE val `x$delegate`: kotlin.Lazy<kotlin.Int> VAR DELEGATE val `x$delegate`: kotlin.Lazy<kotlin.Int>
CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> origin=null
initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Int' RETURN type=kotlin.Nothing from='<anonymous>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int origin=LAMBDA
FUN DELEGATED_PROPERTY_ACCESSOR local final fun <get-x>(): kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR local final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int origin=null
$receiver: GET_VAR '`x$delegate`: Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null $receiver: GET_VAR '`x$delegate`: Lazy<Int>' type=kotlin.Lazy<kotlin.Int> origin=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
CALL 'println(Int): Unit' type=kotlin.Unit operator=null CALL 'println(Int): Unit' type=kotlin.Unit origin=null
message: CALL '<get-x>(): Int' type=kotlin.Int operator=GET_LOCAL_PROPERTY message: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_LOCAL_PROPERTY
FUN public fun test2(): kotlin.Unit FUN public fun test2(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
LOCAL_DELEGATED_PROPERTY var x: kotlin.Int LOCAL_DELEGATED_PROPERTY var x: kotlin.Int
VAR DELEGATE val `x$delegate`: java.util.HashMap<kotlin.String, kotlin.Int> VAR DELEGATE val `x$delegate`: java.util.HashMap<kotlin.String, kotlin.Int>
CALL 'hashMapOf(vararg Pair<String, Int>): HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null CALL 'hashMapOf(vararg Pair<String, Int>): HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR local final fun <get-x>(): kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR local final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Int>: Int' type=kotlin.Int origin=null
$receiver: GET_VAR '`x$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null $receiver: GET_VAR '`x$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
FUN DELEGATED_PROPERTY_ACCESSOR local final fun <set-x>(value: kotlin.Int): kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR local final fun <set-x>(value: kotlin.Int): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<set-x>(Int): Int' RETURN type=kotlin.Nothing from='<set-x>(Int): Int'
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.Int
CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap<in String, in Int>: Unit' type=kotlin.Unit operator=null CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap<in String, in Int>: Unit' type=kotlin.Unit origin=null
$receiver: GET_VAR '`x$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null $receiver: GET_VAR '`x$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
CALL '<set-x>(Int): Int' type=kotlin.Int operator=EQ CALL '<set-x>(Int): Int' type=kotlin.Int origin=EQ
value: CONST Int type=kotlin.Int value='0' value: CONST Int type=kotlin.Int value='0'
BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int
CALL '<get-x>(): Int' type=kotlin.Int operator=POSTFIX_INCR CALL '<get-x>(): Int' type=kotlin.Int origin=POSTFIX_INCR
CALL '<set-x>(Int): Int' type=kotlin.Int operator=POSTFIX_INCR CALL '<set-x>(Int): Int' type=kotlin.Int origin=POSTFIX_INCR
value: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR value: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp0: Int' type=kotlin.Int operator=null $this: GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
GET_VAR 'tmp0: Int' type=kotlin.Int operator=null GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
CALL '<set-x>(Int): Int' type=kotlin.Int operator=PLUSEQ CALL '<set-x>(Int): Int' type=kotlin.Int origin=PLUSEQ
value: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ value: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ
$this: CALL '<get-x>(): Int' type=kotlin.Int operator=PLUSEQ $this: CALL '<get-x>(): Int' type=kotlin.Int origin=PLUSEQ
other: CONST Int type=kotlin.Int value='1' other: CONST Int type=kotlin.Int value='1'
@@ -6,7 +6,7 @@ FILE /packageLevelProperties.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): Int' RETURN type=kotlin.Nothing from='<get-test1>(): Int'
GET_BACKING_FIELD 'test1: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test1: Int' type=kotlin.Int origin=null
PROPERTY public val test2: kotlin.Int PROPERTY public val test2: kotlin.Int
FUN public fun <get-test2>(): kotlin.Int FUN public fun <get-test2>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
@@ -19,11 +19,11 @@ FILE /packageLevelProperties.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test3>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test3>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): Int' RETURN type=kotlin.Nothing from='<get-test3>(): Int'
GET_BACKING_FIELD 'test3: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test3: Int' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public fun <set-test3>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public fun <set-test3>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'test3: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'test3: Int' type=kotlin.Unit origin=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY public var test4: kotlin.Int PROPERTY public var test4: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public var test4: kotlin.Int FIELD PROPERTY_BACKING_FIELD public var test4: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
@@ -31,11 +31,11 @@ FILE /packageLevelProperties.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test4>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test4>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test4>(): Int' RETURN type=kotlin.Nothing from='<get-test4>(): Int'
GET_BACKING_FIELD 'test4: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test4: Int' type=kotlin.Int origin=null
FUN public fun <set-test4>(value: kotlin.Int): kotlin.Unit FUN public fun <set-test4>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'test4: Int' type=kotlin.Unit operator=EQ SET_BACKING_FIELD 'test4: Int' type=kotlin.Unit origin=EQ
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
PROPERTY public var test5: kotlin.Int PROPERTY public var test5: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public var test5: kotlin.Int FIELD PROPERTY_BACKING_FIELD public var test5: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
@@ -43,11 +43,11 @@ FILE /packageLevelProperties.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test5>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test5>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test5>(): Int' RETURN type=kotlin.Nothing from='<get-test5>(): Int'
GET_BACKING_FIELD 'test5: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test5: Int' type=kotlin.Int origin=null
FUN private fun <set-test5>(<set-?>: kotlin.Int): kotlin.Unit FUN private fun <set-test5>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'test5: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'test5: Int' type=kotlin.Unit origin=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY public val test6: kotlin.Int = 1 PROPERTY public val test6: kotlin.Int = 1
FIELD PROPERTY_BACKING_FIELD public val test6: kotlin.Int = 1 FIELD PROPERTY_BACKING_FIELD public val test6: kotlin.Int = 1
EXPRESSION_BODY EXPRESSION_BODY
@@ -55,40 +55,40 @@ FILE /packageLevelProperties.kt
FUN public fun <get-test6>(): kotlin.Int FUN public fun <get-test6>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test6>(): Int' RETURN type=kotlin.Nothing from='<get-test6>(): Int'
GET_BACKING_FIELD 'test6: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test6: Int' type=kotlin.Int origin=null
PROPERTY public val test7: kotlin.Int PROPERTY public val test7: kotlin.Int
FIELD DELEGATE val `test7$delegate`: kotlin.Lazy<kotlin.Int> FIELD DELEGATE val `test7$delegate`: kotlin.Lazy<kotlin.Int>
EXPRESSION_BODY EXPRESSION_BODY
CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> origin=null
initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Int' RETURN type=kotlin.Nothing from='<anonymous>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int origin=LAMBDA
FUN DELEGATED_PROPERTY_ACCESSOR public fun <get-test7>(): kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR public fun <get-test7>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test7>(): Int' RETURN type=kotlin.Nothing from='<get-test7>(): Int'
CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int origin=null
$receiver: GET_BACKING_FIELD '`test7$delegate`: Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null $receiver: GET_BACKING_FIELD '`test7$delegate`: Lazy<Int>' type=kotlin.Lazy<kotlin.Int> origin=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'test7: Int' type=kotlin.reflect.KProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test7: Int' type=kotlin.reflect.KProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
PROPERTY public var test8: kotlin.Int PROPERTY public var test8: kotlin.Int
FIELD DELEGATE val `test8$delegate`: java.util.HashMap<kotlin.String, kotlin.Int> FIELD DELEGATE val `test8$delegate`: java.util.HashMap<kotlin.String, kotlin.Int>
EXPRESSION_BODY EXPRESSION_BODY
CALL 'hashMapOf(vararg Pair<String, Int>): HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null CALL 'hashMapOf(vararg Pair<String, Int>): HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR public fun <get-test8>(): kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR public fun <get-test8>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test8>(): Int' RETURN type=kotlin.Nothing from='<get-test8>(): Int'
CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Int>: Int' type=kotlin.Int origin=null
$receiver: GET_BACKING_FIELD '`test8$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null $receiver: GET_BACKING_FIELD '`test8$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
FUN DELEGATED_PROPERTY_ACCESSOR public fun <set-test8>(<set-?>: kotlin.Int): kotlin.Unit FUN DELEGATED_PROPERTY_ACCESSOR public fun <set-test8>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<set-test8>(Int): Unit' RETURN type=kotlin.Nothing from='<set-test8>(Int): Unit'
CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap<in String, in Int>: Unit' type=kotlin.Unit operator=null CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap<in String, in Int>: Unit' type=kotlin.Unit origin=null
$receiver: GET_BACKING_FIELD '`test8$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null $receiver: GET_BACKING_FIELD '`test8$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
@@ -9,9 +9,9 @@ FILE /primaryCtorDefaultArguments.kt
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int = ...' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Test' type=Test receiver: THIS of 'Test' type=Test
@@ -7,23 +7,23 @@ FILE /primaryCtorProperties.kt
PROPERTY public final val test1: kotlin.Int PROPERTY public final val test1: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val test1: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val test1: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter test1: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter test1: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test1>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test1>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): Int' RETURN type=kotlin.Nothing from='<get-test1>(): Int'
GET_BACKING_FIELD 'test1: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test1: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
PROPERTY public final var test2: kotlin.Int PROPERTY public final var test2: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final var test2: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final var test2: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter test2: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter test2: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test2>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test2>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): Int' RETURN type=kotlin.Nothing from='<get-test2>(): Int'
GET_BACKING_FIELD 'test2: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'test2: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-test2>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-test2>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'test2: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'test2: Int' type=kotlin.Unit origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
@@ -8,5 +8,5 @@ FILE /suppressedNonPublicCall.kt
BLOCK_BODY BLOCK_BODY
FUN public inline fun C.foo(): kotlin.Unit FUN public inline fun C.foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'bar(): Unit' type=kotlin.Unit operator=null CALL 'bar(): Unit' type=kotlin.Unit origin=null
$this: $RECEIVER of 'foo() on C: Unit' type=C $this: $RECEIVER of 'foo() on C: Unit' type=C
+4 -4
View File
@@ -6,7 +6,7 @@ FILE /unresolvedReference.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): [ERROR : Type for unresolved] FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): [ERROR : Type for unresolved]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): [ERROR : Type for unresolved]' RETURN type=kotlin.Nothing from='<get-test1>(): [ERROR : Type for unresolved]'
GET_BACKING_FIELD 'test1: [ERROR : Type for unresolved]' type=[ERROR : Type for unresolved] operator=null GET_BACKING_FIELD 'test1: [ERROR : Type for unresolved]' type=[ERROR : Type for unresolved] origin=null
PROPERTY public val test2: [ERROR : Unresolved] PROPERTY public val test2: [ERROR : Unresolved]
FIELD PROPERTY_BACKING_FIELD public val test2: [ERROR : Unresolved] FIELD PROPERTY_BACKING_FIELD public val test2: [ERROR : Unresolved]
EXPRESSION_BODY EXPRESSION_BODY
@@ -14,7 +14,7 @@ FILE /unresolvedReference.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): [ERROR : Unresolved] FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): [ERROR : Unresolved]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): [ERROR : Unresolved]' RETURN type=kotlin.Nothing from='<get-test2>(): [ERROR : Unresolved]'
GET_BACKING_FIELD 'test2: [ERROR : Unresolved]' type=[ERROR : Unresolved] operator=null GET_BACKING_FIELD 'test2: [ERROR : Unresolved]' type=[ERROR : Unresolved] origin=null
PROPERTY public val test3: [ERROR : Type for 42.unresolved(56)] PROPERTY public val test3: [ERROR : Type for 42.unresolved(56)]
FIELD PROPERTY_BACKING_FIELD public val test3: [ERROR : Type for 42.unresolved(56)] FIELD PROPERTY_BACKING_FIELD public val test3: [ERROR : Type for 42.unresolved(56)]
EXPRESSION_BODY EXPRESSION_BODY
@@ -24,7 +24,7 @@ FILE /unresolvedReference.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test3>(): [ERROR : Type for 42.unresolved(56)] FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test3>(): [ERROR : Type for 42.unresolved(56)]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): [ERROR : Type for 42.unresolved(56)]' RETURN type=kotlin.Nothing from='<get-test3>(): [ERROR : Type for 42.unresolved(56)]'
GET_BACKING_FIELD 'test3: [ERROR : Type for 42.unresolved(56)]' type=[ERROR : Type for 42.unresolved(56)] operator=null GET_BACKING_FIELD 'test3: [ERROR : Type for 42.unresolved(56)]' type=[ERROR : Type for 42.unresolved(56)] origin=null
PROPERTY public val test4: [ERROR : Type for 42 *] PROPERTY public val test4: [ERROR : Type for 42 *]
FIELD PROPERTY_BACKING_FIELD public val test4: [ERROR : Type for 42 *] FIELD PROPERTY_BACKING_FIELD public val test4: [ERROR : Type for 42 *]
EXPRESSION_BODY EXPRESSION_BODY
@@ -32,4 +32,4 @@ FILE /unresolvedReference.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test4>(): [ERROR : Type for 42 *] FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test4>(): [ERROR : Type for 42 *]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test4>(): [ERROR : Type for 42 *]' RETURN type=kotlin.Nothing from='<get-test4>(): [ERROR : Type for 42 *]'
GET_BACKING_FIELD 'test4: [ERROR : Type for 42 *]' type=[ERROR : Type for 42 *] operator=null GET_BACKING_FIELD 'test4: [ERROR : Type for 42 *]' type=[ERROR : Type for 42 *] origin=null
+11 -11
View File
@@ -6,7 +6,7 @@ FILE /arrayAccess.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-p>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-p>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-p>(): Int' RETURN type=kotlin.Nothing from='<get-p>(): Int'
GET_BACKING_FIELD 'p: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'p: Int' type=kotlin.Int origin=null
FUN public fun foo(): kotlin.Int FUN public fun foo(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='foo(): Int' RETURN type=kotlin.Nothing from='foo(): Int'
@@ -14,14 +14,14 @@ FILE /arrayAccess.kt
FUN public fun test(a: kotlin.IntArray): kotlin.Int FUN public fun test(a: kotlin.IntArray): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='test(IntArray): Int' RETURN type=kotlin.Nothing from='test(IntArray): Int'
CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS
$this: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS $this: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS
$this: CALL 'get(Int): Int' type=kotlin.Int operator=GET_ARRAY_ELEMENT $this: CALL 'get(Int): Int' type=kotlin.Int origin=GET_ARRAY_ELEMENT
$this: GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray origin=null
index: CONST Int type=kotlin.Int value='0' index: CONST Int type=kotlin.Int value='0'
other: CALL 'get(Int): Int' type=kotlin.Int operator=GET_ARRAY_ELEMENT other: CALL 'get(Int): Int' type=kotlin.Int origin=GET_ARRAY_ELEMENT
$this: GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray origin=null
index: CALL '<get-p>(): Int' type=kotlin.Int operator=GET_PROPERTY index: CALL '<get-p>(): Int' type=kotlin.Int origin=GET_PROPERTY
other: CALL 'get(Int): Int' type=kotlin.Int operator=GET_ARRAY_ELEMENT other: CALL 'get(Int): Int' type=kotlin.Int origin=GET_ARRAY_ELEMENT
$this: GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray origin=null
index: CALL 'foo(): Int' type=kotlin.Int operator=null index: CALL 'foo(): Int' type=kotlin.Int origin=null
@@ -2,13 +2,13 @@ FILE /arrayAssignment.kt
FUN public fun test(): kotlin.Unit FUN public fun test(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR val x: kotlin.IntArray VAR val x: kotlin.IntArray
CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray operator=null CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray origin=null
elements: VARARG type=IntArray varargElementType=Int elements: VARARG type=IntArray varargElementType=Int
CONST Int type=kotlin.Int value='1' CONST Int type=kotlin.Int value='1'
CONST Int type=kotlin.Int value='2' CONST Int type=kotlin.Int value='2'
CONST Int type=kotlin.Int value='3' CONST Int type=kotlin.Int value='3'
CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=EQ CALL 'set(Int, Int): Unit' type=kotlin.Unit origin=EQ
$this: GET_VAR 'x: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'x: IntArray' type=kotlin.IntArray origin=null
index: CONST Int type=kotlin.Int value='1' index: CONST Int type=kotlin.Int value='1'
value: CONST Int type=kotlin.Int value='0' value: CONST Int type=kotlin.Int value='0'
FUN public fun foo(): kotlin.Int FUN public fun foo(): kotlin.Int
@@ -17,11 +17,11 @@ FILE /arrayAssignment.kt
CONST Int type=kotlin.Int value='1' CONST Int type=kotlin.Int value='1'
FUN public fun test2(): kotlin.Unit FUN public fun test2(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=EQ CALL 'set(Int, Int): Unit' type=kotlin.Unit origin=EQ
$this: CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray operator=null $this: CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray origin=null
elements: VARARG type=IntArray varargElementType=Int elements: VARARG type=IntArray varargElementType=Int
CONST Int type=kotlin.Int value='1' CONST Int type=kotlin.Int value='1'
CONST Int type=kotlin.Int value='2' CONST Int type=kotlin.Int value='2'
CONST Int type=kotlin.Int value='3' CONST Int type=kotlin.Int value='3'
index: CALL 'foo(): Int' type=kotlin.Int operator=null index: CALL 'foo(): Int' type=kotlin.Int origin=null
value: CONST Int type=kotlin.Int value='1' value: CONST Int type=kotlin.Int value='1'
@@ -2,7 +2,7 @@ FILE /arrayAugmentedAssignment1.kt
FUN public fun foo(): kotlin.IntArray FUN public fun foo(): kotlin.IntArray
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='foo(): IntArray' RETURN type=kotlin.Nothing from='foo(): IntArray'
CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray operator=null CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray origin=null
elements: VARARG type=IntArray varargElementType=Int elements: VARARG type=IntArray varargElementType=Int
CONST Int type=kotlin.Int value='1' CONST Int type=kotlin.Int value='1'
CONST Int type=kotlin.Int value='2' CONST Int type=kotlin.Int value='2'
@@ -19,59 +19,59 @@ FILE /arrayAugmentedAssignment1.kt
PROPERTY public final val x: kotlin.IntArray PROPERTY public final val x: kotlin.IntArray
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.IntArray FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.IntArray
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: IntArray' type=kotlin.IntArray operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: IntArray' type=kotlin.IntArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.IntArray FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.IntArray
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): IntArray' RETURN type=kotlin.Nothing from='<get-x>(): IntArray'
GET_BACKING_FIELD 'x: IntArray' type=kotlin.IntArray operator=null GET_BACKING_FIELD 'x: IntArray' type=kotlin.IntArray origin=null
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
FUN public fun testVariable(): kotlin.Unit FUN public fun testVariable(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR var x: kotlin.IntArray VAR var x: kotlin.IntArray
CALL 'foo(): IntArray' type=kotlin.IntArray operator=null CALL 'foo(): IntArray' type=kotlin.IntArray origin=null
BLOCK type=kotlin.Unit operator=PLUSEQ BLOCK type=kotlin.Unit origin=PLUSEQ
VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray
GET_VAR 'x: IntArray' type=kotlin.IntArray operator=null GET_VAR 'x: IntArray' type=kotlin.IntArray origin=null
VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int
CONST Int type=kotlin.Int value='0' CONST Int type=kotlin.Int value='0'
CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=PLUSEQ CALL 'set(Int, Int): Unit' type=kotlin.Unit origin=PLUSEQ
$this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray origin=null
index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int origin=null
value: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ value: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'get(Int): Int' type=kotlin.Int operator=PLUSEQ $this: CALL 'get(Int): Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray origin=null
index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value='1' other: CONST Int type=kotlin.Int value='1'
FUN public fun testCall(): kotlin.Unit FUN public fun testCall(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
BLOCK type=kotlin.Unit operator=MULTEQ BLOCK type=kotlin.Unit origin=MULTEQ
VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray
CALL 'foo(): IntArray' type=kotlin.IntArray operator=null CALL 'foo(): IntArray' type=kotlin.IntArray origin=null
VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int
CALL 'bar(): Int' type=kotlin.Int operator=null CALL 'bar(): Int' type=kotlin.Int origin=null
CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=MULTEQ CALL 'set(Int, Int): Unit' type=kotlin.Unit origin=MULTEQ
$this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray origin=null
index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int origin=null
value: CALL 'times(Int): Int' type=kotlin.Int operator=MULTEQ value: CALL 'times(Int): Int' type=kotlin.Int origin=MULTEQ
$this: CALL 'get(Int): Int' type=kotlin.Int operator=MULTEQ $this: CALL 'get(Int): Int' type=kotlin.Int origin=MULTEQ
$this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray origin=null
index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value='2' other: CONST Int type=kotlin.Int value='2'
FUN public fun testMember(c: C): kotlin.Unit FUN public fun testMember(c: C): kotlin.Unit
BLOCK_BODY BLOCK_BODY
BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray
CALL '<get-x>(): IntArray' type=kotlin.IntArray operator=GET_PROPERTY CALL '<get-x>(): IntArray' type=kotlin.IntArray origin=GET_PROPERTY
$this: GET_VAR 'value-parameter c: C' type=C operator=null $this: GET_VAR 'value-parameter c: C' type=C origin=null
VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int
CONST Int type=kotlin.Int value='0' CONST Int type=kotlin.Int value='0'
VAR IR_TEMPORARY_VARIABLE val tmp2: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp2: kotlin.Int
CALL 'get(Int): Int' type=kotlin.Int operator=POSTFIX_INCR CALL 'get(Int): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray origin=null
index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int origin=null
CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=POSTFIX_INCR CALL 'set(Int, Int): Unit' type=kotlin.Unit origin=POSTFIX_INCR
$this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray origin=null
index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int origin=null
value: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR value: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp2: Int' type=kotlin.Int operator=null $this: GET_VAR 'tmp2: Int' type=kotlin.Int origin=null
GET_VAR 'tmp2: Int' type=kotlin.Int operator=null GET_VAR 'tmp2: Int' type=kotlin.Int origin=null
@@ -5,17 +5,17 @@ FILE /arrayAugmentedAssignment2.kt
FUN public abstract operator fun IA.set(index: kotlin.String, value: kotlin.Int): kotlin.Unit FUN public abstract operator fun IA.set(index: kotlin.String, value: kotlin.Int): kotlin.Unit
FUN public fun IB.test(a: IA): kotlin.Unit FUN public fun IB.test(a: IA): kotlin.Unit
BLOCK_BODY BLOCK_BODY
BLOCK type=kotlin.Unit operator=PLUSEQ BLOCK type=kotlin.Unit origin=PLUSEQ
VAR IR_TEMPORARY_VARIABLE val tmp0_array: IA VAR IR_TEMPORARY_VARIABLE val tmp0_array: IA
GET_VAR 'value-parameter a: IA' type=IA operator=null GET_VAR 'value-parameter a: IA' type=IA origin=null
VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.String VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.String
CONST String type=kotlin.String value='' CONST String type=kotlin.String value=''
CALL 'set(String, Int) on IA: Unit' type=kotlin.Unit operator=PLUSEQ CALL 'set(String, Int) on IA: Unit' type=kotlin.Unit origin=PLUSEQ
$this: $RECEIVER of 'test(IA) on IB: Unit' type=IB $this: $RECEIVER of 'test(IA) on IB: Unit' type=IB
$receiver: GET_VAR 'tmp0_array: IA' type=IA operator=null $receiver: GET_VAR 'tmp0_array: IA' type=IA origin=null
index: GET_VAR 'tmp1_index0: String' type=kotlin.String operator=null index: GET_VAR 'tmp1_index0: String' type=kotlin.String origin=null
value: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ value: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'get(String): Int' type=kotlin.Int operator=PLUSEQ $this: CALL 'get(String): Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'tmp0_array: IA' type=IA operator=null $this: GET_VAR 'tmp0_array: IA' type=IA origin=null
index: GET_VAR 'tmp1_index0: String' type=kotlin.String operator=null index: GET_VAR 'tmp1_index0: String' type=kotlin.String origin=null
other: CONST Int type=kotlin.Int value='42' other: CONST Int type=kotlin.Int value='42'
+10 -10
View File
@@ -7,29 +7,29 @@ FILE /assignments.kt
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: THIS of 'Ref' type=Ref receiver: THIS of 'Ref' type=Ref
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x: Int' type=kotlin.Unit origin=null
receiver: THIS of 'Ref' type=Ref receiver: THIS of 'Ref' type=Ref
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
FUN public fun test1(): kotlin.Unit FUN public fun test1(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR var x: kotlin.Int VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0' CONST Int type=kotlin.Int value='0'
SET_VAR 'x: Int' type=kotlin.Unit operator=EQ SET_VAR 'x: Int' type=kotlin.Unit origin=EQ
CONST Int type=kotlin.Int value='1' CONST Int type=kotlin.Int value='1'
SET_VAR 'x: Int' type=kotlin.Unit operator=EQ SET_VAR 'x: Int' type=kotlin.Unit origin=EQ
CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS
$this: GET_VAR 'x: Int' type=kotlin.Int operator=null $this: GET_VAR 'x: Int' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value='1' other: CONST Int type=kotlin.Int value='1'
FUN public fun test2(r: Ref): kotlin.Unit FUN public fun test2(r: Ref): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL '<set-x>(Int): Unit' type=kotlin.Unit operator=EQ CALL '<set-x>(Int): Unit' type=kotlin.Unit origin=EQ
$this: GET_VAR 'value-parameter r: Ref' type=Ref operator=null $this: GET_VAR 'value-parameter r: Ref' type=Ref origin=null
<set-?>: CONST Int type=kotlin.Int value='0' <set-?>: CONST Int type=kotlin.Int value='0'
@@ -6,59 +6,59 @@ FILE /augmentedAssignment1.kt
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-p>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-p>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-p>(): Int' RETURN type=kotlin.Nothing from='<get-p>(): Int'
GET_BACKING_FIELD 'p: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'p: Int' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public fun <set-p>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public fun <set-p>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'p: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'p: Int' type=kotlin.Unit origin=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
FUN public fun testVariable(): kotlin.Unit FUN public fun testVariable(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR var x: kotlin.Int VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0' CONST Int type=kotlin.Int value='0'
SET_VAR 'x: Int' type=kotlin.Unit operator=PLUSEQ SET_VAR 'x: Int' type=kotlin.Unit origin=PLUSEQ
CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'x: Int' type=kotlin.Int operator=PLUSEQ $this: GET_VAR 'x: Int' type=kotlin.Int origin=PLUSEQ
other: CONST Int type=kotlin.Int value='1' other: CONST Int type=kotlin.Int value='1'
SET_VAR 'x: Int' type=kotlin.Unit operator=MINUSEQ SET_VAR 'x: Int' type=kotlin.Unit origin=MINUSEQ
CALL 'minus(Int): Int' type=kotlin.Int operator=MINUSEQ CALL 'minus(Int): Int' type=kotlin.Int origin=MINUSEQ
$this: GET_VAR 'x: Int' type=kotlin.Int operator=MINUSEQ $this: GET_VAR 'x: Int' type=kotlin.Int origin=MINUSEQ
other: CONST Int type=kotlin.Int value='2' other: CONST Int type=kotlin.Int value='2'
SET_VAR 'x: Int' type=kotlin.Unit operator=MULTEQ SET_VAR 'x: Int' type=kotlin.Unit origin=MULTEQ
CALL 'times(Int): Int' type=kotlin.Int operator=MULTEQ CALL 'times(Int): Int' type=kotlin.Int origin=MULTEQ
$this: GET_VAR 'x: Int' type=kotlin.Int operator=MULTEQ $this: GET_VAR 'x: Int' type=kotlin.Int origin=MULTEQ
other: CONST Int type=kotlin.Int value='3' other: CONST Int type=kotlin.Int value='3'
SET_VAR 'x: Int' type=kotlin.Unit operator=DIVEQ SET_VAR 'x: Int' type=kotlin.Unit origin=DIVEQ
CALL 'div(Int): Int' type=kotlin.Int operator=DIVEQ CALL 'div(Int): Int' type=kotlin.Int origin=DIVEQ
$this: GET_VAR 'x: Int' type=kotlin.Int operator=DIVEQ $this: GET_VAR 'x: Int' type=kotlin.Int origin=DIVEQ
other: CONST Int type=kotlin.Int value='4' other: CONST Int type=kotlin.Int value='4'
SET_VAR 'x: Int' type=kotlin.Unit operator=PERCEQ SET_VAR 'x: Int' type=kotlin.Unit origin=PERCEQ
CALL 'mod(Int): Int' type=kotlin.Int operator=PERCEQ CALL 'mod(Int): Int' type=kotlin.Int origin=PERCEQ
$this: GET_VAR 'x: Int' type=kotlin.Int operator=PERCEQ $this: GET_VAR 'x: Int' type=kotlin.Int origin=PERCEQ
other: CONST Int type=kotlin.Int value='5' other: CONST Int type=kotlin.Int value='5'
FUN public fun testProperty(): kotlin.Unit FUN public fun testProperty(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
BLOCK type=kotlin.Unit operator=PLUSEQ BLOCK type=kotlin.Unit origin=PLUSEQ
CALL '<set-p>(Int): Unit' type=kotlin.Unit operator=PLUSEQ CALL '<set-p>(Int): Unit' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ <set-?>: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ
$this: CALL '<get-p>(): Int' type=kotlin.Int operator=PLUSEQ $this: CALL '<get-p>(): Int' type=kotlin.Int origin=PLUSEQ
other: CONST Int type=kotlin.Int value='1' other: CONST Int type=kotlin.Int value='1'
BLOCK type=kotlin.Unit operator=MINUSEQ BLOCK type=kotlin.Unit origin=MINUSEQ
CALL '<set-p>(Int): Unit' type=kotlin.Unit operator=MINUSEQ CALL '<set-p>(Int): Unit' type=kotlin.Unit origin=MINUSEQ
<set-?>: CALL 'minus(Int): Int' type=kotlin.Int operator=MINUSEQ <set-?>: CALL 'minus(Int): Int' type=kotlin.Int origin=MINUSEQ
$this: CALL '<get-p>(): Int' type=kotlin.Int operator=MINUSEQ $this: CALL '<get-p>(): Int' type=kotlin.Int origin=MINUSEQ
other: CONST Int type=kotlin.Int value='2' other: CONST Int type=kotlin.Int value='2'
BLOCK type=kotlin.Unit operator=MULTEQ BLOCK type=kotlin.Unit origin=MULTEQ
CALL '<set-p>(Int): Unit' type=kotlin.Unit operator=MULTEQ CALL '<set-p>(Int): Unit' type=kotlin.Unit origin=MULTEQ
<set-?>: CALL 'times(Int): Int' type=kotlin.Int operator=MULTEQ <set-?>: CALL 'times(Int): Int' type=kotlin.Int origin=MULTEQ
$this: CALL '<get-p>(): Int' type=kotlin.Int operator=MULTEQ $this: CALL '<get-p>(): Int' type=kotlin.Int origin=MULTEQ
other: CONST Int type=kotlin.Int value='3' other: CONST Int type=kotlin.Int value='3'
BLOCK type=kotlin.Unit operator=DIVEQ BLOCK type=kotlin.Unit origin=DIVEQ
CALL '<set-p>(Int): Unit' type=kotlin.Unit operator=DIVEQ CALL '<set-p>(Int): Unit' type=kotlin.Unit origin=DIVEQ
<set-?>: CALL 'div(Int): Int' type=kotlin.Int operator=DIVEQ <set-?>: CALL 'div(Int): Int' type=kotlin.Int origin=DIVEQ
$this: CALL '<get-p>(): Int' type=kotlin.Int operator=DIVEQ $this: CALL '<get-p>(): Int' type=kotlin.Int origin=DIVEQ
other: CONST Int type=kotlin.Int value='4' other: CONST Int type=kotlin.Int value='4'
BLOCK type=kotlin.Unit operator=PERCEQ BLOCK type=kotlin.Unit origin=PERCEQ
CALL '<set-p>(Int): Unit' type=kotlin.Unit operator=PERCEQ CALL '<set-p>(Int): Unit' type=kotlin.Unit origin=PERCEQ
<set-?>: CALL 'mod(Int): Int' type=kotlin.Int operator=PERCEQ <set-?>: CALL 'mod(Int): Int' type=kotlin.Int origin=PERCEQ
$this: CALL '<get-p>(): Int' type=kotlin.Int operator=PERCEQ $this: CALL '<get-p>(): Int' type=kotlin.Int origin=PERCEQ
other: CONST Int type=kotlin.Int value='5' other: CONST Int type=kotlin.Int value='5'
@@ -17,49 +17,49 @@ FILE /augmentedAssignment2.kt
PROPERTY public val p: A PROPERTY public val p: A
FIELD PROPERTY_BACKING_FIELD public val p: A FIELD PROPERTY_BACKING_FIELD public val p: A
EXPRESSION_BODY EXPRESSION_BODY
CALL 'constructor A()' type=A operator=null CALL 'constructor A()' type=A origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-p>(): A FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-p>(): A
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-p>(): A' RETURN type=kotlin.Nothing from='<get-p>(): A'
GET_BACKING_FIELD 'p: A' type=A operator=null GET_BACKING_FIELD 'p: A' type=A origin=null
FUN public fun testVariable(): kotlin.Unit FUN public fun testVariable(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR val a: A VAR val a: A
CALL 'constructor A()' type=A operator=null CALL 'constructor A()' type=A origin=null
CALL 'plusAssign(String) on A: Unit' type=kotlin.Unit operator=PLUSEQ CALL 'plusAssign(String) on A: Unit' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'a: A' type=A operator=PLUSEQ $receiver: GET_VAR 'a: A' type=A origin=PLUSEQ
s: CONST String type=kotlin.String value='+=' s: CONST String type=kotlin.String value='+='
CALL 'minusAssign(String) on A: Unit' type=kotlin.Unit operator=MINUSEQ CALL 'minusAssign(String) on A: Unit' type=kotlin.Unit origin=MINUSEQ
$receiver: GET_VAR 'a: A' type=A operator=MINUSEQ $receiver: GET_VAR 'a: A' type=A origin=MINUSEQ
s: CONST String type=kotlin.String value='-=' s: CONST String type=kotlin.String value='-='
CALL 'timesAssign(String) on A: Unit' type=kotlin.Unit operator=MULTEQ CALL 'timesAssign(String) on A: Unit' type=kotlin.Unit origin=MULTEQ
$receiver: GET_VAR 'a: A' type=A operator=MULTEQ $receiver: GET_VAR 'a: A' type=A origin=MULTEQ
s: CONST String type=kotlin.String value='*=' s: CONST String type=kotlin.String value='*='
CALL 'divAssign(String) on A: Unit' type=kotlin.Unit operator=DIVEQ CALL 'divAssign(String) on A: Unit' type=kotlin.Unit origin=DIVEQ
$receiver: GET_VAR 'a: A' type=A operator=DIVEQ $receiver: GET_VAR 'a: A' type=A origin=DIVEQ
s: CONST String type=kotlin.String value='/=' s: CONST String type=kotlin.String value='/='
CALL 'modAssign(String) on A: Unit' type=kotlin.Unit operator=PERCEQ CALL 'modAssign(String) on A: Unit' type=kotlin.Unit origin=PERCEQ
$receiver: GET_VAR 'a: A' type=A operator=PERCEQ $receiver: GET_VAR 'a: A' type=A origin=PERCEQ
s: CONST String type=kotlin.String value='*=' s: CONST String type=kotlin.String value='*='
FUN public fun testProperty(): kotlin.Unit FUN public fun testProperty(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
BLOCK type=kotlin.Unit operator=PLUSEQ BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'plusAssign(String) on A: Unit' type=kotlin.Unit operator=PLUSEQ CALL 'plusAssign(String) on A: Unit' type=kotlin.Unit origin=PLUSEQ
$receiver: CALL '<get-p>(): A' type=A operator=PLUSEQ $receiver: CALL '<get-p>(): A' type=A origin=PLUSEQ
s: CONST String type=kotlin.String value='+=' s: CONST String type=kotlin.String value='+='
BLOCK type=kotlin.Unit operator=MINUSEQ BLOCK type=kotlin.Unit origin=MINUSEQ
CALL 'minusAssign(String) on A: Unit' type=kotlin.Unit operator=MINUSEQ CALL 'minusAssign(String) on A: Unit' type=kotlin.Unit origin=MINUSEQ
$receiver: CALL '<get-p>(): A' type=A operator=MINUSEQ $receiver: CALL '<get-p>(): A' type=A origin=MINUSEQ
s: CONST String type=kotlin.String value='-=' s: CONST String type=kotlin.String value='-='
BLOCK type=kotlin.Unit operator=MULTEQ BLOCK type=kotlin.Unit origin=MULTEQ
CALL 'timesAssign(String) on A: Unit' type=kotlin.Unit operator=MULTEQ CALL 'timesAssign(String) on A: Unit' type=kotlin.Unit origin=MULTEQ
$receiver: CALL '<get-p>(): A' type=A operator=MULTEQ $receiver: CALL '<get-p>(): A' type=A origin=MULTEQ
s: CONST String type=kotlin.String value='*=' s: CONST String type=kotlin.String value='*='
BLOCK type=kotlin.Unit operator=DIVEQ BLOCK type=kotlin.Unit origin=DIVEQ
CALL 'divAssign(String) on A: Unit' type=kotlin.Unit operator=DIVEQ CALL 'divAssign(String) on A: Unit' type=kotlin.Unit origin=DIVEQ
$receiver: CALL '<get-p>(): A' type=A operator=DIVEQ $receiver: CALL '<get-p>(): A' type=A origin=DIVEQ
s: CONST String type=kotlin.String value='/=' s: CONST String type=kotlin.String value='/='
BLOCK type=kotlin.Unit operator=PERCEQ BLOCK type=kotlin.Unit origin=PERCEQ
CALL 'modAssign(String) on A: Unit' type=kotlin.Unit operator=PERCEQ CALL 'modAssign(String) on A: Unit' type=kotlin.Unit origin=PERCEQ
$receiver: CALL '<get-p>(): A' type=A operator=PERCEQ $receiver: CALL '<get-p>(): A' type=A origin=PERCEQ
s: CONST String type=kotlin.String value='%=' s: CONST String type=kotlin.String value='%='
@@ -8,26 +8,26 @@ FILE /augmentedAssignmentWithExpression.kt
BLOCK_BODY BLOCK_BODY
FUN public final fun test1(): kotlin.Unit FUN public final fun test1(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'plusAssign(Int): Unit' type=kotlin.Unit operator=PLUSEQ CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ
$this: THIS of 'Host' type=Host $this: THIS of 'Host' type=Host
x: CONST Int type=kotlin.Int value='1' x: CONST Int type=kotlin.Int value='1'
FUN public fun foo(): Host FUN public fun foo(): Host
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='foo(): Host' RETURN type=kotlin.Nothing from='foo(): Host'
CALL 'constructor Host()' type=Host operator=null CALL 'constructor Host()' type=Host origin=null
FUN public fun Host.test2(): kotlin.Unit FUN public fun Host.test2(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'plusAssign(Int): Unit' type=kotlin.Unit operator=PLUSEQ CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ
$this: $RECEIVER of 'test2() on Host: Unit' type=Host $this: $RECEIVER of 'test2() on Host: Unit' type=Host
x: CONST Int type=kotlin.Int value='1' x: CONST Int type=kotlin.Int value='1'
FUN public fun test3(): kotlin.Unit FUN public fun test3(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'plusAssign(Int): Unit' type=kotlin.Unit operator=PLUSEQ CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ
$this: CALL 'foo(): Host' type=Host operator=null $this: CALL 'foo(): Host' type=Host origin=null
x: CONST Int type=kotlin.Int value='1' x: CONST Int type=kotlin.Int value='1'
FUN public fun test4(a: () -> Host): kotlin.Unit FUN public fun test4(a: () -> Host): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'plusAssign(Int): Unit' type=kotlin.Unit operator=PLUSEQ CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ
$this: CALL 'invoke(): Host' type=Host operator=INVOKE $this: CALL 'invoke(): Host' type=Host origin=INVOKE
$this: GET_VAR 'value-parameter a: () -> Host' type=() -> Host operator=VARIABLE_AS_FUNCTION $this: GET_VAR 'value-parameter a: () -> Host' type=() -> Host origin=VARIABLE_AS_FUNCTION
x: CONST Int type=kotlin.Int value='1' x: CONST Int type=kotlin.Int value='1'
+10 -10
View File
@@ -5,28 +5,28 @@ FILE /badBreakContinue.kt
ERROR_EXPR 'Loop not found for continue expression: continue' type=kotlin.Nothing ERROR_EXPR 'Loop not found for continue expression: continue' type=kotlin.Nothing
FUN public fun test2(): kotlin.Unit FUN public fun test2(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
WHILE label=L1 operator=WHILE_LOOP WHILE label=L1 origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
ERROR_EXPR 'Loop not found for break expression: break@ERROR' type=kotlin.Nothing ERROR_EXPR 'Loop not found for break expression: break@ERROR' type=kotlin.Nothing
ERROR_EXPR 'Loop not found for continue expression: continue@ERROR' type=kotlin.Nothing ERROR_EXPR 'Loop not found for continue expression: continue@ERROR' type=kotlin.Nothing
FUN public fun test3(): kotlin.Unit FUN public fun test3(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
WHILE label=L1 operator=WHILE_LOOP WHILE label=L1 origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Unit operator=null body: BLOCK type=kotlin.Unit origin=null
VAR val lambda: () -> kotlin.Nothing VAR val lambda: () -> kotlin.Nothing
BLOCK type=() -> kotlin.Nothing operator=LAMBDA BLOCK type=() -> kotlin.Nothing origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Nothing FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Nothing
BLOCK_BODY BLOCK_BODY
ERROR_EXPR 'Loop not found for break expression: break@L1' type=kotlin.Nothing ERROR_EXPR 'Loop not found for break expression: break@L1' type=kotlin.Nothing
ERROR_EXPR 'Loop not found for continue expression: continue@L1' type=kotlin.Nothing ERROR_EXPR 'Loop not found for continue expression: continue@L1' type=kotlin.Nothing
CALLABLE_REFERENCE '<anonymous>(): Nothing' type=() -> kotlin.Nothing operator=LAMBDA CALLABLE_REFERENCE '<anonymous>(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA
FUN public fun test4(): kotlin.Unit FUN public fun test4(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
WHILE label=null operator=WHILE_LOOP WHILE label=null origin=WHILE_LOOP
condition: ERROR_EXPR 'Loop not found for break expression: break' type=kotlin.Nothing condition: ERROR_EXPR 'Loop not found for break expression: break' type=kotlin.Nothing
body: BLOCK type=kotlin.Unit operator=null body: BLOCK type=kotlin.Unit origin=null
WHILE label=null operator=WHILE_LOOP WHILE label=null origin=WHILE_LOOP
condition: ERROR_EXPR 'Loop not found for continue expression: continue' type=kotlin.Nothing condition: ERROR_EXPR 'Loop not found for continue expression: continue' type=kotlin.Nothing
body: BLOCK type=kotlin.Unit operator=null body: BLOCK type=kotlin.Unit origin=null
+20 -20
View File
@@ -2,33 +2,33 @@ FILE /bangbang.kt
FUN public fun test1(a: kotlin.Any?): kotlin.Any FUN public fun test1(a: kotlin.Any?): kotlin.Any
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='test1(Any?): Any' RETURN type=kotlin.Nothing from='test1(Any?): Any'
BLOCK type=kotlin.Any operator=EXCLEXCL BLOCK type=kotlin.Any origin=EXCLEXCL
VAR IR_TEMPORARY_VARIABLE val tmp0_notnull: kotlin.Any? VAR IR_TEMPORARY_VARIABLE val tmp0_notnull: kotlin.Any?
GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null GET_VAR 'value-parameter a: Any?' type=kotlin.Any? origin=null
WHEN type=kotlin.Any operator=null WHEN type=kotlin.Any origin=null
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? operator=null arg0: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: CALL 'THROW_NPE(): Nothing' type=kotlin.Nothing operator=EXCLEXCL then: CALL 'THROW_NPE(): Nothing' type=kotlin.Nothing origin=EXCLEXCL
else: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? operator=null else: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? origin=null
FUN public fun test2(a: kotlin.Any?): kotlin.Int FUN public fun test2(a: kotlin.Any?): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='test2(Any?): Int' RETURN type=kotlin.Nothing from='test2(Any?): Int'
BLOCK type=kotlin.Int operator=EXCLEXCL BLOCK type=kotlin.Int origin=EXCLEXCL
VAR IR_TEMPORARY_VARIABLE val tmp1_notnull: kotlin.Int? VAR IR_TEMPORARY_VARIABLE val tmp1_notnull: kotlin.Int?
BLOCK type=kotlin.Int? operator=SAFE_CALL BLOCK type=kotlin.Int? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.Any? VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.Any?
GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null GET_VAR 'value-parameter a: Any?' type=kotlin.Any? origin=null
WHEN type=kotlin.Int? operator=SAFE_CALL WHEN type=kotlin.Int? origin=SAFE_CALL
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? operator=null arg0: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null'
else: CALL 'hashCode(): Int' type=kotlin.Int operator=null else: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? operator=null $this: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? origin=null
WHEN type=kotlin.Int operator=null WHEN type=kotlin.Int origin=null
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp1_notnull: Int?' type=kotlin.Int? operator=null arg0: GET_VAR 'tmp1_notnull: Int?' type=kotlin.Int? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: CALL 'THROW_NPE(): Nothing' type=kotlin.Nothing operator=EXCLEXCL then: CALL 'THROW_NPE(): Nothing' type=kotlin.Nothing origin=EXCLEXCL
else: GET_VAR 'tmp1_notnull: Int?' type=kotlin.Int? operator=null else: GET_VAR 'tmp1_notnull: Int?' type=kotlin.Int? origin=null
+12 -12
View File
@@ -2,26 +2,26 @@ FILE /booleanOperators.kt
FUN public fun test1(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean FUN public fun test1(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='test1(Boolean, Boolean): Boolean' RETURN type=kotlin.Nothing from='test1(Boolean, Boolean): Boolean'
WHEN type=kotlin.Boolean operator=ANDAND WHEN type=kotlin.Boolean origin=ANDAND
if: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean operator=null if: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean origin=null
then: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean operator=null then: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean origin=null
else: CONST Boolean type=kotlin.Boolean value='false' else: CONST Boolean type=kotlin.Boolean value='false'
FUN public fun test2(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean FUN public fun test2(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='test2(Boolean, Boolean): Boolean' RETURN type=kotlin.Nothing from='test2(Boolean, Boolean): Boolean'
WHEN type=kotlin.Boolean operator=OROR WHEN type=kotlin.Boolean origin=OROR
if: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean operator=null if: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean origin=null
then: CONST Boolean type=kotlin.Boolean value='true' then: CONST Boolean type=kotlin.Boolean value='true'
else: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean operator=null else: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean origin=null
FUN public fun test1x(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean FUN public fun test1x(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='test1x(Boolean, Boolean): Boolean' RETURN type=kotlin.Nothing from='test1x(Boolean, Boolean): Boolean'
CALL 'and(Boolean): Boolean' type=kotlin.Boolean operator=null CALL 'and(Boolean): Boolean' type=kotlin.Boolean origin=null
$this: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean operator=null $this: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean origin=null
other: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean operator=null other: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean origin=null
FUN public fun test2x(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean FUN public fun test2x(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='test2x(Boolean, Boolean): Boolean' RETURN type=kotlin.Nothing from='test2x(Boolean, Boolean): Boolean'
CALL 'or(Boolean): Boolean' type=kotlin.Boolean operator=null CALL 'or(Boolean): Boolean' type=kotlin.Boolean origin=null
$this: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean operator=null $this: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean origin=null
other: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean operator=null other: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean origin=null
@@ -13,34 +13,34 @@ FILE /boundCallableReferences.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-bar>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-bar>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): Int' RETURN type=kotlin.Nothing from='<get-bar>(): Int'
GET_BACKING_FIELD 'bar: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'bar: Int' type=kotlin.Int origin=null
receiver: THIS of 'A' type=A receiver: THIS of 'A' type=A
FUN public fun A.qux(): kotlin.Unit FUN public fun A.qux(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
PROPERTY public val test1: kotlin.reflect.KFunction0<kotlin.Unit> PROPERTY public val test1: kotlin.reflect.KFunction0<kotlin.Unit>
FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.reflect.KFunction0<kotlin.Unit> FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.reflect.KFunction0<kotlin.Unit>
EXPRESSION_BODY EXPRESSION_BODY
CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null
$this: CALL 'constructor A()' type=A operator=null $this: CALL 'constructor A()' type=A origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): kotlin.reflect.KFunction0<kotlin.Unit> FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): kotlin.reflect.KFunction0<kotlin.Unit>
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): KFunction0<Unit>' RETURN type=kotlin.Nothing from='<get-test1>(): KFunction0<Unit>'
GET_BACKING_FIELD 'test1: KFunction0<Unit>' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null GET_BACKING_FIELD 'test1: KFunction0<Unit>' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null
PROPERTY public val test2: kotlin.reflect.KProperty0<kotlin.Int> PROPERTY public val test2: kotlin.reflect.KProperty0<kotlin.Int>
FIELD PROPERTY_BACKING_FIELD public val test2: kotlin.reflect.KProperty0<kotlin.Int> FIELD PROPERTY_BACKING_FIELD public val test2: kotlin.reflect.KProperty0<kotlin.Int>
EXPRESSION_BODY EXPRESSION_BODY
CALLABLE_REFERENCE 'bar: Int' type=kotlin.reflect.KProperty0<kotlin.Int> operator=null CALLABLE_REFERENCE 'bar: Int' type=kotlin.reflect.KProperty0<kotlin.Int> origin=null
$this: CALL 'constructor A()' type=A operator=null $this: CALL 'constructor A()' type=A origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): kotlin.reflect.KProperty0<kotlin.Int> FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): kotlin.reflect.KProperty0<kotlin.Int>
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): KProperty0<Int>' RETURN type=kotlin.Nothing from='<get-test2>(): KProperty0<Int>'
GET_BACKING_FIELD 'test2: KProperty0<Int>' type=kotlin.reflect.KProperty0<kotlin.Int> operator=null GET_BACKING_FIELD 'test2: KProperty0<Int>' type=kotlin.reflect.KProperty0<kotlin.Int> origin=null
PROPERTY public val test3: kotlin.reflect.KFunction0<kotlin.Unit> PROPERTY public val test3: kotlin.reflect.KFunction0<kotlin.Unit>
FIELD PROPERTY_BACKING_FIELD public val test3: kotlin.reflect.KFunction0<kotlin.Unit> FIELD PROPERTY_BACKING_FIELD public val test3: kotlin.reflect.KFunction0<kotlin.Unit>
EXPRESSION_BODY EXPRESSION_BODY
CALLABLE_REFERENCE 'qux() on A: Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null CALLABLE_REFERENCE 'qux() on A: Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null
$receiver: CALL 'constructor A()' type=A operator=null $receiver: CALL 'constructor A()' type=A origin=null
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test3>(): kotlin.reflect.KFunction0<kotlin.Unit> FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test3>(): kotlin.reflect.KFunction0<kotlin.Unit>
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): KFunction0<Unit>' RETURN type=kotlin.Nothing from='<get-test3>(): KFunction0<Unit>'
GET_BACKING_FIELD 'test3: KFunction0<Unit>' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null GET_BACKING_FIELD 'test3: KFunction0<Unit>' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null
+24 -24
View File
@@ -1,57 +1,57 @@
FILE /breakContinue.kt FILE /breakContinue.kt
FUN public fun test1(): kotlin.Unit FUN public fun test1(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
WHILE label=null operator=WHILE_LOOP WHILE label=null origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
BREAK label=null loop.label=null depth=0 BREAK label=null loop.label=null depth=0
DO_WHILE label=null operator=DO_WHILE_LOOP DO_WHILE label=null origin=DO_WHILE_LOOP
body: BLOCK type=kotlin.Unit operator=null body: BLOCK type=kotlin.Unit origin=null
BREAK label=null loop.label=null depth=0 BREAK label=null loop.label=null depth=0
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
WHILE label=null operator=WHILE_LOOP WHILE label=null origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
CONTINUE label=null loop.label=null depth=0 CONTINUE label=null loop.label=null depth=0
DO_WHILE label=null operator=DO_WHILE_LOOP DO_WHILE label=null origin=DO_WHILE_LOOP
body: BLOCK type=kotlin.Unit operator=null body: BLOCK type=kotlin.Unit origin=null
CONTINUE label=null loop.label=null depth=0 CONTINUE label=null loop.label=null depth=0
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
FUN public fun test2(): kotlin.Unit FUN public fun test2(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
WHILE label=OUTER operator=WHILE_LOOP WHILE label=OUTER origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
WHILE label=INNER operator=WHILE_LOOP WHILE label=INNER origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
BREAK label=INNER loop.label=INNER depth=0 BREAK label=INNER loop.label=INNER depth=0
BREAK label=OUTER loop.label=OUTER depth=1 BREAK label=OUTER loop.label=OUTER depth=1
BREAK label=OUTER loop.label=OUTER depth=0 BREAK label=OUTER loop.label=OUTER depth=0
WHILE label=OUTER operator=WHILE_LOOP WHILE label=OUTER origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
WHILE label=INNER operator=WHILE_LOOP WHILE label=INNER origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
CONTINUE label=INNER loop.label=INNER depth=0 CONTINUE label=INNER loop.label=INNER depth=0
CONTINUE label=OUTER loop.label=OUTER depth=1 CONTINUE label=OUTER loop.label=OUTER depth=1
CONTINUE label=OUTER loop.label=OUTER depth=0 CONTINUE label=OUTER loop.label=OUTER depth=0
FUN public fun test3(): kotlin.Unit FUN public fun test3(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
WHILE label=L operator=WHILE_LOOP WHILE label=L origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
WHILE label=L operator=WHILE_LOOP WHILE label=L origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
BREAK label=L loop.label=L depth=0 BREAK label=L loop.label=L depth=0
BREAK label=L loop.label=L depth=0 BREAK label=L loop.label=L depth=0
WHILE label=L operator=WHILE_LOOP WHILE label=L origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
WHILE label=L operator=WHILE_LOOP WHILE label=L origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null body: BLOCK type=kotlin.Nothing origin=null
CONTINUE label=L loop.label=L depth=0 CONTINUE label=L loop.label=L depth=0
CONTINUE label=L loop.label=L depth=0 CONTINUE label=L loop.label=L depth=0
@@ -1,79 +1,79 @@
FILE /breakContinueInLoopHeader.kt FILE /breakContinueInLoopHeader.kt
FUN public fun test1(c: kotlin.Boolean?): kotlin.Unit FUN public fun test1(c: kotlin.Boolean?): kotlin.Unit
BLOCK_BODY BLOCK_BODY
WHILE label=L operator=WHILE_LOOP WHILE label=L origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Unit operator=null body: BLOCK type=kotlin.Unit origin=null
WHILE label=null operator=WHILE_LOOP WHILE label=null origin=WHILE_LOOP
condition: BLOCK type=kotlin.Boolean operator=ELVIS condition: BLOCK type=kotlin.Boolean origin=ELVIS
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Boolean? VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Boolean?
GET_VAR 'value-parameter c: Boolean?' type=kotlin.Boolean? operator=null GET_VAR 'value-parameter c: Boolean?' type=kotlin.Boolean? origin=null
WHEN type=kotlin.Boolean operator=null WHEN type=kotlin.Boolean origin=null
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? operator=null arg0: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: BREAK label=null loop.label=L depth=1 then: BREAK label=null loop.label=L depth=1
else: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? operator=null else: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
FUN public fun test2(c: kotlin.Boolean?): kotlin.Unit FUN public fun test2(c: kotlin.Boolean?): kotlin.Unit
BLOCK_BODY BLOCK_BODY
WHILE label=L operator=WHILE_LOOP WHILE label=L origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Unit operator=null body: BLOCK type=kotlin.Unit origin=null
WHILE label=null operator=WHILE_LOOP WHILE label=null origin=WHILE_LOOP
condition: BLOCK type=kotlin.Boolean operator=ELVIS condition: BLOCK type=kotlin.Boolean origin=ELVIS
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Boolean? VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Boolean?
GET_VAR 'value-parameter c: Boolean?' type=kotlin.Boolean? operator=null GET_VAR 'value-parameter c: Boolean?' type=kotlin.Boolean? origin=null
WHEN type=kotlin.Boolean operator=null WHEN type=kotlin.Boolean origin=null
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? operator=null arg0: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONTINUE label=null loop.label=L depth=1 then: CONTINUE label=null loop.label=L depth=1
else: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? operator=null else: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
FUN public fun test3(ss: kotlin.collections.List<kotlin.String>?): kotlin.Unit FUN public fun test3(ss: kotlin.collections.List<kotlin.String>?): kotlin.Unit
BLOCK_BODY BLOCK_BODY
WHILE label=L operator=WHILE_LOOP WHILE label=L origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Unit operator=null body: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit operator=FOR_LOOP BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR IR_TEMPORARY_VARIABLE val tmp1_iterator: kotlin.collections.Iterator<kotlin.String> VAR IR_TEMPORARY_VARIABLE val tmp1_iterator: kotlin.collections.Iterator<kotlin.String>
CALL 'iterator(): Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR CALL 'iterator(): Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> origin=FOR_LOOP_ITERATOR
$this: BLOCK type=kotlin.collections.List<kotlin.String> operator=ELVIS $this: BLOCK type=kotlin.collections.List<kotlin.String> origin=ELVIS
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.collections.List<kotlin.String>? VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.collections.List<kotlin.String>?
GET_VAR 'value-parameter ss: List<String>?' type=kotlin.collections.List<kotlin.String>? operator=null GET_VAR 'value-parameter ss: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
WHEN type=kotlin.collections.List<kotlin.String> operator=null WHEN type=kotlin.collections.List<kotlin.String> origin=null
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? operator=null arg0: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONTINUE label=null loop.label=L depth=0 then: CONTINUE label=null loop.label=L depth=0
else: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? operator=null else: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
WHILE label=null operator=FOR_LOOP_INNER_WHILE WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> operator=null $this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> origin=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
VAR val s: kotlin.String VAR val s: kotlin.String
CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT
$this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> operator=null $this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> origin=null
FUN public fun test4(ss: kotlin.collections.List<kotlin.String>?): kotlin.Unit FUN public fun test4(ss: kotlin.collections.List<kotlin.String>?): kotlin.Unit
BLOCK_BODY BLOCK_BODY
WHILE label=L operator=WHILE_LOOP WHILE label=L origin=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true' condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Unit operator=null body: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit operator=FOR_LOOP BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR IR_TEMPORARY_VARIABLE val tmp1_iterator: kotlin.collections.Iterator<kotlin.String> VAR IR_TEMPORARY_VARIABLE val tmp1_iterator: kotlin.collections.Iterator<kotlin.String>
CALL 'iterator(): Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR CALL 'iterator(): Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> origin=FOR_LOOP_ITERATOR
$this: BLOCK type=kotlin.collections.List<kotlin.String> operator=ELVIS $this: BLOCK type=kotlin.collections.List<kotlin.String> origin=ELVIS
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.collections.List<kotlin.String>? VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.collections.List<kotlin.String>?
GET_VAR 'value-parameter ss: List<String>?' type=kotlin.collections.List<kotlin.String>? operator=null GET_VAR 'value-parameter ss: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
WHEN type=kotlin.collections.List<kotlin.String> operator=null WHEN type=kotlin.collections.List<kotlin.String> origin=null
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? operator=null arg0: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: BREAK label=null loop.label=L depth=0 then: BREAK label=null loop.label=L depth=0
else: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? operator=null else: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
WHILE label=null operator=FOR_LOOP_INNER_WHILE WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> operator=null $this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> origin=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
VAR val s: kotlin.String VAR val s: kotlin.String
CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT
$this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> operator=null $this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> origin=null
@@ -19,22 +19,22 @@ FILE /callWithReorderedArguments.kt
CONST Int type=kotlin.Int value='2' CONST Int type=kotlin.Int value='2'
FUN public fun test(): kotlin.Unit FUN public fun test(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'foo(Int, Int): Unit' type=kotlin.Unit operator=null CALL 'foo(Int, Int): Unit' type=kotlin.Unit origin=null
a: CALL 'noReorder1(): Int' type=kotlin.Int operator=null a: CALL 'noReorder1(): Int' type=kotlin.Int origin=null
b: CALL 'noReorder2(): Int' type=kotlin.Int operator=null b: CALL 'noReorder2(): Int' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit operator=ARGUMENTS_REORDERING_FOR_CALL BLOCK type=kotlin.Unit origin=ARGUMENTS_REORDERING_FOR_CALL
VAR IR_TEMPORARY_VARIABLE val tmp0_b: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp0_b: kotlin.Int
CALL 'reordered1(): Int' type=kotlin.Int operator=null CALL 'reordered1(): Int' type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE val tmp1_a: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp1_a: kotlin.Int
CALL 'reordered2(): Int' type=kotlin.Int operator=null CALL 'reordered2(): Int' type=kotlin.Int origin=null
CALL 'foo(Int, Int): Unit' type=kotlin.Unit operator=null CALL 'foo(Int, Int): Unit' type=kotlin.Unit origin=null
a: GET_VAR 'tmp1_a: Int' type=kotlin.Int operator=null a: GET_VAR 'tmp1_a: Int' type=kotlin.Int origin=null
b: GET_VAR 'tmp0_b: Int' type=kotlin.Int operator=null b: GET_VAR 'tmp0_b: Int' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit operator=ARGUMENTS_REORDERING_FOR_CALL BLOCK type=kotlin.Unit origin=ARGUMENTS_REORDERING_FOR_CALL
VAR IR_TEMPORARY_VARIABLE val tmp2_b: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp2_b: kotlin.Int
CONST Int type=kotlin.Int value='1' CONST Int type=kotlin.Int value='1'
VAR IR_TEMPORARY_VARIABLE val tmp3_a: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp3_a: kotlin.Int
CALL 'reordered2(): Int' type=kotlin.Int operator=null CALL 'reordered2(): Int' type=kotlin.Int origin=null
CALL 'foo(Int, Int): Unit' type=kotlin.Unit operator=null CALL 'foo(Int, Int): Unit' type=kotlin.Unit origin=null
a: GET_VAR 'tmp3_a: Int' type=kotlin.Int operator=null a: GET_VAR 'tmp3_a: Int' type=kotlin.Int origin=null
b: GET_VAR 'tmp2_b: Int' type=kotlin.Int operator=null b: GET_VAR 'tmp2_b: Int' type=kotlin.Int origin=null
+13 -13
View File
@@ -2,21 +2,21 @@ FILE /calls.kt
FUN public fun foo(x: kotlin.Int, y: kotlin.Int): kotlin.Int FUN public fun foo(x: kotlin.Int, y: kotlin.Int): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='foo(Int, Int): Int' RETURN type=kotlin.Nothing from='foo(Int, Int): Int'
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
FUN public fun bar(x: kotlin.Int): kotlin.Int FUN public fun bar(x: kotlin.Int): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='bar(Int): Int' RETURN type=kotlin.Nothing from='bar(Int): Int'
CALL 'foo(Int, Int): Int' type=kotlin.Int operator=null CALL 'foo(Int, Int): Int' type=kotlin.Int origin=null
x: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
y: CONST Int type=kotlin.Int value='1' y: CONST Int type=kotlin.Int value='1'
FUN public fun qux(x: kotlin.Int): kotlin.Int FUN public fun qux(x: kotlin.Int): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='qux(Int): Int' RETURN type=kotlin.Nothing from='qux(Int): Int'
CALL 'foo(Int, Int): Int' type=kotlin.Int operator=null CALL 'foo(Int, Int): Int' type=kotlin.Int origin=null
x: CALL 'foo(Int, Int): Int' type=kotlin.Int operator=null x: CALL 'foo(Int, Int): Int' type=kotlin.Int origin=null
x: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
y: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null y: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
y: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null y: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
FUN public fun kotlin.Int.ext1(): kotlin.Int FUN public fun kotlin.Int.ext1(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='ext1() on Int: Int' RETURN type=kotlin.Nothing from='ext1() on Int: Int'
@@ -24,13 +24,13 @@ FILE /calls.kt
FUN public fun kotlin.Int.ext2(x: kotlin.Int): kotlin.Int FUN public fun kotlin.Int.ext2(x: kotlin.Int): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='ext2(Int) on Int: Int' RETURN type=kotlin.Nothing from='ext2(Int) on Int: Int'
CALL 'foo(Int, Int): Int' type=kotlin.Int operator=null CALL 'foo(Int, Int): Int' type=kotlin.Int origin=null
x: $RECEIVER of 'ext2(Int) on Int: Int' type=kotlin.Int x: $RECEIVER of 'ext2(Int) on Int: Int' type=kotlin.Int
y: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null y: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
FUN public fun kotlin.Int.ext3(x: kotlin.Int): kotlin.Int FUN public fun kotlin.Int.ext3(x: kotlin.Int): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='ext3(Int) on Int: Int' RETURN type=kotlin.Nothing from='ext3(Int) on Int: Int'
CALL 'foo(Int, Int): Int' type=kotlin.Int operator=null CALL 'foo(Int, Int): Int' type=kotlin.Int origin=null
x: CALL 'ext1() on Int: Int' type=kotlin.Int operator=null x: CALL 'ext1() on Int: Int' type=kotlin.Int origin=null
$receiver: $RECEIVER of 'ext3(Int) on Int: Int' type=kotlin.Int $receiver: $RECEIVER of 'ext3(Int) on Int: Int' type=kotlin.Int
y: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null y: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
+25 -25
View File
@@ -15,40 +15,40 @@ FILE /chainOfSafeCalls.kt
FUN public fun test(nc: C?): C? FUN public fun test(nc: C?): C?
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='test(C?): C?' RETURN type=kotlin.Nothing from='test(C?): C?'
BLOCK type=C? operator=SAFE_CALL BLOCK type=C? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE val tmp3_safe_receiver: C? VAR IR_TEMPORARY_VARIABLE val tmp3_safe_receiver: C?
BLOCK type=C? operator=SAFE_CALL BLOCK type=C? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE val tmp2_safe_receiver: C? VAR IR_TEMPORARY_VARIABLE val tmp2_safe_receiver: C?
BLOCK type=C? operator=SAFE_CALL BLOCK type=C? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE val tmp1_safe_receiver: C? VAR IR_TEMPORARY_VARIABLE val tmp1_safe_receiver: C?
BLOCK type=C? operator=SAFE_CALL BLOCK type=C? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: C? VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: C?
GET_VAR 'value-parameter nc: C?' type=C? operator=null GET_VAR 'value-parameter nc: C?' type=C? origin=null
WHEN type=C? operator=SAFE_CALL WHEN type=C? origin=SAFE_CALL
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp0_safe_receiver: C?' type=C? operator=null arg0: GET_VAR 'tmp0_safe_receiver: C?' type=C? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null'
else: CALL 'foo(): C' type=C operator=null else: CALL 'foo(): C' type=C origin=null
$this: GET_VAR 'tmp0_safe_receiver: C?' type=C? operator=null $this: GET_VAR 'tmp0_safe_receiver: C?' type=C? origin=null
WHEN type=C? operator=SAFE_CALL WHEN type=C? origin=SAFE_CALL
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp1_safe_receiver: C?' type=C? operator=null arg0: GET_VAR 'tmp1_safe_receiver: C?' type=C? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null'
else: CALL 'bar(): C?' type=C? operator=null else: CALL 'bar(): C?' type=C? origin=null
$this: GET_VAR 'tmp1_safe_receiver: C?' type=C? operator=null $this: GET_VAR 'tmp1_safe_receiver: C?' type=C? origin=null
WHEN type=C? operator=SAFE_CALL WHEN type=C? origin=SAFE_CALL
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp2_safe_receiver: C?' type=C? operator=null arg0: GET_VAR 'tmp2_safe_receiver: C?' type=C? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null'
else: CALL 'foo(): C' type=C operator=null else: CALL 'foo(): C' type=C origin=null
$this: GET_VAR 'tmp2_safe_receiver: C?' type=C? operator=null $this: GET_VAR 'tmp2_safe_receiver: C?' type=C? origin=null
WHEN type=C? operator=SAFE_CALL WHEN type=C? origin=SAFE_CALL
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp3_safe_receiver: C?' type=C? operator=null arg0: GET_VAR 'tmp3_safe_receiver: C?' type=C? origin=null
arg1: CONST Null type=kotlin.Nothing? value='null' arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null'
else: CALL 'foo(): C' type=C operator=null else: CALL 'foo(): C' type=C origin=null
$this: GET_VAR 'tmp3_safe_receiver: C?' type=C? operator=null $this: GET_VAR 'tmp3_safe_receiver: C?' type=C? origin=null
@@ -11,13 +11,13 @@ FILE /complexAugmentedAssignment.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x1>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x1>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x1>(): Int' RETURN type=kotlin.Nothing from='<get-x1>(): Int'
GET_BACKING_FIELD 'x1: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x1: Int' type=kotlin.Int origin=null
receiver: THIS of 'X1' type=X1 receiver: THIS of 'X1' type=X1
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x1>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x1>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x1: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x1: Int' type=kotlin.Unit origin=null
receiver: THIS of 'X1' type=X1 receiver: THIS of 'X1' type=X1
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
CLASS OBJECT X2 CLASS OBJECT X2
CONSTRUCTOR private constructor X2() CONSTRUCTOR private constructor X2()
BLOCK_BODY BLOCK_BODY
@@ -30,13 +30,13 @@ FILE /complexAugmentedAssignment.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x2>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x2>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x2>(): Int' RETURN type=kotlin.Nothing from='<get-x2>(): Int'
GET_BACKING_FIELD 'x2: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x2: Int' type=kotlin.Int origin=null
receiver: THIS of 'X2' type=X1.X2 receiver: THIS of 'X2' type=X1.X2
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x2>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x2>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x2: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x2: Int' type=kotlin.Unit origin=null
receiver: THIS of 'X2' type=X1.X2 receiver: THIS of 'X2' type=X1.X2
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
CLASS OBJECT X3 CLASS OBJECT X3
CONSTRUCTOR private constructor X3() CONSTRUCTOR private constructor X3()
BLOCK_BODY BLOCK_BODY
@@ -49,76 +49,76 @@ FILE /complexAugmentedAssignment.kt
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x3>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x3>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x3>(): Int' RETURN type=kotlin.Nothing from='<get-x3>(): Int'
GET_BACKING_FIELD 'x3: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 'x3: Int' type=kotlin.Int origin=null
receiver: THIS of 'X3' type=X1.X2.X3 receiver: THIS of 'X3' type=X1.X2.X3
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x3>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x3>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x3: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x3: Int' type=kotlin.Unit origin=null
receiver: THIS of 'X3' type=X1.X2.X3 receiver: THIS of 'X3' type=X1.X2.X3
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
FUN public fun test1(a: kotlin.IntArray): kotlin.Unit FUN public fun test1(a: kotlin.IntArray): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR var i: kotlin.Int VAR var i: kotlin.Int
CONST Int type=kotlin.Int value='0' CONST Int type=kotlin.Int value='0'
BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp1_array: kotlin.IntArray VAR IR_TEMPORARY_VARIABLE val tmp1_array: kotlin.IntArray
GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray operator=null GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray origin=null
VAR IR_TEMPORARY_VARIABLE val tmp2_index0: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp2_index0: kotlin.Int
BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int
GET_VAR 'i: Int' type=kotlin.Int operator=POSTFIX_INCR GET_VAR 'i: Int' type=kotlin.Int origin=POSTFIX_INCR
SET_VAR 'i: Int' type=kotlin.Unit operator=POSTFIX_INCR SET_VAR 'i: Int' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp0: Int' type=kotlin.Int operator=null $this: GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
GET_VAR 'tmp0: Int' type=kotlin.Int operator=null GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE val tmp3: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp3: kotlin.Int
CALL 'get(Int): Int' type=kotlin.Int operator=POSTFIX_INCR CALL 'get(Int): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp1_array: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'tmp1_array: IntArray' type=kotlin.IntArray origin=null
index: GET_VAR 'tmp2_index0: Int' type=kotlin.Int operator=null index: GET_VAR 'tmp2_index0: Int' type=kotlin.Int origin=null
CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=POSTFIX_INCR CALL 'set(Int, Int): Unit' type=kotlin.Unit origin=POSTFIX_INCR
$this: GET_VAR 'tmp1_array: IntArray' type=kotlin.IntArray operator=null $this: GET_VAR 'tmp1_array: IntArray' type=kotlin.IntArray origin=null
index: GET_VAR 'tmp2_index0: Int' type=kotlin.Int operator=null index: GET_VAR 'tmp2_index0: Int' type=kotlin.Int origin=null
value: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR value: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp3: Int' type=kotlin.Int operator=null $this: GET_VAR 'tmp3: Int' type=kotlin.Int origin=null
GET_VAR 'tmp3: Int' type=kotlin.Int operator=null GET_VAR 'tmp3: Int' type=kotlin.Int origin=null
FUN public fun test2(): kotlin.Unit FUN public fun test2(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp0_this: X1 VAR IR_TEMPORARY_VARIABLE val tmp0_this: X1
GET_OBJECT 'X1' type=X1 GET_OBJECT 'X1' type=X1
BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Int
CALL '<get-x1>(): Int' type=kotlin.Int operator=POSTFIX_INCR CALL '<get-x1>(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp0_this: X1' type=X1 operator=null $this: GET_VAR 'tmp0_this: X1' type=X1 origin=null
CALL '<set-x1>(Int): Unit' type=kotlin.Unit operator=POSTFIX_INCR CALL '<set-x1>(Int): Unit' type=kotlin.Unit origin=POSTFIX_INCR
$this: GET_VAR 'tmp0_this: X1' type=X1 operator=null $this: GET_VAR 'tmp0_this: X1' type=X1 origin=null
<set-?>: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR <set-?>: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp1: Int' type=kotlin.Int operator=null $this: GET_VAR 'tmp1: Int' type=kotlin.Int origin=null
GET_VAR 'tmp1: Int' type=kotlin.Int operator=null GET_VAR 'tmp1: Int' type=kotlin.Int origin=null
BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp2_this: X1.X2 VAR IR_TEMPORARY_VARIABLE val tmp2_this: X1.X2
GET_OBJECT 'X2' type=X1.X2 GET_OBJECT 'X2' type=X1.X2
BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp3: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp3: kotlin.Int
CALL '<get-x2>(): Int' type=kotlin.Int operator=POSTFIX_INCR CALL '<get-x2>(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp2_this: X1.X2' type=X1.X2 operator=null $this: GET_VAR 'tmp2_this: X1.X2' type=X1.X2 origin=null
CALL '<set-x2>(Int): Unit' type=kotlin.Unit operator=POSTFIX_INCR CALL '<set-x2>(Int): Unit' type=kotlin.Unit origin=POSTFIX_INCR
$this: GET_VAR 'tmp2_this: X1.X2' type=X1.X2 operator=null $this: GET_VAR 'tmp2_this: X1.X2' type=X1.X2 origin=null
<set-?>: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR <set-?>: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp3: Int' type=kotlin.Int operator=null $this: GET_VAR 'tmp3: Int' type=kotlin.Int origin=null
GET_VAR 'tmp3: Int' type=kotlin.Int operator=null GET_VAR 'tmp3: Int' type=kotlin.Int origin=null
BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp4_this: X1.X2.X3 VAR IR_TEMPORARY_VARIABLE val tmp4_this: X1.X2.X3
GET_OBJECT 'X3' type=X1.X2.X3 GET_OBJECT 'X3' type=X1.X2.X3
BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp5: kotlin.Int VAR IR_TEMPORARY_VARIABLE val tmp5: kotlin.Int
CALL '<get-x3>(): Int' type=kotlin.Int operator=POSTFIX_INCR CALL '<get-x3>(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp4_this: X1.X2.X3' type=X1.X2.X3 operator=null $this: GET_VAR 'tmp4_this: X1.X2.X3' type=X1.X2.X3 origin=null
CALL '<set-x3>(Int): Unit' type=kotlin.Unit operator=POSTFIX_INCR CALL '<set-x3>(Int): Unit' type=kotlin.Unit origin=POSTFIX_INCR
$this: GET_VAR 'tmp4_this: X1.X2.X3' type=X1.X2.X3 operator=null $this: GET_VAR 'tmp4_this: X1.X2.X3' type=X1.X2.X3 origin=null
<set-?>: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR <set-?>: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp5: Int' type=kotlin.Int operator=null $this: GET_VAR 'tmp5: Int' type=kotlin.Int origin=null
GET_VAR 'tmp5: Int' type=kotlin.Int operator=null GET_VAR 'tmp5: Int' type=kotlin.Int origin=null
CLASS CLASS B CLASS CLASS B
CONSTRUCTOR public constructor B(s: kotlin.Int = ...) CONSTRUCTOR public constructor B(s: kotlin.Int = ...)
s: EXPRESSION_BODY s: EXPRESSION_BODY
@@ -129,17 +129,17 @@ FILE /complexAugmentedAssignment.kt
PROPERTY public final var s: kotlin.Int PROPERTY public final var s: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final var s: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final var s: kotlin.Int
EXPRESSION_BODY EXPRESSION_BODY
GET_VAR 'value-parameter s: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER GET_VAR 'value-parameter s: Int = ...' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-s>(): kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-s>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-s>(): Int' RETURN type=kotlin.Nothing from='<get-s>(): Int'
GET_BACKING_FIELD 's: Int' type=kotlin.Int operator=null GET_BACKING_FIELD 's: Int' type=kotlin.Int origin=null
receiver: THIS of 'B' type=B receiver: THIS of 'B' type=B
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-s>(<set-?>: kotlin.Int): kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-s>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 's: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 's: Int' type=kotlin.Unit origin=null
receiver: THIS of 'B' type=B receiver: THIS of 'B' type=B
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
CLASS OBJECT Host CLASS OBJECT Host
CONSTRUCTOR private constructor Host() CONSTRUCTOR private constructor Host()
BLOCK_BODY BLOCK_BODY
@@ -147,20 +147,20 @@ FILE /complexAugmentedAssignment.kt
INSTANCE_INITIALIZER_CALL classDescriptor='Host' INSTANCE_INITIALIZER_CALL classDescriptor='Host'
FUN public final operator fun B.plusAssign(b: B): kotlin.Unit FUN public final operator fun B.plusAssign(b: B): kotlin.Unit
BLOCK_BODY BLOCK_BODY
BLOCK type=kotlin.Unit operator=PLUSEQ BLOCK type=kotlin.Unit origin=PLUSEQ
VAR IR_TEMPORARY_VARIABLE val tmp0_this: B VAR IR_TEMPORARY_VARIABLE val tmp0_this: B
$RECEIVER of 'plusAssign(B) on B: Unit' type=B $RECEIVER of 'plusAssign(B) on B: Unit' type=B
CALL '<set-s>(Int): Unit' type=kotlin.Unit operator=PLUSEQ CALL '<set-s>(Int): Unit' type=kotlin.Unit origin=PLUSEQ
$this: GET_VAR 'tmp0_this: B' type=B operator=null $this: GET_VAR 'tmp0_this: B' type=B origin=null
<set-?>: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ <set-?>: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ
$this: CALL '<get-s>(): Int' type=kotlin.Int operator=PLUSEQ $this: CALL '<get-s>(): Int' type=kotlin.Int origin=PLUSEQ
$this: GET_VAR 'tmp0_this: B' type=B operator=null $this: GET_VAR 'tmp0_this: B' type=B origin=null
other: CALL '<get-s>(): Int' type=kotlin.Int operator=GET_PROPERTY other: CALL '<get-s>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'value-parameter b: B' type=B operator=null $this: GET_VAR 'value-parameter b: B' type=B origin=null
FUN public fun Host.test3(v: B): kotlin.Unit FUN public fun Host.test3(v: B): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'plusAssign(B) on B: Unit' type=kotlin.Unit operator=PLUSEQ CALL 'plusAssign(B) on B: Unit' type=kotlin.Unit origin=PLUSEQ
$this: $RECEIVER of 'test3(B) on Host: Unit' type=Host $this: $RECEIVER of 'test3(B) on Host: Unit' type=Host
$receiver: GET_VAR 'value-parameter v: B' type=B operator=PLUSEQ $receiver: GET_VAR 'value-parameter v: B' type=B origin=PLUSEQ
b: CALL 'constructor B(Int = ...)' type=B operator=null b: CALL 'constructor B(Int = ...)' type=B origin=null
s: CONST Int type=kotlin.Int value='1000' s: CONST Int type=kotlin.Int value='1000'

Some files were not shown because too many files have changed in this diff Show More