[FIR2IR] Fix generating body for for-loop
This commit is contained in:
committed by
TeamCityServer
parent
5d78b0a962
commit
d0a148074f
@@ -16,6 +16,7 @@ import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.buildProperty
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
|
||||
import org.jetbrains.kotlin.fir.expressions.*
|
||||
import org.jetbrains.kotlin.fir.expressions.builder.buildBlock
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.FirElseIfTrueCondition
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.FirStubStatement
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.FirUnitExpression
|
||||
@@ -745,14 +746,44 @@ class Fir2IrVisitor(
|
||||
|
||||
override fun visitWhileLoop(whileLoop: FirWhileLoop, data: Any?): IrElement {
|
||||
return whileLoop.convertWithOffsets { startOffset, endOffset ->
|
||||
val origin = if (whileLoop.source?.elementType == KtNodeTypes.FOR) IrStatementOrigin.FOR_LOOP_INNER_WHILE
|
||||
else IrStatementOrigin.WHILE_LOOP
|
||||
val isForLoop = whileLoop.source?.elementType == KtNodeTypes.FOR
|
||||
val origin = if (isForLoop) IrStatementOrigin.FOR_LOOP_INNER_WHILE else IrStatementOrigin.WHILE_LOOP
|
||||
val firLoopBody = whileLoop.block
|
||||
IrWhileLoopImpl(startOffset, endOffset, irBuiltIns.unitType, origin).apply {
|
||||
loopMap[whileLoop] = this
|
||||
label = whileLoop.label?.name
|
||||
condition = convertToIrExpression(whileLoop.condition)
|
||||
// NB: here we have strange origin logic, made to be compatible with FE 1.0
|
||||
body = whileLoop.block.convertToIrExpressionOrBlock(origin.takeIf { it != IrStatementOrigin.WHILE_LOOP })
|
||||
body = if (isForLoop) {
|
||||
/*
|
||||
* for loops in IR should have specific for of their body, because some of lowerings (e.g. `ForLoopLowering`) expects
|
||||
* exactly that shape:
|
||||
*
|
||||
* for (x in list) { ...body...}
|
||||
*
|
||||
* IR (loop body):
|
||||
* IrBlock:
|
||||
* x = <iterator>.next()
|
||||
* IrBlock:
|
||||
* ...body...
|
||||
*/
|
||||
firLoopBody.convertWithOffsets { innerStartOffset, innerEndOffset ->
|
||||
val irInnerBody = IrBlockImpl(innerStartOffset, innerEndOffset, irBuiltIns.unitType, origin)
|
||||
irInnerBody.statements += firLoopBody.statements.first().toIrStatement()
|
||||
?: error("Unexpected shape of body of for loop")
|
||||
if (firLoopBody.statements.size > 1) {
|
||||
val tmpBlock = buildBlock {
|
||||
source = firLoopBody.source
|
||||
for (i in 1 until firLoopBody.statements.size) {
|
||||
statements += firLoopBody.statements[i]
|
||||
}
|
||||
}
|
||||
irInnerBody.statements += tmpBlock.convertToIrExpressionOrBlock()
|
||||
}
|
||||
irInnerBody
|
||||
}
|
||||
} else {
|
||||
firLoopBody.convertToIrExpressionOrBlock()
|
||||
}
|
||||
loopMap.remove(whileLoop)
|
||||
}
|
||||
}.also {
|
||||
|
||||
+6
@@ -15182,6 +15182,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/fir/NameHighlighter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noSymbolForIntRangeIterator.kt")
|
||||
public void testNoSymbolForIntRangeIterator() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("SuspendExtension.kt")
|
||||
public void testSuspendExtension() throws Exception {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
private const val MOD = 998244353
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
FILE fqName:<root> fileName:/noSymbolForIntRangeIterator.kt
|
||||
PROPERTY name:result visibility:public modality:FINAL [var]
|
||||
FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.Int visibility:private [static]
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=0
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-result> visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:result visibility:public modality:FINAL [var]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-result> (): kotlin.Int declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-result> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
|
||||
correspondingProperty: PROPERTY name:result visibility:public modality:FINAL [var]
|
||||
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
|
||||
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-result>' type=kotlin.Int origin=null
|
||||
FUN name:takeString visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun forEach <T> (action: kotlin.Function1<T of kotlin.collections.CollectionsKt.forEach, kotlin.Unit>): kotlin.Unit [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=null
|
||||
<T>: kotlin.String
|
||||
$receiver: CALL 'public final fun split (vararg delimiters: kotlin.String, ignoreCase: kotlin.Boolean, limit: kotlin.Int): kotlin.collections.List<kotlin.String> declared in kotlin.text.StringsKt' type=kotlin.collections.List<kotlin.String> origin=null
|
||||
$receiver: GET_VAR 's: kotlin.String declared in <root>.takeString' type=kotlin.String origin=null
|
||||
delimiters: VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
|
||||
CONST String type=kotlin.String value="\n"
|
||||
action: FUN_EXPR type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:it index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun <set-result> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
|
||||
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun <get-result> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
|
||||
other: BLOCK type=kotlin.Int origin=ELVIS
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int? [val]
|
||||
CALL 'public final fun toIntOrNull (): kotlin.Int? declared in kotlin.text.StringsKt' type=kotlin.Int? origin=null
|
||||
$receiver: GET_VAR 'it: kotlin.String declared in <root>.takeString.<anonymous>' type=kotlin.String origin=null
|
||||
WHEN type=kotlin.Int origin=ELVIS
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp_0: kotlin.Int? [val] declared in <root>.takeString.<anonymous>' type=kotlin.Int? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||
then: CONST Int type=kotlin.Int value=0
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: GET_VAR 'val tmp_0: kotlin.Int? [val] declared in <root>.takeString.<anonymous>' type=kotlin.Int? origin=null
|
||||
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
VAR name:x type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=10
|
||||
VAR name:y type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=10
|
||||
FUN name:localFunc visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.IntIterator [val]
|
||||
CALL 'public open fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.ranges.IntProgression' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
$this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange [operator] declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE
|
||||
$this: CONST Int type=kotlin.Int value=0
|
||||
other: GET_VAR 'val x: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc' type=kotlin.collections.IntIterator origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc' type=kotlin.collections.IntIterator origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
VAR name:s type:kotlin.String [val]
|
||||
CALL 'public final fun buildString (builderAction: @[ExtensionFunctionType] kotlin.Function1<java.lang.StringBuilder, kotlin.Unit>): kotlin.String [inline] declared in kotlin.text.StringsKt' type=kotlin.String origin=null
|
||||
builderAction: FUN_EXPR type=kotlin.Function1<java.lang.StringBuilder, kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:java.lang.StringBuilder) returnType:kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER name:<this> type:java.lang.StringBuilder
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.IntIterator [val]
|
||||
CALL 'public open fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.ranges.IntProgression' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
$this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange [operator] declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE
|
||||
$this: CONST Int type=kotlin.Int value=0
|
||||
other: GET_VAR 'val y: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.collections.IntIterator origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:j type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.collections.IntIterator origin=null
|
||||
CALL 'public final fun appendLine (value: kotlin.String?): java.lang.StringBuilder [inline] declared in kotlin.text.StringsKt' type=java.lang.StringBuilder origin=null
|
||||
$receiver: GET_VAR '<this>: java.lang.StringBuilder declared in <root>.test.localFunc.<anonymous>' type=java.lang.StringBuilder origin=null
|
||||
value: STRING_CONCATENATION type=kotlin.String
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MUL
|
||||
$this: GET_VAR 'val i: kotlin.Int [val] declared in <root>.test.localFunc' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val j: kotlin.Int [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.Int origin=null
|
||||
CALL 'public final fun takeString (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: GET_VAR 'val s: kotlin.String [val] declared in <root>.test.localFunc' type=kotlin.String origin=null
|
||||
CALL 'local final fun localFunc (): kotlin.Unit declared in <root>.test' type=kotlin.Unit origin=null
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun test (): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
WHEN type=kotlin.String origin=IF
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: CALL 'public final fun <get-result> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
|
||||
arg1: CONST Int type=kotlin.Int value=3025
|
||||
then: CONST String type=kotlin.String value="OK"
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Fail: "
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: CALL 'public final fun <get-result> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
|
||||
@@ -0,0 +1,34 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// DUMP_IR
|
||||
// WITH_STDLIB
|
||||
|
||||
var result = 0
|
||||
|
||||
fun takeString(s: String) {
|
||||
s.split("\n").forEach {
|
||||
result += it.toIntOrNull() ?: 0
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val x = 10
|
||||
val y = 10
|
||||
|
||||
fun localFunc() {
|
||||
for (i in 0..x) {
|
||||
val s = buildString {
|
||||
for (j in 0..y) {
|
||||
appendLine("${i * j}")
|
||||
}
|
||||
}
|
||||
takeString(s)
|
||||
}
|
||||
}
|
||||
|
||||
localFunc()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test()
|
||||
return if (result == 3025) "OK" else "Fail: $result"
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
FILE fqName:<root> fileName:/noSymbolForIntRangeIterator.kt
|
||||
PROPERTY name:result visibility:public modality:FINAL [var]
|
||||
FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.Int visibility:private [static]
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=0
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-result> visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:result visibility:public modality:FINAL [var]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-result> (): kotlin.Int declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-result> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
|
||||
correspondingProperty: PROPERTY name:result visibility:public modality:FINAL [var]
|
||||
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:result type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
|
||||
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-result>' type=kotlin.Int origin=null
|
||||
FUN name:takeString visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun forEach <T> (action: kotlin.Function1<T of kotlin.collections.CollectionsKt.forEach, kotlin.Unit>): kotlin.Unit [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=null
|
||||
<T>: kotlin.String
|
||||
$receiver: CALL 'public final fun split (vararg delimiters: kotlin.String, ignoreCase: kotlin.Boolean, limit: kotlin.Int): kotlin.collections.List<kotlin.String> declared in kotlin.text.StringsKt' type=kotlin.collections.List<kotlin.String> origin=null
|
||||
$receiver: GET_VAR 's: kotlin.String declared in <root>.takeString' type=kotlin.String origin=null
|
||||
delimiters: VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
|
||||
CONST String type=kotlin.String value="\n"
|
||||
action: FUN_EXPR type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:it index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=PLUSEQ
|
||||
CALL 'public final fun <set-result> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
|
||||
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
|
||||
$this: CALL 'public final fun <get-result> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
|
||||
other: BLOCK type=kotlin.Int origin=ELVIS
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int? [val]
|
||||
CALL 'public final fun toIntOrNull (): kotlin.Int? declared in kotlin.text.StringsKt' type=kotlin.Int? origin=null
|
||||
$receiver: GET_VAR 'it: kotlin.String declared in <root>.takeString.<anonymous>' type=kotlin.String origin=null
|
||||
WHEN type=kotlin.Int origin=null
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp_0: kotlin.Int? [val] declared in <root>.takeString.<anonymous>' type=kotlin.Int? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||
then: CONST Int type=kotlin.Int value=0
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: GET_VAR 'val tmp_0: kotlin.Int? [val] declared in <root>.takeString.<anonymous>' type=kotlin.Int? origin=null
|
||||
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
VAR name:x type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=10
|
||||
VAR name:y type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=10
|
||||
FUN name:localFunc visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.IntIterator [val]
|
||||
CALL 'public open fun iterator (): kotlin.collections.IntIterator [fake_override,operator] declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
$this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange [operator] declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE
|
||||
$this: CONST Int type=kotlin.Int value=0
|
||||
other: GET_VAR 'val x: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc' type=kotlin.collections.IntIterator origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc' type=kotlin.collections.IntIterator origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
VAR name:s type:kotlin.String [val]
|
||||
CALL 'public final fun buildString (builderAction: @[ExtensionFunctionType] kotlin.Function1<java.lang.StringBuilder{ kotlin.text.TypeAliasesKt.StringBuilder }, kotlin.Unit>): kotlin.String [inline] declared in kotlin.text.StringsKt' type=kotlin.String origin=null
|
||||
builderAction: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<java.lang.StringBuilder{ kotlin.text.TypeAliasesKt.StringBuilder }, kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:java.lang.StringBuilder{ kotlin.text.TypeAliasesKt.StringBuilder }) returnType:kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER name:$this$buildString type:java.lang.StringBuilder{ kotlin.text.TypeAliasesKt.StringBuilder }
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.IntIterator [val]
|
||||
CALL 'public open fun iterator (): kotlin.collections.IntIterator [fake_override,operator] declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
$this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange [operator] declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE
|
||||
$this: CONST Int type=kotlin.Int value=0
|
||||
other: GET_VAR 'val y: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.collections.IntIterator origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:j type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.collections.IntIterator origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun appendLine (value: kotlin.String?): java.lang.StringBuilder{ kotlin.text.TypeAliasesKt.StringBuilder } [inline] declared in kotlin.text.StringsKt' type=java.lang.StringBuilder{ kotlin.text.TypeAliasesKt.StringBuilder } origin=null
|
||||
$receiver: GET_VAR '$this$buildString: java.lang.StringBuilder{ kotlin.text.TypeAliasesKt.StringBuilder } declared in <root>.test.localFunc.<anonymous>' type=java.lang.StringBuilder{ kotlin.text.TypeAliasesKt.StringBuilder } origin=null
|
||||
value: STRING_CONCATENATION type=kotlin.String
|
||||
CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MUL
|
||||
$this: GET_VAR 'val i: kotlin.Int [val] declared in <root>.test.localFunc' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val j: kotlin.Int [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.Int origin=null
|
||||
CALL 'public final fun takeString (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: GET_VAR 'val s: kotlin.String [val] declared in <root>.test.localFunc' type=kotlin.String origin=null
|
||||
CALL 'local final fun localFunc (): kotlin.Unit declared in <root>.test' type=kotlin.Unit origin=null
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun test (): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
WHEN type=kotlin.String origin=IF
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: CALL 'public final fun <get-result> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
|
||||
arg1: CONST Int type=kotlin.Int value=3025
|
||||
then: CONST String type=kotlin.String value="OK"
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Fail: "
|
||||
CALL 'public final fun <get-result> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
|
||||
Vendored
+4
-1
@@ -4,7 +4,9 @@ fun sum(vararg args: Int): Int {
|
||||
val <iterator>: IntIterator = args.iterator()
|
||||
while (<iterator>.hasNext()) { // BLOCK
|
||||
val arg: Int = <iterator>.next()
|
||||
result = result.plus(other = arg)
|
||||
{ // BLOCK
|
||||
result = result.plus(other = arg)
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
@@ -53,3 +55,4 @@ fun testArrayAndDefaults() {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+5
-4
@@ -15,10 +15,11 @@ FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
|
||||
VAR FOR_LOOP_VARIABLE name:arg type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_0: kotlin.collections.IntIterator [val] declared in <root>.sum' type=kotlin.collections.IntIterator origin=null
|
||||
SET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Unit origin=EQ
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val arg: kotlin.Int [val] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
SET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Unit origin=EQ
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val arg: kotlin.Int [val] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>'
|
||||
GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
FUN name:nsum visibility:public modality:FINAL <> (args:kotlin.Array<out kotlin.Number>) returnType:kotlin.Int
|
||||
|
||||
+7
-4
@@ -22,10 +22,12 @@ fun testDestructuring(pp: List<Pair<Int, String>>) {
|
||||
val <iterator>: Iterator<Pair<Int, String>> = pp.iterator()
|
||||
while (<iterator>.hasNext()) { // BLOCK
|
||||
val <destruct>: Pair<Int, String> = <iterator>.next()
|
||||
val i: Int = <destruct>.component1()
|
||||
val s: String = <destruct>.component2()
|
||||
println(message = i)
|
||||
println(message = s)
|
||||
{ // BLOCK
|
||||
val i: Int = <destruct>.component1()
|
||||
val s: String = <destruct>.component2()
|
||||
println(message = i)
|
||||
println(message = s)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,3 +40,4 @@ fun testRange() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-10
@@ -43,16 +43,17 @@ FILE fqName:<root> fileName:/for.kt
|
||||
VAR FOR_LOOP_VARIABLE name:<destruct> type:kotlin.Pair<kotlin.Int, kotlin.String> [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=kotlin.Pair<kotlin.Int, kotlin.String> origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> [val] declared in <root>.testDestructuring' type=kotlin.collections.Iterator<kotlin.Pair<kotlin.Int, kotlin.String>> origin=null
|
||||
VAR name:i type:kotlin.Int [val]
|
||||
CALL 'public final fun component1 (): A of kotlin.Pair [operator] declared in kotlin.Pair' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: kotlin.Pair<kotlin.Int, kotlin.String> [val] declared in <root>.testDestructuring' type=kotlin.Pair<kotlin.Int, kotlin.String> origin=null
|
||||
VAR name:s type:kotlin.String [val]
|
||||
CALL 'public final fun component2 (): B of kotlin.Pair [operator] declared in kotlin.Pair' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'val <destruct>: kotlin.Pair<kotlin.Int, kotlin.String> [val] declared in <root>.testDestructuring' type=kotlin.Pair<kotlin.Int, kotlin.String> origin=null
|
||||
CALL 'public final fun println (message: kotlin.Int): kotlin.Unit [inline] declared in kotlin.io.ConsoleKt' type=kotlin.Unit origin=null
|
||||
message: GET_VAR 'val i: kotlin.Int [val] declared in <root>.testDestructuring' type=kotlin.Int origin=null
|
||||
CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io.ConsoleKt' type=kotlin.Unit origin=null
|
||||
message: GET_VAR 'val s: kotlin.String [val] declared in <root>.testDestructuring' type=kotlin.String origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
VAR name:i type:kotlin.Int [val]
|
||||
CALL 'public final fun component1 (): A of kotlin.Pair [operator] declared in kotlin.Pair' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: kotlin.Pair<kotlin.Int, kotlin.String> [val] declared in <root>.testDestructuring' type=kotlin.Pair<kotlin.Int, kotlin.String> origin=null
|
||||
VAR name:s type:kotlin.String [val]
|
||||
CALL 'public final fun component2 (): B of kotlin.Pair [operator] declared in kotlin.Pair' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'val <destruct>: kotlin.Pair<kotlin.Int, kotlin.String> [val] declared in <root>.testDestructuring' type=kotlin.Pair<kotlin.Int, kotlin.String> origin=null
|
||||
CALL 'public final fun println (message: kotlin.Int): kotlin.Unit [inline] declared in kotlin.io.ConsoleKt' type=kotlin.Unit origin=null
|
||||
message: GET_VAR 'val i: kotlin.Int [val] declared in <root>.testDestructuring' type=kotlin.Int origin=null
|
||||
CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io.ConsoleKt' type=kotlin.Unit origin=null
|
||||
message: GET_VAR 'val s: kotlin.String [val] declared in <root>.testDestructuring' type=kotlin.String origin=null
|
||||
FUN name:testRange visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
|
||||
@@ -14,15 +14,19 @@ fun testForBreak2(ss: List<String>) {
|
||||
OUTER@ while (<iterator>.hasNext()) { // BLOCK
|
||||
val s1: String = <iterator>.next()
|
||||
{ // BLOCK
|
||||
val <iterator>: Iterator<String> = ss.iterator()
|
||||
INNER@ while (<iterator>.hasNext()) { // BLOCK
|
||||
val s2: String = <iterator>.next()
|
||||
break@OUTER
|
||||
break@INNER
|
||||
break@INNER
|
||||
{ // BLOCK
|
||||
val <iterator>: Iterator<String> = ss.iterator()
|
||||
INNER@ while (<iterator>.hasNext()) { // BLOCK
|
||||
val s2: String = <iterator>.next()
|
||||
{ // BLOCK
|
||||
break@OUTER
|
||||
break@INNER
|
||||
break@INNER
|
||||
}
|
||||
}
|
||||
}
|
||||
break@OUTER
|
||||
}
|
||||
break@OUTER
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,15 +47,20 @@ fun testForContinue2(ss: List<String>) {
|
||||
OUTER@ while (<iterator>.hasNext()) { // BLOCK
|
||||
val s1: String = <iterator>.next()
|
||||
{ // BLOCK
|
||||
val <iterator>: Iterator<String> = ss.iterator()
|
||||
INNER@ while (<iterator>.hasNext()) { // BLOCK
|
||||
val s2: String = <iterator>.next()
|
||||
continue@OUTER
|
||||
continue@INNER
|
||||
continue@INNER
|
||||
{ // BLOCK
|
||||
val <iterator>: Iterator<String> = ss.iterator()
|
||||
INNER@ while (<iterator>.hasNext()) { // BLOCK
|
||||
val s2: String = <iterator>.next()
|
||||
{ // BLOCK
|
||||
continue@OUTER
|
||||
continue@INNER
|
||||
continue@INNER
|
||||
}
|
||||
}
|
||||
}
|
||||
continue@OUTER
|
||||
}
|
||||
continue@OUTER
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ FILE fqName:<root> fileName:/forWithBreakContinue.kt
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_0: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak1' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
body: BLOCK type=kotlin.Nothing origin=FOR_LOOP_INNER_WHILE
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:s type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_0: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak1' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
@@ -24,25 +24,27 @@ FILE fqName:<root> fileName:/forWithBreakContinue.kt
|
||||
WHILE label=OUTER origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
body: BLOCK type=kotlin.Nothing origin=FOR_LOOP_INNER_WHILE
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:s1 type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.Iterator<kotlin.String> [val]
|
||||
CALL 'public abstract fun iterator (): kotlin.collections.Iterator<E of kotlin.collections.List> [operator] declared in kotlin.collections.List' type=kotlin.collections.Iterator<kotlin.String> origin=FOR_LOOP_ITERATOR
|
||||
$this: GET_VAR 'ss: kotlin.collections.List<kotlin.String> declared in <root>.testForBreak2' type=kotlin.collections.List<kotlin.String> origin=null
|
||||
WHILE label=INNER origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
body: BLOCK type=kotlin.Nothing origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:s2 type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BREAK label=OUTER loop.label=OUTER
|
||||
BREAK label=INNER loop.label=INNER
|
||||
BREAK label=INNER loop.label=INNER
|
||||
BREAK label=OUTER loop.label=OUTER
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.Iterator<kotlin.String> [val]
|
||||
CALL 'public abstract fun iterator (): kotlin.collections.Iterator<E of kotlin.collections.List> [operator] declared in kotlin.collections.List' type=kotlin.collections.Iterator<kotlin.String> origin=FOR_LOOP_ITERATOR
|
||||
$this: GET_VAR 'ss: kotlin.collections.List<kotlin.String> declared in <root>.testForBreak2' type=kotlin.collections.List<kotlin.String> origin=null
|
||||
WHILE label=INNER origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:s2 type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
BREAK label=OUTER loop.label=OUTER
|
||||
BREAK label=INNER loop.label=INNER
|
||||
BREAK label=INNER loop.label=INNER
|
||||
BREAK label=OUTER loop.label=OUTER
|
||||
FUN name:testForContinue1 visibility:public modality:FINAL <> (ss:kotlin.collections.List<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List<kotlin.String>
|
||||
BLOCK_BODY
|
||||
@@ -53,7 +55,7 @@ FILE fqName:<root> fileName:/forWithBreakContinue.kt
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_3: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue1' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
body: BLOCK type=kotlin.Nothing origin=FOR_LOOP_INNER_WHILE
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:s type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_3: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue1' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
@@ -68,22 +70,24 @@ FILE fqName:<root> fileName:/forWithBreakContinue.kt
|
||||
WHILE label=OUTER origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_4: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
body: BLOCK type=kotlin.Nothing origin=FOR_LOOP_INNER_WHILE
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:s1 type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_4: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_5 type:kotlin.collections.Iterator<kotlin.String> [val]
|
||||
CALL 'public abstract fun iterator (): kotlin.collections.Iterator<E of kotlin.collections.List> [operator] declared in kotlin.collections.List' type=kotlin.collections.Iterator<kotlin.String> origin=FOR_LOOP_ITERATOR
|
||||
$this: GET_VAR 'ss: kotlin.collections.List<kotlin.String> declared in <root>.testForContinue2' type=kotlin.collections.List<kotlin.String> origin=null
|
||||
WHILE label=INNER origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_5: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
body: BLOCK type=kotlin.Nothing origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:s2 type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_5: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
CONTINUE label=OUTER loop.label=OUTER
|
||||
CONTINUE label=INNER loop.label=INNER
|
||||
CONTINUE label=INNER loop.label=INNER
|
||||
CONTINUE label=OUTER loop.label=OUTER
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_5 type:kotlin.collections.Iterator<kotlin.String> [val]
|
||||
CALL 'public abstract fun iterator (): kotlin.collections.Iterator<E of kotlin.collections.List> [operator] declared in kotlin.collections.List' type=kotlin.collections.Iterator<kotlin.String> origin=FOR_LOOP_ITERATOR
|
||||
$this: GET_VAR 'ss: kotlin.collections.List<kotlin.String> declared in <root>.testForContinue2' type=kotlin.collections.List<kotlin.String> origin=null
|
||||
WHILE label=INNER origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_5: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:s2 type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_5: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
CONTINUE label=OUTER loop.label=OUTER
|
||||
CONTINUE label=INNER loop.label=INNER
|
||||
CONTINUE label=INNER loop.label=INNER
|
||||
CONTINUE label=OUTER loop.label=OUTER
|
||||
|
||||
+9
-6
@@ -49,14 +49,17 @@ fun resolveClashesIfAny(container: ComponentContainer, clashResolvers: List<Plat
|
||||
val <iterator>: Iterator<PlatformExtensionsClashResolver<*>> = clashResolvers.iterator()
|
||||
while (<iterator>.hasNext()) { // BLOCK
|
||||
val resolver: PlatformExtensionsClashResolver<*> = <iterator>.next()
|
||||
val clashedComponents: Collection<ComponentDescriptor> = { // BLOCK
|
||||
val <elvis>: Collection<ComponentDescriptor>? = <get-registrationMap>().get(p0 = resolver.<get-applicableTo>()) as? Collection<ComponentDescriptor>
|
||||
when {
|
||||
EQEQ(arg0 = <elvis>, arg1 = null) -> continue
|
||||
else -> <elvis>
|
||||
{ // BLOCK
|
||||
val clashedComponents: Collection<ComponentDescriptor> = { // BLOCK
|
||||
val <elvis>: Collection<ComponentDescriptor>? = <get-registrationMap>().get(p0 = resolver.<get-applicableTo>()) as? Collection<ComponentDescriptor>
|
||||
when {
|
||||
EQEQ(arg0 = <elvis>, arg1 = null) -> continue
|
||||
else -> <elvis>
|
||||
}
|
||||
}
|
||||
val substituteDescriptor: ClashResolutionDescriptor<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out Any?>>>>>> = ClashResolutionDescriptor<PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out Any?>>>>>>(container = container, resolver = resolver, clashedComponents = clashedComponents.toList<ComponentDescriptor>())
|
||||
}
|
||||
val substituteDescriptor: ClashResolutionDescriptor<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out Any?>>>>>> = ClashResolutionDescriptor<PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out Any?>>>>>>(container = container, resolver = resolver, clashedComponents = clashedComponents.toList<ComponentDescriptor>())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+26
-25
@@ -148,28 +148,29 @@ FILE fqName:<root> fileName:/ClashResolutionDescriptor.kt
|
||||
VAR FOR_LOOP_VARIABLE name:resolver type:<root>.PlatformExtensionsClashResolver<*> [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=<root>.PlatformExtensionsClashResolver<*> origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_0: kotlin.collections.Iterator<<root>.PlatformExtensionsClashResolver<*>> [val] declared in <root>.resolveClashesIfAny' type=kotlin.collections.Iterator<<root>.PlatformExtensionsClashResolver<*>> origin=null
|
||||
VAR name:clashedComponents type:kotlin.collections.Collection<<root>.ComponentDescriptor> [val]
|
||||
BLOCK type=kotlin.collections.Collection<<root>.ComponentDescriptor> origin=ELVIS
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.Collection<<root>.ComponentDescriptor>? [val]
|
||||
TYPE_OP type=kotlin.collections.Collection<<root>.ComponentDescriptor>? origin=SAFE_CAST typeOperand=kotlin.collections.Collection<<root>.ComponentDescriptor>
|
||||
CALL 'public open fun get (p0: @[FlexibleNullability] K of java.util.HashMap?): V of java.util.HashMap? [operator] declared in java.util.HashMap' type=kotlin.Any? origin=null
|
||||
$this: CALL 'private final fun <get-registrationMap> (): java.util.HashMap<java.lang.reflect.Type, kotlin.Any> declared in <root>' type=java.util.HashMap<java.lang.reflect.Type, kotlin.Any> origin=GET_PROPERTY
|
||||
p0: CALL 'public final fun <get-applicableTo> (): java.lang.Class<E of <root>.PlatformExtensionsClashResolver> declared in <root>.PlatformExtensionsClashResolver' type=java.lang.Class<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out kotlin.Any?>>>>>> origin=GET_PROPERTY
|
||||
$this: GET_VAR 'val resolver: <root>.PlatformExtensionsClashResolver<*> [val] declared in <root>.resolveClashesIfAny' type=<root>.PlatformExtensionsClashResolver<*> origin=null
|
||||
WHEN type=kotlin.collections.Collection<<root>.ComponentDescriptor> origin=ELVIS
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp_1: kotlin.collections.Collection<<root>.ComponentDescriptor>? [val] declared in <root>.resolveClashesIfAny' type=kotlin.collections.Collection<<root>.ComponentDescriptor>? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||
then: CONTINUE label=null loop.label=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: GET_VAR 'val tmp_1: kotlin.collections.Collection<<root>.ComponentDescriptor>? [val] declared in <root>.resolveClashesIfAny' type=kotlin.collections.Collection<<root>.ComponentDescriptor>? origin=null
|
||||
VAR name:substituteDescriptor type:<root>.ClashResolutionDescriptor<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out kotlin.Any?>>>>>> [val]
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (container: <root>.ComponentContainer, resolver: <root>.PlatformExtensionsClashResolver<E of <root>.ClashResolutionDescriptor>, clashedComponents: kotlin.collections.List<<root>.ComponentDescriptor>) [primary] declared in <root>.ClashResolutionDescriptor' type=<root>.ClashResolutionDescriptor<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out kotlin.Any?>>>>>> origin=null
|
||||
<class: E>: <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out kotlin.Any?>>>>>
|
||||
container: GET_VAR 'container: <root>.ComponentContainer declared in <root>.resolveClashesIfAny' type=<root>.ComponentContainer origin=null
|
||||
resolver: GET_VAR 'val resolver: <root>.PlatformExtensionsClashResolver<*> [val] declared in <root>.resolveClashesIfAny' type=<root>.PlatformExtensionsClashResolver<*> origin=null
|
||||
clashedComponents: CALL 'public final fun toList <T> (): kotlin.collections.List<T of kotlin.collections.CollectionsKt.toList> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<<root>.ComponentDescriptor> origin=null
|
||||
<T>: <root>.ComponentDescriptor
|
||||
$receiver: GET_VAR 'val clashedComponents: kotlin.collections.Collection<<root>.ComponentDescriptor> [val] declared in <root>.resolveClashesIfAny' type=kotlin.collections.Collection<<root>.ComponentDescriptor> origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
VAR name:clashedComponents type:kotlin.collections.Collection<<root>.ComponentDescriptor> [val]
|
||||
BLOCK type=kotlin.collections.Collection<<root>.ComponentDescriptor> origin=ELVIS
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.Collection<<root>.ComponentDescriptor>? [val]
|
||||
TYPE_OP type=kotlin.collections.Collection<<root>.ComponentDescriptor>? origin=SAFE_CAST typeOperand=kotlin.collections.Collection<<root>.ComponentDescriptor>
|
||||
CALL 'public open fun get (p0: @[FlexibleNullability] K of java.util.HashMap?): V of java.util.HashMap? [operator] declared in java.util.HashMap' type=kotlin.Any? origin=null
|
||||
$this: CALL 'private final fun <get-registrationMap> (): java.util.HashMap<java.lang.reflect.Type, kotlin.Any> declared in <root>' type=java.util.HashMap<java.lang.reflect.Type, kotlin.Any> origin=GET_PROPERTY
|
||||
p0: CALL 'public final fun <get-applicableTo> (): java.lang.Class<E of <root>.PlatformExtensionsClashResolver> declared in <root>.PlatformExtensionsClashResolver' type=java.lang.Class<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out kotlin.Any?>>>>>> origin=GET_PROPERTY
|
||||
$this: GET_VAR 'val resolver: <root>.PlatformExtensionsClashResolver<*> [val] declared in <root>.resolveClashesIfAny' type=<root>.PlatformExtensionsClashResolver<*> origin=null
|
||||
WHEN type=kotlin.collections.Collection<<root>.ComponentDescriptor> origin=ELVIS
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp_1: kotlin.collections.Collection<<root>.ComponentDescriptor>? [val] declared in <root>.resolveClashesIfAny' type=kotlin.collections.Collection<<root>.ComponentDescriptor>? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||
then: CONTINUE label=null loop.label=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: GET_VAR 'val tmp_1: kotlin.collections.Collection<<root>.ComponentDescriptor>? [val] declared in <root>.resolveClashesIfAny' type=kotlin.collections.Collection<<root>.ComponentDescriptor>? origin=null
|
||||
VAR name:substituteDescriptor type:<root>.ClashResolutionDescriptor<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out kotlin.Any?>>>>>> [val]
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (container: <root>.ComponentContainer, resolver: <root>.PlatformExtensionsClashResolver<E of <root>.ClashResolutionDescriptor>, clashedComponents: kotlin.collections.List<<root>.ComponentDescriptor>) [primary] declared in <root>.ClashResolutionDescriptor' type=<root>.ClashResolutionDescriptor<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out kotlin.Any?>>>>>> origin=null
|
||||
<class: E>: <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out <root>.PlatformSpecificExtension<out kotlin.Any?>>>>>
|
||||
container: GET_VAR 'container: <root>.ComponentContainer declared in <root>.resolveClashesIfAny' type=<root>.ComponentContainer origin=null
|
||||
resolver: GET_VAR 'val resolver: <root>.PlatformExtensionsClashResolver<*> [val] declared in <root>.resolveClashesIfAny' type=<root>.PlatformExtensionsClashResolver<*> origin=null
|
||||
clashedComponents: CALL 'public final fun toList <T> (): kotlin.collections.List<T of kotlin.collections.CollectionsKt.toList> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<<root>.ComponentDescriptor> origin=null
|
||||
<T>: <root>.ComponentDescriptor
|
||||
$receiver: GET_VAR 'val clashedComponents: kotlin.collections.Collection<<root>.ComponentDescriptor> [val] declared in <root>.resolveClashesIfAny' type=kotlin.collections.Collection<<root>.ComponentDescriptor> origin=null
|
||||
|
||||
@@ -55,12 +55,14 @@ class DeepCopyIrTreeWithSymbols {
|
||||
val <iterator>: Iterator<Pair<IrTypeParameter, IrTypeParameter>> = <this>.<get-typeParameters>().zip<IrTypeParameter, IrTypeParameter>(other = other.<get-typeParameters>()).iterator()
|
||||
while (<iterator>.hasNext()) { // BLOCK
|
||||
val <destruct>: Pair<IrTypeParameter, IrTypeParameter> = <iterator>.next()
|
||||
val thisTypeParameter: IrTypeParameter = <destruct>.component1()
|
||||
val otherTypeParameter: IrTypeParameter = <destruct>.component2()
|
||||
otherTypeParameter.<get-superTypes>().mapTo<IrType, IrType, MutableList<IrType>>(destination = thisTypeParameter.<get-superTypes>(), transform = local fun <anonymous>(it: IrType): IrType {
|
||||
return <this>.<get-typeRemapper>().remapType(type = it)
|
||||
}
|
||||
{ // BLOCK
|
||||
val thisTypeParameter: IrTypeParameter = <destruct>.component1()
|
||||
val otherTypeParameter: IrTypeParameter = <destruct>.component2()
|
||||
otherTypeParameter.<get-superTypes>().mapTo<IrType, IrType, MutableList<IrType>>(destination = thisTypeParameter.<get-superTypes>(), transform = local fun <anonymous>(it: IrType): IrType {
|
||||
return <this>.<get-typeRemapper>().remapType(type = it)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,3 +77,4 @@ inline fun <T : Any?> TypeRemapper.withinScope(irTypeParametersContainer: IrType
|
||||
<this>.leaveScope()
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
+25
-24
@@ -177,33 +177,34 @@ FILE fqName:<root> fileName:/DeepCopyIrTree.kt
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_0: kotlin.collections.Iterator<kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter>> [val] declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>' type=kotlin.collections.Iterator<kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter>> origin=null
|
||||
body: BLOCK type=kotlin.collections.MutableList<<root>.IrType> origin=FOR_LOOP_INNER_WHILE
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:<destruct> type:kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter> [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter> origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_0: kotlin.collections.Iterator<kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter>> [val] declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>' type=kotlin.collections.Iterator<kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter>> origin=null
|
||||
VAR name:thisTypeParameter type:<root>.IrTypeParameter [val]
|
||||
CALL 'public final fun component1 (): A of kotlin.Pair [operator] declared in kotlin.Pair' type=<root>.IrTypeParameter origin=null
|
||||
$this: GET_VAR 'val <destruct>: kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter> [val] declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>' type=kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter> origin=null
|
||||
VAR name:otherTypeParameter type:<root>.IrTypeParameter [val]
|
||||
CALL 'public final fun component2 (): B of kotlin.Pair [operator] declared in kotlin.Pair' type=<root>.IrTypeParameter origin=null
|
||||
$this: GET_VAR 'val <destruct>: kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter> [val] declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>' type=kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter> origin=null
|
||||
CALL 'public final fun mapTo <T, R, C> (destination: C of kotlin.collections.CollectionsKt.mapTo, transform: kotlin.Function1<T of kotlin.collections.CollectionsKt.mapTo, R of kotlin.collections.CollectionsKt.mapTo>): C of kotlin.collections.CollectionsKt.mapTo [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.collections.MutableList<<root>.IrType> origin=null
|
||||
<T>: <root>.IrType
|
||||
<R>: <root>.IrType
|
||||
<C>: kotlin.collections.MutableList<<root>.IrType>
|
||||
$receiver: CALL 'public abstract fun <get-superTypes> (): kotlin.collections.MutableList<<root>.IrType> declared in <root>.IrTypeParameter' type=kotlin.collections.MutableList<<root>.IrType> origin=GET_PROPERTY
|
||||
$this: GET_VAR 'val otherTypeParameter: <root>.IrTypeParameter [val] declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>' type=<root>.IrTypeParameter origin=null
|
||||
destination: CALL 'public abstract fun <get-superTypes> (): kotlin.collections.MutableList<<root>.IrType> declared in <root>.IrTypeParameter' type=kotlin.collections.MutableList<<root>.IrType> origin=GET_PROPERTY
|
||||
$this: GET_VAR 'val thisTypeParameter: <root>.IrTypeParameter [val] declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>' type=<root>.IrTypeParameter origin=null
|
||||
transform: FUN_EXPR type=kotlin.Function1<<root>.IrType, <root>.IrType> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:<root>.IrType) returnType:<root>.IrType
|
||||
VALUE_PARAMETER name:it index:0 type:<root>.IrType
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (it: <root>.IrType): <root>.IrType declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>'
|
||||
CALL 'public abstract fun remapType (type: <root>.IrType): <root>.IrType declared in <root>.TypeRemapper' type=<root>.IrType origin=null
|
||||
$this: CALL 'private final fun <get-typeRemapper> (): <root>.TypeRemapper declared in <root>.DeepCopyIrTreeWithSymbols' type=<root>.TypeRemapper origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.DeepCopyIrTreeWithSymbols declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom' type=<root>.DeepCopyIrTreeWithSymbols origin=null
|
||||
type: GET_VAR 'it: <root>.IrType declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>.<anonymous>' type=<root>.IrType origin=null
|
||||
BLOCK type=kotlin.collections.MutableList<<root>.IrType> origin=null
|
||||
VAR name:thisTypeParameter type:<root>.IrTypeParameter [val]
|
||||
CALL 'public final fun component1 (): A of kotlin.Pair [operator] declared in kotlin.Pair' type=<root>.IrTypeParameter origin=null
|
||||
$this: GET_VAR 'val <destruct>: kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter> [val] declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>' type=kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter> origin=null
|
||||
VAR name:otherTypeParameter type:<root>.IrTypeParameter [val]
|
||||
CALL 'public final fun component2 (): B of kotlin.Pair [operator] declared in kotlin.Pair' type=<root>.IrTypeParameter origin=null
|
||||
$this: GET_VAR 'val <destruct>: kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter> [val] declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>' type=kotlin.Pair<<root>.IrTypeParameter, <root>.IrTypeParameter> origin=null
|
||||
CALL 'public final fun mapTo <T, R, C> (destination: C of kotlin.collections.CollectionsKt.mapTo, transform: kotlin.Function1<T of kotlin.collections.CollectionsKt.mapTo, R of kotlin.collections.CollectionsKt.mapTo>): C of kotlin.collections.CollectionsKt.mapTo [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.collections.MutableList<<root>.IrType> origin=null
|
||||
<T>: <root>.IrType
|
||||
<R>: <root>.IrType
|
||||
<C>: kotlin.collections.MutableList<<root>.IrType>
|
||||
$receiver: CALL 'public abstract fun <get-superTypes> (): kotlin.collections.MutableList<<root>.IrType> declared in <root>.IrTypeParameter' type=kotlin.collections.MutableList<<root>.IrType> origin=GET_PROPERTY
|
||||
$this: GET_VAR 'val otherTypeParameter: <root>.IrTypeParameter [val] declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>' type=<root>.IrTypeParameter origin=null
|
||||
destination: CALL 'public abstract fun <get-superTypes> (): kotlin.collections.MutableList<<root>.IrType> declared in <root>.IrTypeParameter' type=kotlin.collections.MutableList<<root>.IrType> origin=GET_PROPERTY
|
||||
$this: GET_VAR 'val thisTypeParameter: <root>.IrTypeParameter [val] declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>' type=<root>.IrTypeParameter origin=null
|
||||
transform: FUN_EXPR type=kotlin.Function1<<root>.IrType, <root>.IrType> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:<root>.IrType) returnType:<root>.IrType
|
||||
VALUE_PARAMETER name:it index:0 type:<root>.IrType
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (it: <root>.IrType): <root>.IrType declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>'
|
||||
CALL 'public abstract fun remapType (type: <root>.IrType): <root>.IrType declared in <root>.TypeRemapper' type=<root>.IrType origin=null
|
||||
$this: CALL 'private final fun <get-typeRemapper> (): <root>.TypeRemapper declared in <root>.DeepCopyIrTreeWithSymbols' type=<root>.TypeRemapper origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.DeepCopyIrTreeWithSymbols declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom' type=<root>.DeepCopyIrTreeWithSymbols origin=null
|
||||
type: GET_VAR 'it: <root>.IrType declared in <root>.DeepCopyIrTreeWithSymbols.copyTypeParametersFrom.<anonymous>.<anonymous>' type=<root>.IrType origin=null
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
|
||||
+12
-6
@@ -15,8 +15,10 @@ fun testForInListDestructured() {
|
||||
val <iterator>: MutableIterator<@FlexibleNullability P?> = listOfNotNull().iterator()
|
||||
while (<iterator>.hasNext()) { // BLOCK
|
||||
val <destruct>: @FlexibleNullability P? = <iterator>.next()
|
||||
val x: Int = <destruct>.component1()
|
||||
val y: Int = <destruct>.component2()
|
||||
{ // BLOCK
|
||||
val x: Int = <destruct>.component1()
|
||||
val y: Int = <destruct>.component2()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,8 +44,10 @@ fun testForInListUse() {
|
||||
val <iterator>: MutableIterator<@FlexibleNullability P?> = listOfNotNull().iterator()
|
||||
while (<iterator>.hasNext()) { // BLOCK
|
||||
val x: @FlexibleNullability P? = <iterator>.next()
|
||||
use(s = x /*!! @FlexibleNullability P */)
|
||||
use(s = x)
|
||||
{ // BLOCK
|
||||
use(s = x /*!! @FlexibleNullability P */)
|
||||
use(s = x)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,8 +57,10 @@ fun testForInArrayUse(j: J) {
|
||||
val <iterator>: Iterator<@FlexibleNullability P?> = j.arrayOfNotNull().iterator()
|
||||
while (<iterator>.hasNext()) { // BLOCK
|
||||
val x: @FlexibleNullability P? = <iterator>.next()
|
||||
use(s = x /*!! @FlexibleNullability P */)
|
||||
use(s = x)
|
||||
{ // BLOCK
|
||||
use(s = x /*!! @FlexibleNullability P */)
|
||||
use(s = x)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+19
-16
@@ -28,12 +28,13 @@ FILE fqName:<root> fileName:/enhancedNullabilityInForLoop.kt
|
||||
VAR FOR_LOOP_VARIABLE name:<destruct> type:@[FlexibleNullability] <root>.P? [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableIterator' type=@[FlexibleNullability] <root>.P? origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<@[FlexibleNullability] <root>.P?> [val] declared in <root>.testForInListDestructured' type=kotlin.collections.MutableIterator<@[FlexibleNullability] <root>.P?> origin=null
|
||||
VAR name:x type:kotlin.Int [val]
|
||||
CALL 'public final fun component1 (): kotlin.Int [operator] declared in <root>.P' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInListDestructured' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
VAR name:y type:kotlin.Int [val]
|
||||
CALL 'public final fun component2 (): kotlin.Int [operator] declared in <root>.P' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInListDestructured' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
VAR name:x type:kotlin.Int [val]
|
||||
CALL 'public final fun component1 (): kotlin.Int [operator] declared in <root>.P' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInListDestructured' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
VAR name:y type:kotlin.Int [val]
|
||||
CALL 'public final fun component2 (): kotlin.Int [operator] declared in <root>.P' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInListDestructured' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
FUN name:testDesugaredForInList visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
VAR name:iterator type:kotlin.collections.MutableIterator<@[FlexibleNullability] <root>.P?> [val]
|
||||
@@ -74,11 +75,12 @@ FILE fqName:<root> fileName:/enhancedNullabilityInForLoop.kt
|
||||
VAR FOR_LOOP_VARIABLE name:x type:@[FlexibleNullability] <root>.P? [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableIterator' type=@[FlexibleNullability] <root>.P? origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_3: kotlin.collections.MutableIterator<@[FlexibleNullability] <root>.P?> [val] declared in <root>.testForInListUse' type=kotlin.collections.MutableIterator<@[FlexibleNullability] <root>.P?> origin=null
|
||||
CALL 'public final fun use (s: <root>.P): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: TYPE_OP type=@[FlexibleNullability] <root>.P origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] <root>.P
|
||||
GET_VAR 'val x: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInListUse' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
CALL 'public open fun use (s: @[EnhancedNullability] <root>.P): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
|
||||
s: GET_VAR 'val x: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInListUse' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'public final fun use (s: <root>.P): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: TYPE_OP type=@[FlexibleNullability] <root>.P origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] <root>.P
|
||||
GET_VAR 'val x: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInListUse' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
CALL 'public open fun use (s: @[EnhancedNullability] <root>.P): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
|
||||
s: GET_VAR 'val x: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInListUse' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
FUN name:testForInArrayUse visibility:public modality:FINAL <> (j:<root>.J) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:j index:0 type:<root>.J
|
||||
BLOCK_BODY
|
||||
@@ -94,11 +96,12 @@ FILE fqName:<root> fileName:/enhancedNullabilityInForLoop.kt
|
||||
VAR FOR_LOOP_VARIABLE name:x type:@[FlexibleNullability] <root>.P? [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=@[FlexibleNullability] <root>.P? origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_4: kotlin.collections.Iterator<@[FlexibleNullability] <root>.P?> [val] declared in <root>.testForInArrayUse' type=kotlin.collections.Iterator<@[FlexibleNullability] <root>.P?> origin=null
|
||||
CALL 'public final fun use (s: <root>.P): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: TYPE_OP type=@[FlexibleNullability] <root>.P origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] <root>.P
|
||||
GET_VAR 'val x: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInArrayUse' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
CALL 'public open fun use (s: @[EnhancedNullability] <root>.P): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
|
||||
s: GET_VAR 'val x: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInArrayUse' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'public final fun use (s: <root>.P): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: TYPE_OP type=@[FlexibleNullability] <root>.P origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] <root>.P
|
||||
GET_VAR 'val x: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInArrayUse' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
CALL 'public open fun use (s: @[EnhancedNullability] <root>.P): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
|
||||
s: GET_VAR 'val x: @[FlexibleNullability] <root>.P? [val] declared in <root>.testForInArrayUse' type=@[FlexibleNullability] <root>.P? origin=null
|
||||
CLASS INTERFACE name:K modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.K
|
||||
FUN name:arrayOfNotNull visibility:public modality:ABSTRACT <> ($this:<root>.K) returnType:kotlin.Array<<root>.P>
|
||||
|
||||
+6
@@ -15182,6 +15182,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/fir/NameHighlighter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noSymbolForIntRangeIterator.kt")
|
||||
public void testNoSymbolForIntRangeIterator() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("SuspendExtension.kt")
|
||||
public void testSuspendExtension() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user