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