Detailed "operator" convention information (for JS).

This commit is contained in:
Dmitry Petrov
2016-08-18 17:53:04 +03:00
committed by Dmitry Petrov
parent 4a62a6b7c3
commit 64d630faa3
42 changed files with 529 additions and 421 deletions
@@ -28,7 +28,7 @@ import org.jetbrains.kotlin.resolve.BindingContext
class Psi2IrTranslator(val configuration: Configuration = Configuration()) { class Psi2IrTranslator(val configuration: Configuration = Configuration()) {
class Configuration( class Configuration(
val shouldInlineDesugaredBlocks: Boolean = true, val shouldInlineDesugaredBlocks: Boolean = false,
val shouldFoldStringConcatenation: Boolean = true val shouldFoldStringConcatenation: Boolean = true
) )
@@ -161,11 +161,9 @@ class IrCallGenerator(val irStatementGenerator: IrStatementGenerator) : IrGenera
val valueArgumentsInEvaluationOrder = resolvedCall.valueArguments.values val valueArgumentsInEvaluationOrder = resolvedCall.valueArguments.values
val valueParameters = resolvedCall.resultingDescriptor.valueParameters val valueParameters = resolvedCall.resultingDescriptor.valueParameters
val irBlock = IrBlockExpressionImpl(ktExpression.startOffset, ktExpression.endOffset, resultType, val hasResult = isUsedAsExpression(ktExpression)
hasResult = isUsedAsExpression(ktExpression), val irBlock = IrBlockExpressionImpl(ktExpression.startOffset, ktExpression.endOffset, resultType, hasResult,
isDesugared = true) IrOperator.SYNTHETIC_BLOCK)
val valueArgumentsToValueParameters = HashMap<ResolvedValueArgument, ValueParameterDescriptor>() val valueArgumentsToValueParameters = HashMap<ResolvedValueArgument, ValueParameterDescriptor>()
for ((index, valueArgument) in resolvedCall.valueArgumentsByIndex!!.withIndex()) { for ((index, valueArgument) in resolvedCall.valueArgumentsByIndex!!.withIndex()) {
@@ -150,7 +150,7 @@ class IrDeclarationGenerator(override val context: IrGeneratorContext) : IrGener
if (ktBody is KtBlockExpression) if (ktBody is KtBlockExpression)
irRhs irRhs
else else
IrBlockExpressionImpl(ktBody.startOffset, ktBody.endOffset, null, hasResult = false, isDesugared = true).apply { IrBlockExpressionImpl(ktBody.startOffset, ktBody.endOffset, null, false).apply {
addStatement(IrReturnExpressionImpl(ktBody.startOffset, ktBody.endOffset, scopeOwner, irRhs)) addStatement(IrReturnExpressionImpl(ktBody.startOffset, ktBody.endOffset, scopeOwner, irRhs))
} }
return IrExpressionBodyImpl(ktBody.startOffset, ktBody.endOffset, irExpressionBody) return IrExpressionBodyImpl(ktBody.startOffset, ktBody.endOffset, irExpressionBody)
@@ -17,11 +17,12 @@
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.IrBinaryOperator
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrOperator
import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.lexer.KtTokens
fun getIrBinaryOperator(ktOperator: IElementType): IrOperator? = fun getIrBinaryOperator(ktOperator: IElementType): IrBinaryOperator? =
KT_TOKEN_TO_IR_BINARY_OPERATOR[ktOperator] KT_TOKEN_TO_IR_BINARY_OPERATOR[ktOperator]
fun getIrPrefixOperator(ktOperator: IElementType): IrOperator? = fun getIrPrefixOperator(ktOperator: IElementType): IrOperator? =
@@ -30,7 +31,7 @@ fun getIrPrefixOperator(ktOperator: IElementType): IrOperator? =
fun getIrPostfixOperator(ktOperator: IElementType): IrOperator? = fun getIrPostfixOperator(ktOperator: IElementType): IrOperator? =
KT_TOKEN_TO_IR_POSTFIX_OPERATOR[ktOperator] KT_TOKEN_TO_IR_POSTFIX_OPERATOR[ktOperator]
private val KT_TOKEN_TO_IR_BINARY_OPERATOR = mapOf( private val KT_TOKEN_TO_IR_BINARY_OPERATOR = mapOf<IElementType, IrBinaryOperator>(
KtTokens.EQ to IrOperator.EQ, KtTokens.EQ to IrOperator.EQ,
KtTokens.PLUSEQ to IrOperator.PLUSEQ, KtTokens.PLUSEQ to IrOperator.PLUSEQ,
@@ -66,14 +67,14 @@ private val KT_TOKEN_TO_IR_BINARY_OPERATOR = mapOf(
KtTokens.ELVIS to IrOperator.ELVIS KtTokens.ELVIS to IrOperator.ELVIS
) )
private val KT_TOKEN_TO_IR_PREFIX_OPERATOR = mapOf( private val KT_TOKEN_TO_IR_PREFIX_OPERATOR = mapOf<IElementType, IrOperator>(
KtTokens.PLUSPLUS to IrOperator.PREFIX_INCR, KtTokens.PLUSPLUS to IrOperator.PREFIX_INCR,
KtTokens.MINUSMINUS to IrOperator.PREFIX_DECR, KtTokens.MINUSMINUS to IrOperator.PREFIX_DECR,
KtTokens.EXCL to IrOperator.EXCL, KtTokens.EXCL to IrOperator.EXCL,
KtTokens.MINUS to IrOperator.UMINUS KtTokens.MINUS to IrOperator.UMINUS
) )
private val KT_TOKEN_TO_IR_POSTFIX_OPERATOR = mapOf( private val KT_TOKEN_TO_IR_POSTFIX_OPERATOR = mapOf<IElementType, IrOperator>(
KtTokens.PLUSPLUS to IrOperator.POSTFIX_INCR, KtTokens.PLUSPLUS to IrOperator.POSTFIX_INCR,
KtTokens.MINUSMINUS to IrOperator.POSTFIX_DECR, KtTokens.MINUSMINUS to IrOperator.POSTFIX_DECR,
KtTokens.EXCLEXCL to IrOperator.EXCLEXCL KtTokens.EXCLEXCL to IrOperator.EXCLEXCL
@@ -78,7 +78,7 @@ class IrOperatorExpressionGenerator(val irStatementGenerator: IrStatementGenerat
) )
} }
private fun generateBinaryBooleanOperator(expression: KtBinaryExpression, irOperator: IrOperator): IrExpression { private fun generateBinaryBooleanOperator(expression: KtBinaryExpression, irOperator: IrBinaryOperator): IrExpression {
val irArgument0 = irStatementGenerator.generateExpression(expression.left!!).toExpectedType(context.builtIns.booleanType) val irArgument0 = irStatementGenerator.generateExpression(expression.left!!).toExpectedType(context.builtIns.booleanType)
val irArgument1 = irStatementGenerator.generateExpression(expression.right!!).toExpectedType(context.builtIns.booleanType) val irArgument1 = irStatementGenerator.generateExpression(expression.right!!).toExpectedType(context.builtIns.booleanType)
return IrBinaryOperatorExpressionImpl( return IrBinaryOperatorExpressionImpl(
@@ -99,7 +99,7 @@ class IrOperatorExpressionGenerator(val irStatementGenerator: IrStatementGenerat
IrOperator.EXCL, null, irOperatorCall) IrOperator.EXCL, null, irOperatorCall)
} }
private fun generateIdentityOperator(expression: KtBinaryExpression, irOperator: IrOperator): IrExpression { private fun generateIdentityOperator(expression: KtBinaryExpression, irOperator: IrBinaryOperator): IrExpression {
val irArgument0 = irStatementGenerator.generateExpression(expression.left!!) val irArgument0 = irStatementGenerator.generateExpression(expression.left!!)
val irArgument1 = irStatementGenerator.generateExpression(expression.right!!) val irArgument1 = irStatementGenerator.generateExpression(expression.right!!)
return IrBinaryOperatorExpressionImpl( return IrBinaryOperatorExpressionImpl(
@@ -108,7 +108,7 @@ class IrOperatorExpressionGenerator(val irStatementGenerator: IrStatementGenerat
) )
} }
private fun generateEqualityOperator(expression: KtBinaryExpression, irOperator: IrOperator): IrExpression { private fun generateEqualityOperator(expression: KtBinaryExpression, irOperator: IrBinaryOperator): IrExpression {
val relatedCall = getResolvedCall(expression)!! val relatedCall = getResolvedCall(expression)!!
val relatedDescriptor = relatedCall.resultingDescriptor val relatedDescriptor = relatedCall.resultingDescriptor
@@ -133,7 +133,7 @@ class IrOperatorExpressionGenerator(val irStatementGenerator: IrStatementGenerat
) )
} }
private fun generateComparisonOperator(expression: KtBinaryExpression, irOperator: IrOperator): IrExpression { private fun generateComparisonOperator(expression: KtBinaryExpression, irOperator: IrBinaryOperator): IrExpression {
val relatedCall = getResolvedCall(expression)!! val relatedCall = getResolvedCall(expression)!!
val relatedDescriptor = relatedCall.resultingDescriptor val relatedDescriptor = relatedCall.resultingDescriptor
@@ -158,11 +158,11 @@ class IrOperatorExpressionGenerator(val irStatementGenerator: IrStatementGenerat
val operatorCall = getResolvedCall(expression)!! val operatorCall = getResolvedCall(expression)!!
if (irLValue is IrLValueWithAugmentedStore) { if (irLValue is IrLValueWithAugmentedStore) {
return irLValue.prefixAugmentedStore(operatorCall) return irLValue.prefixAugmentedStore(operatorCall, irOperator)
} }
val opCallGenerator = IrCallGenerator(irStatementGenerator).apply { putValue(ktBaseExpression, irLValue) } val opCallGenerator = IrCallGenerator(irStatementGenerator).apply { putValue(ktBaseExpression, irLValue) }
val irBlock = IrBlockExpressionImpl(expression.startOffset, expression.endOffset, irLValue.type, true, true) val irBlock = IrBlockExpressionImpl(expression.startOffset, expression.endOffset, irLValue.type, true, irOperator)
val irOpCall = opCallGenerator.generateCall(expression, operatorCall, irOperator) val irOpCall = opCallGenerator.generateCall(expression, operatorCall, irOperator)
val irTmp = irStatementGenerator.temporaryVariableFactory.createTemporaryVariable(irOpCall) val irTmp = irStatementGenerator.temporaryVariableFactory.createTemporaryVariable(irOpCall)
irBlock.addStatement(irTmp) irBlock.addStatement(irTmp)
@@ -179,7 +179,7 @@ class IrOperatorExpressionGenerator(val irStatementGenerator: IrStatementGenerat
val isSimpleAssignment = get(BindingContext.VARIABLE_REASSIGNMENT, expression) ?: false val isSimpleAssignment = get(BindingContext.VARIABLE_REASSIGNMENT, expression) ?: false
if (isSimpleAssignment && irLValue is IrLValueWithAugmentedStore) { if (isSimpleAssignment && irLValue is IrLValueWithAugmentedStore) {
return irLValue.augmentedStore(operatorCall, irStatementGenerator.generateExpression(expression.right!!)) return irLValue.augmentedStore(operatorCall, irOperator, irStatementGenerator.generateExpression(expression.right!!))
} }
val opCallGenerator = IrCallGenerator(irStatementGenerator).apply { putValue(ktLeft, irLValue) } val opCallGenerator = IrCallGenerator(irStatementGenerator).apply { putValue(ktLeft, irLValue) }
@@ -72,8 +72,7 @@ class IrStatementGenerator(
override fun visitDestructuringDeclaration(multiDeclaration: KtDestructuringDeclaration, data: Nothing?): IrStatement { override fun visitDestructuringDeclaration(multiDeclaration: KtDestructuringDeclaration, data: Nothing?): IrStatement {
// TODO use some special form that introduces multiple declarations into surrounding scope? // TODO use some special form that introduces multiple declarations into surrounding scope?
val irBlock = IrBlockExpressionImpl(multiDeclaration.startOffset, multiDeclaration.endOffset, null, val irBlock = IrBlockExpressionImpl(multiDeclaration.startOffset, multiDeclaration.endOffset, null, false, IrOperator.SYNTHETIC_BLOCK)
hasResult = false, isDesugared = true)
val ktInitializer = multiDeclaration.initializer!! val ktInitializer = multiDeclaration.initializer!!
val irTmpInitializer = temporaryVariableFactory.createTemporaryVariable(ktInitializer.genExpr()) val irTmpInitializer = temporaryVariableFactory.createTemporaryVariable(ktInitializer.genExpr())
irBlock.addStatement(irTmpInitializer) irBlock.addStatement(irTmpInitializer)
@@ -94,8 +93,8 @@ class IrStatementGenerator(
} }
override fun visitBlockExpression(expression: KtBlockExpression, data: Nothing?): IrStatement { override fun visitBlockExpression(expression: KtBlockExpression, data: Nothing?): IrStatement {
val irBlock = IrBlockExpressionImpl(expression.startOffset, expression.endOffset, getReturnType(expression), val irBlock = IrBlockExpressionImpl(expression.startOffset, expression.endOffset,
hasResult = isUsedAsExpression(expression), isDesugared = false) getReturnType(expression), isUsedAsExpression(expression))
expression.statements.forEach { irBlock.addStatement(it.genStmt()) } expression.statements.forEach { irBlock.addStatement(it.genStmt()) }
return irBlock return irBlock
} }
@@ -51,26 +51,22 @@ class IrIndexedLValue(
private fun generateGetOrSetCallAsDesugaredBlock(call: ResolvedCall<*>, irArgument: IrExpression? = null): IrExpression { private fun generateGetOrSetCallAsDesugaredBlock(call: ResolvedCall<*>, irArgument: IrExpression? = null): IrExpression {
val callGenerator = IrCallGenerator(irStatementGenerator) val callGenerator = IrCallGenerator(irStatementGenerator)
setupCallGeneratorContext(callGenerator)
val hasResult = irArgument == null
val irBlock = createDesugaredBlock(call, callGenerator, hasResult)
if (irArgument != null) { if (irArgument != null) {
callGenerator.putValue(call.resultingDescriptor.valueParameters.last(), IrSingleExpressionValue(irArgument)) callGenerator.putValue(call.resultingDescriptor.valueParameters.last(), IrSingleExpressionValue(irArgument))
} }
irBlock.addStatement(callGenerator.generateCall(ktArrayAccessExpression, call, irOperator)) return callGenerator.generateCall(ktArrayAccessExpression, call, irOperator)
return irBlock
} }
override fun prefixAugmentedStore(operatorCall: ResolvedCall<*>): IrExpression { override fun prefixAugmentedStore(operatorCall: ResolvedCall<*>, irOperator: IrOperator): IrExpression {
if (indexedGetCall == null) throw AssertionError("Indexed LValue has no 'get' call: ${ktArrayAccessExpression.text}") if (indexedGetCall == null) throw AssertionError("Indexed LValue has no 'get' call: ${ktArrayAccessExpression.text}")
if (indexedSetCall == null) throw AssertionError("Indexed LValue has no 'set' call: ${ktArrayAccessExpression.text}") if (indexedSetCall == null) throw AssertionError("Indexed LValue has no 'set' call: ${ktArrayAccessExpression.text}")
val callGenerator = IrCallGenerator(irStatementGenerator) val callGenerator = IrCallGenerator(irStatementGenerator)
val irBlock = createDesugaredBlock(indexedSetCall, callGenerator, true) val irBlock = createDesugaredBlockWithTemporaries(indexedSetCall, callGenerator, true, irOperator)
val operatorCallReceiver = operatorCall.extensionReceiver ?: operatorCall.dispatchReceiver val operatorCallReceiver = operatorCall.extensionReceiver ?: operatorCall.dispatchReceiver
callGenerator.putValue(operatorCallReceiver!!, callGenerator.putValue(operatorCallReceiver!!,
@@ -89,13 +85,13 @@ class IrIndexedLValue(
return irBlock return irBlock
} }
override fun augmentedStore(operatorCall: ResolvedCall<*>, irOperatorArgument: IrExpression): IrExpression { override fun augmentedStore(operatorCall: ResolvedCall<*>, irOperator: IrOperator, irOperatorArgument: IrExpression): IrExpression {
if (indexedGetCall == null) throw AssertionError("Indexed LValue has no 'get' call: ${ktArrayAccessExpression.text}") if (indexedGetCall == null) throw AssertionError("Indexed LValue has no 'get' call: ${ktArrayAccessExpression.text}")
if (indexedSetCall == null) throw AssertionError("Indexed LValue has no 'set' call: ${ktArrayAccessExpression.text}") if (indexedSetCall == null) throw AssertionError("Indexed LValue has no 'set' call: ${ktArrayAccessExpression.text}")
val callGenerator = IrCallGenerator(irStatementGenerator) val callGenerator = IrCallGenerator(irStatementGenerator)
val irBlock = createDesugaredBlock(indexedSetCall, callGenerator, false) val irBlock = createDesugaredBlockWithTemporaries(indexedSetCall, callGenerator, false, irOperator)
callGenerator.putValue(operatorCall.resultingDescriptor.valueParameters[0], IrSingleExpressionValue(irOperatorArgument)) callGenerator.putValue(operatorCall.resultingDescriptor.valueParameters[0], IrSingleExpressionValue(irOperatorArgument))
@@ -111,17 +107,24 @@ class IrIndexedLValue(
return irBlock return irBlock
} }
private fun createDesugaredBlock(call: ResolvedCall<*>, callGenerator: IrCallGenerator, hasResult: Boolean): IrBlockExpressionImpl { private fun createDesugaredBlockWithTemporaries(
val irBlock = IrBlockExpressionImpl(ktArrayAccessExpression.startOffset, ktArrayAccessExpression.endOffset, call: ResolvedCall<*>,
call.resultingDescriptor.returnType, callGenerator: IrCallGenerator,
hasResult, true) hasResult: Boolean,
operator: IrOperator?
defineContextVariables(irBlock, callGenerator) ): IrBlockExpressionImpl {
val irBlock = createDesugaredBlock(call, hasResult, operator)
defineTemporaryVariables(irBlock, callGenerator)
return irBlock return irBlock
} }
private fun defineContextVariables(irBlock: IrBlockExpression, callGenerator: IrCallGenerator) { private fun createDesugaredBlock(call: ResolvedCall<*>, hasResult: Boolean, operator: IrOperator?): IrBlockExpressionImpl {
return IrBlockExpressionImpl(ktArrayAccessExpression.startOffset, ktArrayAccessExpression.endOffset,
call.resultingDescriptor.returnType,
hasResult, operator)
}
private fun defineTemporaryVariables(irBlock: IrBlockExpression, callGenerator: IrCallGenerator) {
irBlock.addIfNotNull(callGenerator.introduceTemporary(ktArrayAccessExpression.arrayExpression!!, irArray, "array")) irBlock.addIfNotNull(callGenerator.introduceTemporary(ktArrayAccessExpression.arrayExpression!!, irArray, "array"))
var index = 0 var index = 0
@@ -129,4 +132,12 @@ class IrIndexedLValue(
irBlock.addIfNotNull(callGenerator.introduceTemporary(ktIndexExpression, irIndexValue, "index${index++}")) irBlock.addIfNotNull(callGenerator.introduceTemporary(ktIndexExpression, irIndexValue, "index${index++}"))
} }
} }
private fun setupCallGeneratorContext(callGenerator: IrCallGenerator) {
callGenerator.putValue(ktArrayAccessExpression.arrayExpression!!, IrSingleExpressionValue(irArray))
for ((ktIndexExpression, irIndexValue) in indexValues) {
callGenerator.putValue(ktIndexExpression, IrSingleExpressionValue(irIndexValue))
}
}
} }
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.psi2ir.generators.values
import org.jetbrains.kotlin.ir.assertDetached import org.jetbrains.kotlin.ir.assertDetached
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.resolve.calls.model.ResolvedCall import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
@@ -49,7 +50,7 @@ interface IrLValue : IrValue {
} }
interface IrLValueWithAugmentedStore : IrLValue { interface IrLValueWithAugmentedStore : IrLValue {
fun prefixAugmentedStore(operatorCall: ResolvedCall<*>): IrExpression fun prefixAugmentedStore(operatorCall: ResolvedCall<*>, irOperator: IrOperator): IrExpression
fun augmentedStore(operatorCall: ResolvedCall<*>, irOperatorArgument: IrExpression): IrExpression fun augmentedStore(operatorCall: ResolvedCall<*>, irOperator: IrOperator, irOperatorArgument: IrExpression): IrExpression
} }
@@ -35,11 +35,11 @@ class InlineDesugaredBlocks : IrElementVisitor<Unit, Nothing?> {
override fun visitBlockExpression(expression: IrBlockExpression, data: Nothing?) { override fun visitBlockExpression(expression: IrBlockExpression, data: Nothing?) {
val transformedBlock = IrBlockExpressionImpl( val transformedBlock = IrBlockExpressionImpl(
expression.startOffset, expression.endOffset, expression.type, expression.startOffset, expression.endOffset, expression.type,
expression.hasResult, expression.isDesugared expression.hasResult, expression.operator
) )
for (statement in expression.statements) { for (statement in expression.statements) {
statement.accept(this, data) statement.accept(this, data)
if (statement is IrBlockExpression && statement.isDesugared) { if (statement is IrBlockExpression && statement.operator != null) {
statement.statements.forEach { statement.statements.forEach {
transformedBlock.addStatement(it.detach()) transformedBlock.addStatement(it.detach())
} }
@@ -27,7 +27,7 @@ import java.util.*
interface IrBlockExpression : IrExpression { interface IrBlockExpression : IrExpression {
val hasResult: Boolean val hasResult: Boolean
val isDesugared: Boolean val operator: IrOperator?
val statements: List<IrStatement> val statements: List<IrStatement>
fun addStatement(statement: IrStatement) fun addStatement(statement: IrStatement)
@@ -42,7 +42,7 @@ class IrBlockExpressionImpl(
endOffset: Int, endOffset: Int,
type: KotlinType?, type: KotlinType?,
override val hasResult: Boolean, override val hasResult: Boolean,
override val isDesugared: Boolean override val operator: IrOperator? = null
) : IrExpressionBase(startOffset, endOffset, type), IrBlockExpression { ) : IrExpressionBase(startOffset, endOffset, type), IrBlockExpression {
override val statements: MutableList<IrStatement> = ArrayList() override val statements: MutableList<IrStatement> = ArrayList()
@@ -16,51 +16,54 @@
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
abstract class IrOperator(val debugName: String) { interface IrOperator {
override fun toString(): String = debugName object UMINUS : IrOperatorImpl("UMINUS"), IrUnaryOperator
object EXCL : IrOperatorImpl("EXCL"), IrUnaryOperator
object EXCLEXCL : IrOperatorImpl("EXCLEXCL"), IrUnaryOperator
object INVOKE : IrOperator("INVOKE") object ELVIS : IrOperatorImpl("ELVIS"), IrBinaryOperator
object PREFIX_INCR : IrOperator("PREFIX_INCR") object LT : IrOperatorImpl("LT"), IrBinaryOperator
object PREFIX_DECR : IrOperator("PREFIX_DECR") object GT : IrOperatorImpl("GT"), IrBinaryOperator
object POSTFIX_INCR : IrOperator("POSTFIX_INCR") object LTEQ : IrOperatorImpl("LTEQ"), IrBinaryOperator
object POSTFIX_DECR : IrOperator("POSTFIX_DECR") object GTEQ : IrOperatorImpl("GTEQ"), IrBinaryOperator
object UMINUS : IrOperator("UMINUS") object EQEQ : IrOperatorImpl("EQEQ"), IrBinaryOperator
object EXCL : IrOperator("EXCL") object EQEQEQ : IrOperatorImpl("EQEQEQ"), IrBinaryOperator
object EXCLEXCL : IrOperator("EXCLEXCL") object EXCLEQ : IrOperatorImpl("EXCLEQ"), IrBinaryOperator
object ELVIS : IrOperator("ELVIS") object EXCLEQEQ : IrOperatorImpl("EXCLEQEQ"), IrBinaryOperator
object LT : IrOperator("LT") object IN : IrOperatorImpl("IN"), IrBinaryOperator
object GT : IrOperator("GT") object NOT_IN : IrOperatorImpl("NOT_IN"), IrBinaryOperator
object LTEQ : IrOperator("LTEQ") object ANDAND : IrOperatorImpl("ANDAND"), IrBinaryOperator
object GTEQ : IrOperator("GTEQ") object OROR : IrOperatorImpl("OROR"), IrBinaryOperator
object EQEQ : IrOperator("EQEQ")
object EQEQEQ : IrOperator("EQEQEQ")
object EXCLEQ : IrOperator("EXCLEQ")
object EXCLEQEQ : IrOperator("EXCLEQEQ")
object IN : IrOperator("IN")
object NOT_IN : IrOperator("NOT_IN")
object ANDAND : IrOperator("ANDAND")
object OROR : IrOperator("OROR")
object RANGE : IrOperator("RANGE")
object PLUS : IrOperator("PLUS") object PLUS : IrOperatorImpl("PLUS"), IrBinaryOperator
object MINUS : IrOperator("MINUS") object MINUS : IrOperatorImpl("MINUS"), IrBinaryOperator
object MUL : IrOperator("MUL") object MUL : IrOperatorImpl("MUL"), IrBinaryOperator
object DIV : IrOperator("DIV") object DIV : IrOperatorImpl("DIV"), IrBinaryOperator
object PERC : IrOperator("PERC") object PERC : IrOperatorImpl("PERC"), IrBinaryOperator
object RANGE : IrOperatorImpl("RANGE"), IrBinaryOperator
object EQ : IrOperator("EQ") object INVOKE : IrOperatorImpl("INVOKE"), IrUnaryOperator
object PLUSEQ : IrOperator("PLUSEQ")
object MINUSEQ : IrOperator("MINUSEQ")
object MULTEQ : IrOperator("MULTEQ")
object DIVEQ : IrOperator("DIVEQ")
object PERCEQ : IrOperator("PERCEQ")
data class COMPONENT_N private constructor(val index: Int) : IrOperator("COMPONENT_$index") { object PREFIX_INCR : IrOperatorImpl("PREFIX_INCR"), IrUnaryOperator
object PREFIX_DECR : IrOperatorImpl("PREFIX_DECR"), IrUnaryOperator
object POSTFIX_INCR : IrOperatorImpl("POSTFIX_INCR"), IrUnaryOperator
object POSTFIX_DECR : IrOperatorImpl("POSTFIX_DECR"), IrUnaryOperator
object EQ : IrOperatorImpl("EQ"), IrBinaryOperator
object PLUSEQ : IrOperatorImpl("PLUSEQ"), IrBinaryOperator
object MINUSEQ : IrOperatorImpl("MINUSEQ"), IrBinaryOperator
object MULTEQ : IrOperatorImpl("MULTEQ"), IrBinaryOperator
object DIVEQ : IrOperatorImpl("DIVEQ"), IrBinaryOperator
object PERCEQ : IrOperatorImpl("PERCEQ"), IrBinaryOperator
object SYNTHETIC_BLOCK : IrOperatorImpl("SYNTHETIC_BLOCK")
data class COMPONENT_N private constructor(val index: Int) : IrOperatorImpl("COMPONENT_$index") {
companion object { companion object {
private val precreatedComponents = Array(32) { i -> COMPONENT_N(i + 1) } private val precreatedComponents = Array(32) { i -> COMPONENT_N(i + 1) }
@@ -71,4 +74,11 @@ abstract class IrOperator(val debugName: String) {
COMPONENT_N(index) COMPONENT_N(index)
} }
} }
}
interface IrUnaryOperator : IrOperator
interface IrBinaryOperator : IrOperator
abstract class IrOperatorImpl(val debugName: String): IrOperator {
override fun toString(): String = debugName
} }
@@ -27,10 +27,12 @@ interface IrOperatorExpression : IrExpression {
} }
interface IrUnaryOperatorExpression : IrOperatorExpression { interface IrUnaryOperatorExpression : IrOperatorExpression {
override val operator: IrUnaryOperator
var argument: IrExpression var argument: IrExpression
} }
interface IrBinaryOperatorExpression : IrOperatorExpression { interface IrBinaryOperatorExpression : IrOperatorExpression {
override val operator: IrBinaryOperator
var argument0: IrExpression var argument0: IrExpression
var argument1: IrExpression var argument1: IrExpression
} }
@@ -39,14 +41,14 @@ class IrUnaryOperatorExpressionImpl(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
type: KotlinType?, type: KotlinType?,
override val operator: IrOperator, override val operator: IrUnaryOperator,
override val relatedDescriptor: CallableDescriptor? override val relatedDescriptor: CallableDescriptor?
) : IrExpressionBase(startOffset, endOffset, type), IrUnaryOperatorExpression { ) : IrExpressionBase(startOffset, endOffset, type), IrUnaryOperatorExpression {
constructor( constructor(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
type: KotlinType?, type: KotlinType?,
operator: IrOperator, operator: IrUnaryOperator,
relatedDescriptor: CallableDescriptor?, relatedDescriptor: CallableDescriptor?,
argument: IrExpression argument: IrExpression
) : this(startOffset, endOffset, type, operator, relatedDescriptor) { ) : this(startOffset, endOffset, type, operator, relatedDescriptor) {
@@ -89,14 +91,14 @@ class IrBinaryOperatorExpressionImpl(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
type: KotlinType?, type: KotlinType?,
override val operator: IrOperator, override val operator: IrBinaryOperator,
override val relatedDescriptor: CallableDescriptor? override val relatedDescriptor: CallableDescriptor?
) : IrExpressionBase(startOffset, endOffset, type), IrBinaryOperatorExpression { ) : IrExpressionBase(startOffset, endOffset, type), IrBinaryOperatorExpression {
constructor( constructor(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
type: KotlinType?, type: KotlinType?,
operator: IrOperator, operator: IrBinaryOperator,
relatedDescriptor: CallableDescriptor?, relatedDescriptor: CallableDescriptor?,
argument0: IrExpression, argument0: IrExpression,
argument1: IrExpression argument1: IrExpression
@@ -64,7 +64,7 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
"LITERAL ${expression.kind} type=${expression.renderType()} value='${expression.value}'" "LITERAL ${expression.kind} type=${expression.renderType()} value='${expression.value}'"
override fun visitBlockExpression(expression: IrBlockExpression, data: Nothing?): String = override fun visitBlockExpression(expression: IrBlockExpression, data: Nothing?): String =
"BLOCK type=${expression.renderType()} hasResult=${expression.hasResult} isDesugared=${expression.isDesugared}" "BLOCK type=${expression.renderType()} hasResult=${expression.hasResult} operator=${expression.operator}"
override fun visitReturnExpression(expression: IrReturnExpression, data: Nothing?): String = override fun visitReturnExpression(expression: IrReturnExpression, data: Nothing?): String =
"RETURN type=${expression.renderType()}" "RETURN type=${expression.renderType()}"
@@ -77,17 +77,21 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
override fun visitCallExpression(expression: IrCallExpression, data: Nothing?): String = override fun visitCallExpression(expression: IrCallExpression, data: Nothing?): String =
"CALL ${if (expression.isSafe) "?." else "."}${expression.descriptor.name} " + "CALL ${if (expression.isSafe) "?." else "."}${expression.descriptor.name} " +
"type=${expression.renderType()} operator=${expression.operator ?: ""}" "type=${expression.renderType()} operator=${expression.operator}"
override fun visitGetProperty(expression: IrGetPropertyExpression, data: Nothing?): String = override fun visitGetProperty(expression: IrGetPropertyExpression, data: Nothing?): String =
"GET_PROPERTY ${if (expression.isSafe) "?." else "."}${expression.descriptor.name} " + "GET_PROPERTY ${if (expression.isSafe) "?." else "."}${expression.descriptor.name} " +
"type=${expression.renderType()}" "type=${expression.renderType()} operator=${expression.operator}"
override fun visitSetProperty(expression: IrSetPropertyExpression, data: Nothing?): String =
"SET_PROPERTY ${if (expression.isSafe) "?." else "."}${expression.descriptor.name}" +
"type=${expression.renderType()} operator=${expression.operator}"
override fun visitGetVariable(expression: IrGetVariableExpression, data: Nothing?): String = override fun visitGetVariable(expression: IrGetVariableExpression, data: Nothing?): String =
"GET_VAR ${expression.descriptor.name} type=${expression.renderType()}" "GET_VAR ${expression.descriptor.name} type=${expression.renderType()} operator=${expression.operator}"
override fun visitSetVariable(expression: IrSetVariableExpression, data: Nothing?): String = override fun visitSetVariable(expression: IrSetVariableExpression, data: Nothing?): String =
"SET_VAR ${expression.descriptor.name} type=${expression.renderType()}" "SET_VAR ${expression.descriptor.name} type=${expression.renderType()} operator=${expression.operator}"
override fun visitGetObjectValue(expression: IrGetObjectValueExpression, data: Nothing?): String = override fun visitGetObjectValue(expression: IrGetObjectValueExpression, data: Nothing?): String =
"GET_OBJECT ${expression.descriptor.name} type=${expression.renderType()}" "GET_OBJECT ${expression.descriptor.name} type=${expression.renderType()}"
@@ -95,10 +99,6 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
override fun visitGetEnumValue(expression: IrGetEnumValueExpression, data: Nothing?): String = override fun visitGetEnumValue(expression: IrGetEnumValueExpression, data: Nothing?): String =
"GET_ENUM_VALUE ${expression.descriptor.name} type=${expression.renderType()}" "GET_ENUM_VALUE ${expression.descriptor.name} type=${expression.renderType()}"
override fun visitSetProperty(expression: IrSetPropertyExpression, data: Nothing?): String =
"SET_PROPERTY ${if (expression.isSafe) "?." else "."}${expression.descriptor.name}" +
"type=${expression.renderType()}"
override fun visitUnaryOperator(expression: IrUnaryOperatorExpression, data: Nothing?): String = override fun visitUnaryOperator(expression: IrUnaryOperatorExpression, data: Nothing?): String =
"UNARY_OP operator=${expression.operator} " + "UNARY_OP operator=${expression.operator} " +
"type=${expression.renderType()} " + "type=${expression.renderType()} " +
+6
View File
@@ -1,4 +1,10 @@
fun test() { fun test() {
val x = intArrayOf(1, 2, 3) val x = intArrayOf(1, 2, 3)
x[1] = 0 x[1] = 0
}
fun foo() = 1
fun test2() {
intArrayOf(1, 2, 3)[foo()] = 1
} }
+16 -3
View File
@@ -1,11 +1,24 @@
IrFile /arrayAssignment.kt IrFile /arrayAssignment.kt
IrFunction public fun test(): kotlin.Unit IrFunction public fun test(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
VAR val x: kotlin.IntArray VAR val x: kotlin.IntArray
CALL .intArrayOf type=kotlin.IntArray operator= CALL .intArrayOf type=kotlin.IntArray operator=null
elements: DUMMY vararg type=kotlin.Int elements: DUMMY vararg type=kotlin.Int
CALL .set type=kotlin.Unit operator=EQ CALL .set type=kotlin.Unit operator=EQ
$this: GET_VAR x type=kotlin.IntArray $this: GET_VAR x type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='1' index: LITERAL Int type=kotlin.Int value='1'
value: LITERAL Int type=kotlin.Int value='0' value: LITERAL Int type=kotlin.Int value='0'
IrFunction public fun foo(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='1'
IrFunction public fun test2(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
CALL .set type=kotlin.Unit operator=EQ
$this: CALL .intArrayOf type=kotlin.IntArray operator=null
elements: DUMMY vararg type=kotlin.Int
index: CALL .foo type=kotlin.Int operator=null
value: LITERAL Int type=kotlin.Int value='1'
+2 -1
View File
@@ -1,8 +1,9 @@
fun foo(): IntArray = intArrayOf(1, 2, 3) fun foo(): IntArray = intArrayOf(1, 2, 3)
fun bar() = 42
fun testVariable() { fun testVariable() {
var x = foo() var x = foo()
x[0] += 1 x[0] += 1
foo()[0] *= 2 foo()[0] *= 2
foo()[bar()] -= 1
} }
+42 -22
View File
@@ -1,30 +1,50 @@
IrFile /arrayAugmentedAssignment1.kt IrFile /arrayAugmentedAssignment1.kt
IrFunction public fun foo(): kotlin.IntArray IrFunction public fun foo(): kotlin.IntArray
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .intArrayOf type=kotlin.IntArray operator= CALL .intArrayOf type=kotlin.IntArray operator=null
elements: DUMMY vararg type=kotlin.Int elements: DUMMY vararg type=kotlin.Int
IrFunction public fun bar(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='42'
IrFunction public fun testVariable(): kotlin.Unit IrFunction public fun testVariable(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.IntArray VAR var x: kotlin.IntArray
CALL .foo type=kotlin.IntArray operator= CALL .foo type=kotlin.IntArray operator=null
CALL .set type=kotlin.Unit operator=PLUSEQ BLOCK type=kotlin.Unit hasResult=false operator=PLUSEQ
$this: GET_VAR x type=kotlin.IntArray CALL .set type=kotlin.Unit operator=PLUSEQ
index: LITERAL Int type=kotlin.Int value='0' $this: GET_VAR x type=kotlin.IntArray operator=null
value: CALL .plus type=kotlin.Int operator=PLUSEQ index: LITERAL Int type=kotlin.Int value='0'
$this: CALL .get type=kotlin.Int operator=PLUSEQ value: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: GET_VAR x type=kotlin.IntArray $this: CALL .get type=kotlin.Int operator=PLUSEQ
index: LITERAL Int type=kotlin.Int value='0' $this: GET_VAR x type=kotlin.IntArray operator=null
other: LITERAL Int type=kotlin.Int value='1' index: LITERAL Int type=kotlin.Int value='0'
VAR val tmp0_array: kotlin.IntArray other: LITERAL Int type=kotlin.Int value='1'
CALL .foo type=kotlin.IntArray operator= BLOCK type=kotlin.Unit hasResult=false operator=MULTEQ
CALL .set type=kotlin.Unit operator=MULTEQ VAR val tmp0_array: kotlin.IntArray
$this: GET_VAR tmp0_array type=kotlin.IntArray CALL .foo type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0' CALL .set type=kotlin.Unit operator=MULTEQ
value: CALL .times type=kotlin.Int operator=MULTEQ $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
$this: CALL .get type=kotlin.Int operator=MULTEQ index: LITERAL Int type=kotlin.Int value='0'
$this: GET_VAR tmp0_array type=kotlin.IntArray value: CALL .times type=kotlin.Int operator=MULTEQ
index: LITERAL Int type=kotlin.Int value='0' $this: CALL .get type=kotlin.Int operator=MULTEQ
other: LITERAL Int type=kotlin.Int value='2' $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0'
other: LITERAL Int type=kotlin.Int value='2'
BLOCK type=kotlin.Unit hasResult=false operator=MINUSEQ
VAR val tmp1_array: kotlin.IntArray
CALL .foo type=kotlin.IntArray operator=null
VAR val tmp2_index0: kotlin.Int
CALL .bar type=kotlin.Int operator=null
CALL .set type=kotlin.Unit operator=MINUSEQ
$this: GET_VAR tmp1_array type=kotlin.IntArray operator=null
index: GET_VAR tmp2_index0 type=kotlin.Int operator=null
value: CALL .minus type=kotlin.Int operator=MINUSEQ
$this: CALL .get type=kotlin.Int operator=MINUSEQ
$this: GET_VAR tmp1_array type=kotlin.IntArray operator=null
index: GET_VAR tmp2_index0 type=kotlin.Int operator=null
other: LITERAL Int type=kotlin.Int value='1'
+11 -10
View File
@@ -3,13 +3,14 @@ IrFile /arrayAugmentedAssignment2.kt
DUMMY IB DUMMY IB
IrFunction public fun IB.test(/*0*/ a: IA): kotlin.Unit IrFunction public fun IB.test(/*0*/ a: IA): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
CALL .set type=kotlin.Unit operator=PLUSEQ BLOCK type=kotlin.Unit hasResult=false operator=PLUSEQ
$this: $RECEIVER of: test type=IB CALL .set type=kotlin.Unit operator=PLUSEQ
$receiver: GET_VAR a type=IA $this: $RECEIVER of: test type=IB
index: LITERAL String type=kotlin.String value='' $receiver: GET_VAR a type=IA operator=null
value: CALL .plus type=kotlin.Int operator=PLUSEQ index: LITERAL String type=kotlin.String value=''
$this: CALL .get type=kotlin.Int operator=PLUSEQ value: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: GET_VAR a type=IA $this: CALL .get type=kotlin.Int operator=PLUSEQ
index: LITERAL String type=kotlin.String value='' $this: GET_VAR a type=IA operator=null
other: LITERAL Int type=kotlin.Int value='42' index: LITERAL String type=kotlin.String value=''
other: LITERAL Int type=kotlin.Int value='42'
+7 -7
View File
@@ -2,18 +2,18 @@ IrFile /assignments.kt
DUMMY Ref DUMMY Ref
IrFunction public fun test1(): kotlin.Unit IrFunction public fun test1(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.Int VAR var x: kotlin.Int
LITERAL Int type=kotlin.Int value='0' LITERAL Int type=kotlin.Int value='0'
SET_VAR x type=<no-type> SET_VAR x type=<no-type> operator=EQ
LITERAL Int type=kotlin.Int value='1' LITERAL Int type=kotlin.Int value='1'
SET_VAR x type=<no-type> SET_VAR x type=<no-type> operator=EQ
CALL .plus type=kotlin.Int operator=PLUS CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR x type=kotlin.Int $this: GET_VAR x type=kotlin.Int operator=null
other: LITERAL Int type=kotlin.Int value='1' other: LITERAL Int type=kotlin.Int value='1'
IrFunction public fun test2(/*0*/ r: Ref): kotlin.Unit IrFunction public fun test2(/*0*/ r: Ref): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
SET_PROPERTY .xtype=<no-type> SET_PROPERTY .xtype=<no-type> operator=EQ
$this: GET_VAR r type=Ref $this: GET_VAR r type=Ref operator=null
$value: LITERAL Int type=kotlin.Int value='0' $value: LITERAL Int type=kotlin.Int value='0'
+22 -22
View File
@@ -4,49 +4,49 @@ IrFile /augmentedAssignment1.kt
LITERAL Int type=kotlin.Int value='0' LITERAL Int type=kotlin.Int value='0'
IrFunction public fun testVariable(): kotlin.Unit IrFunction public fun testVariable(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=kotlin.Int hasResult=true isDesugared=false BLOCK type=kotlin.Int hasResult=true operator=null
VAR var x: kotlin.Int VAR var x: kotlin.Int
LITERAL Int type=kotlin.Int value='0' LITERAL Int type=kotlin.Int value='0'
SET_VAR x type=<no-type> SET_VAR x type=<no-type> operator=PLUSEQ
CALL .plus type=kotlin.Int operator=PLUSEQ CALL .plus type=kotlin.Int operator=PLUSEQ
$this: GET_VAR x type=kotlin.Int $this: GET_VAR x type=kotlin.Int operator=PLUSEQ
other: LITERAL Int type=kotlin.Int value='1' other: LITERAL Int type=kotlin.Int value='1'
SET_VAR x type=<no-type> SET_VAR x type=<no-type> operator=MINUSEQ
CALL .minus type=kotlin.Int operator=MINUSEQ CALL .minus type=kotlin.Int operator=MINUSEQ
$this: GET_VAR x type=kotlin.Int $this: GET_VAR x type=kotlin.Int operator=MINUSEQ
other: LITERAL Int type=kotlin.Int value='2' other: LITERAL Int type=kotlin.Int value='2'
SET_VAR x type=<no-type> SET_VAR x type=<no-type> operator=MULTEQ
CALL .times type=kotlin.Int operator=MULTEQ CALL .times type=kotlin.Int operator=MULTEQ
$this: GET_VAR x type=kotlin.Int $this: GET_VAR x type=kotlin.Int operator=MULTEQ
other: LITERAL Int type=kotlin.Int value='3' other: LITERAL Int type=kotlin.Int value='3'
SET_VAR x type=<no-type> SET_VAR x type=<no-type> operator=DIVEQ
CALL .div type=kotlin.Int operator=DIVEQ CALL .div type=kotlin.Int operator=DIVEQ
$this: GET_VAR x type=kotlin.Int $this: GET_VAR x type=kotlin.Int operator=DIVEQ
other: LITERAL Int type=kotlin.Int value='4' other: LITERAL Int type=kotlin.Int value='4'
SET_VAR x type=<no-type> SET_VAR x type=<no-type> operator=PERCEQ
CALL .mod type=kotlin.Int operator=PERCEQ CALL .mod type=kotlin.Int operator=PERCEQ
$this: GET_VAR x type=kotlin.Int $this: GET_VAR x type=kotlin.Int operator=PERCEQ
other: LITERAL Int type=kotlin.Int value='5' other: LITERAL Int type=kotlin.Int value='5'
IrFunction public fun testProperty(): kotlin.Unit IrFunction public fun testProperty(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=kotlin.Int hasResult=true isDesugared=false BLOCK type=kotlin.Int hasResult=true operator=null
SET_PROPERTY .ptype=<no-type> SET_PROPERTY .ptype=<no-type> operator=PLUSEQ
$value: CALL .plus type=kotlin.Int operator=PLUSEQ $value: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: GET_PROPERTY .p type=kotlin.Int $this: GET_PROPERTY .p type=kotlin.Int operator=PLUSEQ
other: LITERAL Int type=kotlin.Int value='1' other: LITERAL Int type=kotlin.Int value='1'
SET_PROPERTY .ptype=<no-type> SET_PROPERTY .ptype=<no-type> operator=MINUSEQ
$value: CALL .minus type=kotlin.Int operator=MINUSEQ $value: CALL .minus type=kotlin.Int operator=MINUSEQ
$this: GET_PROPERTY .p type=kotlin.Int $this: GET_PROPERTY .p type=kotlin.Int operator=MINUSEQ
other: LITERAL Int type=kotlin.Int value='2' other: LITERAL Int type=kotlin.Int value='2'
SET_PROPERTY .ptype=<no-type> SET_PROPERTY .ptype=<no-type> operator=MULTEQ
$value: CALL .times type=kotlin.Int operator=MULTEQ $value: CALL .times type=kotlin.Int operator=MULTEQ
$this: GET_PROPERTY .p type=kotlin.Int $this: GET_PROPERTY .p type=kotlin.Int operator=MULTEQ
other: LITERAL Int type=kotlin.Int value='3' other: LITERAL Int type=kotlin.Int value='3'
SET_PROPERTY .ptype=<no-type> SET_PROPERTY .ptype=<no-type> operator=DIVEQ
$value: CALL .div type=kotlin.Int operator=DIVEQ $value: CALL .div type=kotlin.Int operator=DIVEQ
$this: GET_PROPERTY .p type=kotlin.Int $this: GET_PROPERTY .p type=kotlin.Int operator=DIVEQ
other: LITERAL Int type=kotlin.Int value='4' other: LITERAL Int type=kotlin.Int value='4'
SET_PROPERTY .ptype=<no-type> SET_PROPERTY .ptype=<no-type> operator=PERCEQ
$value: CALL .mod type=kotlin.Int operator=PERCEQ $value: CALL .mod type=kotlin.Int operator=PERCEQ
$this: GET_PROPERTY .p type=kotlin.Int $this: GET_PROPERTY .p type=kotlin.Int operator=PERCEQ
other: LITERAL Int type=kotlin.Int value='5' other: LITERAL Int type=kotlin.Int value='5'
+1 -1
View File
@@ -22,5 +22,5 @@ fun testProperty() {
p -= "-=" p -= "-="
p *= "*=" p *= "*="
p /= "/=" p /= "/="
p %= "*=" p %= "%="
} }
+20 -20
View File
@@ -2,57 +2,57 @@ IrFile /augmentedAssignment2.kt
DUMMY A DUMMY A
IrFunction public operator fun A.plusAssign(/*0*/ s: kotlin.String): kotlin.Unit IrFunction public operator fun A.plusAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
IrFunction public operator fun A.minusAssign(/*0*/ s: kotlin.String): kotlin.Unit IrFunction public operator fun A.minusAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
IrFunction public operator fun A.timesAssign(/*0*/ s: kotlin.String): kotlin.Unit IrFunction public operator fun A.timesAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
IrFunction public operator fun A.divAssign(/*0*/ s: kotlin.String): kotlin.Unit IrFunction public operator fun A.divAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
IrFunction public operator fun A.modAssign(/*0*/ s: kotlin.String): kotlin.Unit IrFunction public operator fun A.modAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
IrProperty public val p: A getter=null setter=null IrProperty public val p: A getter=null setter=null
IrExpressionBody IrExpressionBody
CALL .<init> type=A operator= CALL .<init> type=A operator=null
IrFunction public fun testVariable(): kotlin.Unit IrFunction public fun testVariable(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
VAR val a: A VAR val a: A
CALL .<init> type=A operator= CALL .<init> type=A operator=null
CALL .plusAssign type=kotlin.Unit operator=PLUSEQ CALL .plusAssign type=kotlin.Unit operator=PLUSEQ
$receiver: GET_VAR a type=A $receiver: GET_VAR a type=A operator=PLUSEQ
s: LITERAL String type=kotlin.String value='+=' s: LITERAL String type=kotlin.String value='+='
CALL .minusAssign type=kotlin.Unit operator=MINUSEQ CALL .minusAssign type=kotlin.Unit operator=MINUSEQ
$receiver: GET_VAR a type=A $receiver: GET_VAR a type=A operator=MINUSEQ
s: LITERAL String type=kotlin.String value='-=' s: LITERAL String type=kotlin.String value='-='
CALL .timesAssign type=kotlin.Unit operator=MULTEQ CALL .timesAssign type=kotlin.Unit operator=MULTEQ
$receiver: GET_VAR a type=A $receiver: GET_VAR a type=A operator=MULTEQ
s: LITERAL String type=kotlin.String value='*=' s: LITERAL String type=kotlin.String value='*='
CALL .divAssign type=kotlin.Unit operator=DIVEQ CALL .divAssign type=kotlin.Unit operator=DIVEQ
$receiver: GET_VAR a type=A $receiver: GET_VAR a type=A operator=DIVEQ
s: LITERAL String type=kotlin.String value='/=' s: LITERAL String type=kotlin.String value='/='
CALL .modAssign type=kotlin.Unit operator=PERCEQ CALL .modAssign type=kotlin.Unit operator=PERCEQ
$receiver: GET_VAR a type=A $receiver: GET_VAR a type=A operator=PERCEQ
s: LITERAL String type=kotlin.String value='*=' s: LITERAL String type=kotlin.String value='*='
IrFunction public fun testProperty(): kotlin.Unit IrFunction public fun testProperty(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
CALL .plusAssign type=kotlin.Unit operator=PLUSEQ CALL .plusAssign type=kotlin.Unit operator=PLUSEQ
$receiver: GET_PROPERTY .p type=A $receiver: GET_PROPERTY .p type=A operator=PLUSEQ
s: LITERAL String type=kotlin.String value='+=' s: LITERAL String type=kotlin.String value='+='
CALL .minusAssign type=kotlin.Unit operator=MINUSEQ CALL .minusAssign type=kotlin.Unit operator=MINUSEQ
$receiver: GET_PROPERTY .p type=A $receiver: GET_PROPERTY .p type=A operator=MINUSEQ
s: LITERAL String type=kotlin.String value='-=' s: LITERAL String type=kotlin.String value='-='
CALL .timesAssign type=kotlin.Unit operator=MULTEQ CALL .timesAssign type=kotlin.Unit operator=MULTEQ
$receiver: GET_PROPERTY .p type=A $receiver: GET_PROPERTY .p type=A operator=MULTEQ
s: LITERAL String type=kotlin.String value='*=' s: LITERAL String type=kotlin.String value='*='
CALL .divAssign type=kotlin.Unit operator=DIVEQ CALL .divAssign type=kotlin.Unit operator=DIVEQ
$receiver: GET_PROPERTY .p type=A $receiver: GET_PROPERTY .p type=A operator=DIVEQ
s: LITERAL String type=kotlin.String value='/=' s: LITERAL String type=kotlin.String value='/='
CALL .modAssign type=kotlin.Unit operator=PERCEQ CALL .modAssign type=kotlin.Unit operator=PERCEQ
$receiver: GET_PROPERTY .p type=A $receiver: GET_PROPERTY .p type=A operator=PERCEQ
s: LITERAL String type=kotlin.String value='*=' s: LITERAL String type=kotlin.String value='%='
+1 -1
View File
@@ -1,6 +1,6 @@
IrFile /boxOk.kt IrFile /boxOk.kt
IrFunction public fun box(): kotlin.String IrFunction public fun box(): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL String type=kotlin.String value='OK' LITERAL String type=kotlin.String value='OK'
+23 -21
View File
@@ -1,42 +1,44 @@
IrFile /callWithReorderedArguments.kt IrFile /callWithReorderedArguments.kt
IrFunction public fun foo(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Unit IrFunction public fun foo(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
IrFunction public fun noReorder1(): kotlin.Int IrFunction public fun noReorder1(): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='1' LITERAL Int type=kotlin.Int value='1'
IrFunction public fun noReorder2(): kotlin.Int IrFunction public fun noReorder2(): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='2' LITERAL Int type=kotlin.Int value='2'
IrFunction public fun reordered1(): kotlin.Int IrFunction public fun reordered1(): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='1' LITERAL Int type=kotlin.Int value='1'
IrFunction public fun reordered2(): kotlin.Int IrFunction public fun reordered2(): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='2' LITERAL Int type=kotlin.Int value='2'
IrFunction public fun test(): kotlin.Unit IrFunction public fun test(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
CALL .foo type=kotlin.Unit operator= CALL .foo type=kotlin.Unit operator=null
a: CALL .noReorder1 type=kotlin.Int operator= a: CALL .noReorder1 type=kotlin.Int operator=null
b: CALL .noReorder2 type=kotlin.Int operator= b: CALL .noReorder2 type=kotlin.Int operator=null
VAR val tmp0_b: kotlin.Int BLOCK type=kotlin.Unit hasResult=false operator=SYNTHETIC_BLOCK
CALL .reordered1 type=kotlin.Int operator= VAR val tmp0_b: kotlin.Int
VAR val tmp1_a: kotlin.Int CALL .reordered1 type=kotlin.Int operator=null
CALL .reordered2 type=kotlin.Int operator= VAR val tmp1_a: kotlin.Int
CALL .foo type=kotlin.Unit operator= CALL .reordered2 type=kotlin.Int operator=null
a: GET_VAR tmp1_a type=kotlin.Int CALL .foo type=kotlin.Unit operator=null
b: GET_VAR tmp0_b type=kotlin.Int a: GET_VAR tmp1_a type=kotlin.Int operator=null
VAR val tmp2_a: kotlin.Int b: GET_VAR tmp0_b type=kotlin.Int operator=null
CALL .reordered2 type=kotlin.Int operator= BLOCK type=kotlin.Unit hasResult=false operator=SYNTHETIC_BLOCK
CALL .foo type=kotlin.Unit operator= VAR val tmp2_a: kotlin.Int
a: GET_VAR tmp2_a type=kotlin.Int CALL .reordered2 type=kotlin.Int operator=null
b: LITERAL Int type=kotlin.Int value='1' CALL .foo type=kotlin.Unit operator=null
a: GET_VAR tmp2_a type=kotlin.Int operator=null
b: LITERAL Int type=kotlin.Int value='1'
+19 -19
View File
@@ -1,42 +1,42 @@
IrFile /calls.kt IrFile /calls.kt
IrFunction public fun foo(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int): kotlin.Int IrFunction public fun foo(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
GET_VAR x type=kotlin.Int GET_VAR x type=kotlin.Int operator=null
IrFunction public fun bar(/*0*/ x: kotlin.Int): kotlin.Int IrFunction public fun bar(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .foo type=kotlin.Int operator= CALL .foo type=kotlin.Int operator=null
x: GET_VAR x type=kotlin.Int x: GET_VAR x type=kotlin.Int operator=null
y: LITERAL Int type=kotlin.Int value='1' y: LITERAL Int type=kotlin.Int value='1'
IrFunction public fun qux(/*0*/ x: kotlin.Int): kotlin.Int IrFunction public fun qux(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .foo type=kotlin.Int operator= CALL .foo type=kotlin.Int operator=null
x: CALL .foo type=kotlin.Int operator= x: CALL .foo type=kotlin.Int operator=null
x: GET_VAR x type=kotlin.Int x: GET_VAR x type=kotlin.Int operator=null
y: GET_VAR x type=kotlin.Int y: GET_VAR x type=kotlin.Int operator=null
y: GET_VAR x type=kotlin.Int y: GET_VAR x type=kotlin.Int operator=null
IrFunction public fun kotlin.Int.ext1(): kotlin.Int IrFunction public fun kotlin.Int.ext1(): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
$RECEIVER of: ext1 type=kotlin.Int $RECEIVER of: ext1 type=kotlin.Int
IrFunction public fun kotlin.Int.ext2(/*0*/ x: kotlin.Int): kotlin.Int IrFunction public fun kotlin.Int.ext2(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .foo type=kotlin.Int operator= CALL .foo type=kotlin.Int operator=null
x: $RECEIVER of: ext2 type=kotlin.Int x: $RECEIVER of: ext2 type=kotlin.Int
y: GET_VAR x type=kotlin.Int y: GET_VAR x type=kotlin.Int operator=null
IrFunction public fun kotlin.Int.ext3(/*0*/ x: kotlin.Int): kotlin.Int IrFunction public fun kotlin.Int.ext3(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .foo type=kotlin.Int operator= CALL .foo type=kotlin.Int operator=null
x: CALL .ext1 type=kotlin.Int operator= x: CALL .ext1 type=kotlin.Int operator=null
$receiver: $RECEIVER of: ext3 type=kotlin.Int $receiver: $RECEIVER of: ext3 type=kotlin.Int
y: GET_VAR x type=kotlin.Int y: GET_VAR x type=kotlin.Int operator=null
+12 -12
View File
@@ -1,29 +1,29 @@
IrFile /conventionComparisons.kt IrFile /conventionComparisons.kt
IrFunction public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean IrFunction public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int
GET_VAR a type=kotlin.String GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.String GET_VAR b type=kotlin.String operator=null
IrFunction public fun test2(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean IrFunction public fun test2(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int
GET_VAR a type=kotlin.String GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.String GET_VAR b type=kotlin.String operator=null
IrFunction public fun test3(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean IrFunction public fun test3(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int
GET_VAR a type=kotlin.String GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.String GET_VAR b type=kotlin.String operator=null
IrFunction public fun test4(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean IrFunction public fun test4(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.String): kotlin.Int
GET_VAR a type=kotlin.String GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.String GET_VAR b type=kotlin.String operator=null
+12 -11
View File
@@ -1,13 +1,14 @@
IrFunction public fun B.test(): kotlin.Unit IrFunction public fun B.test(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
VAR val tmp0: A BLOCK type=<no-type> hasResult=false operator=SYNTHETIC_BLOCK
GET_VAR A type=A VAR val tmp0: A
VAR val x: kotlin.Int GET_VAR A type=A operator=null
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1) VAR val x: kotlin.Int
$this: $RECEIVER of: test type=B CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
$receiver: GET_VAR tmp0 type=A $this: $RECEIVER of: test type=B
VAR val y: kotlin.Int $receiver: GET_VAR tmp0 type=A operator=null
CALL .component2 type=kotlin.Int operator=COMPONENT_N(index=2) VAR val y: kotlin.Int
$this: $RECEIVER of: test type=B CALL .component2 type=kotlin.Int operator=COMPONENT_N(index=2)
$receiver: GET_VAR tmp0 type=A $this: $RECEIVER of: test type=B
$receiver: GET_VAR tmp0 type=A operator=null
+6 -6
View File
@@ -1,14 +1,14 @@
IrFile /dotQualified.kt IrFile /dotQualified.kt
IrFunction public fun length(/*0*/ s: kotlin.String): kotlin.Int IrFunction public fun length(/*0*/ s: kotlin.String): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
GET_PROPERTY .length type=kotlin.Int GET_PROPERTY .length type=kotlin.Int operator=null
$this: GET_VAR s type=kotlin.String $this: GET_VAR s type=kotlin.String operator=null
IrFunction public fun lengthN(/*0*/ s: kotlin.String?): kotlin.Int? IrFunction public fun lengthN(/*0*/ s: kotlin.String?): kotlin.Int?
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
GET_PROPERTY ?.length type=kotlin.Int? GET_PROPERTY ?.length type=kotlin.Int? operator=null
$this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String $this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR s type=kotlin.String? GET_VAR s type=kotlin.String? operator=null
+9 -9
View File
@@ -1,26 +1,26 @@
IrFile /elvis.kt IrFile /elvis.kt
IrFunction public fun test1(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any): kotlin.Any IrFunction public fun test1(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any): kotlin.Any
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=ELVIS type=kotlin.Any related=null BINARY_OP operator=ELVIS type=kotlin.Any related=null
GET_VAR a type=kotlin.Any? GET_VAR a type=kotlin.Any? operator=null
GET_VAR b type=kotlin.Any GET_VAR b type=kotlin.Any operator=null
IrFunction public fun test2(/*0*/ a: kotlin.String?, /*1*/ b: kotlin.Any): kotlin.Any IrFunction public fun test2(/*0*/ a: kotlin.String?, /*1*/ b: kotlin.Any): kotlin.Any
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=ELVIS type=kotlin.Any related=null BINARY_OP operator=ELVIS type=kotlin.Any related=null
GET_VAR a type=kotlin.String? GET_VAR a type=kotlin.String? operator=null
GET_VAR b type=kotlin.Any GET_VAR b type=kotlin.Any operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.String IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
DUMMY KtIfExpression type=kotlin.Unit DUMMY KtIfExpression type=kotlin.Unit
DUMMY KtIfExpression type=kotlin.Unit DUMMY KtIfExpression type=kotlin.Unit
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=ELVIS type=kotlin.String related=null BINARY_OP operator=ELVIS type=kotlin.String related=null
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String? TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String?
GET_VAR a type=kotlin.Any? GET_VAR a type=kotlin.Any? operator=null
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR b type=kotlin.Any? GET_VAR b type=kotlin.Any? operator=null
+9 -9
View File
@@ -1,22 +1,22 @@
IrFile /equality.kt IrFile /equality.kt
IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=EQEQ type=kotlin.Boolean related=public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean BINARY_OP operator=EQEQ type=kotlin.Boolean related=public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
GET_VAR a type=kotlin.Int GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=EXCLEQ type=kotlin.Boolean related=public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean BINARY_OP operator=EXCLEQ type=kotlin.Boolean related=public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
GET_VAR a type=kotlin.Int GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.Boolean IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=EQEQ type=kotlin.Boolean related=public open operator fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean BINARY_OP operator=EQEQ type=kotlin.Boolean related=public open operator fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
GET_VAR a type=kotlin.Any? GET_VAR a type=kotlin.Any? operator=null
GET_VAR b type=kotlin.Any? GET_VAR b type=kotlin.Any? operator=null
@@ -2,12 +2,12 @@ IrFile /extensionPropertyGetterCall.kt
IrProperty public val kotlin.String.okext: kotlin.String getter=<get-okext> setter=null IrProperty public val kotlin.String.okext: kotlin.String getter=<get-okext> setter=null
IrPropertyGetter public fun kotlin.String.<get-okext>(): kotlin.String property=okext IrPropertyGetter public fun kotlin.String.<get-okext>(): kotlin.String property=okext
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL String type=kotlin.String value='OK' LITERAL String type=kotlin.String value='OK'
IrFunction public fun kotlin.String.test5(): kotlin.String IrFunction public fun kotlin.String.test5(): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
GET_PROPERTY .okext type=kotlin.String GET_PROPERTY .okext type=kotlin.String operator=null
$receiver: $RECEIVER of: test5 type=kotlin.String $receiver: $RECEIVER of: test5 type=kotlin.String
+9 -9
View File
@@ -1,22 +1,22 @@
IrFile /identity.kt IrFile /identity.kt
IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=EQEQEQ type=kotlin.Boolean related=null BINARY_OP operator=EQEQEQ type=kotlin.Boolean related=null
GET_VAR a type=kotlin.Int GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=EXCLEQEQ type=kotlin.Boolean related=null BINARY_OP operator=EXCLEQEQ type=kotlin.Boolean related=null
GET_VAR a type=kotlin.Int GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.Boolean IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=EQEQEQ type=kotlin.Boolean related=null BINARY_OP operator=EQEQEQ type=kotlin.Boolean related=null
GET_VAR a type=kotlin.Any? GET_VAR a type=kotlin.Any? operator=null
GET_VAR b type=kotlin.Any? GET_VAR b type=kotlin.Any? operator=null
+12 -12
View File
@@ -1,31 +1,31 @@
IrFile /in.kt IrFile /in.kt
IrFunction public fun test1(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean IrFunction public fun test1(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .contains type=kotlin.Boolean operator=IN CALL .contains type=kotlin.Boolean operator=IN
$this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any> $this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any> operator=null
element: GET_VAR a type=kotlin.Any element: GET_VAR a type=kotlin.Any operator=null
IrFunction public fun test2(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean IrFunction public fun test2(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
UNARY_OP operator=EXCL type=kotlin.Boolean related=null UNARY_OP operator=EXCL type=kotlin.Boolean related=null
CALL .contains type=kotlin.Boolean operator=NOT_IN CALL .contains type=kotlin.Boolean operator=NOT_IN
$this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any> $this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any> operator=null
element: GET_VAR a type=kotlin.Any element: GET_VAR a type=kotlin.Any operator=null
IrFunction public fun </*0*/ T> test3(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection<T>): kotlin.Boolean IrFunction public fun </*0*/ T> test3(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection<T>): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .contains type=kotlin.Boolean operator=IN CALL .contains type=kotlin.Boolean operator=IN
$this: GET_VAR x type=kotlin.collections.Collection<T> $this: GET_VAR x type=kotlin.collections.Collection<T> operator=null
element: GET_VAR a type=T element: GET_VAR a type=T operator=null
IrFunction public fun </*0*/ T> test4(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection<T>): kotlin.Boolean IrFunction public fun </*0*/ T> test4(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection<T>): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
UNARY_OP operator=EXCL type=kotlin.Boolean related=null UNARY_OP operator=EXCL type=kotlin.Boolean related=null
CALL .contains type=kotlin.Boolean operator=NOT_IN CALL .contains type=kotlin.Boolean operator=NOT_IN
$this: GET_VAR x type=kotlin.collections.Collection<T> $this: GET_VAR x type=kotlin.collections.Collection<T> operator=null
element: GET_VAR a type=T element: GET_VAR a type=T operator=null
+36 -36
View File
@@ -4,78 +4,78 @@ IrFile /incrementDecrement.kt
LITERAL Int type=kotlin.Int value='0' LITERAL Int type=kotlin.Int value='0'
IrProperty public val arr: kotlin.IntArray getter=null setter=null IrProperty public val arr: kotlin.IntArray getter=null setter=null
IrExpressionBody IrExpressionBody
CALL .intArrayOf type=kotlin.IntArray operator= CALL .intArrayOf type=kotlin.IntArray operator=null
elements: DUMMY vararg type=kotlin.Int elements: DUMMY vararg type=kotlin.Int
IrFunction public fun testVar(): kotlin.Unit IrFunction public fun testVar(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.Int VAR var x: kotlin.Int
LITERAL Int type=kotlin.Int value='0' LITERAL Int type=kotlin.Int value='0'
VAR val x1: kotlin.Int VAR val x1: kotlin.Int
BLOCK type=kotlin.Int hasResult=true isDesugared=true BLOCK type=kotlin.Int hasResult=true operator=PREFIX_INCR
VAR val tmp0: kotlin.Int VAR val tmp0: kotlin.Int
CALL .inc type=kotlin.Int operator=PREFIX_INCR CALL .inc type=kotlin.Int operator=PREFIX_INCR
$this: GET_VAR x type=kotlin.Int $this: GET_VAR x type=kotlin.Int operator=PREFIX_INCR
SET_VAR x type=<no-type> SET_VAR x type=<no-type> operator=PREFIX_INCR
GET_VAR tmp0 type=kotlin.Int GET_VAR tmp0 type=kotlin.Int operator=null
GET_VAR tmp0 type=kotlin.Int GET_VAR tmp0 type=kotlin.Int operator=null
VAR val x2: kotlin.Int VAR val x2: kotlin.Int
BLOCK type=kotlin.Int hasResult=true isDesugared=true BLOCK type=kotlin.Int hasResult=true operator=PREFIX_DECR
VAR val tmp1: kotlin.Int VAR val tmp1: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR CALL .dec type=kotlin.Int operator=PREFIX_DECR
$this: GET_VAR x type=kotlin.Int $this: GET_VAR x type=kotlin.Int operator=PREFIX_DECR
SET_VAR x type=<no-type> SET_VAR x type=<no-type> operator=PREFIX_DECR
GET_VAR tmp1 type=kotlin.Int GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int GET_VAR tmp1 type=kotlin.Int operator=null
IrFunction public fun testProp(): kotlin.Unit IrFunction public fun testProp(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
VAR val p1: kotlin.Int VAR val p1: kotlin.Int
BLOCK type=kotlin.Int hasResult=true isDesugared=true BLOCK type=kotlin.Int hasResult=true operator=PREFIX_INCR
VAR val tmp0: kotlin.Int VAR val tmp0: kotlin.Int
CALL .inc type=kotlin.Int operator=PREFIX_INCR CALL .inc type=kotlin.Int operator=PREFIX_INCR
$this: GET_PROPERTY .p type=kotlin.Int $this: GET_PROPERTY .p type=kotlin.Int operator=PREFIX_INCR
SET_PROPERTY .ptype=<no-type> SET_PROPERTY .ptype=<no-type> operator=PREFIX_INCR
$value: GET_VAR tmp0 type=kotlin.Int $value: GET_VAR tmp0 type=kotlin.Int operator=null
GET_VAR tmp0 type=kotlin.Int GET_VAR tmp0 type=kotlin.Int operator=null
VAR val p2: kotlin.Int VAR val p2: kotlin.Int
BLOCK type=kotlin.Int hasResult=true isDesugared=true BLOCK type=kotlin.Int hasResult=true operator=PREFIX_DECR
VAR val tmp1: kotlin.Int VAR val tmp1: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR CALL .dec type=kotlin.Int operator=PREFIX_DECR
$this: GET_PROPERTY .p type=kotlin.Int $this: GET_PROPERTY .p type=kotlin.Int operator=PREFIX_DECR
SET_PROPERTY .ptype=<no-type> SET_PROPERTY .ptype=<no-type> operator=PREFIX_DECR
$value: GET_VAR tmp1 type=kotlin.Int $value: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int GET_VAR tmp1 type=kotlin.Int operator=null
IrFunction public fun testArray(): kotlin.Unit IrFunction public fun testArray(): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
VAR val a1: kotlin.Int VAR val a1: kotlin.Int
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int
BLOCK type=kotlin.Unit hasResult=true isDesugared=true BLOCK type=kotlin.Unit hasResult=true operator=PREFIX_INCR
VAR val tmp0_array: kotlin.IntArray VAR val tmp0_array: kotlin.IntArray
GET_PROPERTY .arr type=kotlin.IntArray GET_PROPERTY .arr type=kotlin.IntArray operator=null
VAR val tmp1: kotlin.Int VAR val tmp1: kotlin.Int
CALL .inc type=kotlin.Int operator=PREFIX_INCR CALL .inc type=kotlin.Int operator=PREFIX_INCR
$this: CALL .get type=kotlin.Int operator=PREFIX_INCR $this: CALL .get type=kotlin.Int operator=PREFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0' index: LITERAL Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=PREFIX_INCR CALL .set type=kotlin.Unit operator=PREFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0' index: LITERAL Int type=kotlin.Int value='0'
value: GET_VAR tmp1 type=kotlin.Int value: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int GET_VAR tmp1 type=kotlin.Int operator=null
VAR val a2: kotlin.Int VAR val a2: kotlin.Int
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int
BLOCK type=kotlin.Unit hasResult=true isDesugared=true BLOCK type=kotlin.Unit hasResult=true operator=PREFIX_DECR
VAR val tmp2_array: kotlin.IntArray VAR val tmp2_array: kotlin.IntArray
GET_PROPERTY .arr type=kotlin.IntArray GET_PROPERTY .arr type=kotlin.IntArray operator=null
VAR val tmp3: kotlin.Int VAR val tmp3: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR CALL .dec type=kotlin.Int operator=PREFIX_DECR
$this: CALL .get type=kotlin.Int operator=PREFIX_DECR $this: CALL .get type=kotlin.Int operator=PREFIX_DECR
$this: GET_VAR tmp2_array type=kotlin.IntArray $this: GET_VAR tmp2_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0' index: LITERAL Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=PREFIX_DECR CALL .set type=kotlin.Unit operator=PREFIX_DECR
$this: GET_VAR tmp2_array type=kotlin.IntArray $this: GET_VAR tmp2_array type=kotlin.IntArray operator=null
index: LITERAL Int type=kotlin.Int value='0' index: LITERAL Int type=kotlin.Int value='0'
value: GET_VAR tmp3 type=kotlin.Int value: GET_VAR tmp3 type=kotlin.Int operator=null
GET_VAR tmp3 type=kotlin.Int GET_VAR tmp3 type=kotlin.Int operator=null
+12 -12
View File
@@ -1,29 +1,29 @@
IrFile /primitiveComparisons.kt IrFile /primitiveComparisons.kt
IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int BINARY_OP operator=GT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int
GET_VAR a type=kotlin.Int GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int BINARY_OP operator=LT type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int
GET_VAR a type=kotlin.Int GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean IrFunction public fun test3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int BINARY_OP operator=GTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int
GET_VAR a type=kotlin.Int GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean IrFunction public fun test4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int BINARY_OP operator=LTEQ type=kotlin.Boolean related=public open override /*1*/ fun compareTo(/*0*/ other: kotlin.Int): kotlin.Int
GET_VAR a type=kotlin.Int GET_VAR a type=kotlin.Int operator=null
GET_VAR b type=kotlin.Int GET_VAR b type=kotlin.Int operator=null
+13 -13
View File
@@ -4,44 +4,44 @@ IrFile /references.kt
LITERAL String type=kotlin.String value='OK' LITERAL String type=kotlin.String value='OK'
IrProperty public val ok2: kotlin.String = "OK" getter=null setter=null IrProperty public val ok2: kotlin.String = "OK" getter=null setter=null
IrExpressionBody IrExpressionBody
GET_PROPERTY .ok type=kotlin.String GET_PROPERTY .ok type=kotlin.String operator=null
IrProperty public val ok3: kotlin.String getter=<get-ok3> setter=null IrProperty public val ok3: kotlin.String getter=<get-ok3> setter=null
IrPropertyGetter public fun <get-ok3>(): kotlin.String property=ok3 IrPropertyGetter public fun <get-ok3>(): kotlin.String property=ok3
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL String type=kotlin.String value='OK' LITERAL String type=kotlin.String value='OK'
IrFunction public fun test1(): kotlin.String IrFunction public fun test1(): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
GET_PROPERTY .ok type=kotlin.String GET_PROPERTY .ok type=kotlin.String operator=null
IrFunction public fun test2(/*0*/ x: kotlin.String): kotlin.String IrFunction public fun test2(/*0*/ x: kotlin.String): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
GET_VAR x type=kotlin.String GET_VAR x type=kotlin.String operator=null
IrFunction public fun test3(): kotlin.String IrFunction public fun test3(): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
VAR val x: kotlin.String = "OK" VAR val x: kotlin.String = "OK"
LITERAL String type=kotlin.String value='OK' LITERAL String type=kotlin.String value='OK'
RETURN type=<no-type> RETURN type=<no-type>
GET_VAR x type=kotlin.String GET_VAR x type=kotlin.String operator=null
IrFunction public fun test4(): kotlin.String IrFunction public fun test4(): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
GET_PROPERTY .ok3 type=kotlin.String GET_PROPERTY .ok3 type=kotlin.String operator=null
IrProperty public val kotlin.String.okext: kotlin.String getter=<get-okext> setter=null IrProperty public val kotlin.String.okext: kotlin.String getter=<get-okext> setter=null
IrPropertyGetter public fun kotlin.String.<get-okext>(): kotlin.String property=okext IrPropertyGetter public fun kotlin.String.<get-okext>(): kotlin.String property=okext
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL String type=kotlin.String value='OK' LITERAL String type=kotlin.String value='OK'
IrFunction public fun kotlin.String.test5(): kotlin.String IrFunction public fun kotlin.String.test5(): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
GET_PROPERTY .okext type=kotlin.String GET_PROPERTY .okext type=kotlin.String operator=null
$receiver: $RECEIVER of: test5 type=kotlin.String $receiver: $RECEIVER of: test5 type=kotlin.String
+6
View File
@@ -4,3 +4,9 @@ fun test3(a: Int, b: Int) = a * b
fun test4(a: Int, b: Int) = a / b fun test4(a: Int, b: Int) = a / b
fun test5(a: Int, b: Int) = a % b fun test5(a: Int, b: Int) = a % b
fun test6(a: Int, b: Int) = a .. b fun test6(a: Int, b: Int) = a .. b
fun test1x(a: Int, b: Int) = a.plus(b)
fun test2x(a: Int, b: Int) = a.minus(b)
fun test3x(a: Int, b: Int) = a.times(b)
fun test4x(a: Int, b: Int) = a.div(b)
fun test5x(a: Int, b: Int) = a.mod(b)
+53 -18
View File
@@ -1,43 +1,78 @@
IrFile /simpleOperators.kt IrFile /simpleOperators.kt
IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .plus type=kotlin.Int operator=PLUS CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR a type=kotlin.Int $this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int IrFunction public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .minus type=kotlin.Int operator=MINUS CALL .minus type=kotlin.Int operator=MINUS
$this: GET_VAR a type=kotlin.Int $this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int IrFunction public fun test3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .times type=kotlin.Int operator=MUL CALL .times type=kotlin.Int operator=MUL
$this: GET_VAR a type=kotlin.Int $this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int IrFunction public fun test4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .div type=kotlin.Int operator=DIV CALL .div type=kotlin.Int operator=DIV
$this: GET_VAR a type=kotlin.Int $this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test5(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int IrFunction public fun test5(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .mod type=kotlin.Int operator=PERC CALL .mod type=kotlin.Int operator=PERC
$this: GET_VAR a type=kotlin.Int $this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test6(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.ranges.IntRange IrFunction public fun test6(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.ranges.IntRange
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
CALL .rangeTo type=kotlin.ranges.IntRange operator=RANGE CALL .rangeTo type=kotlin.ranges.IntRange operator=RANGE
$this: GET_VAR a type=kotlin.Int $this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test1x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .plus type=kotlin.Int operator=null
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test2x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .minus type=kotlin.Int operator=null
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .times type=kotlin.Int operator=null
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test4x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .div type=kotlin.Int operator=null
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test5x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .mod type=kotlin.Int operator=null
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
+23 -23
View File
@@ -1,51 +1,51 @@
IrFile /smartCasts.kt IrFile /smartCasts.kt
IrFunction public fun expectsString(/*0*/ s: kotlin.String): kotlin.Unit IrFunction public fun expectsString(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
IrFunction public fun expectsInt(/*0*/ i: kotlin.Int): kotlin.Unit IrFunction public fun expectsInt(/*0*/ i: kotlin.Int): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
IrFunction public fun overloaded(/*0*/ s: kotlin.String): kotlin.String IrFunction public fun overloaded(/*0*/ s: kotlin.String): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
GET_VAR s type=kotlin.String GET_VAR s type=kotlin.String operator=null
IrFunction public fun overloaded(/*0*/ x: kotlin.Any): kotlin.Any IrFunction public fun overloaded(/*0*/ x: kotlin.Any): kotlin.Any
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
GET_VAR x type=kotlin.Any GET_VAR x type=kotlin.Any operator=null
IrFunction public fun test1(/*0*/ x: kotlin.Any): kotlin.Unit IrFunction public fun test1(/*0*/ x: kotlin.Any): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
DUMMY KtIfExpression type=kotlin.Unit DUMMY KtIfExpression type=kotlin.Unit
CALL .println type=kotlin.Unit operator= CALL .println type=kotlin.Unit operator=null
message: GET_PROPERTY .length type=kotlin.Int message: GET_PROPERTY .length type=kotlin.Int operator=null
$this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String $this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any GET_VAR x type=kotlin.Any operator=null
CALL .expectsString type=kotlin.Unit operator= CALL .expectsString type=kotlin.Unit operator=null
s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any GET_VAR x type=kotlin.Any operator=null
CALL .expectsInt type=kotlin.Unit operator= CALL .expectsInt type=kotlin.Unit operator=null
i: GET_PROPERTY .length type=kotlin.Int i: GET_PROPERTY .length type=kotlin.Int operator=null
$this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String $this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any GET_VAR x type=kotlin.Any operator=null
CALL .expectsString type=kotlin.Unit operator= CALL .expectsString type=kotlin.Unit operator=null
s: CALL .overloaded type=kotlin.String operator= s: CALL .overloaded type=kotlin.String operator=null
s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any GET_VAR x type=kotlin.Any operator=null
IrFunction public fun test2(/*0*/ x: kotlin.Any): kotlin.String IrFunction public fun test2(/*0*/ x: kotlin.Any): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
DUMMY KtIfExpression type=kotlin.Unit DUMMY KtIfExpression type=kotlin.Unit
RETURN type=<no-type> RETURN type=<no-type>
CALL .overloaded type=kotlin.String operator= CALL .overloaded type=kotlin.String operator=null
s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any GET_VAR x type=kotlin.Any operator=null
IrFunction public fun test3(/*0*/ x: kotlin.Any): kotlin.String IrFunction public fun test3(/*0*/ x: kotlin.Any): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
DUMMY KtIfExpression type=kotlin.Unit DUMMY KtIfExpression type=kotlin.Unit
RETURN type=<no-type> RETURN type=<no-type>
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any GET_VAR x type=kotlin.Any operator=null
+13 -12
View File
@@ -3,24 +3,25 @@ IrFile /smartCastsWithDestructuring.kt
DUMMY I2 DUMMY I2
IrFunction public operator fun I1.component1(): kotlin.Int IrFunction public operator fun I1.component1(): kotlin.Int
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='1' LITERAL Int type=kotlin.Int value='1'
IrFunction public operator fun I2.component2(): kotlin.String IrFunction public operator fun I2.component2(): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL String type=kotlin.String value='' LITERAL String type=kotlin.String value=''
IrFunction public fun test(/*0*/ x: I1): kotlin.Unit IrFunction public fun test(/*0*/ x: I1): kotlin.Unit
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
DUMMY KtIfExpression type=kotlin.Unit DUMMY KtIfExpression type=kotlin.Unit
VAR val tmp0: I1 BLOCK type=<no-type> hasResult=false operator=SYNTHETIC_BLOCK
GET_VAR x type=I1 VAR val tmp0: I1
VAR val c1: kotlin.Int GET_VAR x type=I1 operator=null
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1) VAR val c1: kotlin.Int
$receiver: GET_VAR tmp0 type=I1 CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
VAR val c2: kotlin.String $receiver: GET_VAR tmp0 type=I1 operator=null
CALL .component2 type=kotlin.String operator=COMPONENT_N(index=2) VAR val c2: kotlin.String
$receiver: TYPE_OP operator=IMPLICIT_CAST typeOperand=I2 CALL .component2 type=kotlin.String operator=COMPONENT_N(index=2)
GET_VAR tmp0 type=I1 $receiver: TYPE_OP operator=IMPLICIT_CAST typeOperand=I2
GET_VAR tmp0 type=I1 operator=null
+4 -4
View File
@@ -1,7 +1,7 @@
IrFile /smoke.kt IrFile /smoke.kt
IrFunction public fun testFun(): kotlin.String IrFunction public fun testFun(): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL String type=kotlin.String value='OK' LITERAL String type=kotlin.String value='OK'
IrProperty public val testSimpleVal: kotlin.Int = 1 getter=null setter=null IrProperty public val testSimpleVal: kotlin.Int = 1 getter=null setter=null
@@ -10,7 +10,7 @@ IrFile /smoke.kt
IrProperty public val testValWithGetter: kotlin.Int getter=<get-testValWithGetter> setter=null IrProperty public val testValWithGetter: kotlin.Int getter=<get-testValWithGetter> setter=null
IrPropertyGetter public fun <get-testValWithGetter>(): kotlin.Int property=testValWithGetter IrPropertyGetter public fun <get-testValWithGetter>(): kotlin.Int property=testValWithGetter
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='42' LITERAL Int type=kotlin.Int value='42'
IrProperty public var testSimpleVar: kotlin.Int getter=null setter=null IrProperty public var testSimpleVar: kotlin.Int getter=null setter=null
@@ -19,9 +19,9 @@ IrFile /smoke.kt
IrProperty public var testVarWithAccessors: kotlin.Int getter=<get-testVarWithAccessors> setter=<set-testVarWithAccessors> IrProperty public var testVarWithAccessors: kotlin.Int getter=<get-testVarWithAccessors> setter=<set-testVarWithAccessors>
IrPropertyGetter public fun <get-testVarWithAccessors>(): kotlin.Int property=testVarWithAccessors IrPropertyGetter public fun <get-testVarWithAccessors>(): kotlin.Int property=testVarWithAccessors
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='42' LITERAL Int type=kotlin.Int value='42'
IrPropertySetter public fun <set-testVarWithAccessors>(/*0*/ v: kotlin.Int): kotlin.Unit property=testVarWithAccessors IrPropertySetter public fun <set-testVarWithAccessors>(/*0*/ v: kotlin.Int): kotlin.Unit property=testVarWithAccessors
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false BLOCK type=<no-type> hasResult=false operator=null
+10 -10
View File
@@ -1,27 +1,27 @@
IrFile /stringPlus.kt IrFile /stringPlus.kt
IrFunction public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Any): kotlin.String IrFunction public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Any): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.Any GET_VAR b type=kotlin.Any operator=null
IrFunction public fun test2(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String IrFunction public fun test2(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String GET_VAR a type=kotlin.String operator=null
LITERAL String type=kotlin.String value='+' LITERAL String type=kotlin.String value='+'
GET_VAR b type=kotlin.Int GET_VAR b type=kotlin.Int operator=null
IrFunction public fun test3(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String IrFunction public fun test3(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String
IrExpressionBody IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=true BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type> RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String GET_VAR a type=kotlin.String operator=null
LITERAL String type=kotlin.String value='+' LITERAL String type=kotlin.String value='+'
CALL .plus type=kotlin.Int operator=PLUS CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR b type=kotlin.Int $this: GET_VAR b type=kotlin.Int operator=null
other: LITERAL Int type=kotlin.Int value='1' other: LITERAL Int type=kotlin.Int value='1'
GET_VAR a type=kotlin.String GET_VAR a type=kotlin.String operator=null