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