IrBlockBody

Change block typing contract.
This commit is contained in:
Dmitry Petrov
2016-08-25 14:19:37 +03:00
committed by Dmitry Petrov
parent 8bef05703e
commit be86739d3a
72 changed files with 1882 additions and 2040 deletions
@@ -17,35 +17,37 @@
package org.jetbrains.kotlin.psi2ir.generators
import org.jetbrains.kotlin.descriptors.CallableDescriptor
import org.jetbrains.kotlin.ir.expressions.IrBlockImpl
import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrLoop
import org.jetbrains.kotlin.ir.expressions.IrReturnImpl
import org.jetbrains.kotlin.ir.expressions.*
import org.jetbrains.kotlin.psi.KtBlockExpression
import org.jetbrains.kotlin.psi.KtExpression
import org.jetbrains.kotlin.psi.psiUtil.endOffset
import org.jetbrains.kotlin.psi.psiUtil.startOffset
import java.util.*
class ExpressionBodyGenerator(val scopeOwner: CallableDescriptor, override val context: GeneratorContext): GeneratorWithScope {
class BodyGenerator(val scopeOwner: CallableDescriptor, override val context: GeneratorContext): GeneratorWithScope {
override val scope = Scope(scopeOwner)
private val loopTable = HashMap<KtExpression, IrLoop>()
fun generateFunctionBody(ktBody: KtExpression): IrExpression {
fun generateFunctionBody(ktBody: KtExpression): IrBody {
resetInternalContext()
val irBodyExpression = createStatementGenerator().generateExpression(ktBody)
val statementGenerator = createStatementGenerator()
val irBodyExpressionAsBlock =
if (ktBody is KtBlockExpression)
irBodyExpression
else IrBlockImpl(ktBody.startOffset, ktBody.endOffset, null, false).apply {
addStatement(IrReturnImpl(ktBody.startOffset, ktBody.endOffset, scopeOwner, irBodyExpression))
}
val irBlockBody = IrBlockBodyImpl(ktBody.startOffset, ktBody.endOffset)
if (ktBody is KtBlockExpression) {
for (ktStatement in ktBody.statements) {
irBlockBody.addStatement(statementGenerator.generateStatement(ktStatement))
}
}
else {
val irBodyExpression = statementGenerator.generateExpression(ktBody)
val irReturn = IrReturnImpl(ktBody.startOffset, ktBody.endOffset, scopeOwner, irBodyExpression)
irBlockBody.addStatement(irReturn)
}
postprocessFunctionBody()
return irBodyExpressionAsBlock
return irBlockBody
}
private fun resetInternalContext() {
@@ -55,8 +57,9 @@ class ExpressionBodyGenerator(val scopeOwner: CallableDescriptor, override val c
private fun postprocessFunctionBody() {
}
fun generatePropertyInitializerBody(ktInitializer: KtExpression): IrExpression =
createStatementGenerator().generateExpression(ktInitializer)
fun generatePropertyInitializerBody(ktInitializer: KtExpression): IrBody =
IrExpressionBodyImpl(ktInitializer.startOffset, ktInitializer.endOffset,
createStatementGenerator().generateExpression(ktInitializer))
private fun createStatementGenerator() =
StatementGenerator(context, scopeOwner, this, scope)
@@ -23,7 +23,6 @@ import org.jetbrains.kotlin.psi.psiUtil.endOffset
import org.jetbrains.kotlin.psi.psiUtil.startOffset
import org.jetbrains.kotlin.psi2ir.defaultLoad
import org.jetbrains.kotlin.psi2ir.deparenthesize
import org.jetbrains.kotlin.psi2ir.generators.getInfixOperator
import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.utils.SmartList
import java.lang.AssertionError
@@ -107,18 +106,18 @@ class BranchingExpressionGenerator(val statementGenerator: StatementGenerator) :
private fun generateWhenBody(expression: KtWhenExpression, irSubject: IrVariable?, irWhen: IrWhen): IrExpression {
if (irSubject == null) {
if (irWhen.branchesCount == 0)
return IrBlockImpl(expression.startOffset, expression.endOffset, null, false, IrOperator.WHEN)
return IrBlockImpl(expression.startOffset, expression.endOffset, context.builtIns.unitType, IrOperator.WHEN)
else
return irWhen
}
else {
if (irWhen.branchesCount == 0) {
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, null, false, IrOperator.WHEN)
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, context.builtIns.unitType, IrOperator.WHEN)
irBlock.addStatement(irSubject)
return irBlock
}
else {
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, irWhen.type, true, IrOperator.WHEN)
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, irWhen.type, IrOperator.WHEN)
irBlock.addStatement(irSubject)
irBlock.addStatement(irWhen)
return irBlock
@@ -68,19 +68,17 @@ fun StatementGenerator.generateCallReceiver(
val dispatchReceiverValue = generateReceiverOrNull(ktDefaultElement, dispatchReceiver)
val extensionReceiverValue = generateReceiverOrNull(ktDefaultElement, extensionReceiver)
if (!isSafe) {
return SimpleCallReceiver(dispatchReceiverValue, extensionReceiverValue)
}
else if (extensionReceiverValue != null) {
return SafeCallReceiver(this, ktDefaultElement.startOffset, ktDefaultElement.endOffset,
extensionReceiverValue.load(), dispatchReceiverValue)
}
else if (dispatchReceiverValue != null) {
return SafeCallReceiver(this, ktDefaultElement.startOffset, ktDefaultElement.endOffset,
dispatchReceiverValue.load(), null)
}
else {
return throw AssertionError("Safe call should have an explicit receiver: ${ktDefaultElement.text}")
return when {
!isSafe ->
SimpleCallReceiver(dispatchReceiverValue, extensionReceiverValue)
extensionReceiverValue != null ->
SafeCallReceiver(this, ktDefaultElement.startOffset, ktDefaultElement.endOffset,
extensionReceiverValue.load(), dispatchReceiverValue)
dispatchReceiverValue != null ->
SafeCallReceiver(this, ktDefaultElement.startOffset, ktDefaultElement.endOffset,
dispatchReceiverValue.load(), null)
else ->
throw AssertionError("Safe call should have an explicit receiver: ${ktDefaultElement.text}")
}
}
@@ -118,7 +118,7 @@ class CallGenerator(
val valueArgumentsInEvaluationOrder = resolvedCall.valueArguments.values
val valueParameters = resolvedCall.resultingDescriptor.valueParameters
val irBlock = IrBlockImpl(startOffset, endOffset, resultType, true, IrOperator.SYNTHETIC_BLOCK)
val irBlock = IrBlockImpl(startOffset, endOffset, resultType, IrOperator.ARGUMENTS_REORDERING_FOR_CALL)
val valueArgumentsToValueParameters = HashMap<ResolvedValueArgument, ValueParameterDescriptor>()
for ((index, valueArgument) in resolvedCall.valueArgumentsByIndex!!.withIndex()) {
@@ -25,10 +25,6 @@ import org.jetbrains.kotlin.psi.psiUtil.startOffset
import org.jetbrains.kotlin.resolve.BindingContext
class DeclarationGenerator(override val context: GeneratorContext) : Generator {
fun generateAnnotationEntries(annotationEntries: List<KtAnnotationEntry>) {
// TODO create IrAnnotation's for each KtAnnotationEntry
}
fun generateMemberDeclaration(ktDeclaration: KtDeclaration): IrDeclaration =
when (ktDeclaration) {
is KtNamedFunction ->
@@ -122,10 +118,8 @@ class DeclarationGenerator(override val context: GeneratorContext) : Generator {
}
private fun generateFunctionBody(scopeOwner: CallableDescriptor, ktBody: KtExpression): IrBody =
IrExpressionBodyImpl(ktBody.startOffset, ktBody.endOffset,
ExpressionBodyGenerator(scopeOwner, context).generateFunctionBody(ktBody))
BodyGenerator(scopeOwner, context).generateFunctionBody(ktBody)
private fun generateInitializerBody(scopeOwner: CallableDescriptor, ktBody: KtExpression): IrBody =
IrExpressionBodyImpl(ktBody.startOffset, ktBody.endOffset,
ExpressionBodyGenerator(scopeOwner, context).generatePropertyInitializerBody(ktBody))
BodyGenerator(scopeOwner, context).generatePropertyInitializerBody(ktBody)
}
@@ -19,10 +19,12 @@ package org.jetbrains.kotlin.psi2ir.generators
import org.jetbrains.kotlin.descriptors.CallableDescriptor
import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.ir.expressions.IrDummyExpression
import org.jetbrains.kotlin.psi.*
import org.jetbrains.kotlin.psi.KtBlockExpression
import org.jetbrains.kotlin.psi.KtConstantExpression
import org.jetbrains.kotlin.psi.KtExpression
import org.jetbrains.kotlin.psi.KtStringTemplateExpression
import org.jetbrains.kotlin.psi.psiUtil.endOffset
import org.jetbrains.kotlin.psi.psiUtil.startOffset
import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
import org.jetbrains.kotlin.resolve.calls.callUtil.isSafeCall
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
@@ -58,9 +60,6 @@ fun Generator.getInferredTypeWithSmartcasts(key: KtExpression): KotlinType? =
fun Generator.getInferredTypeWithSmartcastsOrFail(key: KtExpression): KotlinType =
getInferredTypeWithSmartcasts(key) ?: throw AssertionError("No type for expression: ${key.text}")
fun Generator.isUsedAsExpression(ktElement: KtElement) =
get(BindingContext.USED_AS_EXPRESSION, ktElement) ?: false
fun Generator.getResolvedCall(key: KtExpression): ResolvedCall<out CallableDescriptor>? =
key.getResolvedCall(context.bindingContext)
@@ -70,20 +69,17 @@ fun Generator.getReturnType(key: KtExpression): KotlinType? {
return getReturnType(resolvedCall)
}
if (key is KtBlockExpression) {
if (!isUsedAsExpression(key)) return null
return getReturnType(key.statements.last())
return when (key) {
is KtBlockExpression ->
getReturnType(key.statements.last())
is KtConstantExpression ->
getInferredTypeWithSmartcasts(key)
is KtStringTemplateExpression ->
context.builtIns.stringType
else ->
throw AssertionError("Unexpected expression: $key")
}
if (key is KtConstantExpression) {
return getInferredTypeWithSmartcasts(key)
}
if (key is KtStringTemplateExpression) {
return context.builtIns.stringType
}
throw AssertionError("Unexpected expression: $key")
}
fun getReturnType(resolvedCall: ResolvedCall<*>): KotlinType {
@@ -38,7 +38,7 @@ class LoopExpressionGenerator(val statementGenerator: StatementGenerator) : Gene
generateConditionalLoop(ktDoWhile, IrDoWhileLoopImpl(ktDoWhile.startOffset, ktDoWhile.endOffset, IrOperator.DO_WHILE_LOOP))
private fun generateConditionalLoop(ktLoop: KtWhileExpressionBase, irLoop: IrLoopBase): IrLoop {
statementGenerator.expressionBodyGenerator.putLoop(ktLoop, irLoop)
statementGenerator.bodyGenerator.putLoop(ktLoop, irLoop)
irLoop.condition = statementGenerator.generateExpression(ktLoop.condition!!)
irLoop.body = statementGenerator.generateExpression(ktLoop.body!!)
irLoop.label = getLoopLabel(ktLoop)
@@ -89,7 +89,7 @@ class LoopExpressionGenerator(val statementGenerator: StatementGenerator) : Gene
}
private fun getLoop(ktLoop: KtLoopExpression): IrLoop {
return statementGenerator.expressionBodyGenerator.getLoop(ktLoop) ?:
return statementGenerator.bodyGenerator.getLoop(ktLoop) ?:
throw AssertionError("Loop was not visited:\n${ktLoop.text}")
}
@@ -108,7 +108,7 @@ class LoopExpressionGenerator(val statementGenerator: StatementGenerator) : Gene
val callGenerator = CallGenerator(statementGenerator)
val irForBlock = IrBlockImpl(ktFor.startOffset, ktFor.endOffset, context.builtIns.unitType, false, IrOperator.FOR_LOOP)
val irForBlock = IrBlockImpl(ktFor.startOffset, ktFor.endOffset, context.builtIns.unitType, IrOperator.FOR_LOOP)
val iteratorCall = statementGenerator.pregenerateCall(iteratorResolvedCall)
val irIteratorCall = callGenerator.generateCall(ktLoopRange, iteratorCall, IrOperator.FOR_LOOP_ITERATOR)
@@ -118,7 +118,7 @@ class LoopExpressionGenerator(val statementGenerator: StatementGenerator) : Gene
val irInnerWhile = IrWhileLoopImpl(ktFor.startOffset, ktFor.endOffset, IrOperator.FOR_LOOP_INNER_WHILE)
irInnerWhile.label = getLoopLabel(ktFor)
statementGenerator.expressionBodyGenerator.putLoop(ktFor, irInnerWhile)
statementGenerator.bodyGenerator.putLoop(ktFor, irInnerWhile)
irForBlock.addStatement(irInnerWhile)
val hasNextCall = statementGenerator.pregenerateCall(hasNextResolvedCall)
@@ -126,7 +126,7 @@ class LoopExpressionGenerator(val statementGenerator: StatementGenerator) : Gene
val irHasNextCall = callGenerator.generateCall(ktLoopRange, hasNextCall, IrOperator.FOR_LOOP_HAS_NEXT)
irInnerWhile.condition = irHasNextCall
val irInnerBody = IrBlockImpl(ktFor.startOffset, ktFor.endOffset, context.builtIns.unitType, false, IrOperator.FOR_LOOP_INNER_WHILE)
val irInnerBody = IrBlockImpl(ktFor.startOffset, ktFor.endOffset, context.builtIns.unitType, IrOperator.FOR_LOOP_INNER_WHILE)
irInnerWhile.body = irInnerBody
val nextCall = statementGenerator.pregenerateCall(nextResolvedCall)
@@ -117,7 +117,7 @@ class OperatorExpressionGenerator(
val irArgument0 = statementGenerator.generateExpression(expression.left!!)
val irArgument1 = statementGenerator.generateExpression(expression.right!!)
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, returnType, true, IrOperator.ELVIS)
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, returnType, IrOperator.ELVIS)
val irArgument0Value = createRematerializableOrTemporary(scope, irArgument0, irBlock, "elvis_lhs")
irBlock.addStatement(IrIfThenElseImpl(
expression.startOffset, expression.endOffset, returnType,
@@ -225,7 +225,7 @@ class OperatorExpressionGenerator(
val irAssignmentReceiver = generateAssignmentReceiver(ktBaseExpression, irOperator)
return irAssignmentReceiver.assign { irLValue ->
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, irLValue.type, true, irOperator)
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, irLValue.type, irOperator)
// VAR tmp = [lhs].inc()
val opCall = statementGenerator.pregenerateCall(opResolvedCall)
@@ -250,7 +250,7 @@ class OperatorExpressionGenerator(
val irAssignmentReceiver = generateAssignmentReceiver(ktBaseExpression, irOperator)
return irAssignmentReceiver.assign { irLValue ->
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, irLValue.type, true, irOperator)
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, irLValue.type, irOperator)
// VAR tmp = [lhs]
val irTmp = scope.createTemporaryVariable(irLValue.load())
@@ -40,14 +40,16 @@ import org.jetbrains.kotlin.resolve.constants.StringValue
import org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator
import org.jetbrains.kotlin.resolve.descriptorUtil.classValueType
import org.jetbrains.kotlin.types.expressions.ExpressionTypingUtils
import java.lang.AssertionError
class StatementGenerator(
override val context: GeneratorContext,
val scopeOwner: DeclarationDescriptor,
val expressionBodyGenerator: ExpressionBodyGenerator,
val bodyGenerator: BodyGenerator,
override val scope: Scope
) : KtVisitor<IrStatement, Nothing?>(), GeneratorWithScope {
fun generateStatement(ktElement: KtElement): IrStatement =
ktElement.genStmt()
fun generateExpression(ktExpression: KtExpression): IrExpression =
ktExpression.genExpr()
@@ -73,7 +75,8 @@ class StatementGenerator(
override fun visitDestructuringDeclaration(multiDeclaration: KtDestructuringDeclaration, data: Nothing?): IrStatement {
// TODO use some special form that introduces multiple declarations into surrounding scope?
val irBlock = IrBlockImpl(multiDeclaration.startOffset, multiDeclaration.endOffset, null, false, IrOperator.SYNTHETIC_BLOCK)
val irBlock = IrBlockImpl(multiDeclaration.startOffset, multiDeclaration.endOffset,
context.builtIns.unitType, IrOperator.DESTRUCTURING_DECLARATION)
val ktInitializer = multiDeclaration.initializer!!
val containerValue = createRematerializableOrTemporary(scope, ktInitializer.genExpr(), irBlock, "container")
@@ -100,11 +103,16 @@ class StatementGenerator(
}
override fun visitBlockExpression(expression: KtBlockExpression, data: Nothing?): IrStatement {
val isBlockBody = expression.parent is KtNamedFunction
val hasResult = if (isBlockBody) false else isUsedAsExpression(expression)
val returnType = if (isBlockBody || !hasResult) null else getReturnType(expression)
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, returnType, hasResult)
expression.statements.forEach { irBlock.addStatement(it.genStmt()) }
val isBlockBody = expression.parent is KtDeclarationWithBody && expression.parent !is KtFunctionLiteral
if (isBlockBody) throw AssertionError("Use IrBlockBody and corresponding body generator to generate blocks as function bodies")
val returnType = getInferredTypeWithSmartcasts(expression) ?: context.builtIns.unitType
val irBlock = IrBlockImpl(expression.startOffset, expression.endOffset, returnType)
expression.statements.forEach {
irBlock.addStatement(it.genStmt())
}
return irBlock
}
@@ -38,7 +38,7 @@ class ArrayAccessAssignmentReceiver(
override fun assign(withLValue: (LValue) -> IrExpression): IrExpression {
val hasResult = operator.isAssignmentOperatorWithResult()
val resultType = if (hasResult) type else callGenerator.context.builtIns.unitType
val irBlock = IrBlockImpl(startOffset, endOffset, resultType, hasResult, operator)
val irBlock = IrBlockImpl(startOffset, endOffset, resultType, operator)
val irArrayValue = createRematerializableOrTemporary(callGenerator.scope, irArray, irBlock, "array")
@@ -51,7 +51,7 @@ class SafeCallReceiver(
val irResult = withDispatchAndExtensionReceivers(dispatchReceiverValue, extensionReceiverValue)
val resultType = irResult.type?.makeNullable()
val irBlock = IrBlockImpl(startOffset, endOffset, resultType, resultType != null, IrOperator.SAFE_CALL)
val irBlock = IrBlockImpl(startOffset, endOffset, resultType, IrOperator.SAFE_CALL)
irBlock.addStatement(irTmp)
@@ -79,7 +79,7 @@ class SimplePropertyLValue(
irResultExpression
}
else {
val irBlock = IrBlockImpl(startOffset, endOffset, irResultExpression.type, irResultExpression.type != null, irOperator)
val irBlock = IrBlockImpl(startOffset, endOffset, irResultExpression.type, irOperator)
irBlock.addAll(variablesForReceivers)
irBlock.addStatement(irResultExpression)
irBlock
@@ -33,10 +33,7 @@ class InlineDesugaredBlocks : IrElementVisitor<Unit, Nothing?> {
}
override fun visitBlock(expression: IrBlock, data: Nothing?) {
val transformedBlock = IrBlockImpl(
expression.startOffset, expression.endOffset, expression.type,
expression.hasResult, expression.operator
)
val transformedBlock = IrBlockImpl(expression.startOffset, expression.endOffset, expression.type, expression.operator)
for (statement in expression.statements) {
statement.accept(this, data)
if (statement is IrBlock && statement.operator != null) {
@@ -55,7 +55,7 @@ class InlineSafeCallChains(val context: GeneratorContext) : IrElementVisitor<Uni
if (innerNestedCallReturnType.containsNull()) return
outer.root.replaceWith {
val newBlock = IrBlockImpl(it.startOffset, it.endOffset, it.type, it.hasResult, IrOperator.SAFE_CALL)
val newBlock = IrBlockImpl(it.startOffset, it.endOffset, it.type, IrOperator.SAFE_CALL)
newBlock.addStatement(inner.receiverVariable.detach())
val replaceWithValue = OnceExpressionValue(inner.nestedCall.detach())
@@ -29,7 +29,6 @@ import org.jetbrains.kotlin.types.checker.KotlinTypeChecker
import org.jetbrains.kotlin.types.isNullabilityFlexible
import org.jetbrains.kotlin.types.typeUtil.makeNotNullable
import org.jetbrains.kotlin.types.upperIfFlexible
import java.lang.AssertionError
fun insertImplicitCasts(builtIns: KotlinBuiltIns, element: IrElement) {
element.accept(InsertImplicitCasts(builtIns), null)
@@ -55,11 +54,13 @@ class InsertImplicitCasts(val builtIns: KotlinBuiltIns): IrElementVisitor<Unit,
override fun visitBlock(expression: IrBlock, data: Nothing?) {
expression.acceptChildren(this, null)
if (!expression.hasResult || expression.type == null) return
val type = expression.type
if (type == null || KotlinBuiltIns.isUnit(type)) return
if (expression.statements.isEmpty()) return
val lastStatement = expression.statements.last()
if (lastStatement is IrExpression) {
lastStatement.wrapWithImplicitCast(expression.type)
lastStatement.replaceWithCast(type)
}
}
@@ -119,12 +120,12 @@ class InsertImplicitCasts(val builtIns: KotlinBuiltIns): IrElementVisitor<Unit,
}
private fun IrExpression.wrapWithImplicitCast(expectedType: KotlinType?): IrExpression {
if (this is IrBlock && !this.hasResult) return this
if (this is IrBlock && this.type == null) return this
if (expectedType == null) return this
if (expectedType.isError) return this
if (KotlinBuiltIns.isUnit(expectedType)) return this // TODO expose coercion to Unit in IR?
val valueType = this.type ?: throw AssertionError("expectedType != null, valueType == null: $this")
val valueType = this.type ?: return this
if (valueType.isNullabilityFlexible() && valueType.containsNull() && !expectedType.containsNull()) {
val nonNullValueType = valueType.upperIfFlexible().makeNotNullable();
@@ -30,8 +30,6 @@ interface IrClass : IrDeclaration {
override val descriptor: ClassDescriptor
val children: List<IrClassElement>
fun addChild(child: IrClassElement)
}
class IrClassImpl(
@@ -42,7 +40,7 @@ class IrClassImpl(
) : IrDeclarationBase(startOffset, endOffset, originKind), IrClass {
override val children: MutableList<IrClassElement> = ArrayList()
override fun addChild(child: IrClassElement) {
fun addElement(child: IrClassElement) {
child.assertDetached()
child.setTreeLocation(this, children.size)
children.add(child)
@@ -23,7 +23,6 @@ import java.util.*
interface IrBlock : IrExpression {
val hasResult: Boolean
val operator: IrOperator?
val statements: List<IrStatement>
@@ -37,7 +36,6 @@ class IrBlockImpl(
startOffset: Int,
endOffset: Int,
type: KotlinType?,
override val hasResult: Boolean,
override val operator: IrOperator? = null
) : IrExpressionBase(startOffset, endOffset, type), IrBlock {
override val statements: MutableList<IrStatement> = ArrayList()
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import java.util.*
interface IrBody : IrElement
@@ -25,15 +26,12 @@ interface IrExpressionBody : IrBody {
var expression: IrExpression
}
class IrExpressionBodyImpl(
startOffset: Int,
endOffset: Int
) : IrElementBase(startOffset, endOffset), IrExpressionBody {
constructor(
startOffset: Int,
endOffset: Int,
expression: IrExpression
) : this(startOffset, endOffset) {
interface IrBlockBody : IrBody {
val statements: List<IrStatement>
}
class IrExpressionBodyImpl(startOffset: Int, endOffset: Int) : IrElementBase(startOffset, endOffset), IrExpressionBody {
constructor(startOffset: Int, endOffset: Int, expression: IrExpression) : this(startOffset, endOffset) {
this.expression = expression
}
@@ -65,4 +63,36 @@ class IrExpressionBodyImpl(
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
expression.accept(visitor, data)
}
}
class IrBlockBodyImpl(startOffset: Int, endOffset: Int) : IrElementBase(startOffset, endOffset), IrBlockBody {
override val statements: MutableList<IrStatement> = ArrayList()
fun addStatement(statement: IrStatement) {
statement.assertDetached()
statement.setTreeLocation(this, statements.size)
statements.add(statement)
}
override fun getChild(slot: Int): IrElement? =
statements.getOrNull(slot)
override fun replaceChild(slot: Int, newChild: IrElement) {
if (slot < 0 || slot >= statements.size) throwNoSuchSlot(slot)
newChild.assertDetached()
statements[slot].detach()
statements[slot] = newChild.assertCast()
newChild.setTreeLocation(this, slot)
}
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
return visitor.visitBlockBody(this, data)
}
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
statements.forEach { it.accept(visitor, data) }
}
}
@@ -68,7 +68,8 @@ interface IrOperator {
object DIVEQ : IrOperatorImpl("DIVEQ")
object PERCEQ : IrOperatorImpl("PERCEQ")
object SYNTHETIC_BLOCK : IrOperatorImpl("SYNTHETIC_BLOCK")
object ARGUMENTS_REORDERING_FOR_CALL : IrOperatorImpl("ARGUMENTS_REORDERING_FOR_CALL")
object DESTRUCTURING_DECLARATION : IrOperatorImpl("DESTRUCTURING_DECLARATION")
object GET_PROPERTY : IrOperatorImpl("GET_PROPERTY")
object SET_PROPERTY : IrOperatorImpl("SET_PROPERTY")
@@ -37,25 +37,28 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
"? ${declaration.javaClass.simpleName} ${declaration.descriptor?.name}"
override fun visitFile(declaration: IrFile, data: Nothing?): String =
"IrFile ${declaration.name}"
"FILE ${declaration.name}"
override fun visitFunction(declaration: IrFunction, data: Nothing?): String =
"IrFunction ${declaration.descriptor.render()}"
"FUN ${declaration.descriptor.render()}"
override fun visitProperty(declaration: IrProperty, data: Nothing?): String =
"IrProperty ${declaration.descriptor.render()} getter=${declaration.getter?.name()} setter=${declaration.setter?.name()}"
"PROPERTY ${declaration.descriptor.render()} getter=${declaration.getter?.name()} setter=${declaration.setter?.name()}"
override fun visitPropertyGetter(declaration: IrPropertyGetter, data: Nothing?): String =
"IrPropertyGetter ${declaration.descriptor.render()} property=${declaration.property?.name()}"
"PROPERTY_GETTER ${declaration.descriptor.render()} property=${declaration.property?.name()}"
override fun visitPropertySetter(declaration: IrPropertySetter, data: Nothing?): String =
"IrPropertySetter ${declaration.descriptor.render()} property=${declaration.property?.name()}"
"PROPERTY_SETTER ${declaration.descriptor.render()} property=${declaration.property?.name()}"
override fun visitVariable(declaration: IrVariable, data: Nothing?): String =
"VAR ${declaration.descriptor.render()}"
override fun visitExpressionBody(body: IrExpressionBody, data: Nothing?): String =
"IrExpressionBody"
"EXPRESSION_BODY"
override fun visitBlockBody(body: IrBlockBody, data: Nothing?): String =
"BLOCK_BODY"
override fun visitExpression(expression: IrExpression, data: Nothing?): String =
"? ${expression.javaClass.simpleName} type=${expression.renderType()}"
@@ -64,7 +67,7 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
"CONST ${expression.kind} type=${expression.renderType()} value='${expression.value}'"
override fun visitBlock(expression: IrBlock, data: Nothing?): String =
"BLOCK type=${expression.renderType()} hasResult=${expression.hasResult} operator=${expression.operator}"
"BLOCK type=${expression.renderType()} operator=${expression.operator}"
override fun visitReturn(expression: IrReturn, data: Nothing?): String =
"RETURN type=${expression.renderType()}"
@@ -37,6 +37,8 @@ interface IrElementVisitor<out R, in D> {
fun visitBody(body: IrBody, data: D): R = visitElement(body, data)
fun visitExpressionBody(body: IrExpressionBody, data: D): R = visitBody(body, data)
fun visitBlockBody(body: IrBlockBody, data: D) = visitBody(body, data)
fun visitExpression(expression: IrExpression, data: D): R = visitElement(expression, data)
fun <T> visitConst(expression: IrConst<T>, data: D): R = visitExpression(expression, data)
@@ -71,6 +73,4 @@ interface IrElementVisitor<out R, in D> {
// NB Use it only for testing purposes; will be removed as soon as all Kotlin expression types are covered
fun visitDummyDeclaration(declaration: IrDummyDeclaration, data: D) = visitDeclaration(declaration, data)
fun visitDummyExpression(expression: IrDummyExpression, data: D) = visitExpression(expression, data)
}
+19 -21
View File
@@ -1,24 +1,22 @@
IrFile /arrayAccess.kt
IrProperty public val p: kotlin.Int = 0 getter=null setter=null
IrExpressionBody
FILE /arrayAccess.kt
PROPERTY public val p: kotlin.Int = 0 getter=null setter=null
EXPRESSION_BODY
CONST 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>
CONST Int type=kotlin.Int value='1'
IrFunction public fun test(/*0*/ a: kotlin.IntArray): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .plus type=kotlin.Int operator=PLUS
$this: CALL .plus type=kotlin.Int operator=PLUS
$this: CALL .get type=kotlin.Int operator=GET_ARRAY_ELEMENT
$this: GET_VAR a type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
other: CALL .get type=kotlin.Int operator=GET_ARRAY_ELEMENT
$this: GET_VAR a type=kotlin.IntArray operator=null
index: CALL .<get-p> type=kotlin.Int operator=GET_PROPERTY
FUN public fun foo(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='1'
FUN public fun test(/*0*/ a: kotlin.IntArray): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .plus type=kotlin.Int operator=PLUS
$this: CALL .plus type=kotlin.Int operator=PLUS
$this: CALL .get type=kotlin.Int operator=GET_ARRAY_ELEMENT
$this: GET_VAR a type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
other: CALL .get type=kotlin.Int operator=GET_ARRAY_ELEMENT
$this: GET_VAR a type=kotlin.IntArray operator=null
index: CALL .foo type=kotlin.Int operator=null
index: CALL .<get-p> type=kotlin.Int operator=GET_PROPERTY
other: CALL .get type=kotlin.Int operator=GET_ARRAY_ELEMENT
$this: GET_VAR a type=kotlin.IntArray operator=null
index: CALL .foo type=kotlin.Int operator=null
+23 -26
View File
@@ -1,26 +1,23 @@
IrFile /arrayAssignment.kt
IrFunction public fun test(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR val x: kotlin.IntArray
CALL .intArrayOf type=kotlin.IntArray operator=null
elements: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.IntArray
DUMMY vararg type=kotlin.Int
CALL .set type=kotlin.Unit operator=EQ
$this: GET_VAR x type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='1'
value: CONST 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>
CONST 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: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.IntArray
DUMMY vararg type=kotlin.Int
index: CALL .foo type=kotlin.Int operator=null
value: CONST Int type=kotlin.Int value='1'
FILE /arrayAssignment.kt
FUN public fun test(): kotlin.Unit
BLOCK_BODY
VAR val x: kotlin.IntArray
CALL .intArrayOf type=kotlin.IntArray operator=null
elements: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.IntArray
DUMMY vararg type=kotlin.Int
CALL .set type=kotlin.Unit operator=EQ
$this: GET_VAR x type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='1'
value: CONST Int type=kotlin.Int value='0'
FUN public fun foo(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='1'
FUN public fun test2(): kotlin.Unit
BLOCK_BODY
CALL .set type=kotlin.Unit operator=EQ
$this: CALL .intArrayOf type=kotlin.IntArray operator=null
elements: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.IntArray
DUMMY vararg type=kotlin.Int
index: CALL .foo type=kotlin.Int operator=null
value: CONST Int type=kotlin.Int value='1'
+52 -57
View File
@@ -1,61 +1,56 @@
IrFile /arrayAugmentedAssignment1.kt
IrFunction public fun foo(): kotlin.IntArray
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .intArrayOf type=kotlin.IntArray operator=null
elements: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.IntArray
DUMMY vararg type=kotlin.Int
IrFunction public fun bar(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST Int type=kotlin.Int value='42'
FILE /arrayAugmentedAssignment1.kt
FUN public fun foo(): kotlin.IntArray
BLOCK_BODY
RETURN type=<no-type>
CALL .intArrayOf type=kotlin.IntArray operator=null
elements: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.IntArray
DUMMY vararg type=kotlin.Int
FUN public fun bar(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='42'
DUMMY C
IrFunction public fun testVariable(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.IntArray
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: CONST 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: CONST Int type=kotlin.Int value='0'
other: CONST Int type=kotlin.Int value='1'
IrFunction public fun testCall(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=MULTEQ
VAR val tmp0_array: kotlin.IntArray
CALL .foo type=kotlin.IntArray operator=null
VAR val tmp1_index0: kotlin.Int
CALL .bar type=kotlin.Int operator=null
CALL .set type=kotlin.Unit operator=MULTEQ
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: GET_VAR tmp1_index0 type=kotlin.Int operator=null
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: GET_VAR tmp1_index0 type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='2'
IrFunction public fun testMember(/*0*/ c: C): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_INCR
VAR val tmp0_array: kotlin.IntArray
CALL .<get-x> type=kotlin.IntArray operator=GET_PROPERTY
$this: GET_VAR c type=C operator=null
VAR val tmp1: kotlin.Int
CALL .get type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
FUN public fun testVariable(): kotlin.Unit
BLOCK_BODY
VAR var x: kotlin.IntArray
CALL .foo type=kotlin.IntArray operator=null
BLOCK type=kotlin.Unit operator=PLUSEQ
CALL .set type=kotlin.Unit operator=PLUSEQ
$this: GET_VAR x type=kotlin.IntArray operator=null
index: CONST 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: CONST Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=POSTFIX_INCR
other: CONST Int type=kotlin.Int value='1'
FUN public fun testCall(): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=MULTEQ
VAR val tmp0_array: kotlin.IntArray
CALL .foo type=kotlin.IntArray operator=null
VAR val tmp1_index0: kotlin.Int
CALL .bar type=kotlin.Int operator=null
CALL .set type=kotlin.Unit operator=MULTEQ
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: GET_VAR tmp1_index0 type=kotlin.Int operator=null
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: GET_VAR tmp1_index0 type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='2'
FUN public fun testMember(/*0*/ c: C): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp0_array: kotlin.IntArray
CALL .<get-x> type=kotlin.IntArray operator=GET_PROPERTY
$this: GET_VAR c type=C operator=null
VAR val tmp1: kotlin.Int
CALL .get type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
CALL .set type=kotlin.Unit operator=POSTFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
+13 -14
View File
@@ -1,16 +1,15 @@
IrFile /arrayAugmentedAssignment2.kt
FILE /arrayAugmentedAssignment2.kt
DUMMY IA
DUMMY IB
IrFunction public fun IB.test(/*0*/ a: IA): kotlin.Unit
IrExpressionBody
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: CONST 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: CONST String type=kotlin.String value=''
other: CONST Int type=kotlin.Int value='42'
FUN public fun IB.test(/*0*/ a: IA): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=PLUSEQ
CALL .set type=kotlin.Unit operator=PLUSEQ
$this: $RECEIVER of: test type=IB
$receiver: GET_VAR a type=IA operator=null
index: CONST 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: CONST String type=kotlin.String value=''
other: CONST Int type=kotlin.Int value='42'
+16 -18
View File
@@ -1,19 +1,17 @@
IrFile /assignments.kt
FILE /assignments.kt
DUMMY Ref
IrFunction public fun test1(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
SET_VAR x type=<no-type> operator=EQ
CONST Int type=kotlin.Int value='1'
SET_VAR x type=<no-type> operator=EQ
CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR x type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='1'
IrFunction public fun test2(/*0*/ r: Ref): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
CALL .<set-x> type=kotlin.Unit operator=EQ
$this: GET_VAR r type=Ref operator=null
<set-?>: CONST Int type=kotlin.Int value='0'
FUN public fun test1(): kotlin.Unit
BLOCK_BODY
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
SET_VAR x type=<no-type> operator=EQ
CONST Int type=kotlin.Int value='1'
SET_VAR x type=<no-type> operator=EQ
CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR x type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='1'
FUN public fun test2(/*0*/ r: Ref): kotlin.Unit
BLOCK_BODY
CALL .<set-x> type=kotlin.Unit operator=EQ
$this: GET_VAR r type=Ref operator=null
<set-?>: CONST Int type=kotlin.Int value='0'
+49 -51
View File
@@ -1,52 +1,50 @@
IrFile /augmentedAssignment1.kt
IrProperty public var p: kotlin.Int getter=null setter=null
IrExpressionBody
FILE /augmentedAssignment1.kt
PROPERTY public var p: kotlin.Int getter=null setter=null
EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
IrFunction public fun testVariable(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
SET_VAR x type=<no-type> operator=PLUSEQ
CALL .plus type=kotlin.Int operator=PLUSEQ
$this: GET_VAR x type=kotlin.Int operator=PLUSEQ
other: CONST Int type=kotlin.Int value='1'
SET_VAR x type=<no-type> operator=MINUSEQ
CALL .minus type=kotlin.Int operator=MINUSEQ
$this: GET_VAR x type=kotlin.Int operator=MINUSEQ
other: CONST Int type=kotlin.Int value='2'
SET_VAR x type=<no-type> operator=MULTEQ
CALL .times type=kotlin.Int operator=MULTEQ
$this: GET_VAR x type=kotlin.Int operator=MULTEQ
other: CONST Int type=kotlin.Int value='3'
SET_VAR x type=<no-type> operator=DIVEQ
CALL .div type=kotlin.Int operator=DIVEQ
$this: GET_VAR x type=kotlin.Int operator=DIVEQ
other: CONST Int type=kotlin.Int value='4'
SET_VAR x type=<no-type> operator=PERCEQ
CALL .mod type=kotlin.Int operator=PERCEQ
$this: GET_VAR x type=kotlin.Int operator=PERCEQ
other: CONST Int type=kotlin.Int value='5'
IrFunction public fun testProperty(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
CALL .<set-p> type=kotlin.Unit operator=PLUSEQ
<set-?>: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: CALL .<get-p> type=kotlin.Int operator=PLUSEQ
other: CONST Int type=kotlin.Int value='1'
CALL .<set-p> type=kotlin.Unit operator=MINUSEQ
<set-?>: CALL .minus type=kotlin.Int operator=MINUSEQ
$this: CALL .<get-p> type=kotlin.Int operator=MINUSEQ
other: CONST Int type=kotlin.Int value='2'
CALL .<set-p> type=kotlin.Unit operator=MULTEQ
<set-?>: CALL .times type=kotlin.Int operator=MULTEQ
$this: CALL .<get-p> type=kotlin.Int operator=MULTEQ
other: CONST Int type=kotlin.Int value='3'
CALL .<set-p> type=kotlin.Unit operator=DIVEQ
<set-?>: CALL .div type=kotlin.Int operator=DIVEQ
$this: CALL .<get-p> type=kotlin.Int operator=DIVEQ
other: CONST Int type=kotlin.Int value='4'
CALL .<set-p> type=kotlin.Unit operator=PERCEQ
<set-?>: CALL .mod type=kotlin.Int operator=PERCEQ
$this: CALL .<get-p> type=kotlin.Int operator=PERCEQ
other: CONST Int type=kotlin.Int value='5'
FUN public fun testVariable(): kotlin.Unit
BLOCK_BODY
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
SET_VAR x type=<no-type> operator=PLUSEQ
CALL .plus type=kotlin.Int operator=PLUSEQ
$this: GET_VAR x type=kotlin.Int operator=PLUSEQ
other: CONST Int type=kotlin.Int value='1'
SET_VAR x type=<no-type> operator=MINUSEQ
CALL .minus type=kotlin.Int operator=MINUSEQ
$this: GET_VAR x type=kotlin.Int operator=MINUSEQ
other: CONST Int type=kotlin.Int value='2'
SET_VAR x type=<no-type> operator=MULTEQ
CALL .times type=kotlin.Int operator=MULTEQ
$this: GET_VAR x type=kotlin.Int operator=MULTEQ
other: CONST Int type=kotlin.Int value='3'
SET_VAR x type=<no-type> operator=DIVEQ
CALL .div type=kotlin.Int operator=DIVEQ
$this: GET_VAR x type=kotlin.Int operator=DIVEQ
other: CONST Int type=kotlin.Int value='4'
SET_VAR x type=<no-type> operator=PERCEQ
CALL .mod type=kotlin.Int operator=PERCEQ
$this: GET_VAR x type=kotlin.Int operator=PERCEQ
other: CONST Int type=kotlin.Int value='5'
FUN public fun testProperty(): kotlin.Unit
BLOCK_BODY
CALL .<set-p> type=kotlin.Unit operator=PLUSEQ
<set-?>: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: CALL .<get-p> type=kotlin.Int operator=PLUSEQ
other: CONST Int type=kotlin.Int value='1'
CALL .<set-p> type=kotlin.Unit operator=MINUSEQ
<set-?>: CALL .minus type=kotlin.Int operator=MINUSEQ
$this: CALL .<get-p> type=kotlin.Int operator=MINUSEQ
other: CONST Int type=kotlin.Int value='2'
CALL .<set-p> type=kotlin.Unit operator=MULTEQ
<set-?>: CALL .times type=kotlin.Int operator=MULTEQ
$this: CALL .<get-p> type=kotlin.Int operator=MULTEQ
other: CONST Int type=kotlin.Int value='3'
CALL .<set-p> type=kotlin.Unit operator=DIVEQ
<set-?>: CALL .div type=kotlin.Int operator=DIVEQ
$this: CALL .<get-p> type=kotlin.Int operator=DIVEQ
other: CONST Int type=kotlin.Int value='4'
CALL .<set-p> type=kotlin.Unit operator=PERCEQ
<set-?>: CALL .mod type=kotlin.Int operator=PERCEQ
$this: CALL .<get-p> type=kotlin.Int operator=PERCEQ
other: CONST Int type=kotlin.Int value='5'
+49 -56
View File
@@ -1,58 +1,51 @@
IrFile /augmentedAssignment2.kt
FILE /augmentedAssignment2.kt
DUMMY A
IrFunction public operator fun A.plusAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody
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 operator=null
IrFunction public operator fun A.timesAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody
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 operator=null
IrFunction public operator fun A.modAssign(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
IrProperty public val p: A getter=null setter=null
IrExpressionBody
FUN public operator fun A.plusAssign(/*0*/ s: kotlin.String): kotlin.Unit
BLOCK_BODY
FUN public operator fun A.minusAssign(/*0*/ s: kotlin.String): kotlin.Unit
BLOCK_BODY
FUN public operator fun A.timesAssign(/*0*/ s: kotlin.String): kotlin.Unit
BLOCK_BODY
FUN public operator fun A.divAssign(/*0*/ s: kotlin.String): kotlin.Unit
BLOCK_BODY
FUN public operator fun A.modAssign(/*0*/ s: kotlin.String): kotlin.Unit
BLOCK_BODY
PROPERTY public val p: A getter=null setter=null
EXPRESSION_BODY
CALL .<init> type=A operator=null
IrFunction public fun testVariable(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR val a: A
CALL .<init> type=A operator=null
CALL .plusAssign type=kotlin.Unit operator=PLUSEQ
$receiver: GET_VAR a type=A operator=PLUSEQ
s: CONST String type=kotlin.String value='+='
CALL .minusAssign type=kotlin.Unit operator=MINUSEQ
$receiver: GET_VAR a type=A operator=MINUSEQ
s: CONST String type=kotlin.String value='-='
CALL .timesAssign type=kotlin.Unit operator=MULTEQ
$receiver: GET_VAR a type=A operator=MULTEQ
s: CONST String type=kotlin.String value='*='
CALL .divAssign type=kotlin.Unit operator=DIVEQ
$receiver: GET_VAR a type=A operator=DIVEQ
s: CONST String type=kotlin.String value='/='
CALL .modAssign type=kotlin.Unit operator=PERCEQ
$receiver: GET_VAR a type=A operator=PERCEQ
s: CONST String type=kotlin.String value='*='
IrFunction public fun testProperty(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
CALL .plusAssign type=kotlin.Unit operator=PLUSEQ
$receiver: CALL .<get-p> type=A operator=PLUSEQ
s: CONST String type=kotlin.String value='+='
CALL .minusAssign type=kotlin.Unit operator=MINUSEQ
$receiver: CALL .<get-p> type=A operator=MINUSEQ
s: CONST String type=kotlin.String value='-='
CALL .timesAssign type=kotlin.Unit operator=MULTEQ
$receiver: CALL .<get-p> type=A operator=MULTEQ
s: CONST String type=kotlin.String value='*='
CALL .divAssign type=kotlin.Unit operator=DIVEQ
$receiver: CALL .<get-p> type=A operator=DIVEQ
s: CONST String type=kotlin.String value='/='
CALL .modAssign type=kotlin.Unit operator=PERCEQ
$receiver: CALL .<get-p> type=A operator=PERCEQ
s: CONST String type=kotlin.String value='%='
FUN public fun testVariable(): kotlin.Unit
BLOCK_BODY
VAR val a: A
CALL .<init> type=A operator=null
CALL .plusAssign type=kotlin.Unit operator=PLUSEQ
$receiver: GET_VAR a type=A operator=PLUSEQ
s: CONST String type=kotlin.String value='+='
CALL .minusAssign type=kotlin.Unit operator=MINUSEQ
$receiver: GET_VAR a type=A operator=MINUSEQ
s: CONST String type=kotlin.String value='-='
CALL .timesAssign type=kotlin.Unit operator=MULTEQ
$receiver: GET_VAR a type=A operator=MULTEQ
s: CONST String type=kotlin.String value='*='
CALL .divAssign type=kotlin.Unit operator=DIVEQ
$receiver: GET_VAR a type=A operator=DIVEQ
s: CONST String type=kotlin.String value='/='
CALL .modAssign type=kotlin.Unit operator=PERCEQ
$receiver: GET_VAR a type=A operator=PERCEQ
s: CONST String type=kotlin.String value='*='
FUN public fun testProperty(): kotlin.Unit
BLOCK_BODY
CALL .plusAssign type=kotlin.Unit operator=PLUSEQ
$receiver: CALL .<get-p> type=A operator=PLUSEQ
s: CONST String type=kotlin.String value='+='
CALL .minusAssign type=kotlin.Unit operator=MINUSEQ
$receiver: CALL .<get-p> type=A operator=MINUSEQ
s: CONST String type=kotlin.String value='-='
CALL .timesAssign type=kotlin.Unit operator=MULTEQ
$receiver: CALL .<get-p> type=A operator=MULTEQ
s: CONST String type=kotlin.String value='*='
CALL .divAssign type=kotlin.Unit operator=DIVEQ
$receiver: CALL .<get-p> type=A operator=DIVEQ
s: CONST String type=kotlin.String value='/='
CALL .modAssign type=kotlin.Unit operator=PERCEQ
$receiver: CALL .<get-p> type=A operator=PERCEQ
s: CONST String type=kotlin.String value='%='
+27 -31
View File
@@ -1,31 +1,27 @@
IrFile /booleanOperators.kt
IrFunction public fun test1(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
WHEN type=kotlin.Boolean operator=ANDAND
if: GET_VAR a type=kotlin.Boolean operator=null
then: GET_VAR b type=kotlin.Boolean operator=null
else: CONST Boolean type=kotlin.Boolean value='false'
IrFunction public fun test2(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
WHEN type=kotlin.Boolean operator=OROR
if: GET_VAR a type=kotlin.Boolean operator=null
then: CONST Boolean type=kotlin.Boolean value='true'
else: GET_VAR b type=kotlin.Boolean operator=null
IrFunction public fun test1x(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .and type=kotlin.Boolean operator=null
$this: GET_VAR a type=kotlin.Boolean operator=null
other: GET_VAR b type=kotlin.Boolean operator=null
IrFunction public fun test2x(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .or type=kotlin.Boolean operator=null
$this: GET_VAR a type=kotlin.Boolean operator=null
other: GET_VAR b type=kotlin.Boolean operator=null
FILE /booleanOperators.kt
FUN public fun test1(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.Boolean operator=ANDAND
if: GET_VAR a type=kotlin.Boolean operator=null
then: GET_VAR b type=kotlin.Boolean operator=null
else: CONST Boolean type=kotlin.Boolean value='false'
FUN public fun test2(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.Boolean operator=OROR
if: GET_VAR a type=kotlin.Boolean operator=null
then: CONST Boolean type=kotlin.Boolean value='true'
else: GET_VAR b type=kotlin.Boolean operator=null
FUN public fun test1x(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .and type=kotlin.Boolean operator=null
$this: GET_VAR a type=kotlin.Boolean operator=null
other: GET_VAR b type=kotlin.Boolean operator=null
FUN public fun test2x(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .or type=kotlin.Boolean operator=null
$this: GET_VAR a type=kotlin.Boolean operator=null
other: GET_VAR b type=kotlin.Boolean operator=null
+5 -6
View File
@@ -1,6 +1,5 @@
IrFile /boxOk.kt
IrFunction public fun box(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST String type=kotlin.String value='OK'
FILE /boxOk.kt
FUN public fun box(): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
CONST String type=kotlin.String value='OK'
+57 -60
View File
@@ -1,60 +1,57 @@
IrFile /breakContinue.kt
IrFunction public fun test1(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
WHILE label=null operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=<no-type> hasResult=false operator=null
BREAK label=null depth=0
DO_WHILE label=null operator=DO_WHILE_LOOP
body: BLOCK type=<no-type> hasResult=false operator=null
BREAK label=null depth=0
condition: CONST Boolean type=kotlin.Boolean value='true'
WHILE label=null operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=<no-type> hasResult=false operator=null
CONTINUE label=null depth=0
DO_WHILE label=null operator=DO_WHILE_LOOP
body: BLOCK type=<no-type> hasResult=false operator=null
CONTINUE label=null depth=0
condition: CONST Boolean type=kotlin.Boolean value='true'
IrFunction public fun test2(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
WHILE label=OUTER operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=<no-type> hasResult=false operator=null
WHILE label=INNER operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=<no-type> hasResult=false operator=null
BREAK label=INNER depth=0
BREAK label=OUTER depth=1
BREAK label=OUTER depth=0
WHILE label=OUTER operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=<no-type> hasResult=false operator=null
WHILE label=INNER operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=<no-type> hasResult=false operator=null
CONTINUE label=INNER depth=0
CONTINUE label=OUTER depth=1
CONTINUE label=OUTER depth=0
IrFunction public fun test3(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
WHILE label=L operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=<no-type> hasResult=false operator=null
WHILE label=L operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=<no-type> hasResult=false operator=null
BREAK label=L depth=0
BREAK label=L depth=0
WHILE label=L operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=<no-type> hasResult=false operator=null
WHILE label=L operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=<no-type> hasResult=false operator=null
CONTINUE label=L depth=0
CONTINUE label=L depth=0
FILE /breakContinue.kt
FUN public fun test1(): kotlin.Unit
BLOCK_BODY
WHILE label=null operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null
BREAK label=null depth=0
DO_WHILE label=null operator=DO_WHILE_LOOP
body: BLOCK type=kotlin.Unit operator=null
BREAK label=null depth=0
condition: CONST Boolean type=kotlin.Boolean value='true'
WHILE label=null operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null
CONTINUE label=null depth=0
DO_WHILE label=null operator=DO_WHILE_LOOP
body: BLOCK type=kotlin.Unit operator=null
CONTINUE label=null depth=0
condition: CONST Boolean type=kotlin.Boolean value='true'
FUN public fun test2(): kotlin.Unit
BLOCK_BODY
WHILE label=OUTER operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null
WHILE label=INNER operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null
BREAK label=INNER depth=0
BREAK label=OUTER depth=1
BREAK label=OUTER depth=0
WHILE label=OUTER operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null
WHILE label=INNER operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null
CONTINUE label=INNER depth=0
CONTINUE label=OUTER depth=1
CONTINUE label=OUTER depth=0
FUN public fun test3(): kotlin.Unit
BLOCK_BODY
WHILE label=L operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null
WHILE label=L operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null
BREAK label=L depth=0
BREAK label=L depth=0
WHILE label=L operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null
WHILE label=L operator=WHILE_LOOP
condition: CONST Boolean type=kotlin.Boolean value='true'
body: BLOCK type=kotlin.Nothing operator=null
CONTINUE label=L depth=0
CONTINUE label=L depth=0
+37 -43
View File
@@ -1,44 +1,38 @@
IrFile /callWithReorderedArguments.kt
IrFunction public fun foo(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
IrFunction public fun noReorder1(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST Int type=kotlin.Int value='1'
IrFunction public fun noReorder2(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST Int type=kotlin.Int value='2'
IrFunction public fun reordered1(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST Int type=kotlin.Int value='1'
IrFunction public fun reordered2(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST Int type=kotlin.Int value='2'
IrFunction public fun test(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
FILE /callWithReorderedArguments.kt
FUN public fun foo(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Unit
BLOCK_BODY
FUN public fun noReorder1(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='1'
FUN public fun noReorder2(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='2'
FUN public fun reordered1(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='1'
FUN public fun reordered2(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='2'
FUN public fun test(): kotlin.Unit
BLOCK_BODY
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 operator=ARGUMENTS_REORDERING_FOR_CALL
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: CALL .noReorder1 type=kotlin.Int operator=null
b: CALL .noReorder2 type=kotlin.Int operator=null
BLOCK type=kotlin.Unit hasResult=true 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=true 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: CONST Int type=kotlin.Int value='1'
a: GET_VAR tmp1_a type=kotlin.Int operator=null
b: GET_VAR tmp0_b type=kotlin.Int operator=null
BLOCK type=kotlin.Unit operator=ARGUMENTS_REORDERING_FOR_CALL
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: CONST Int type=kotlin.Int value='1'
+34 -40
View File
@@ -1,42 +1,36 @@
IrFile /calls.kt
IrFunction public fun foo(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
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 operator=null
RETURN type=<no-type>
CALL .foo type=kotlin.Int operator=null
FILE /calls.kt
FUN public fun foo(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
GET_VAR x type=kotlin.Int operator=null
FUN public fun bar(/*0*/ x: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .foo type=kotlin.Int operator=null
x: GET_VAR x type=kotlin.Int operator=null
y: CONST Int type=kotlin.Int value='1'
FUN public fun qux(/*0*/ x: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
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: CONST Int type=kotlin.Int value='1'
IrFunction public fun qux(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
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 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 operator=null
RETURN type=<no-type>
CALL .foo type=kotlin.Int operator=null
x: $RECEIVER of: ext2 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 operator=null
RETURN type=<no-type>
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 operator=null
y: GET_VAR x type=kotlin.Int operator=null
FUN public fun kotlin.Int.ext1(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
$RECEIVER of: ext1 type=kotlin.Int
FUN public fun kotlin.Int.ext2(/*0*/ x: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .foo type=kotlin.Int operator=null
x: $RECEIVER of: ext2 type=kotlin.Int
y: GET_VAR x type=kotlin.Int operator=null
FUN public fun kotlin.Int.ext3(/*0*/ x: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
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 operator=null
+17 -18
View File
@@ -1,24 +1,23 @@
IrFile /chainOfSafeCalls.kt
FILE /chainOfSafeCalls.kt
DUMMY C
IrFunction public fun test(/*0*/ nc: C?): C?
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BLOCK type=C? hasResult=true operator=SAFE_CALL
VAR val tmp2_safe_receiver: C?
WHEN type=C? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR nc type=C? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .bar type=C? operator=null
$this: CALL .foo type=C operator=null
$this: GET_VAR nc type=C? operator=null
FUN public fun test(/*0*/ nc: C?): C?
BLOCK_BODY
RETURN type=<no-type>
BLOCK type=C? operator=SAFE_CALL
VAR val tmp2_safe_receiver: C?
WHEN type=C? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp2_safe_receiver type=C? operator=null
arg0: GET_VAR nc type=C? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .foo type=C operator=null
else: CALL .bar type=C? operator=null
$this: CALL .foo type=C operator=null
$this: GET_VAR tmp2_safe_receiver type=C? operator=null
$this: GET_VAR nc type=C? operator=null
WHEN type=C? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp2_safe_receiver type=C? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .foo type=C operator=null
$this: CALL .foo type=C operator=null
$this: GET_VAR tmp2_safe_receiver type=C? operator=null
+33 -37
View File
@@ -1,39 +1,35 @@
IrFile /conventionComparisons.kt
FILE /conventionComparisons.kt
DUMMY IA
DUMMY IB
IrFunction public fun IB.test1(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: $RECEIVER of: test1 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
IrFunction public fun IB.test2(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: $RECEIVER of: test2 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
IrFunction public fun IB.test3(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: $RECEIVER of: test3 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
IrFunction public fun IB.test4(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: $RECEIVER of: test4 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
FUN public fun IB.test1(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: $RECEIVER of: test1 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
FUN public fun IB.test2(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: $RECEIVER of: test2 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
FUN public fun IB.test3(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: $RECEIVER of: test3 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
FUN public fun IB.test4(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: $RECEIVER of: test4 type=IB
$receiver: GET_VAR a1 type=IA operator=null
other: GET_VAR a2 type=IA operator=null
+13 -14
View File
@@ -1,14 +1,13 @@
IrFunction public fun B.test(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=<no-type> hasResult=false operator=SYNTHETIC_BLOCK
VAR val tmp0_container: A
GET_OBJECT 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_container 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_container type=A operator=null
FUN public fun B.test(): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=DESTRUCTURING_DECLARATION
VAR val tmp0_container: A
GET_OBJECT 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_container 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_container type=A operator=null
+16 -18
View File
@@ -1,18 +1,16 @@
IrFile /dotQualified.kt
IrFunction public fun length(/*0*/ s: kotlin.String): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$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 operator=null
RETURN type=<no-type>
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR s type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$this: GET_VAR s type=kotlin.String? operator=null
FILE /dotQualified.kt
FUN public fun length(/*0*/ s: kotlin.String): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$this: GET_VAR s type=kotlin.String operator=null
FUN public fun lengthN(/*0*/ s: kotlin.String?): kotlin.Int?
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR s type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$this: GET_VAR s type=kotlin.String? operator=null
+73 -79
View File
@@ -1,80 +1,74 @@
IrFile /elvis.kt
IrProperty public val p: kotlin.Any? = null getter=null setter=null
IrExpressionBody
FILE /elvis.kt
PROPERTY public val p: kotlin.Any? = null getter=null setter=null
EXPRESSION_BODY
CONST Null type=kotlin.Nothing? value='null'
IrFunction public fun foo(): kotlin.Any?
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST Null type=kotlin.Nothing? value='null'
IrFunction public fun test1(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any): kotlin.Any
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BLOCK type=kotlin.Any hasResult=true operator=ELVIS
WHEN type=kotlin.Any operator=null
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: GET_VAR b type=kotlin.Any operator=null
else: GET_VAR a 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 operator=null
RETURN type=<no-type>
BLOCK type=kotlin.Any hasResult=true operator=ELVIS
WHEN type=kotlin.Any operator=null
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: GET_VAR b type=kotlin.Any operator=null
else: GET_VAR a type=kotlin.String? operator=null
IrFunction public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String
GET_VAR b type=kotlin.Any? operator=null
then: RETURN type=<no-type>
CONST String type=kotlin.String value=''
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String?
GET_VAR a type=kotlin.Any? operator=null
then: RETURN type=<no-type>
CONST String type=kotlin.String value=''
RETURN type=<no-type>
BLOCK type=kotlin.String hasResult=true operator=ELVIS
WHEN type=kotlin.String operator=null
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR b type=kotlin.Any? operator=null
else: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR a type=kotlin.Any? operator=null
IrFunction public fun test4(/*0*/ x: kotlin.Any): kotlin.Any
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BLOCK type=kotlin.Any hasResult=true operator=ELVIS
VAR val tmp0_elvis_lhs: kotlin.Any?
CALL .<get-p> type=kotlin.Any? operator=GET_PROPERTY
WHEN type=kotlin.Any operator=null
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: GET_VAR x type=kotlin.Any operator=null
else: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null
IrFunction public fun test5(/*0*/ x: kotlin.Any): kotlin.Any
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BLOCK type=kotlin.Any hasResult=true operator=ELVIS
VAR val tmp0_elvis_lhs: kotlin.Any?
CALL .foo type=kotlin.Any? operator=null
WHEN type=kotlin.Any operator=null
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: GET_VAR x type=kotlin.Any operator=null
else: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null
FUN public fun foo(): kotlin.Any?
BLOCK_BODY
RETURN type=<no-type>
CONST Null type=kotlin.Nothing? value='null'
FUN public fun test1(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any): kotlin.Any
BLOCK_BODY
RETURN type=<no-type>
BLOCK type=kotlin.Any operator=ELVIS
WHEN type=kotlin.Any operator=null
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: GET_VAR b type=kotlin.Any operator=null
else: GET_VAR a type=kotlin.Any? operator=null
FUN public fun test2(/*0*/ a: kotlin.String?, /*1*/ b: kotlin.Any): kotlin.Any
BLOCK_BODY
RETURN type=<no-type>
BLOCK type=kotlin.Any operator=ELVIS
WHEN type=kotlin.Any operator=null
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: GET_VAR b type=kotlin.Any operator=null
else: GET_VAR a type=kotlin.String? operator=null
FUN public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.String
BLOCK_BODY
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String
GET_VAR b type=kotlin.Any? operator=null
then: RETURN type=<no-type>
CONST String type=kotlin.String value=''
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String?
GET_VAR a type=kotlin.Any? operator=null
then: RETURN type=<no-type>
CONST String type=kotlin.String value=''
RETURN type=<no-type>
BLOCK type=kotlin.String operator=ELVIS
WHEN type=kotlin.String operator=null
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR b type=kotlin.Any? operator=null
else: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR a type=kotlin.Any? operator=null
FUN public fun test4(/*0*/ x: kotlin.Any): kotlin.Any
BLOCK_BODY
RETURN type=<no-type>
BLOCK type=kotlin.Any operator=ELVIS
VAR val tmp0_elvis_lhs: kotlin.Any?
CALL .<get-p> type=kotlin.Any? operator=GET_PROPERTY
WHEN type=kotlin.Any operator=null
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: GET_VAR x type=kotlin.Any operator=null
else: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null
FUN public fun test5(/*0*/ x: kotlin.Any): kotlin.Any
BLOCK_BODY
RETURN type=<no-type>
BLOCK type=kotlin.Any operator=ELVIS
VAR val tmp0_elvis_lhs: kotlin.Any?
CALL .foo type=kotlin.Any? operator=null
WHEN type=kotlin.Any operator=null
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: GET_VAR x type=kotlin.Any operator=null
else: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null
+18 -21
View File
@@ -1,23 +1,20 @@
IrFile /equality.kt
IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .EQEQ type=kotlin.Boolean operator=EQEQ
FILE /equality.kt
FUN public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.Int operator=null
arg1: GET_VAR b type=kotlin.Int operator=null
FUN public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .NOT type=kotlin.Boolean operator=EXCLEQ
arg0: CALL .EQEQ type=kotlin.Boolean operator=EXCLEQ
arg0: GET_VAR a type=kotlin.Int operator=null
arg1: 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 operator=null
RETURN type=<no-type>
CALL .NOT type=kotlin.Boolean operator=EXCLEQ
arg0: CALL .EQEQ type=kotlin.Boolean operator=EXCLEQ
arg0: GET_VAR a type=kotlin.Int operator=null
arg1: 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 operator=null
RETURN type=<no-type>
CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.Any? operator=null
arg1: GET_VAR b type=kotlin.Any? operator=null
FUN public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR a type=kotlin.Any? operator=null
arg1: GET_VAR b type=kotlin.Any? operator=null
+11 -13
View File
@@ -1,13 +1,11 @@
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 operator=null
RETURN type=<no-type>
CONST String type=kotlin.String value='OK'
IrFunction public fun kotlin.String.test5(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .<get-okext> type=kotlin.String operator=GET_PROPERTY
$receiver: $RECEIVER of: test5 type=kotlin.String
FILE /extensionPropertyGetterCall.kt
PROPERTY public val kotlin.String.okext: kotlin.String getter=<get-okext> setter=null
PROPERTY_GETTER public fun kotlin.String.<get-okext>(): kotlin.String property=okext
BLOCK_BODY
RETURN type=<no-type>
CONST String type=kotlin.String value='OK'
FUN public fun kotlin.String.test5(): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
CALL .<get-okext> type=kotlin.String operator=GET_PROPERTY
$receiver: $RECEIVER of: test5 type=kotlin.String
+41 -43
View File
@@ -1,43 +1,41 @@
IrFile /for.kt
IrFunction public fun testIterable(/*0*/ ss: kotlin.collections.List<kotlin.String>): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=null operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP_INNER_WHILE
VAR val s: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=<no-type> hasResult=false operator=null
CALL .println type=kotlin.Unit operator=null
message: GET_VAR s type=kotlin.String operator=null
IrFunction public fun testDestructuring(/*0*/ pp: kotlin.collections.List<kotlin.Pair<kotlin.Int, kotlin.String>>): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>>
CALL .iterator type=kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> operator=FOR_LOOP_ITERATOR
$this: GET_VAR pp type=kotlin.collections.List<kotlin.Pair<kotlin.Int, kotlin.String>> operator=null
WHILE label=null operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> operator=null
body: BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP_INNER_WHILE
VAR val tmp1_loop_parameter: kotlin.Pair<kotlin.Int, kotlin.String>
CALL .next type=kotlin.Pair<kotlin.Int, kotlin.String> operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> operator=null
VAR val i: kotlin.Int
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
$this: GET_VAR tmp1_loop_parameter type=kotlin.Pair<kotlin.Int, kotlin.String> operator=null
VAR val s: kotlin.String
CALL .component2 type=kotlin.String operator=COMPONENT_N(index=2)
$this: GET_VAR tmp1_loop_parameter type=kotlin.Pair<kotlin.Int, kotlin.String> operator=null
BLOCK type=<no-type> hasResult=false operator=null
CALL .println type=kotlin.Unit operator=null
message: GET_VAR i type=kotlin.Int operator=null
CALL .println type=kotlin.Unit operator=null
message: GET_VAR s type=kotlin.String operator=null
FILE /for.kt
FUN public fun testIterable(/*0*/ ss: kotlin.collections.List<kotlin.String>): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=null operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE
VAR val s: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=kotlin.Unit operator=null
CALL .println type=kotlin.Unit operator=null
message: GET_VAR s type=kotlin.String operator=null
FUN public fun testDestructuring(/*0*/ pp: kotlin.collections.List<kotlin.Pair<kotlin.Int, kotlin.String>>): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>>
CALL .iterator type=kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> operator=FOR_LOOP_ITERATOR
$this: GET_VAR pp type=kotlin.collections.List<kotlin.Pair<kotlin.Int, kotlin.String>> operator=null
WHILE label=null operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> operator=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE
VAR val tmp1_loop_parameter: kotlin.Pair<kotlin.Int, kotlin.String>
CALL .next type=kotlin.Pair<kotlin.Int, kotlin.String> operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> operator=null
VAR val i: kotlin.Int
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
$this: GET_VAR tmp1_loop_parameter type=kotlin.Pair<kotlin.Int, kotlin.String> operator=null
VAR val s: kotlin.String
CALL .component2 type=kotlin.String operator=COMPONENT_N(index=2)
$this: GET_VAR tmp1_loop_parameter type=kotlin.Pair<kotlin.Int, kotlin.String> operator=null
BLOCK type=kotlin.Unit operator=null
CALL .println type=kotlin.Unit operator=null
message: GET_VAR i type=kotlin.Int operator=null
CALL .println type=kotlin.Unit operator=null
message: GET_VAR s type=kotlin.String operator=null
+91 -95
View File
@@ -1,95 +1,91 @@
IrFile /forWithBreakContinue.kt
IrFunction public fun testForBreak1(/*0*/ ss: kotlin.collections.List<kotlin.String>): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=null operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP_INNER_WHILE
VAR val s: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=<no-type> hasResult=false operator=null
BREAK label=null depth=0
IrFunction public fun testForBreak2(/*0*/ ss: kotlin.collections.List<kotlin.String>): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=OUTER operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP_INNER_WHILE
VAR val s1: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP
VAR val tmp1_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=INNER operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP_INNER_WHILE
VAR val s2: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=<no-type> hasResult=false operator=null
BREAK label=OUTER depth=1
BREAK label=INNER depth=0
BREAK label=null depth=0
BREAK label=OUTER depth=0
IrFunction public fun testForContinue1(/*0*/ ss: kotlin.collections.List<kotlin.String>): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=null operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP_INNER_WHILE
VAR val s: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=<no-type> hasResult=false operator=null
CONTINUE label=null depth=0
IrFunction public fun testForContinue2(/*0*/ ss: kotlin.collections.List<kotlin.String>): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=OUTER operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP_INNER_WHILE
VAR val s1: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP
VAR val tmp1_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=INNER operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP_INNER_WHILE
VAR val s2: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=<no-type> hasResult=false operator=null
CONTINUE label=OUTER depth=1
CONTINUE label=INNER depth=0
CONTINUE label=null depth=0
CONTINUE label=OUTER depth=0
FILE /forWithBreakContinue.kt
FUN public fun testForBreak1(/*0*/ ss: kotlin.collections.List<kotlin.String>): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=null operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE
VAR val s: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=kotlin.Nothing operator=null
BREAK label=null depth=0
FUN public fun testForBreak2(/*0*/ ss: kotlin.collections.List<kotlin.String>): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=OUTER operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE
VAR val s1: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=kotlin.Nothing operator=null
BLOCK type=kotlin.Unit operator=FOR_LOOP
VAR val tmp1_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=INNER operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE
VAR val s2: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=kotlin.Nothing operator=null
BREAK label=OUTER depth=1
BREAK label=INNER depth=0
BREAK label=null depth=0
BREAK label=OUTER depth=0
FUN public fun testForContinue1(/*0*/ ss: kotlin.collections.List<kotlin.String>): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=null operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE
VAR val s: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=kotlin.Nothing operator=null
CONTINUE label=null depth=0
FUN public fun testForContinue2(/*0*/ ss: kotlin.collections.List<kotlin.String>): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=FOR_LOOP
VAR val tmp0_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=OUTER operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE
VAR val s1: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=kotlin.Nothing operator=null
BLOCK type=kotlin.Unit operator=FOR_LOOP
VAR val tmp1_iterator: kotlin.collections.Iterator<kotlin.String>
CALL .iterator type=kotlin.collections.Iterator<kotlin.String> operator=FOR_LOOP_ITERATOR
$this: GET_VAR ss type=kotlin.collections.List<kotlin.String> operator=null
WHILE label=INNER operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE
VAR val s2: kotlin.String
CALL .next type=kotlin.String operator=FOR_LOOP_NEXT
$this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator<kotlin.String> operator=null
BLOCK type=kotlin.Nothing operator=null
CONTINUE label=OUTER depth=1
CONTINUE label=INNER depth=0
CONTINUE label=null depth=0
CONTINUE label=OUTER depth=0
+20 -21
View File
@@ -1,24 +1,23 @@
IrFile /forWithImplicitReceivers.kt
FILE /forWithImplicitReceivers.kt
DUMMY FiveTimes
DUMMY IntCell
DUMMY IReceiver
IrFunction public fun IReceiver.test(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP
VAR val tmp0_iterator: IntCell
CALL .iterator type=IntCell operator=FOR_LOOP_ITERATOR
$this: $RECEIVER of: test type=IReceiver
$receiver: GET_OBJECT FiveTimes type=FiveTimes
WHILE label=null operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: $RECEIVER of: test type=IReceiver
$receiver: GET_VAR tmp0_iterator type=IntCell operator=null
body: BLOCK type=kotlin.Unit hasResult=false operator=FOR_LOOP_INNER_WHILE
VAR val i: kotlin.Int
CALL .next type=kotlin.Int operator=FOR_LOOP_NEXT
$this: $RECEIVER of: test type=IReceiver
$receiver: GET_VAR tmp0_iterator type=IntCell operator=null
BLOCK type=<no-type> hasResult=false operator=null
CALL .println type=kotlin.Unit operator=null
message: GET_VAR i type=kotlin.Int operator=null
FUN public fun IReceiver.test(): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=FOR_LOOP
VAR val tmp0_iterator: IntCell
CALL .iterator type=IntCell operator=FOR_LOOP_ITERATOR
$this: $RECEIVER of: test type=IReceiver
$receiver: GET_OBJECT FiveTimes type=FiveTimes
WHILE label=null operator=FOR_LOOP_INNER_WHILE
condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT
$this: $RECEIVER of: test type=IReceiver
$receiver: GET_VAR tmp0_iterator type=IntCell operator=null
body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE
VAR val i: kotlin.Int
CALL .next type=kotlin.Int operator=FOR_LOOP_NEXT
$this: $RECEIVER of: test type=IReceiver
$receiver: GET_VAR tmp0_iterator type=IntCell operator=null
BLOCK type=kotlin.Unit operator=null
CALL .println type=kotlin.Unit operator=null
message: GET_VAR i type=kotlin.Int operator=null
+18 -21
View File
@@ -1,23 +1,20 @@
IrFile /identity.kt
IrFunction public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .EQEQEQ type=kotlin.Boolean operator=EQEQEQ
FILE /identity.kt
FUN public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .EQEQEQ type=kotlin.Boolean operator=EQEQEQ
arg0: GET_VAR a type=kotlin.Int operator=null
arg1: GET_VAR b type=kotlin.Int operator=null
FUN public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .NOT type=kotlin.Boolean operator=EXCLEQEQ
arg0: CALL .EQEQEQ type=kotlin.Boolean operator=EXCLEQEQ
arg0: GET_VAR a type=kotlin.Int operator=null
arg1: 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 operator=null
RETURN type=<no-type>
CALL .NOT type=kotlin.Boolean operator=EXCLEQEQ
arg0: CALL .EQEQEQ type=kotlin.Boolean operator=EXCLEQEQ
arg0: GET_VAR a type=kotlin.Int operator=null
arg1: 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 operator=null
RETURN type=<no-type>
CALL .EQEQEQ type=kotlin.Boolean operator=EQEQEQ
arg0: GET_VAR a type=kotlin.Any? operator=null
arg1: GET_VAR b type=kotlin.Any? operator=null
FUN public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .EQEQEQ type=kotlin.Boolean operator=EQEQEQ
arg0: GET_VAR a type=kotlin.Any? operator=null
arg1: GET_VAR b type=kotlin.Any? operator=null
+17 -18
View File
@@ -1,18 +1,17 @@
IrFile /ifElseIf.kt
IrFunction public fun test(/*0*/ i: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
WHEN type=kotlin.Int operator=WHEN
if: CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR i type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='0'
then: CONST Int type=kotlin.Int value='1'
if: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR i type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='0'
then: CALL .unaryMinus type=kotlin.Int operator=UMINUS
$this: CONST Int type=kotlin.Int value='1'
else: CONST Int type=kotlin.Int value='0'
FILE /ifElseIf.kt
FUN public fun test(/*0*/ i: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.Int operator=WHEN
if: CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR i type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='0'
then: CONST Int type=kotlin.Int value='1'
if: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR i type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='0'
then: CALL .unaryMinus type=kotlin.Int operator=UMINUS
$this: CONST Int type=kotlin.Int value='1'
else: CONST Int type=kotlin.Int value='0'
+7 -8
View File
@@ -1,8 +1,7 @@
IrFile /implicitCastOnPlatformType.kt
IrFunction public fun test(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=kotlin.String
CALL .getProperty type=kotlin.String! operator=null
p0: CONST String type=kotlin.String value='test'
FILE /implicitCastOnPlatformType.kt
FUN public fun test(): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=kotlin.String
CALL .getProperty type=kotlin.String! operator=null
p0: CONST String type=kotlin.String value='test'
+23 -27
View File
@@ -1,31 +1,27 @@
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 operator=null
RETURN type=<no-type>
CALL .contains type=kotlin.Boolean operator=IN
FILE /in.kt
FUN public fun test1(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .contains type=kotlin.Boolean operator=IN
$this: GET_VAR x type=kotlin.collections.Collection<kotlin.Any> operator=null
element: GET_VAR a type=kotlin.Any operator=null
FUN public fun test2(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .NOT type=kotlin.Boolean operator=NOT_IN
arg0: CALL .contains type=kotlin.Boolean operator=NOT_IN
$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 operator=null
RETURN type=<no-type>
CALL .NOT type=kotlin.Boolean operator=NOT_IN
arg0: CALL .contains type=kotlin.Boolean operator=NOT_IN
$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 operator=null
RETURN type=<no-type>
CALL .contains type=kotlin.Boolean operator=IN
FUN public fun </*0*/ T> test3(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection<T>): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .contains type=kotlin.Boolean operator=IN
$this: GET_VAR x type=kotlin.collections.Collection<T> operator=null
element: GET_VAR a type=T operator=null
FUN public fun </*0*/ T> test4(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection<T>): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .NOT type=kotlin.Boolean operator=NOT_IN
arg0: CALL .contains type=kotlin.Boolean operator=NOT_IN
$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 operator=null
RETURN type=<no-type>
CALL .NOT type=kotlin.Boolean operator=NOT_IN
arg0: CALL .contains type=kotlin.Boolean operator=NOT_IN
$this: GET_VAR x type=kotlin.collections.Collection<T> operator=null
element: GET_VAR a type=T operator=null
+133 -139
View File
@@ -1,151 +1,145 @@
IrFile /incrementDecrement.kt
IrProperty public var p: kotlin.Int getter=null setter=null
IrExpressionBody
FILE /incrementDecrement.kt
PROPERTY public var p: kotlin.Int getter=null setter=null
EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
IrProperty public val arr: kotlin.IntArray getter=null setter=null
IrExpressionBody
PROPERTY public val arr: kotlin.IntArray getter=null setter=null
EXPRESSION_BODY
CALL .intArrayOf type=kotlin.IntArray operator=null
elements: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.IntArray
DUMMY vararg type=kotlin.Int
IrFunction public fun testVarPrefix(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
VAR val x1: kotlin.Int
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 operator=PREFIX_INCR
SET_VAR x type=<no-type> operator=PREFIX_INCR
GET_VAR tmp0 type=kotlin.Int operator=null
FUN public fun testVarPrefix(): kotlin.Unit
BLOCK_BODY
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
VAR val x1: kotlin.Int
BLOCK type=kotlin.Int operator=PREFIX_INCR
VAR val tmp0: kotlin.Int
CALL .inc type=kotlin.Int operator=PREFIX_INCR
$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
VAR val x2: kotlin.Int
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 operator=PREFIX_DECR
SET_VAR x type=<no-type> operator=PREFIX_DECR
GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp0 type=kotlin.Int operator=null
VAR val x2: kotlin.Int
BLOCK type=kotlin.Int operator=PREFIX_DECR
VAR val tmp1: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR
$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
IrFunction public fun testVarPostfix(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
VAR val x1: kotlin.Int
BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_INCR
VAR val tmp0: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_INCR
SET_VAR x type=<no-type> operator=POSTFIX_INCR
CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: 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 operator=POSTFIX_DECR
VAR val tmp1: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_DECR
SET_VAR x type=<no-type> operator=POSTFIX_DECR
CALL .dec type=kotlin.Int operator=POSTFIX_DECR
$this: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
IrFunction public fun testPropPrefix(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR val p1: kotlin.Int
BLOCK type=kotlin.Int hasResult=true operator=PREFIX_INCR
VAR val tmp0: kotlin.Int
CALL .inc type=kotlin.Int operator=PREFIX_INCR
$this: CALL .<get-p> type=kotlin.Int operator=PREFIX_INCR
CALL .<set-p> type=kotlin.Unit operator=PREFIX_INCR
<set-?>: 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 operator=PREFIX_DECR
VAR val tmp1: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR
$this: CALL .<get-p> type=kotlin.Int operator=PREFIX_DECR
CALL .<set-p> type=kotlin.Unit operator=PREFIX_DECR
<set-?>: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
IrFunction public fun testPropPostfix(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR val p1: kotlin.Int
BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_INCR
VAR val tmp0: kotlin.Int
CALL .<get-p> type=kotlin.Int operator=POSTFIX_INCR
CALL .<set-p> type=kotlin.Unit operator=POSTFIX_INCR
<set-?>: CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: 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 operator=PREFIX_DECR
VAR val tmp1: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR
$this: CALL .<get-p> type=kotlin.Int operator=PREFIX_DECR
CALL .<set-p> type=kotlin.Unit operator=PREFIX_DECR
<set-?>: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
IrFunction public fun testArrayPrefix(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR val a1: kotlin.Int
BLOCK type=kotlin.Int hasResult=true operator=PREFIX_INCR
VAR val tmp0_array: kotlin.IntArray
CALL .<get-arr> type=kotlin.IntArray operator=GET_PROPERTY
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 operator=null
index: CONST Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=PREFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
value: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
VAR val a2: kotlin.Int
BLOCK type=kotlin.Int hasResult=true operator=PREFIX_DECR
VAR val tmp2_array: kotlin.IntArray
CALL .<get-arr> type=kotlin.IntArray operator=GET_PROPERTY
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 operator=null
index: CONST Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=PREFIX_DECR
$this: GET_VAR tmp2_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
value: GET_VAR tmp3 type=kotlin.Int operator=null
GET_VAR tmp3 type=kotlin.Int operator=null
IrFunction public fun testArrayPostfix(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR val a1: kotlin.Int
BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_INCR
VAR val tmp0_array: kotlin.IntArray
CALL .<get-arr> type=kotlin.IntArray operator=GET_PROPERTY
VAR val tmp1: kotlin.Int
CALL .get type=kotlin.Int operator=POSTFIX_INCR
GET_VAR tmp1 type=kotlin.Int operator=null
FUN public fun testVarPostfix(): kotlin.Unit
BLOCK_BODY
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
VAR val x1: kotlin.Int
BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp0: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_INCR
SET_VAR x type=<no-type> operator=POSTFIX_INCR
CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: 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 operator=POSTFIX_DECR
VAR val tmp1: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_DECR
SET_VAR x type=<no-type> operator=POSTFIX_DECR
CALL .dec type=kotlin.Int operator=POSTFIX_DECR
$this: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
FUN public fun testPropPrefix(): kotlin.Unit
BLOCK_BODY
VAR val p1: kotlin.Int
BLOCK type=kotlin.Int operator=PREFIX_INCR
VAR val tmp0: kotlin.Int
CALL .inc type=kotlin.Int operator=PREFIX_INCR
$this: CALL .<get-p> type=kotlin.Int operator=PREFIX_INCR
CALL .<set-p> type=kotlin.Unit operator=PREFIX_INCR
<set-?>: 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 operator=PREFIX_DECR
VAR val tmp1: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR
$this: CALL .<get-p> type=kotlin.Int operator=PREFIX_DECR
CALL .<set-p> type=kotlin.Unit operator=PREFIX_DECR
<set-?>: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
FUN public fun testPropPostfix(): kotlin.Unit
BLOCK_BODY
VAR val p1: kotlin.Int
BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp0: kotlin.Int
CALL .<get-p> type=kotlin.Int operator=POSTFIX_INCR
CALL .<set-p> type=kotlin.Unit operator=POSTFIX_INCR
<set-?>: CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: 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 operator=PREFIX_DECR
VAR val tmp1: kotlin.Int
CALL .dec type=kotlin.Int operator=PREFIX_DECR
$this: CALL .<get-p> type=kotlin.Int operator=PREFIX_DECR
CALL .<set-p> type=kotlin.Unit operator=PREFIX_DECR
<set-?>: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
FUN public fun testArrayPrefix(): kotlin.Unit
BLOCK_BODY
VAR val a1: kotlin.Int
BLOCK type=kotlin.Int operator=PREFIX_INCR
VAR val tmp0_array: kotlin.IntArray
CALL .<get-arr> type=kotlin.IntArray operator=GET_PROPERTY
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 operator=null
index: CONST Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=POSTFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
VAR val a2: kotlin.Int
BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_DECR
VAR val tmp2_array: kotlin.IntArray
CALL .<get-arr> type=kotlin.IntArray operator=GET_PROPERTY
VAR val tmp3: kotlin.Int
CALL .get type=kotlin.Int operator=POSTFIX_DECR
CALL .set type=kotlin.Unit operator=PREFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
value: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
VAR val a2: kotlin.Int
BLOCK type=kotlin.Int operator=PREFIX_DECR
VAR val tmp2_array: kotlin.IntArray
CALL .<get-arr> type=kotlin.IntArray operator=GET_PROPERTY
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 operator=null
index: CONST Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=POSTFIX_DECR
CALL .set type=kotlin.Unit operator=PREFIX_DECR
$this: GET_VAR tmp2_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
value: GET_VAR tmp3 type=kotlin.Int operator=null
GET_VAR tmp3 type=kotlin.Int operator=null
FUN public fun testArrayPostfix(): kotlin.Unit
BLOCK_BODY
VAR val a1: kotlin.Int
BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp0_array: kotlin.IntArray
CALL .<get-arr> type=kotlin.IntArray operator=GET_PROPERTY
VAR val tmp1: kotlin.Int
CALL .get type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=POSTFIX_INCR
$this: GET_VAR tmp0_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
VAR val a2: kotlin.Int
BLOCK type=kotlin.Int operator=POSTFIX_DECR
VAR val tmp2_array: kotlin.IntArray
CALL .<get-arr> type=kotlin.IntArray operator=GET_PROPERTY
VAR val tmp3: kotlin.Int
CALL .get type=kotlin.Int operator=POSTFIX_DECR
$this: GET_VAR tmp2_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
value: CALL .dec type=kotlin.Int operator=POSTFIX_DECR
$this: GET_VAR tmp3 type=kotlin.Int operator=null
GET_VAR tmp3 type=kotlin.Int operator=null
CALL .set type=kotlin.Unit operator=POSTFIX_DECR
$this: GET_VAR tmp2_array type=kotlin.IntArray operator=null
index: CONST Int type=kotlin.Int value='0'
value: CALL .dec type=kotlin.Int operator=POSTFIX_DECR
$this: GET_VAR tmp3 type=kotlin.Int operator=null
GET_VAR tmp3 type=kotlin.Int operator=null
+13 -13
View File
@@ -1,20 +1,20 @@
IrFile /literals.kt
IrProperty public val test1: kotlin.Int = 1 getter=null setter=null
IrExpressionBody
FILE /literals.kt
PROPERTY public val test1: kotlin.Int = 1 getter=null setter=null
EXPRESSION_BODY
CONST Int type=kotlin.Int value='1'
IrProperty public val test2: kotlin.Int = -1 getter=null setter=null
IrExpressionBody
PROPERTY public val test2: kotlin.Int = -1 getter=null setter=null
EXPRESSION_BODY
CALL .unaryMinus type=kotlin.Int operator=UMINUS
$this: CONST Int type=kotlin.Int value='1'
IrProperty public val test3: kotlin.Boolean = true getter=null setter=null
IrExpressionBody
PROPERTY public val test3: kotlin.Boolean = true getter=null setter=null
EXPRESSION_BODY
CONST Boolean type=kotlin.Boolean value='true'
IrProperty public val test4: kotlin.Boolean = false getter=null setter=null
IrExpressionBody
PROPERTY public val test4: kotlin.Boolean = false getter=null setter=null
EXPRESSION_BODY
CONST Boolean type=kotlin.Boolean value='false'
IrProperty public val test5: kotlin.String = "abc" getter=null setter=null
IrExpressionBody
PROPERTY public val test5: kotlin.String = "abc" getter=null setter=null
EXPRESSION_BODY
CONST String type=kotlin.String value='abc'
IrProperty public val test6: kotlin.Nothing? = null getter=null setter=null
IrExpressionBody
PROPERTY public val test6: kotlin.Nothing? = null getter=null setter=null
EXPRESSION_BODY
CONST Null type=kotlin.Nothing? value='null'
+169 -193
View File
@@ -1,193 +1,169 @@
IrFile /primitiveComparisons.kt
IrFunction public fun btest1(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
IrFunction public fun btest2(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
IrFunction public fun btest3(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
IrFunction public fun btest4(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
IrFunction public fun stest1(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
IrFunction public fun stest2(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
IrFunction public fun stest3(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
IrFunction public fun stest4(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
IrFunction public fun itest1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun itest2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun itest3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun itest4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
IrFunction public fun ltest1(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
IrFunction public fun ltest2(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
IrFunction public fun ltest3(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
IrFunction public fun ltest4(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
IrFunction public fun ftest1(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
IrFunction public fun ftest2(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
IrFunction public fun ftest3(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
IrFunction public fun ftest4(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
IrFunction public fun dtest1(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
IrFunction public fun dtest2(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
IrFunction public fun dtest3(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
IrFunction public fun dtest4(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
FILE /primitiveComparisons.kt
FUN public fun btest1(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
FUN public fun btest2(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
FUN public fun btest3(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
FUN public fun btest4(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Byte operator=null
other: GET_VAR b type=kotlin.Byte operator=null
FUN public fun stest1(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
FUN public fun stest2(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
FUN public fun stest3(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
FUN public fun stest4(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Short operator=null
other: GET_VAR b type=kotlin.Short operator=null
FUN public fun itest1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
FUN public fun itest2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
FUN public fun itest3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
FUN public fun itest4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
FUN public fun ltest1(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
FUN public fun ltest2(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
FUN public fun ltest3(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
FUN public fun ltest4(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Long operator=null
other: GET_VAR b type=kotlin.Long operator=null
FUN public fun ftest1(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
FUN public fun ftest2(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
FUN public fun ftest3(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
FUN public fun ftest4(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Float operator=null
other: GET_VAR b type=kotlin.Float operator=null
FUN public fun dtest1(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
FUN public fun dtest2(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
FUN public fun dtest3(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
FUN public fun dtest4(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.Double operator=null
other: GET_VAR b type=kotlin.Double operator=null
+38 -45
View File
@@ -1,47 +1,40 @@
IrFile /references.kt
IrProperty public val ok: kotlin.String = "OK" getter=null setter=null
IrExpressionBody
FILE /references.kt
PROPERTY public val ok: kotlin.String = "OK" getter=null setter=null
EXPRESSION_BODY
CONST String type=kotlin.String value='OK'
IrProperty public val ok2: kotlin.String = "OK" getter=null setter=null
IrExpressionBody
PROPERTY public val ok2: kotlin.String = "OK" getter=null setter=null
EXPRESSION_BODY
CALL .<get-ok> type=kotlin.String operator=GET_PROPERTY
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 operator=null
RETURN type=<no-type>
CONST String type=kotlin.String value='OK'
IrFunction public fun test1(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .<get-ok> type=kotlin.String operator=GET_PROPERTY
IrFunction public fun test2(/*0*/ x: kotlin.String): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_VAR x type=kotlin.String operator=null
IrFunction public fun test3(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR val x: kotlin.String = "OK"
CONST String type=kotlin.String value='OK'
RETURN type=<no-type>
GET_VAR x type=kotlin.String operator=null
IrFunction public fun test4(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .<get-ok3> type=kotlin.String operator=GET_PROPERTY
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 operator=null
RETURN type=<no-type>
CONST String type=kotlin.String value='OK'
IrFunction public fun kotlin.String.test5(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .<get-okext> type=kotlin.String operator=GET_PROPERTY
$receiver: $RECEIVER of: test5 type=kotlin.String
PROPERTY public val ok3: kotlin.String getter=<get-ok3> setter=null
PROPERTY_GETTER public fun <get-ok3>(): kotlin.String property=ok3
BLOCK_BODY
RETURN type=<no-type>
CONST String type=kotlin.String value='OK'
FUN public fun test1(): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
CALL .<get-ok> type=kotlin.String operator=GET_PROPERTY
FUN public fun test2(/*0*/ x: kotlin.String): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
GET_VAR x type=kotlin.String operator=null
FUN public fun test3(): kotlin.String
BLOCK_BODY
VAR val x: kotlin.String = "OK"
CONST String type=kotlin.String value='OK'
RETURN type=<no-type>
GET_VAR x type=kotlin.String operator=null
FUN public fun test4(): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
CALL .<get-ok3> type=kotlin.String operator=GET_PROPERTY
PROPERTY public val kotlin.String.okext: kotlin.String getter=<get-okext> setter=null
PROPERTY_GETTER public fun kotlin.String.<get-okext>(): kotlin.String property=okext
BLOCK_BODY
RETURN type=<no-type>
CONST String type=kotlin.String value='OK'
FUN public fun kotlin.String.test5(): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
CALL .<get-okext> type=kotlin.String operator=GET_PROPERTY
$receiver: $RECEIVER of: test5 type=kotlin.String
@@ -1,69 +1,62 @@
IrFile /safeCallWithIncrementDecrement.kt
FILE /safeCallWithIncrementDecrement.kt
DUMMY C
IrProperty public var test.C?.p: kotlin.Int getter=<get-p> setter=<set-p>
IrPropertyGetter public fun test.C?.<get-p>(): kotlin.Int property=p
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST Int type=kotlin.Int value='42'
IrPropertySetter public fun test.C?.<set-p>(/*0*/ value: kotlin.Int): kotlin.Unit property=p
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
IrFunction public operator fun kotlin.Int?.inc(): kotlin.Int?
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: $RECEIVER of: inc type=kotlin.Int?
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .inc type=kotlin.Int operator=null
$this: $RECEIVER of: inc type=kotlin.Int?
IrFunction public operator fun kotlin.Int?.get(/*0*/ index: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST Int type=kotlin.Int value='42'
IrFunction public operator fun kotlin.Int?.set(/*0*/ index: kotlin.Int, /*1*/ value: kotlin.Int): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
IrFunction public fun testProperty(/*0*/ nc: test.C?): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
PROPERTY public var test.C?.p: kotlin.Int getter=<get-p> setter=<set-p>
PROPERTY_GETTER public fun test.C?.<get-p>(): kotlin.Int property=p
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='42'
PROPERTY_SETTER public fun test.C?.<set-p>(/*0*/ value: kotlin.Int): kotlin.Unit property=p
BLOCK_BODY
FUN public operator fun kotlin.Int?.inc(): kotlin.Int?
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR nc type=test.C? operator=null
arg0: $RECEIVER of: inc type=kotlin.Int?
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_INCR
VAR val tmp1: kotlin.Int
CALL .<get-p> type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR nc type=test.C? operator=null
CALL .<set-p> type=kotlin.Unit operator=POSTFIX_INCR
else: CALL .inc type=kotlin.Int operator=null
$this: $RECEIVER of: inc type=kotlin.Int?
FUN public operator fun kotlin.Int?.get(/*0*/ index: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='42'
FUN public operator fun kotlin.Int?.set(/*0*/ index: kotlin.Int, /*1*/ value: kotlin.Int): kotlin.Unit
BLOCK_BODY
FUN public fun testProperty(/*0*/ nc: test.C?): kotlin.Unit
BLOCK_BODY
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR nc type=test.C? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp1: kotlin.Int
CALL .<get-p> type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR nc type=test.C? operator=null
value: CALL .inc type=kotlin.Int? operator=POSTFIX_INCR
$receiver: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
IrFunction public fun testArrayAccess(/*0*/ nc: test.C?): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_INCR
VAR val tmp3_array: kotlin.Int?
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR nc type=test.C? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .<get-p> type=kotlin.Int operator=GET_PROPERTY
$this: GET_VAR nc type=test.C? operator=null
VAR val tmp4: kotlin.Int
CALL .get type=kotlin.Int operator=POSTFIX_INCR
$receiver: GET_VAR tmp3_array type=kotlin.Int? operator=null
index: CONST Int type=kotlin.Int value='0'
CALL .set type=kotlin.Unit operator=POSTFIX_INCR
CALL .<set-p> type=kotlin.Unit operator=POSTFIX_INCR
$this: GET_VAR nc type=test.C? operator=null
value: CALL .inc type=kotlin.Int? operator=POSTFIX_INCR
$receiver: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
FUN public fun testArrayAccess(/*0*/ nc: test.C?): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp3_array: kotlin.Int?
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR nc type=test.C? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .<get-p> type=kotlin.Int operator=GET_PROPERTY
$this: GET_VAR nc type=test.C? operator=null
VAR val tmp4: kotlin.Int
CALL .get type=kotlin.Int operator=POSTFIX_INCR
$receiver: GET_VAR tmp3_array type=kotlin.Int? operator=null
index: CONST Int type=kotlin.Int value='0'
value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp4 type=kotlin.Int operator=null
GET_VAR tmp4 type=kotlin.Int operator=null
CALL .set type=kotlin.Unit operator=POSTFIX_INCR
$receiver: GET_VAR tmp3_array type=kotlin.Int? operator=null
index: CONST Int type=kotlin.Int value='0'
value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp4 type=kotlin.Int operator=null
GET_VAR tmp4 type=kotlin.Int operator=null
+50 -55
View File
@@ -1,60 +1,55 @@
IrFile /safeCalls.kt
FILE /safeCalls.kt
DUMMY Ref
DUMMY IHost
IrFunction public fun test1(/*0*/ x: kotlin.String?): kotlin.Int?
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$this: GET_VAR x type=kotlin.String? operator=null
IrFunction public fun test2(/*0*/ x: kotlin.String?): kotlin.Int?
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .hashCode type=kotlin.Int operator=null
$this: GET_VAR x type=kotlin.String? operator=null
IrFunction public fun test3(/*0*/ x: kotlin.String?, /*1*/ y: kotlin.Any?): kotlin.Boolean?
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
WHEN type=kotlin.Boolean? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .equals type=kotlin.Boolean operator=null
$this: GET_VAR x type=kotlin.String? operator=null
other: GET_VAR y type=kotlin.Any? operator=null
IrFunction public fun test4(/*0*/ x: Ref?): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
WHEN type=kotlin.Unit? operator=SAFE_CALL
FUN public fun test1(/*0*/ x: kotlin.String?): kotlin.Int?
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=Ref? operator=null
arg0: GET_VAR x type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .<set-value> type=kotlin.Unit operator=EQ
$this: GET_VAR x type=Ref? operator=null
<set-?>: CONST Int type=kotlin.Int value='0'
IrFunction public fun IHost.test5(/*0*/ s: kotlin.String?): kotlin.Int?
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR s type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .extLength type=kotlin.Int operator=null
$this: $RECEIVER of: test5 type=IHost
$receiver: GET_VAR s type=kotlin.String? operator=null
else: CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$this: GET_VAR x type=kotlin.String? operator=null
FUN public fun test2(/*0*/ x: kotlin.String?): kotlin.Int?
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .hashCode type=kotlin.Int operator=null
$this: GET_VAR x type=kotlin.String? operator=null
FUN public fun test3(/*0*/ x: kotlin.String?, /*1*/ y: kotlin.Any?): kotlin.Boolean?
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.Boolean? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .equals type=kotlin.Boolean operator=null
$this: GET_VAR x type=kotlin.String? operator=null
other: GET_VAR y type=kotlin.Any? operator=null
FUN public fun test4(/*0*/ x: Ref?): kotlin.Unit
BLOCK_BODY
WHEN type=kotlin.Unit? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=Ref? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .<set-value> type=kotlin.Unit operator=EQ
$this: GET_VAR x type=Ref? operator=null
<set-?>: CONST Int type=kotlin.Int value='0'
FUN public fun IHost.test5(/*0*/ s: kotlin.String?): kotlin.Int?
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.Int? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR s type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .extLength type=kotlin.Int operator=null
$this: $RECEIVER of: test5 type=IHost
$receiver: GET_VAR s type=kotlin.String? operator=null
+67 -78
View File
@@ -1,78 +1,67 @@
IrFile /simpleOperators.kt
IrFunction public fun test1(/*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=PLUS
$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 operator=null
RETURN type=<no-type>
CALL .minus type=kotlin.Int operator=MINUS
$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 operator=null
RETURN type=<no-type>
CALL .times type=kotlin.Int operator=MUL
$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 operator=null
RETURN type=<no-type>
CALL .div type=kotlin.Int operator=DIV
$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 operator=null
RETURN type=<no-type>
CALL .mod type=kotlin.Int operator=PERC
$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 operator=null
RETURN type=<no-type>
CALL .rangeTo type=kotlin.ranges.IntRange operator=RANGE
$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
FILE /simpleOperators.kt
FUN public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
FUN public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .minus type=kotlin.Int operator=MINUS
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
FUN public fun test3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .times type=kotlin.Int operator=MUL
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
FUN public fun test4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .div type=kotlin.Int operator=DIV
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
FUN public fun test5(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .mod type=kotlin.Int operator=PERC
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
FUN public fun test6(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.ranges.IntRange
BLOCK_BODY
RETURN type=<no-type>
CALL .rangeTo type=kotlin.ranges.IntRange operator=RANGE
$this: GET_VAR a type=kotlin.Int operator=null
other: GET_VAR b type=kotlin.Int operator=null
FUN public fun test1x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
BLOCK_BODY
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
FUN public fun test2x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
BLOCK_BODY
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
FUN public fun test3x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
BLOCK_BODY
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
FUN public fun test4x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
BLOCK_BODY
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
FUN public fun test5x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int
BLOCK_BODY
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
+31 -37
View File
@@ -1,37 +1,31 @@
IrFile /simpleUnaryOperators.kt
IrFunction public fun test1(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .unaryMinus type=kotlin.Int operator=UMINUS
$this: GET_VAR x type=kotlin.Int operator=null
IrFunction public fun test2(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .unaryMinus type=kotlin.Int operator=UMINUS
$this: CONST Int type=kotlin.Int value='42'
IrFunction public fun test3(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .unaryPlus type=kotlin.Int operator=UPLUS
$this: GET_VAR x type=kotlin.Int operator=null
IrFunction public fun test4(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .unaryPlus type=kotlin.Int operator=UPLUS
$this: CONST Int type=kotlin.Int value='42'
IrFunction public fun test5(/*0*/ x: kotlin.Boolean): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .not type=kotlin.Boolean operator=EXCL
$this: GET_VAR x type=kotlin.Boolean operator=null
IrFunction public fun test6(): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .not type=kotlin.Boolean operator=EXCL
$this: CONST Boolean type=kotlin.Boolean value='true'
FILE /simpleUnaryOperators.kt
FUN public fun test1(/*0*/ x: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .unaryMinus type=kotlin.Int operator=UMINUS
$this: GET_VAR x type=kotlin.Int operator=null
FUN public fun test2(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .unaryMinus type=kotlin.Int operator=UMINUS
$this: CONST Int type=kotlin.Int value='42'
FUN public fun test3(/*0*/ x: kotlin.Int): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .unaryPlus type=kotlin.Int operator=UPLUS
$this: GET_VAR x type=kotlin.Int operator=null
FUN public fun test4(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .unaryPlus type=kotlin.Int operator=UPLUS
$this: CONST Int type=kotlin.Int value='42'
FUN public fun test5(/*0*/ x: kotlin.Boolean): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .not type=kotlin.Boolean operator=EXCL
$this: GET_VAR x type=kotlin.Boolean operator=null
FUN public fun test6(): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .not type=kotlin.Boolean operator=EXCL
$this: CONST Boolean type=kotlin.Boolean value='true'
+50 -57
View File
@@ -1,62 +1,55 @@
IrFile /smartCasts.kt
IrFunction public fun expectsString(/*0*/ s: kotlin.String): kotlin.Unit
IrExpressionBody
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 operator=null
IrFunction public fun overloaded(/*0*/ s: kotlin.String): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
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 operator=null
RETURN type=<no-type>
FILE /smartCasts.kt
FUN public fun expectsString(/*0*/ s: kotlin.String): kotlin.Unit
BLOCK_BODY
FUN public fun expectsInt(/*0*/ i: kotlin.Int): kotlin.Unit
BLOCK_BODY
FUN public fun overloaded(/*0*/ s: kotlin.String): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
GET_VAR s type=kotlin.String operator=null
FUN public fun overloaded(/*0*/ x: kotlin.Any): kotlin.Any
BLOCK_BODY
RETURN type=<no-type>
GET_VAR x type=kotlin.Any operator=null
FUN public fun test1(/*0*/ x: kotlin.Any): kotlin.Unit
BLOCK_BODY
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String
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 operator=null
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String
then: RETURN type=<no-type>
CALL .println type=kotlin.Unit operator=null
message: CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any operator=null
then: RETURN type=<no-type>
CALL .println type=kotlin.Unit operator=null
message: CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any operator=null
CALL .expectsString type=kotlin.Unit operator=null
CALL .expectsString type=kotlin.Unit operator=null
s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any operator=null
CALL .expectsInt type=kotlin.Unit operator=null
i: CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
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 operator=null
CALL .expectsInt type=kotlin.Unit operator=null
i: CALL .<get-length> type=kotlin.Int operator=GET_PROPERTY
$this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
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 operator=null
IrFunction public fun test2(/*0*/ x: kotlin.Any): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String
GET_VAR x type=kotlin.Any operator=null
then: RETURN type=<no-type>
CONST String type=kotlin.String value=''
RETURN type=<no-type>
CALL .overloaded type=kotlin.String operator=null
s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
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 operator=null
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String
GET_VAR x type=kotlin.Any operator=null
then: RETURN type=<no-type>
CONST String type=kotlin.String value=''
RETURN type=<no-type>
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
FUN public fun test2(/*0*/ x: kotlin.Any): kotlin.String
BLOCK_BODY
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String
GET_VAR x type=kotlin.Any operator=null
then: RETURN type=<no-type>
CONST String type=kotlin.String value=''
RETURN type=<no-type>
CALL .overloaded type=kotlin.String operator=null
s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any operator=null
FUN public fun test3(/*0*/ x: kotlin.Any): kotlin.String
BLOCK_BODY
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String
GET_VAR x type=kotlin.Any operator=null
then: RETURN type=<no-type>
CONST String type=kotlin.String value=''
RETURN type=<no-type>
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR x type=kotlin.Any operator=null
+23 -26
View File
@@ -1,28 +1,25 @@
IrFile /smartCastsWithDestructuring.kt
FILE /smartCastsWithDestructuring.kt
DUMMY I1
DUMMY I2
IrFunction public operator fun I1.component1(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST Int type=kotlin.Int value='1'
IrFunction public operator fun I2.component2(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST String type=kotlin.String value=''
IrFunction public fun test(/*0*/ x: I1): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=I2
GET_VAR x type=I1 operator=null
then: RETURN type=<no-type>
BLOCK type=<no-type> hasResult=false operator=SYNTHETIC_BLOCK
VAR val c1: kotlin.Int
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
$receiver: GET_VAR x 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 x type=I1 operator=null
FUN public operator fun I1.component1(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='1'
FUN public operator fun I2.component2(): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
CONST String type=kotlin.String value=''
FUN public fun test(/*0*/ x: I1): kotlin.Unit
BLOCK_BODY
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=I2
GET_VAR x type=I1 operator=null
then: RETURN type=<no-type>
BLOCK type=kotlin.Unit operator=DESTRUCTURING_DECLARATION
VAR val c1: kotlin.Int
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
$receiver: GET_VAR x 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 x type=I1 operator=null
+4 -7
View File
@@ -6,10 +6,7 @@ var testVarWithAccessors: Int
get() = 42
set(v) {}
// 1 IrFunction public fun testFun
// 1 IrProperty public val testSimpleVal
// 1 IrProperty public val testValWithGetter
// 2 IrPropertyGetter
// 1 IrPropertySetter
// 1 IrProperty public var testSimpleVar
// 1 IrProperty public var testVarWithAccessors
// 1 FUN public fun testFun
// 1 PROPERTY public val testSimpleVal
// 2 PROPERTY_GETTER
// 1 PROPERTY_SETTER
+21 -25
View File
@@ -1,27 +1,23 @@
IrFile /smoke.kt
IrFunction public fun testFun(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CONST String type=kotlin.String value='OK'
IrProperty public val testSimpleVal: kotlin.Int = 1 getter=null setter=null
IrExpressionBody
FILE /smoke.kt
FUN public fun testFun(): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
CONST String type=kotlin.String value='OK'
PROPERTY public val testSimpleVal: kotlin.Int = 1 getter=null setter=null
EXPRESSION_BODY
CONST Int type=kotlin.Int value='1'
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 operator=null
RETURN type=<no-type>
CONST Int type=kotlin.Int value='42'
IrProperty public var testSimpleVar: kotlin.Int getter=null setter=null
IrExpressionBody
PROPERTY public val testValWithGetter: kotlin.Int getter=<get-testValWithGetter> setter=null
PROPERTY_GETTER public fun <get-testValWithGetter>(): kotlin.Int property=testValWithGetter
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='42'
PROPERTY public var testSimpleVar: kotlin.Int getter=null setter=null
EXPRESSION_BODY
CONST Int type=kotlin.Int value='2'
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 operator=null
RETURN type=<no-type>
CONST 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 operator=null
PROPERTY public var testVarWithAccessors: kotlin.Int getter=<get-testVarWithAccessors> setter=<set-testVarWithAccessors>
PROPERTY_GETTER public fun <get-testVarWithAccessors>(): kotlin.Int property=testVarWithAccessors
BLOCK_BODY
RETURN type=<no-type>
CONST Int type=kotlin.Int value='42'
PROPERTY_SETTER public fun <set-testVarWithAccessors>(/*0*/ v: kotlin.Int): kotlin.Unit property=testVarWithAccessors
BLOCK_BODY
+29 -33
View File
@@ -1,33 +1,29 @@
IrFile /stringComparisons.kt
IrFunction public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.String operator=null
other: 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 operator=null
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.String operator=null
other: 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 operator=null
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.String operator=null
other: 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 operator=null
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.String operator=null
other: GET_VAR b type=kotlin.String operator=null
FILE /stringComparisons.kt
FUN public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GT0 type=kotlin.Boolean operator=GT
arg0: CALL .compareTo type=kotlin.Int operator=GT
$this: GET_VAR a type=kotlin.String operator=null
other: GET_VAR b type=kotlin.String operator=null
FUN public fun test2(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR a type=kotlin.String operator=null
other: GET_VAR b type=kotlin.String operator=null
FUN public fun test3(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ
arg0: CALL .compareTo type=kotlin.Int operator=GTEQ
$this: GET_VAR a type=kotlin.String operator=null
other: GET_VAR b type=kotlin.String operator=null
FUN public fun test4(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ
arg0: CALL .compareTo type=kotlin.Int operator=LTEQ
$this: GET_VAR a type=kotlin.String operator=null
other: GET_VAR b type=kotlin.String operator=null
+24 -27
View File
@@ -1,27 +1,24 @@
IrFile /stringPlus.kt
IrFunction public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Any): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String
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 operator=null
RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String operator=null
CONST String type=kotlin.String value='+'
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 operator=null
RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String operator=null
CONST String type=kotlin.String value='+'
CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR b type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='1'
GET_VAR a type=kotlin.String operator=null
FILE /stringPlus.kt
FUN public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Any): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String operator=null
GET_VAR b type=kotlin.Any operator=null
FUN public fun test2(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String operator=null
CONST String type=kotlin.String value='+'
GET_VAR b type=kotlin.Int operator=null
FUN public fun test3(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
STRING_CONCATENATION type=kotlin.String
GET_VAR a type=kotlin.String operator=null
CONST String type=kotlin.String value='+'
CALL .plus type=kotlin.Int operator=PLUS
$this: GET_VAR b type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='1'
GET_VAR a type=kotlin.String operator=null
+14 -16
View File
@@ -1,16 +1,14 @@
IrFile /throw.kt
IrFunction public fun test1(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
THROW type=<no-type>
CALL .<init> type=kotlin.Throwable operator=null
IrFunction public fun testImplicitCast(/*0*/ a: kotlin.Any): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.Throwable
GET_VAR a type=kotlin.Any operator=null
then: BLOCK type=<no-type> hasResult=false operator=null
THROW type=<no-type>
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Throwable
GET_VAR a type=kotlin.Any operator=null
FILE /throw.kt
FUN public fun test1(): kotlin.Unit
BLOCK_BODY
THROW type=<no-type>
CALL .<init> type=kotlin.Throwable operator=null
FUN public fun testImplicitCast(/*0*/ a: kotlin.Any): kotlin.Unit
BLOCK_BODY
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.Throwable
GET_VAR a type=kotlin.Any operator=null
then: BLOCK type=kotlin.Nothing operator=null
THROW type=<no-type>
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Throwable
GET_VAR a type=kotlin.Any operator=null
-6
View File
@@ -23,9 +23,3 @@ fun test2(): Int {
println()
}
}
fun testImplicitCast(a: Any) {
if (a !is String) return
val t: String = try { a } catch (e: Throwable) { "" }
}
+19 -35
View File
@@ -1,38 +1,22 @@
IrFile /tryCatch.kt
IrFunction public fun test1(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
TRY_CATCH type=kotlin.Unit
try: BLOCK type=<no-type> hasResult=false operator=null
FILE /tryCatch.kt
FUN public fun test1(): kotlin.Unit
BLOCK_BODY
TRY_CATCH type=kotlin.Unit
try: BLOCK type=kotlin.Unit operator=null
CALL .println type=kotlin.Unit operator=null
catch e: BLOCK type=kotlin.Unit operator=null
CALL .println type=kotlin.Unit operator=null
finally: BLOCK type=kotlin.Unit operator=null
CALL .println type=kotlin.Unit operator=null
FUN public fun test2(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
TRY_CATCH type=kotlin.Int
try: BLOCK type=kotlin.Int operator=null
CALL .println type=kotlin.Unit operator=null
catch e: BLOCK type=<no-type> hasResult=false operator=null
CONST Int type=kotlin.Int value='42'
catch e: BLOCK type=kotlin.Int operator=null
CALL .println type=kotlin.Unit operator=null
finally: BLOCK type=<no-type> hasResult=false operator=null
CONST Int type=kotlin.Int value='24'
finally: BLOCK type=kotlin.Unit operator=null
CALL .println type=kotlin.Unit operator=null
IrFunction public fun test2(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
TRY_CATCH type=kotlin.Int
try: BLOCK type=kotlin.Int hasResult=true operator=null
CALL .println type=kotlin.Unit operator=null
CONST Int type=kotlin.Int value='42'
catch e: BLOCK type=kotlin.Int hasResult=true operator=null
CALL .println type=kotlin.Unit operator=null
CONST Int type=kotlin.Int value='24'
finally: BLOCK type=<no-type> hasResult=false operator=null
CALL .println type=kotlin.Unit operator=null
IrFunction public fun testImplicitCast(/*0*/ a: kotlin.Any): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String
GET_VAR a type=kotlin.Any operator=null
then: RETURN type=<no-type>
VAR val t: kotlin.String
TRY_CATCH type=kotlin.String
try: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
BLOCK type=kotlin.Any hasResult=true operator=null
GET_VAR a type=kotlin.Any operator=null
catch e: BLOCK type=kotlin.String hasResult=true operator=null
CONST String type=kotlin.String value=''
@@ -0,0 +1,5 @@
fun testImplicitCast(a: Any) {
if (a !is String) return
val t: String = try { a } catch (e: Throwable) { "" }
}
@@ -0,0 +1,14 @@
FILE /tryCatchWithImplicitCast.kt
FUN public fun testImplicitCast(/*0*/ a: kotlin.Any): kotlin.Unit
BLOCK_BODY
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String
GET_VAR a type=kotlin.Any operator=null
then: RETURN type=<no-type>
VAR val t: kotlin.String
TRY_CATCH type=kotlin.String
try: BLOCK type=kotlin.String operator=null
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR a type=kotlin.Any operator=null
catch e: BLOCK type=kotlin.String operator=null
CONST String type=kotlin.String value=''
+21 -25
View File
@@ -1,26 +1,22 @@
IrFile /typeOperators.kt
FILE /typeOperators.kt
DUMMY IThing
IrFunction public fun test1(/*0*/ x: kotlin.Any): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
TYPE_OP operator=INSTANCEOF typeOperand=IThing
GET_VAR x type=kotlin.Any operator=null
IrFunction public fun test2(/*0*/ x: kotlin.Any): kotlin.Boolean
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
TYPE_OP operator=NOT_INSTANCEOF typeOperand=IThing
GET_VAR x type=kotlin.Any operator=null
IrFunction public fun test3(/*0*/ x: kotlin.Any): IThing
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
TYPE_OP operator=CAST typeOperand=IThing
GET_VAR x type=kotlin.Any operator=null
IrFunction public fun test4(/*0*/ x: kotlin.Any): IThing?
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
TYPE_OP operator=SAFE_CAST typeOperand=IThing
GET_VAR x type=kotlin.Any operator=null
FUN public fun test1(/*0*/ x: kotlin.Any): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
TYPE_OP operator=INSTANCEOF typeOperand=IThing
GET_VAR x type=kotlin.Any operator=null
FUN public fun test2(/*0*/ x: kotlin.Any): kotlin.Boolean
BLOCK_BODY
RETURN type=<no-type>
TYPE_OP operator=NOT_INSTANCEOF typeOperand=IThing
GET_VAR x type=kotlin.Any operator=null
FUN public fun test3(/*0*/ x: kotlin.Any): IThing
BLOCK_BODY
RETURN type=<no-type>
TYPE_OP operator=CAST typeOperand=IThing
GET_VAR x type=kotlin.Any operator=null
FUN public fun test4(/*0*/ x: kotlin.Any): IThing?
BLOCK_BODY
RETURN type=<no-type>
TYPE_OP operator=SAFE_CAST typeOperand=IThing
GET_VAR x type=kotlin.Any operator=null
+19 -23
View File
@@ -1,27 +1,23 @@
IrFile /values.kt
FILE /values.kt
DUMMY Enum
DUMMY A
IrProperty public val a: kotlin.Int = 0 getter=null setter=null
IrExpressionBody
PROPERTY public val a: kotlin.Int = 0 getter=null setter=null
EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
DUMMY Z
IrFunction public fun test1(): Enum
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_ENUM_VALUE A type=Enum
IrFunction public fun test2(): A
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_OBJECT A type=A
IrFunction public fun test3(): kotlin.Int
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .<get-a> type=kotlin.Int operator=GET_PROPERTY
IrFunction public fun test4(): Z.Companion
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
GET_OBJECT Companion type=Z.Companion
FUN public fun test1(): Enum
BLOCK_BODY
RETURN type=<no-type>
GET_ENUM_VALUE A type=Enum
FUN public fun test2(): A
BLOCK_BODY
RETURN type=<no-type>
GET_OBJECT A type=A
FUN public fun test3(): kotlin.Int
BLOCK_BODY
RETURN type=<no-type>
CALL .<get-a> type=kotlin.Int operator=GET_PROPERTY
FUN public fun test4(): Z.Companion
BLOCK_BODY
RETURN type=<no-type>
GET_OBJECT Companion type=Z.Companion
+31 -36
View File
@@ -1,38 +1,33 @@
IrFile /variableAsFunctionCall.kt
IrFunction public fun kotlin.String.k(): () -> kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
DUMMY KtLambdaExpression type=() -> kotlin.String
IrFunction public fun test1(/*0*/ f: () -> kotlin.Unit): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .invoke type=kotlin.Unit operator=INVOKE
$this: GET_VAR f type=() -> kotlin.Unit operator=VARIABLE_AS_FUNCTION
IrFunction public fun test2(/*0*/ f: kotlin.String.() -> kotlin.Unit): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .invoke type=kotlin.Unit operator=INVOKE
$this: GET_VAR f type=kotlin.String.() -> kotlin.Unit operator=VARIABLE_AS_FUNCTION
FILE /variableAsFunctionCall.kt
FUN public fun kotlin.String.k(): () -> kotlin.String
BLOCK_BODY
RETURN type=<no-type>
DUMMY KtLambdaExpression type=() -> kotlin.String
FUN public fun test1(/*0*/ f: () -> kotlin.Unit): kotlin.Unit
BLOCK_BODY
RETURN type=<no-type>
CALL .invoke type=kotlin.Unit operator=INVOKE
$this: GET_VAR f type=() -> kotlin.Unit operator=VARIABLE_AS_FUNCTION
FUN public fun test2(/*0*/ f: kotlin.String.() -> kotlin.Unit): kotlin.Unit
BLOCK_BODY
RETURN type=<no-type>
CALL .invoke type=kotlin.Unit operator=INVOKE
$this: GET_VAR f type=kotlin.String.() -> kotlin.Unit operator=VARIABLE_AS_FUNCTION
$receiver: CONST String type=kotlin.String value='hello'
FUN public fun test3(): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
CALL .invoke type=kotlin.String operator=null
$this: CALL .k type=() -> kotlin.String operator=null
$receiver: CONST String type=kotlin.String value='hello'
IrFunction public fun test3(): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
CALL .invoke type=kotlin.String operator=null
FUN public fun test4(/*0*/ ns: kotlin.String?): kotlin.String?
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.String? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR ns type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .invoke type=kotlin.String operator=null
$this: CALL .k type=() -> kotlin.String operator=null
$receiver: CONST String type=kotlin.String value='hello'
IrFunction public fun test4(/*0*/ ns: kotlin.String?): kotlin.String?
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
WHEN type=kotlin.String? operator=SAFE_CALL
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR ns type=kotlin.String? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST Null type=kotlin.Nothing? value='null'
else: CALL .invoke type=kotlin.String operator=null
$this: CALL .k type=() -> kotlin.String operator=null
$this: GET_VAR ns type=kotlin.String? operator=null
$this: GET_VAR ns type=kotlin.String? operator=null
+65 -68
View File
@@ -1,98 +1,95 @@
IrFile /when.kt
FILE /when.kt
DUMMY A
IrFunction public fun testWithSubject(/*0*/ x: kotlin.Any?): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BLOCK type=kotlin.String hasResult=true operator=WHEN
VAR val tmp0_subject: kotlin.Any?
GET_VAR x type=kotlin.Any? operator=null
WHEN type=kotlin.String operator=WHEN
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST String type=kotlin.String value='null'
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Any? operator=null
arg1: GET_OBJECT A type=A
then: CONST String type=kotlin.String value='A'
if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.String
GET_VAR tmp0_subject type=kotlin.Any? operator=null
then: CONST String type=kotlin.String value='String'
if: CALL .contains type=kotlin.Boolean operator=IN
$receiver: CALL .setOf type=kotlin.collections.Set<kotlin.Nothing> operator=null
element: GET_VAR tmp0_subject type=kotlin.Any? operator=null
then: CONST String type=kotlin.String value='nothingness?'
else: CONST String type=kotlin.String value='something'
IrFunction public fun test(/*0*/ x: kotlin.Any?): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
FUN public fun testWithSubject(/*0*/ x: kotlin.Any?): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
BLOCK type=kotlin.String operator=WHEN
VAR val tmp0_subject: kotlin.Any?
GET_VAR x type=kotlin.Any? operator=null
WHEN type=kotlin.String operator=WHEN
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.Any? operator=null
arg0: GET_VAR tmp0_subject type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST String type=kotlin.String value='null'
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.Any? operator=null
arg0: GET_VAR tmp0_subject type=kotlin.Any? operator=null
arg1: GET_OBJECT A type=A
then: CONST String type=kotlin.String value='A'
if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.String
GET_VAR x type=kotlin.Any? operator=null
GET_VAR tmp0_subject type=kotlin.Any? operator=null
then: CONST String type=kotlin.String value='String'
if: CALL .contains type=kotlin.Boolean operator=IN
$receiver: CALL .setOf type=kotlin.collections.Set<kotlin.Nothing> operator=null
element: GET_VAR x type=kotlin.Any? operator=null
element: GET_VAR tmp0_subject type=kotlin.Any? operator=null
then: CONST String type=kotlin.String value='nothingness?'
else: CONST String type=kotlin.String value='something'
IrFunction public fun testComma(/*0*/ x: kotlin.Int): kotlin.String
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
RETURN type=<no-type>
BLOCK type=kotlin.String hasResult=true operator=WHEN
VAR val tmp0_subject: kotlin.Int
GET_VAR x type=kotlin.Int operator=null
WHEN type=kotlin.String operator=WHEN
if: WHEN type=kotlin.Boolean operator=WHEN_COMMA
if: WHEN type=kotlin.Boolean operator=WHEN_COMMA
if: WHEN type=kotlin.Boolean operator=WHEN_COMMA
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='1'
then: CONST Boolean type=kotlin.Boolean value='true'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='2'
then: CONST Boolean type=kotlin.Boolean value='true'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='3'
then: CONST Boolean type=kotlin.Boolean value='true'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='4'
then: CONST String type=kotlin.String value='1234'
FUN public fun test(/*0*/ x: kotlin.Any?): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
WHEN type=kotlin.String operator=WHEN
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.Any? operator=null
arg1: CONST Null type=kotlin.Nothing? value='null'
then: CONST String type=kotlin.String value='null'
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR x type=kotlin.Any? operator=null
arg1: GET_OBJECT A type=A
then: CONST String type=kotlin.String value='A'
if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.String
GET_VAR x type=kotlin.Any? operator=null
then: CONST String type=kotlin.String value='String'
if: CALL .contains type=kotlin.Boolean operator=IN
$receiver: CALL .setOf type=kotlin.collections.Set<kotlin.Nothing> operator=null
element: GET_VAR x type=kotlin.Any? operator=null
then: CONST String type=kotlin.String value='nothingness?'
else: CONST String type=kotlin.String value='something'
FUN public fun testComma(/*0*/ x: kotlin.Int): kotlin.String
BLOCK_BODY
RETURN type=<no-type>
BLOCK type=kotlin.String operator=WHEN
VAR val tmp0_subject: kotlin.Int
GET_VAR x type=kotlin.Int operator=null
WHEN type=kotlin.String operator=WHEN
if: WHEN type=kotlin.Boolean operator=WHEN_COMMA
if: WHEN type=kotlin.Boolean operator=WHEN_COMMA
if: WHEN type=kotlin.Boolean operator=WHEN_COMMA
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='5'
arg1: CONST Int type=kotlin.Int value='1'
then: CONST Boolean type=kotlin.Boolean value='true'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='6'
arg1: CONST Int type=kotlin.Int value='2'
then: CONST Boolean type=kotlin.Boolean value='true'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='7'
then: CONST String type=kotlin.String value='567'
arg1: CONST Int type=kotlin.Int value='3'
then: CONST Boolean type=kotlin.Boolean value='true'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='4'
then: CONST String type=kotlin.String value='1234'
if: WHEN type=kotlin.Boolean operator=WHEN_COMMA
if: WHEN type=kotlin.Boolean operator=WHEN_COMMA
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='8'
arg1: CONST Int type=kotlin.Int value='5'
then: CONST Boolean type=kotlin.Boolean value='true'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='9'
then: CONST String type=kotlin.String value='89'
else: CONST String type=kotlin.String value='?'
arg1: CONST Int type=kotlin.Int value='6'
then: CONST Boolean type=kotlin.Boolean value='true'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='7'
then: CONST String type=kotlin.String value='567'
if: WHEN type=kotlin.Boolean operator=WHEN_COMMA
if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='8'
then: CONST Boolean type=kotlin.Boolean value='true'
else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null
arg1: CONST Int type=kotlin.Int value='9'
then: CONST String type=kotlin.String value='89'
else: CONST String type=kotlin.String value='?'
+65 -67
View File
@@ -1,73 +1,71 @@
IrFile /whileDoWhile.kt
IrFunction public fun test(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
WHILE label=null operator=WHILE_LOOP
condition: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR x type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='5'
body: BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_INCR
VAR val tmp0: kotlin.Int
FILE /whileDoWhile.kt
FUN public fun test(): kotlin.Unit
BLOCK_BODY
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
WHILE label=null operator=WHILE_LOOP
condition: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR x type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='5'
body: BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp0: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_INCR
SET_VAR x type=<no-type> operator=POSTFIX_INCR
CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp0 type=kotlin.Int operator=null
GET_VAR tmp0 type=kotlin.Int operator=null
WHILE label=null operator=WHILE_LOOP
condition: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR x type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='10'
body: BLOCK type=kotlin.Int operator=null
BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp1: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_INCR
SET_VAR x type=<no-type> operator=POSTFIX_INCR
CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp0 type=kotlin.Int operator=null
GET_VAR tmp0 type=kotlin.Int operator=null
WHILE label=null operator=WHILE_LOOP
condition: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR x type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='10'
body: BLOCK type=kotlin.Int hasResult=true operator=null
BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_INCR
VAR val tmp1: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_INCR
SET_VAR x type=<no-type> operator=POSTFIX_INCR
CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
DO_WHILE label=null operator=DO_WHILE_LOOP
body: BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_INCR
VAR val tmp2: kotlin.Int
$this: GET_VAR tmp1 type=kotlin.Int operator=null
GET_VAR tmp1 type=kotlin.Int operator=null
DO_WHILE label=null operator=DO_WHILE_LOOP
body: BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp2: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_INCR
SET_VAR x type=<no-type> operator=POSTFIX_INCR
CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp2 type=kotlin.Int operator=null
GET_VAR tmp2 type=kotlin.Int operator=null
condition: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR x type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='15'
DO_WHILE label=null operator=DO_WHILE_LOOP
body: BLOCK type=kotlin.Unit operator=null
BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp3: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_INCR
SET_VAR x type=<no-type> operator=POSTFIX_INCR
CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp2 type=kotlin.Int operator=null
GET_VAR tmp2 type=kotlin.Int operator=null
condition: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR x type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='15'
DO_WHILE label=null operator=DO_WHILE_LOOP
body: BLOCK type=kotlin.Int hasResult=true operator=null
BLOCK type=kotlin.Int hasResult=true operator=POSTFIX_INCR
VAR val tmp3: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_INCR
SET_VAR x type=<no-type> operator=POSTFIX_INCR
CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp3 type=kotlin.Int operator=null
GET_VAR tmp3 type=kotlin.Int operator=null
condition: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR x type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='20'
IrFunction public fun testSmartcastInCondition(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
VAR val a: kotlin.Any? = null
CONST Null type=kotlin.Nothing? value='null'
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.Boolean
GET_VAR a type=kotlin.Any? operator=null
then: BLOCK type=<no-type> hasResult=false operator=null
WHILE label=null operator=WHILE_LOOP
condition: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Boolean
GET_VAR a type=kotlin.Any? operator=null
body: BLOCK type=<no-type> hasResult=false operator=null
DO_WHILE label=null operator=DO_WHILE_LOOP
body: BLOCK type=<no-type> hasResult=false operator=null
condition: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Boolean
GET_VAR a type=kotlin.Any? operator=null
$this: GET_VAR tmp3 type=kotlin.Int operator=null
GET_VAR tmp3 type=kotlin.Int operator=null
condition: CALL .LT0 type=kotlin.Boolean operator=LT
arg0: CALL .compareTo type=kotlin.Int operator=LT
$this: GET_VAR x type=kotlin.Int operator=null
other: CONST Int type=kotlin.Int value='20'
FUN public fun testSmartcastInCondition(): kotlin.Unit
BLOCK_BODY
VAR val a: kotlin.Any? = null
CONST Null type=kotlin.Nothing? value='null'
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.Boolean
GET_VAR a type=kotlin.Any? operator=null
then: BLOCK type=kotlin.Unit operator=null
WHILE label=null operator=WHILE_LOOP
condition: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Boolean
GET_VAR a type=kotlin.Any? operator=null
body: BLOCK type=kotlin.Unit operator=null
DO_WHILE label=null operator=DO_WHILE_LOOP
body: BLOCK type=kotlin.Unit operator=null
condition: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Boolean
GET_VAR a type=kotlin.Any? operator=null
@@ -281,6 +281,12 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
doTest(fileName);
}
@TestMetadata("tryCatchWithImplicitCast.kt")
public void testTryCatchWithImplicitCast() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/tryCatchWithImplicitCast.kt");
doTest(fileName);
}
@TestMetadata("typeOperators.kt")
public void testTypeOperators() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/typeOperators.kt");