diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt index 62f6bc0a933..8f8adb93344 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt @@ -45,6 +45,8 @@ class FirDataFlowAnalyzer(transformer: FirBodyResolveTransformer) : BodyResolveC private val variableStorage = DataFlowVariableStorage() private val flowOnNodes = mutableMapOf, Flow>() + private val variablesForWhenConditions = mutableMapOf() + /* * If there is no types from smartcasts function returns null * @@ -93,12 +95,7 @@ class FirDataFlowAnalyzer(transformer: FirBodyResolveTransformer) : BodyResolveC // ----------------------------------- Block ----------------------------------- fun enterBlock(block: FirBlock) { - val node = graphBuilder.enterBlock(block).mergeIncomingFlow() - - val previousNode = node.alivePreviousNodes.singleOrNull() as? WhenBranchConditionExitNode - if (previousNode != null) { - node.flow = approveFactsAndUpdateImplicitReceivers(previousNode.variable, EqTrue, node.flow) - } + graphBuilder.enterBlock(block).mergeIncomingFlow() } fun exitBlock(block: FirBlock) { @@ -311,16 +308,20 @@ class FirDataFlowAnalyzer(transformer: FirBodyResolveTransformer) : BodyResolveC val node = graphBuilder.enterWhenBranchCondition(whenBranch).mergeIncomingFlow() val previousNode = node.previousNodes.single() if (previousNode is WhenBranchConditionExitNode) { - node.flow = approveFactsAndUpdateImplicitReceivers(previousNode.variable, EqFalse, node.flow) + node.flow = approveFactsAndUpdateImplicitReceivers(variablesForWhenConditions.remove(previousNode)!!, EqFalse, node.flow) } node.flow.freeze() } fun exitWhenBranchCondition(whenBranch: FirWhenBranch) { - val node = graphBuilder.exitWhenBranchCondition(whenBranch).mergeIncomingFlow() - node.flow.freeze() + val (conditionExitNode, branchEnterNode) = graphBuilder.exitWhenBranchCondition(whenBranch) + conditionExitNode.mergeIncomingFlow() + conditionExitNode.flow.freeze() + val conditionVariable = getOrCreateVariable(whenBranch.condition) - node.variable = conditionVariable + variablesForWhenConditions[conditionExitNode] = conditionVariable + branchEnterNode.mergeIncomingFlow() + branchEnterNode.flow = approveFactsAndUpdateImplicitReceivers(conditionVariable, EqTrue, branchEnterNode.flow) } fun exitWhenBranchResult(whenBranch: FirWhenBranch) { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt index 5976df1f0a1..2024cda1ffe 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt @@ -11,7 +11,6 @@ import org.jetbrains.kotlin.fir.declarations.FirAnonymousInitializer import org.jetbrains.kotlin.fir.declarations.FirFunction import org.jetbrains.kotlin.fir.declarations.FirProperty import org.jetbrains.kotlin.fir.expressions.* -import org.jetbrains.kotlin.fir.resolve.dfa.DataFlowVariable class ControlFlowGraph(val name: String) { val nodes = mutableListOf>() @@ -62,9 +61,8 @@ class BlockExitNode(owner: ControlFlowGraph, override val fir: FirBlock, level: class WhenEnterNode(owner: ControlFlowGraph, override val fir: FirWhenExpression, level: Int) : CFGNode(owner, level), EnterNode class WhenExitNode(owner: ControlFlowGraph, override val fir: FirWhenExpression, level: Int) : CFGNode(owner, level), ExitNode class WhenBranchConditionEnterNode(owner: ControlFlowGraph, override val fir: FirWhenBranch, level: Int) : CFGNode(owner, level), EnterNode -class WhenBranchConditionExitNode(owner: ControlFlowGraph, override val fir: FirWhenBranch, level: Int) : CFGNode(owner, level), ExitNode { - lateinit var variable: DataFlowVariable -} +class WhenBranchConditionExitNode(owner: ControlFlowGraph, override val fir: FirWhenBranch, level: Int) : CFGNode(owner, level), ExitNode +class WhenBranchResultEnterNode(owner: ControlFlowGraph, override val fir: FirWhenBranch, level: Int) : CFGNode(owner, level) class WhenBranchResultExitNode(owner: ControlFlowGraph, override val fir: FirWhenBranch, level: Int) : CFGNode(owner, level) // ----------------------------------- Loop ----------------------------------- diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt index e1d6f97c5db..1c9f59c89d1 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt @@ -188,13 +188,16 @@ class ControlFlowGraphBuilder { return createWhenBranchConditionEnterNode(whenBranch).also { addNewSimpleNode(it) }.also { levelCounter++ } } - fun exitWhenBranchCondition(whenBranch: FirWhenBranch): WhenBranchConditionExitNode { + fun exitWhenBranchCondition(whenBranch: FirWhenBranch): Pair { levelCounter-- - return createWhenBranchConditionExitNode(whenBranch).also { + val conditionExitNode = createWhenBranchConditionExitNode(whenBranch).also { addNewSimpleNode(it) - // put exit branch condition node twice so we can refer it after exit from when expression - lastNodes.push(it) }.also { levelCounter++ } + val branchEnterNode = createWhenBranchResultEnterNode(whenBranch).also { + lastNodes.push(it) + addEdge(conditionExitNode, it) + } + return conditionExitNode to branchEnterNode } fun exitWhenBranchResult(whenBranch: FirWhenBranch): WhenBranchResultExitNode { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt index 7cde69804e4..8ae984c619b 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt @@ -88,6 +88,9 @@ fun ControlFlowGraphBuilder.createWhenExitNode(fir: FirWhenExpression): WhenExit fun ControlFlowGraphBuilder.createWhenBranchResultExitNode(fir: FirWhenBranch): WhenBranchResultExitNode = WhenBranchResultExitNode(graph, fir, levelCounter) +fun ControlFlowGraphBuilder.createWhenBranchResultEnterNode(fir: FirWhenBranch): WhenBranchResultEnterNode = + WhenBranchResultEnterNode(graph, fir, levelCounter) + fun ControlFlowGraphBuilder.createLoopConditionExitNode(fir: FirExpression): LoopConditionExitNode = LoopConditionExitNode(graph, fir, levelCounter) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt index bb9316da39e..db60ecbb703 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt @@ -97,6 +97,7 @@ fun CFGNode<*>.render(): String = is WhenEnterNode -> "Enter when" is WhenBranchConditionEnterNode -> "Enter when branch condition ${if (fir.condition is FirElseIfTrueCondition) "\"else\"" else ""}" is WhenBranchConditionExitNode -> "Exit when branch condition" + is WhenBranchResultEnterNode -> "Enter when branch result" is WhenBranchResultExitNode -> "Exit when branch result" is WhenExitNode -> "Exit when" diff --git a/compiler/fir/resolve/testData/resolve/cfg/binaryOperations.dot b/compiler/fir/resolve/testData/resolve/cfg/binaryOperations.dot index 29d49fbc3b5..2ad5ee5b8f1 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/binaryOperations.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/binaryOperations.dot @@ -28,27 +28,29 @@ digraph binaryOperations_kt { } subgraph cluster_5 { color=blue - 11 [label="Enter block"]; - 12 [label="Const: Int(1)"]; - 13 [label="Exit block"]; + 11 [label="Enter when branch condition else"]; + 12 [label="Exit when branch condition"]; } - 14 [label="Exit when branch result"]; + 13 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 15 [label="Enter when branch condition else"]; - 16 [label="Exit when branch condition"]; + 14 [label="Enter block"]; + 15 [label="Exit block"]; } + 16 [label="Exit when branch result"]; + 17 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 17 [label="Enter block"]; - 18 [label="Exit block"]; + 18 [label="Enter block"]; + 19 [label="Const: Int(1)"]; + 20 [label="Exit block"]; } - 19 [label="Exit when branch result"]; - 20 [label="Exit when"]; + 21 [label="Exit when branch result"]; + 22 [label="Exit when"]; } - 21 [label="Exit block"]; + 23 [label="Exit block"]; } - 22 [label="Exit function test_1" style="filled" fillcolor=red]; + 24 [label="Exit function test_1" style="filled" fillcolor=red]; } 0 -> {1}; @@ -61,154 +63,158 @@ digraph binaryOperations_kt { 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {11 15}; + 10 -> {17 11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {20}; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; + 16 -> {22}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; + 22 -> {23}; + 23 -> {24}; subgraph cluster_8 { color=red - 23 [label="Enter function test_2" style="filled" fillcolor=red]; + 25 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 24 [label="Enter block"]; + 26 [label="Enter block"]; subgraph cluster_10 { color=blue - 25 [label="Enter when"]; + 27 [label="Enter when"]; subgraph cluster_11 { color=blue - 26 [label="Enter when branch condition "]; + 28 [label="Enter when branch condition "]; subgraph cluster_12 { color=blue - 27 [label="Enter &&"]; - 28 [label="Access variable R|/b1|"]; - 29 [label="Exit left part of &&"]; - 30 [label="Enter right part of &&"]; - 31 [label="Access variable R|/b2|"]; - 32 [label="Exit &&"]; + 29 [label="Enter &&"]; + 30 [label="Access variable R|/b1|"]; + 31 [label="Exit left part of &&"]; + 32 [label="Enter right part of &&"]; + 33 [label="Access variable R|/b2|"]; + 34 [label="Exit &&"]; } - 33 [label="Exit when branch condition"]; + 35 [label="Exit when branch condition"]; } subgraph cluster_13 { color=blue - 34 [label="Enter block"]; - 35 [label="Const: Int(1)"]; - 36 [label="Exit block"]; + 36 [label="Enter when branch condition else"]; + 37 [label="Exit when branch condition"]; } - 37 [label="Exit when branch result"]; + 38 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 38 [label="Enter when branch condition else"]; - 39 [label="Exit when branch condition"]; + 39 [label="Enter block"]; + 40 [label="Exit block"]; } + 41 [label="Exit when branch result"]; + 42 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 40 [label="Enter block"]; - 41 [label="Exit block"]; + 43 [label="Enter block"]; + 44 [label="Const: Int(1)"]; + 45 [label="Exit block"]; } - 42 [label="Exit when branch result"]; - 43 [label="Exit when"]; + 46 [label="Exit when branch result"]; + 47 [label="Exit when"]; } - 44 [label="Exit block"]; + 48 [label="Exit block"]; } - 45 [label="Exit function test_2" style="filled" fillcolor=red]; + 49 [label="Exit function test_2" style="filled" fillcolor=red]; } - 23 -> {24}; - 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {32 30}; + 29 -> {30}; 30 -> {31}; - 31 -> {32}; + 31 -> {34 32}; 32 -> {33}; - 33 -> {34 38}; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {42 36}; 36 -> {37}; - 37 -> {43}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {42}; + 41 -> {47}; 42 -> {43}; 43 -> {44}; 44 -> {45}; + 45 -> {46}; + 46 -> {47}; + 47 -> {48}; + 48 -> {49}; subgraph cluster_16 { color=red - 46 [label="Enter function test_3" style="filled" fillcolor=red]; + 50 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 47 [label="Enter block"]; + 51 [label="Enter block"]; subgraph cluster_18 { color=blue - 48 [label="Enter when"]; + 52 [label="Enter when"]; subgraph cluster_19 { color=blue - 49 [label="Enter when branch condition "]; + 53 [label="Enter when branch condition "]; subgraph cluster_20 { color=blue - 50 [label="Enter ||"]; + 54 [label="Enter ||"]; subgraph cluster_21 { color=blue - 51 [label="Enter &&"]; - 52 [label="Access variable R|/b1|"]; - 53 [label="Exit left part of &&"]; - 54 [label="Enter right part of &&"]; - 55 [label="Access variable R|/b2|"]; - 56 [label="Exit &&"]; + 55 [label="Enter &&"]; + 56 [label="Access variable R|/b1|"]; + 57 [label="Exit left part of &&"]; + 58 [label="Enter right part of &&"]; + 59 [label="Access variable R|/b2|"]; + 60 [label="Exit &&"]; } - 57 [label="Exit left part of ||"]; - 58 [label="Enter right part of ||"]; - 59 [label="Access variable R|/b3|"]; - 60 [label="Exit ||"]; + 61 [label="Exit left part of ||"]; + 62 [label="Enter right part of ||"]; + 63 [label="Access variable R|/b3|"]; + 64 [label="Exit ||"]; } - 61 [label="Exit when branch condition"]; + 65 [label="Exit when branch condition"]; } subgraph cluster_22 { - color=blue - 62 [label="Enter block"]; - 63 [label="Const: Int(1)"]; - 64 [label="Exit block"]; - } - 65 [label="Exit when branch result"]; - subgraph cluster_23 { color=blue 66 [label="Enter when branch condition else"]; 67 [label="Exit when branch condition"]; } + 68 [label="Enter when branch result"]; + subgraph cluster_23 { + color=blue + 69 [label="Enter block"]; + 70 [label="Exit block"]; + } + 71 [label="Exit when branch result"]; + 72 [label="Enter when branch result"]; subgraph cluster_24 { color=blue - 68 [label="Enter block"]; - 69 [label="Exit block"]; + 73 [label="Enter block"]; + 74 [label="Const: Int(1)"]; + 75 [label="Exit block"]; } - 70 [label="Exit when branch result"]; - 71 [label="Exit when"]; + 76 [label="Exit when branch result"]; + 77 [label="Exit when"]; } - 72 [label="Exit block"]; + 78 [label="Exit block"]; } - 73 [label="Exit function test_3" style="filled" fillcolor=red]; + 79 [label="Exit function test_3" style="filled" fillcolor=red]; } - 46 -> {47}; - 47 -> {48}; - 48 -> {49}; - 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; - 53 -> {56 54}; + 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; @@ -216,101 +222,111 @@ digraph binaryOperations_kt { 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {62 66}; + 61 -> {64 62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {71}; + 65 -> {72 66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {77}; 72 -> {73}; - - subgraph cluster_25 { - color=red - 74 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_26 { - color=blue - 75 [label="Enter block"]; - subgraph cluster_27 { - color=blue - 76 [label="Enter when"]; - subgraph cluster_28 { - color=blue - 77 [label="Enter when branch condition "]; - subgraph cluster_29 { - color=blue - 78 [label="Enter ||"]; - 79 [label="Access variable R|/b1|"]; - 80 [label="Exit left part of ||"]; - 81 [label="Enter right part of ||"]; - subgraph cluster_30 { - color=blue - 82 [label="Enter &&"]; - 83 [label="Access variable R|/b2|"]; - 84 [label="Exit left part of &&"]; - 85 [label="Enter right part of &&"]; - 86 [label="Access variable R|/b3|"]; - 87 [label="Exit &&"]; - } - 88 [label="Exit ||"]; - } - 89 [label="Exit when branch condition"]; - } - subgraph cluster_31 { - color=blue - 90 [label="Enter block"]; - 91 [label="Const: Int(1)"]; - 92 [label="Exit block"]; - } - 93 [label="Exit when branch result"]; - subgraph cluster_32 { - color=blue - 94 [label="Enter when branch condition else"]; - 95 [label="Exit when branch condition"]; - } - subgraph cluster_33 { - color=blue - 96 [label="Enter block"]; - 97 [label="Exit block"]; - } - 98 [label="Exit when branch result"]; - 99 [label="Exit when"]; - } - 100 [label="Exit block"]; - } - 101 [label="Exit function test_4" style="filled" fillcolor=red]; - } - + 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {80}; - 80 -> {88 81}; + + subgraph cluster_25 { + color=red + 80 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 81 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 82 [label="Enter when"]; + subgraph cluster_28 { + color=blue + 83 [label="Enter when branch condition "]; + subgraph cluster_29 { + color=blue + 84 [label="Enter ||"]; + 85 [label="Access variable R|/b1|"]; + 86 [label="Exit left part of ||"]; + 87 [label="Enter right part of ||"]; + subgraph cluster_30 { + color=blue + 88 [label="Enter &&"]; + 89 [label="Access variable R|/b2|"]; + 90 [label="Exit left part of &&"]; + 91 [label="Enter right part of &&"]; + 92 [label="Access variable R|/b3|"]; + 93 [label="Exit &&"]; + } + 94 [label="Exit ||"]; + } + 95 [label="Exit when branch condition"]; + } + subgraph cluster_31 { + color=blue + 96 [label="Enter when branch condition else"]; + 97 [label="Exit when branch condition"]; + } + 98 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 99 [label="Enter block"]; + 100 [label="Exit block"]; + } + 101 [label="Exit when branch result"]; + 102 [label="Enter when branch result"]; + subgraph cluster_33 { + color=blue + 103 [label="Enter block"]; + 104 [label="Const: Int(1)"]; + 105 [label="Exit block"]; + } + 106 [label="Exit when branch result"]; + 107 [label="Exit when"]; + } + 108 [label="Exit block"]; + } + 109 [label="Exit function test_4" style="filled" fillcolor=red]; + } + + 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {87 85}; + 84 -> {85}; 85 -> {86}; - 86 -> {87}; + 86 -> {94 87}; 87 -> {88}; 88 -> {89}; - 89 -> {90 94}; - 90 -> {91}; + 89 -> {90}; + 90 -> {93 91}; 91 -> {92}; 92 -> {93}; - 93 -> {99}; + 93 -> {94}; 94 -> {95}; - 95 -> {96}; + 95 -> {102 96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; + 101 -> {107}; + 102 -> {103}; + 103 -> {104}; + 104 -> {105}; + 105 -> {106}; + 106 -> {107}; + 107 -> {108}; + 108 -> {109}; } diff --git a/compiler/fir/resolve/testData/resolve/cfg/booleanOperatorsWithConsts.dot b/compiler/fir/resolve/testData/resolve/cfg/booleanOperatorsWithConsts.dot index 3ce87a22e4b..6a56ab5b16b 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/booleanOperatorsWithConsts.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/booleanOperatorsWithConsts.dot @@ -28,27 +28,29 @@ digraph booleanOperatorsWithConsts_kt { } subgraph cluster_5 { color=blue - 11 [label="Enter block"]; - 12 [label="Const: Int(1)"]; - 13 [label="Exit block"]; + 11 [label="Enter when branch condition else"]; + 12 [label="Exit when branch condition"]; } - 14 [label="Exit when branch result"]; + 13 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 15 [label="Enter when branch condition else"]; - 16 [label="Exit when branch condition"]; + 14 [label="Enter block"]; + 15 [label="Exit block"]; } + 16 [label="Exit when branch result"]; + 17 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 17 [label="Enter block"]; - 18 [label="Exit block"]; + 18 [label="Enter block"]; + 19 [label="Const: Int(1)"]; + 20 [label="Exit block"]; } - 19 [label="Exit when branch result"]; - 20 [label="Exit when"]; + 21 [label="Exit when branch result"]; + 22 [label="Exit when"]; } - 21 [label="Exit block"]; + 23 [label="Exit block"]; } - 22 [label="Exit function test_1" style="filled" fillcolor=red]; + 24 [label="Exit function test_1" style="filled" fillcolor=red]; } 0 -> {1}; @@ -61,526 +63,556 @@ digraph booleanOperatorsWithConsts_kt { 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {11 15}; + 10 -> {17 11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {20}; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; + 16 -> {22}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; + 22 -> {23}; + 23 -> {24}; subgraph cluster_8 { color=red - 23 [label="Enter function test_2" style="filled" fillcolor=red]; + 25 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 24 [label="Enter block"]; + 26 [label="Enter block"]; subgraph cluster_10 { color=blue - 25 [label="Enter when"]; + 27 [label="Enter when"]; subgraph cluster_11 { color=blue - 26 [label="Enter when branch condition "]; + 28 [label="Enter when branch condition "]; subgraph cluster_12 { color=blue - 27 [label="Enter ||"]; - 28 [label="Const: Boolean(false)"]; - 29 [label="Exit left part of ||"]; - 30 [label="Enter right part of ||"]; - 31 [label="Access variable R|/b|"]; - 32 [label="Stub" style="filled" fillcolor=gray]; - 33 [label="Exit ||"]; + 29 [label="Enter ||"]; + 30 [label="Const: Boolean(false)"]; + 31 [label="Exit left part of ||"]; + 32 [label="Enter right part of ||"]; + 33 [label="Access variable R|/b|"]; + 34 [label="Stub" style="filled" fillcolor=gray]; + 35 [label="Exit ||"]; } - 34 [label="Exit when branch condition"]; + 36 [label="Exit when branch condition"]; } subgraph cluster_13 { color=blue - 35 [label="Enter block"]; - 36 [label="Const: Int(1)"]; - 37 [label="Exit block"]; + 37 [label="Enter when branch condition else"]; + 38 [label="Exit when branch condition"]; } - 38 [label="Exit when branch result"]; + 39 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 39 [label="Enter when branch condition else"]; - 40 [label="Exit when branch condition"]; + 40 [label="Enter block"]; + 41 [label="Exit block"]; } + 42 [label="Exit when branch result"]; + 43 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 41 [label="Enter block"]; - 42 [label="Exit block"]; + 44 [label="Enter block"]; + 45 [label="Const: Int(1)"]; + 46 [label="Exit block"]; } - 43 [label="Exit when branch result"]; - 44 [label="Exit when"]; + 47 [label="Exit when branch result"]; + 48 [label="Exit when"]; } - 45 [label="Exit block"]; + 49 [label="Exit block"]; } - 46 [label="Exit function test_2" style="filled" fillcolor=red]; + 50 [label="Exit function test_2" style="filled" fillcolor=red]; } - 23 -> {24}; - 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 29 -> {32} [style=dotted]; 30 -> {31}; - 31 -> {33}; - 32 -> {33} [style=dotted]; - 33 -> {34}; - 34 -> {35 39}; + 31 -> {32}; + 31 -> {34} [style=dotted]; + 32 -> {33}; + 33 -> {35}; + 34 -> {35} [style=dotted]; 35 -> {36}; - 36 -> {37}; + 36 -> {43 37}; 37 -> {38}; - 38 -> {44}; + 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43}; + 42 -> {48}; 43 -> {44}; 44 -> {45}; 45 -> {46}; + 46 -> {47}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50}; subgraph cluster_16 { color=red - 47 [label="Enter function test_3" style="filled" fillcolor=red]; + 51 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 48 [label="Enter block"]; + 52 [label="Enter block"]; subgraph cluster_18 { color=blue - 49 [label="Enter when"]; + 53 [label="Enter when"]; subgraph cluster_19 { color=blue - 50 [label="Enter when branch condition "]; + 54 [label="Enter when branch condition "]; subgraph cluster_20 { color=blue - 51 [label="Enter ||"]; - 52 [label="Access variable R|/b|"]; - 53 [label="Exit left part of ||"]; - 54 [label="Enter right part of ||"]; - 55 [label="Const: Boolean(true)"]; - 56 [label="Exit ||"]; + 55 [label="Enter ||"]; + 56 [label="Access variable R|/b|"]; + 57 [label="Exit left part of ||"]; + 58 [label="Enter right part of ||"]; + 59 [label="Const: Boolean(true)"]; + 60 [label="Exit ||"]; } - 57 [label="Exit when branch condition"]; + 61 [label="Exit when branch condition"]; } subgraph cluster_21 { - color=blue - 58 [label="Enter block"]; - 59 [label="Const: Int(1)"]; - 60 [label="Exit block"]; - } - 61 [label="Exit when branch result"]; - subgraph cluster_22 { color=blue 62 [label="Enter when branch condition else"]; 63 [label="Exit when branch condition"]; } + 64 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 65 [label="Enter block"]; + 66 [label="Exit block"]; + } + 67 [label="Exit when branch result"]; + 68 [label="Enter when branch result"]; subgraph cluster_23 { color=blue - 64 [label="Enter block"]; - 65 [label="Exit block"]; + 69 [label="Enter block"]; + 70 [label="Const: Int(1)"]; + 71 [label="Exit block"]; } - 66 [label="Exit when branch result"]; - 67 [label="Exit when"]; + 72 [label="Exit when branch result"]; + 73 [label="Exit when"]; } - 68 [label="Exit block"]; + 74 [label="Exit block"]; } - 69 [label="Exit function test_3" style="filled" fillcolor=red]; + 75 [label="Exit function test_3" style="filled" fillcolor=red]; } - 47 -> {48}; - 48 -> {49}; - 49 -> {50}; - 50 -> {51}; 51 -> {52}; 52 -> {53}; - 53 -> {56 54}; + 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58 62}; + 57 -> {60 58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {67}; + 61 -> {68 62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {68}; + 67 -> {73}; 68 -> {69}; - - subgraph cluster_24 { - color=red - 70 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 71 [label="Enter block"]; - subgraph cluster_26 { - color=blue - 72 [label="Enter when"]; - subgraph cluster_27 { - color=blue - 73 [label="Enter when branch condition "]; - subgraph cluster_28 { - color=blue - 74 [label="Enter ||"]; - 75 [label="Const: Boolean(true)"]; - 76 [label="Exit left part of ||"]; - 77 [label="Stub" style="filled" fillcolor=gray]; - 78 [label="Enter right part of ||" style="filled" fillcolor=gray]; - 79 [label="Access variable R|/b|" style="filled" fillcolor=gray]; - 80 [label="Exit ||"]; - } - 81 [label="Exit when branch condition"]; - } - subgraph cluster_29 { - color=blue - 82 [label="Enter block"]; - 83 [label="Const: Int(1)"]; - 84 [label="Exit block"]; - } - 85 [label="Exit when branch result"]; - subgraph cluster_30 { - color=blue - 86 [label="Enter when branch condition else"]; - 87 [label="Exit when branch condition"]; - } - subgraph cluster_31 { - color=blue - 88 [label="Enter block"]; - 89 [label="Exit block"]; - } - 90 [label="Exit when branch result"]; - 91 [label="Exit when"]; - } - 92 [label="Exit block"]; - } - 93 [label="Exit function test_4" style="filled" fillcolor=red]; - } - + 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76}; - 76 -> {80}; - 76 -> {77} [style=dotted]; - 77 -> {78} [style=dotted]; - 78 -> {79} [style=dotted]; - 79 -> {80} [style=dotted]; + + subgraph cluster_24 { + color=red + 76 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_25 { + color=blue + 77 [label="Enter block"]; + subgraph cluster_26 { + color=blue + 78 [label="Enter when"]; + subgraph cluster_27 { + color=blue + 79 [label="Enter when branch condition "]; + subgraph cluster_28 { + color=blue + 80 [label="Enter ||"]; + 81 [label="Const: Boolean(true)"]; + 82 [label="Exit left part of ||"]; + 83 [label="Stub" style="filled" fillcolor=gray]; + 84 [label="Enter right part of ||" style="filled" fillcolor=gray]; + 85 [label="Access variable R|/b|" style="filled" fillcolor=gray]; + 86 [label="Exit ||"]; + } + 87 [label="Exit when branch condition"]; + } + subgraph cluster_29 { + color=blue + 88 [label="Enter when branch condition else"]; + 89 [label="Exit when branch condition"]; + } + 90 [label="Enter when branch result"]; + subgraph cluster_30 { + color=blue + 91 [label="Enter block"]; + 92 [label="Exit block"]; + } + 93 [label="Exit when branch result"]; + 94 [label="Enter when branch result"]; + subgraph cluster_31 { + color=blue + 95 [label="Enter block"]; + 96 [label="Const: Int(1)"]; + 97 [label="Exit block"]; + } + 98 [label="Exit when branch result"]; + 99 [label="Exit when"]; + } + 100 [label="Exit block"]; + } + 101 [label="Exit function test_4" style="filled" fillcolor=red]; + } + + 76 -> {77}; + 77 -> {78}; + 78 -> {79}; + 79 -> {80}; 80 -> {81}; - 81 -> {82 86}; - 82 -> {83}; - 83 -> {84}; - 84 -> {85}; - 85 -> {91}; + 81 -> {82}; + 82 -> {86}; + 82 -> {83} [style=dotted]; + 83 -> {84} [style=dotted]; + 84 -> {85} [style=dotted]; + 85 -> {86} [style=dotted]; 86 -> {87}; - 87 -> {88}; + 87 -> {94 88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; - - subgraph cluster_32 { - color=red - 94 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_33 { - color=blue - 95 [label="Enter block"]; - subgraph cluster_34 { - color=blue - 96 [label="Enter when"]; - subgraph cluster_35 { - color=blue - 97 [label="Enter when branch condition "]; - subgraph cluster_36 { - color=blue - 98 [label="Enter &&"]; - 99 [label="Access variable R|/b|"]; - 100 [label="Exit left part of &&"]; - 101 [label="Enter right part of &&"]; - 102 [label="Const: Boolean(false)"]; - 103 [label="Exit &&"]; - } - 104 [label="Exit when branch condition"]; - } - subgraph cluster_37 { - color=blue - 105 [label="Enter block"]; - 106 [label="Const: Int(1)"]; - 107 [label="Exit block"]; - } - 108 [label="Exit when branch result"]; - subgraph cluster_38 { - color=blue - 109 [label="Enter when branch condition else"]; - 110 [label="Exit when branch condition"]; - } - subgraph cluster_39 { - color=blue - 111 [label="Enter block"]; - 112 [label="Exit block"]; - } - 113 [label="Exit when branch result"]; - 114 [label="Exit when"]; - } - 115 [label="Exit block"]; - } - 116 [label="Exit function test_5" style="filled" fillcolor=red]; - } - + 93 -> {99}; 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; - 100 -> {103 101}; - 101 -> {102}; + 100 -> {101}; + + subgraph cluster_32 { + color=red + 102 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_33 { + color=blue + 103 [label="Enter block"]; + subgraph cluster_34 { + color=blue + 104 [label="Enter when"]; + subgraph cluster_35 { + color=blue + 105 [label="Enter when branch condition "]; + subgraph cluster_36 { + color=blue + 106 [label="Enter &&"]; + 107 [label="Access variable R|/b|"]; + 108 [label="Exit left part of &&"]; + 109 [label="Enter right part of &&"]; + 110 [label="Const: Boolean(false)"]; + 111 [label="Exit &&"]; + } + 112 [label="Exit when branch condition"]; + } + subgraph cluster_37 { + color=blue + 113 [label="Enter when branch condition else"]; + 114 [label="Exit when branch condition"]; + } + 115 [label="Enter when branch result"]; + subgraph cluster_38 { + color=blue + 116 [label="Enter block"]; + 117 [label="Exit block"]; + } + 118 [label="Exit when branch result"]; + 119 [label="Enter when branch result"]; + subgraph cluster_39 { + color=blue + 120 [label="Enter block"]; + 121 [label="Const: Int(1)"]; + 122 [label="Exit block"]; + } + 123 [label="Exit when branch result"]; + 124 [label="Exit when"]; + } + 125 [label="Exit block"]; + } + 126 [label="Exit function test_5" style="filled" fillcolor=red]; + } + 102 -> {103}; 103 -> {104}; - 104 -> {105 109}; + 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {114}; + 108 -> {111 109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; + 112 -> {119 113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; - - subgraph cluster_40 { - color=red - 117 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_41 { - color=blue - 118 [label="Enter block"]; - subgraph cluster_42 { - color=blue - 119 [label="Enter when"]; - subgraph cluster_43 { - color=blue - 120 [label="Enter when branch condition "]; - subgraph cluster_44 { - color=blue - 121 [label="Enter &&"]; - 122 [label="Const: Boolean(false)"]; - 123 [label="Exit left part of &&"]; - 124 [label="Stub" style="filled" fillcolor=gray]; - 125 [label="Enter right part of &&" style="filled" fillcolor=gray]; - 126 [label="Access variable R|/b|" style="filled" fillcolor=gray]; - 127 [label="Exit &&"]; - } - 128 [label="Exit when branch condition"]; - } - subgraph cluster_45 { - color=blue - 129 [label="Enter block"]; - 130 [label="Const: Int(1)"]; - 131 [label="Exit block"]; - } - 132 [label="Exit when branch result"]; - subgraph cluster_46 { - color=blue - 133 [label="Enter when branch condition else"]; - 134 [label="Exit when branch condition"]; - } - subgraph cluster_47 { - color=blue - 135 [label="Enter block"]; - 136 [label="Exit block"]; - } - 137 [label="Exit when branch result"]; - 138 [label="Exit when"]; - } - 139 [label="Exit block"]; - } - 140 [label="Exit function test_6" style="filled" fillcolor=red]; - } - + 116 -> {117}; 117 -> {118}; - 118 -> {119}; + 118 -> {124}; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {127}; - 123 -> {124} [style=dotted]; - 124 -> {125} [style=dotted]; - 125 -> {126} [style=dotted]; - 126 -> {127} [style=dotted]; + 123 -> {124}; + 124 -> {125}; + 125 -> {126}; + + subgraph cluster_40 { + color=red + 127 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_41 { + color=blue + 128 [label="Enter block"]; + subgraph cluster_42 { + color=blue + 129 [label="Enter when"]; + subgraph cluster_43 { + color=blue + 130 [label="Enter when branch condition "]; + subgraph cluster_44 { + color=blue + 131 [label="Enter &&"]; + 132 [label="Const: Boolean(false)"]; + 133 [label="Exit left part of &&"]; + 134 [label="Stub" style="filled" fillcolor=gray]; + 135 [label="Enter right part of &&" style="filled" fillcolor=gray]; + 136 [label="Access variable R|/b|" style="filled" fillcolor=gray]; + 137 [label="Exit &&"]; + } + 138 [label="Exit when branch condition"]; + } + subgraph cluster_45 { + color=blue + 139 [label="Enter when branch condition else"]; + 140 [label="Exit when branch condition"]; + } + 141 [label="Enter when branch result"]; + subgraph cluster_46 { + color=blue + 142 [label="Enter block"]; + 143 [label="Exit block"]; + } + 144 [label="Exit when branch result"]; + 145 [label="Enter when branch result"]; + subgraph cluster_47 { + color=blue + 146 [label="Enter block"]; + 147 [label="Const: Int(1)"]; + 148 [label="Exit block"]; + } + 149 [label="Exit when branch result"]; + 150 [label="Exit when"]; + } + 151 [label="Exit block"]; + } + 152 [label="Exit function test_6" style="filled" fillcolor=red]; + } + 127 -> {128}; - 128 -> {129 133}; + 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; - 132 -> {138}; - 133 -> {134}; - 134 -> {135}; - 135 -> {136}; - 136 -> {137}; + 132 -> {133}; + 133 -> {137}; + 133 -> {134} [style=dotted]; + 134 -> {135} [style=dotted]; + 135 -> {136} [style=dotted]; + 136 -> {137} [style=dotted]; 137 -> {138}; - 138 -> {139}; + 138 -> {145 139}; 139 -> {140}; - - subgraph cluster_48 { - color=red - 141 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_49 { - color=blue - 142 [label="Enter block"]; - subgraph cluster_50 { - color=blue - 143 [label="Enter when"]; - subgraph cluster_51 { - color=blue - 144 [label="Enter when branch condition "]; - subgraph cluster_52 { - color=blue - 145 [label="Enter &&"]; - 146 [label="Access variable R|/b|"]; - 147 [label="Exit left part of &&"]; - 148 [label="Enter right part of &&"]; - 149 [label="Const: Boolean(true)"]; - 150 [label="Exit &&"]; - } - 151 [label="Exit when branch condition"]; - } - subgraph cluster_53 { - color=blue - 152 [label="Enter block"]; - 153 [label="Const: Int(1)"]; - 154 [label="Exit block"]; - } - 155 [label="Exit when branch result"]; - subgraph cluster_54 { - color=blue - 156 [label="Enter when branch condition else"]; - 157 [label="Exit when branch condition"]; - } - subgraph cluster_55 { - color=blue - 158 [label="Enter block"]; - 159 [label="Exit block"]; - } - 160 [label="Exit when branch result"]; - 161 [label="Exit when"]; - } - 162 [label="Exit block"]; - } - 163 [label="Exit function test_7" style="filled" fillcolor=red]; - } - + 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; - 144 -> {145}; + 144 -> {150}; 145 -> {146}; 146 -> {147}; - 147 -> {150 148}; + 147 -> {148}; 148 -> {149}; 149 -> {150}; 150 -> {151}; - 151 -> {152 156}; - 152 -> {153}; + 151 -> {152}; + + subgraph cluster_48 { + color=red + 153 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 154 [label="Enter block"]; + subgraph cluster_50 { + color=blue + 155 [label="Enter when"]; + subgraph cluster_51 { + color=blue + 156 [label="Enter when branch condition "]; + subgraph cluster_52 { + color=blue + 157 [label="Enter &&"]; + 158 [label="Access variable R|/b|"]; + 159 [label="Exit left part of &&"]; + 160 [label="Enter right part of &&"]; + 161 [label="Const: Boolean(true)"]; + 162 [label="Exit &&"]; + } + 163 [label="Exit when branch condition"]; + } + subgraph cluster_53 { + color=blue + 164 [label="Enter when branch condition else"]; + 165 [label="Exit when branch condition"]; + } + 166 [label="Enter when branch result"]; + subgraph cluster_54 { + color=blue + 167 [label="Enter block"]; + 168 [label="Exit block"]; + } + 169 [label="Exit when branch result"]; + 170 [label="Enter when branch result"]; + subgraph cluster_55 { + color=blue + 171 [label="Enter block"]; + 172 [label="Const: Int(1)"]; + 173 [label="Exit block"]; + } + 174 [label="Exit when branch result"]; + 175 [label="Exit when"]; + } + 176 [label="Exit block"]; + } + 177 [label="Exit function test_7" style="filled" fillcolor=red]; + } + 153 -> {154}; 154 -> {155}; - 155 -> {161}; + 155 -> {156}; 156 -> {157}; 157 -> {158}; 158 -> {159}; - 159 -> {160}; + 159 -> {162 160}; 160 -> {161}; 161 -> {162}; 162 -> {163}; - - subgraph cluster_56 { - color=red - 164 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_57 { - color=blue - 165 [label="Enter block"]; - subgraph cluster_58 { - color=blue - 166 [label="Enter when"]; - subgraph cluster_59 { - color=blue - 167 [label="Enter when branch condition "]; - subgraph cluster_60 { - color=blue - 168 [label="Enter &&"]; - 169 [label="Const: Boolean(true)"]; - 170 [label="Exit left part of &&"]; - 171 [label="Enter right part of &&"]; - 172 [label="Access variable R|/b|"]; - 173 [label="Stub" style="filled" fillcolor=gray]; - 174 [label="Exit &&"]; - } - 175 [label="Exit when branch condition"]; - } - subgraph cluster_61 { - color=blue - 176 [label="Enter block"]; - 177 [label="Const: Int(1)"]; - 178 [label="Exit block"]; - } - 179 [label="Exit when branch result"]; - subgraph cluster_62 { - color=blue - 180 [label="Enter when branch condition else"]; - 181 [label="Exit when branch condition"]; - } - subgraph cluster_63 { - color=blue - 182 [label="Enter block"]; - 183 [label="Exit block"]; - } - 184 [label="Exit when branch result"]; - 185 [label="Exit when"]; - } - 186 [label="Exit block"]; - } - 187 [label="Exit function test_8" style="filled" fillcolor=red]; - } - + 163 -> {170 164}; 164 -> {165}; 165 -> {166}; 166 -> {167}; 167 -> {168}; 168 -> {169}; - 169 -> {170}; + 169 -> {175}; 170 -> {171}; - 170 -> {173} [style=dotted]; 171 -> {172}; - 172 -> {174}; - 173 -> {174} [style=dotted]; + 172 -> {173}; + 173 -> {174}; 174 -> {175}; - 175 -> {176 180}; + 175 -> {176}; 176 -> {177}; - 177 -> {178}; + + subgraph cluster_56 { + color=red + 178 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_57 { + color=blue + 179 [label="Enter block"]; + subgraph cluster_58 { + color=blue + 180 [label="Enter when"]; + subgraph cluster_59 { + color=blue + 181 [label="Enter when branch condition "]; + subgraph cluster_60 { + color=blue + 182 [label="Enter &&"]; + 183 [label="Const: Boolean(true)"]; + 184 [label="Exit left part of &&"]; + 185 [label="Enter right part of &&"]; + 186 [label="Access variable R|/b|"]; + 187 [label="Stub" style="filled" fillcolor=gray]; + 188 [label="Exit &&"]; + } + 189 [label="Exit when branch condition"]; + } + subgraph cluster_61 { + color=blue + 190 [label="Enter when branch condition else"]; + 191 [label="Exit when branch condition"]; + } + 192 [label="Enter when branch result"]; + subgraph cluster_62 { + color=blue + 193 [label="Enter block"]; + 194 [label="Exit block"]; + } + 195 [label="Exit when branch result"]; + 196 [label="Enter when branch result"]; + subgraph cluster_63 { + color=blue + 197 [label="Enter block"]; + 198 [label="Const: Int(1)"]; + 199 [label="Exit block"]; + } + 200 [label="Exit when branch result"]; + 201 [label="Exit when"]; + } + 202 [label="Exit block"]; + } + 203 [label="Exit function test_8" style="filled" fillcolor=red]; + } + 178 -> {179}; - 179 -> {185}; + 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; 183 -> {184}; 184 -> {185}; + 184 -> {187} [style=dotted]; 185 -> {186}; - 186 -> {187}; + 186 -> {188}; + 187 -> {188} [style=dotted]; + 188 -> {189}; + 189 -> {196 190}; + 190 -> {191}; + 191 -> {192}; + 192 -> {193}; + 193 -> {194}; + 194 -> {195}; + 195 -> {201}; + 196 -> {197}; + 197 -> {198}; + 198 -> {199}; + 199 -> {200}; + 200 -> {201}; + 201 -> {202}; + 202 -> {203}; } diff --git a/compiler/fir/resolve/testData/resolve/cfg/jumps.dot b/compiler/fir/resolve/testData/resolve/cfg/jumps.dot index b325cb98245..24c8aafda6f 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/jumps.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/jumps.dot @@ -22,33 +22,35 @@ digraph jumps_kt { } subgraph cluster_4 { color=blue - 8 [label="Enter block"]; - 9 [label="Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"]; - 10 [label="Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"]; - 11 [label="Stub" style="filled" fillcolor=gray]; - 12 [label="Exit block" style="filled" fillcolor=gray]; + 8 [label="Enter when branch condition else"]; + 9 [label="Exit when branch condition"]; } - 13 [label="Exit when branch result" style="filled" fillcolor=gray]; + 10 [label="Enter when branch result"]; subgraph cluster_5 { color=blue - 14 [label="Enter when branch condition else"]; - 15 [label="Exit when branch condition"]; + 11 [label="Enter block"]; + 12 [label="Access variable R|/x|"]; + 13 [label="Exit block"]; } + 14 [label="Exit when branch result"]; + 15 [label="Enter when branch result"]; subgraph cluster_6 { color=blue 16 [label="Enter block"]; - 17 [label="Access variable R|/x|"]; - 18 [label="Exit block"]; + 17 [label="Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"]; + 18 [label="Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"]; + 19 [label="Stub" style="filled" fillcolor=gray]; + 20 [label="Exit block" style="filled" fillcolor=gray]; } - 19 [label="Exit when branch result"]; - 20 [label="Exit when"]; + 21 [label="Exit when branch result" style="filled" fillcolor=gray]; + 22 [label="Exit when"]; } - 21 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 22 [label="Access variable R|/y|"]; - 23 [label="Function call: R|/y|.R|kotlin/Int.inc|()"]; - 24 [label="Exit block"]; + 23 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 24 [label="Access variable R|/y|"]; + 25 [label="Function call: R|/y|.R|kotlin/Int.inc|()"]; + 26 [label="Exit block"]; } - 25 [label="Exit function test_1" style="filled" fillcolor=red]; + 27 [label="Exit function test_1" style="filled" fillcolor=red]; } 0 -> {1}; @@ -58,362 +60,372 @@ digraph jumps_kt { 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8 14}; + 7 -> {15 8}; 8 -> {9}; 9 -> {10}; - 10 -> {25}; - 10 -> {11} [style=dotted]; - 11 -> {12} [style=dotted]; - 12 -> {13} [style=dotted]; - 13 -> {20} [style=dotted]; - 14 -> {15}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; + 13 -> {14}; + 14 -> {22}; 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {19}; - 19 -> {20}; - 20 -> {21}; - 21 -> {22}; + 18 -> {27}; + 18 -> {19} [style=dotted]; + 19 -> {20} [style=dotted]; + 20 -> {21} [style=dotted]; + 21 -> {22} [style=dotted]; 22 -> {23}; 23 -> {24}; 24 -> {25}; + 25 -> {26}; + 26 -> {27}; subgraph cluster_7 { color=red - 26 [label="Enter function test_2" style="filled" fillcolor=red]; + 28 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 27 [label="Enter block"]; + 29 [label="Enter block"]; subgraph cluster_9 { color=blue - 28 [label="Enter when"]; + 30 [label="Enter when"]; subgraph cluster_10 { color=blue - 29 [label="Enter when branch condition "]; - 30 [label="Access variable R|/x|"]; - 31 [label="Const: Null(null)"]; - 32 [label="Operator =="]; - 33 [label="Exit when branch condition"]; + 31 [label="Enter when branch condition "]; + 32 [label="Access variable R|/x|"]; + 33 [label="Const: Null(null)"]; + 34 [label="Operator =="]; + 35 [label="Exit when branch condition"]; } subgraph cluster_11 { color=blue - 34 [label="Enter block"]; - 35 [label="Access variable R|/x|"]; - 36 [label="Exit block"]; + 36 [label="Enter when branch condition else"]; + 37 [label="Exit when branch condition"]; } - 37 [label="Exit when branch result"]; + 38 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 38 [label="Enter when branch condition else"]; - 39 [label="Exit when branch condition"]; + 39 [label="Enter block"]; + 40 [label="Access variable R|/x|"]; + 41 [label="Exit block"]; } + 42 [label="Exit when branch result"]; + 43 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 40 [label="Enter block"]; - 41 [label="Access variable R|/x|"]; - 42 [label="Exit block"]; + 44 [label="Enter block"]; + 45 [label="Access variable R|/x|"]; + 46 [label="Exit block"]; } - 43 [label="Exit when branch result"]; - 44 [label="Exit when"]; + 47 [label="Exit when branch result"]; + 48 [label="Exit when"]; } - 45 [label="Variable declaration: lval y: R|kotlin/Int?|"]; - 46 [label="Access variable R|/y|"]; - 47 [label="Function call: R|/y|.#()"]; - 48 [label="Exit block"]; + 49 [label="Variable declaration: lval y: R|kotlin/Int?|"]; + 50 [label="Access variable R|/y|"]; + 51 [label="Function call: R|/y|.#()"]; + 52 [label="Exit block"]; } - 49 [label="Exit function test_2" style="filled" fillcolor=red]; + 53 [label="Exit function test_2" style="filled" fillcolor=red]; } - 26 -> {27}; - 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {34 38}; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {43 36}; 36 -> {37}; - 37 -> {44}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43}; + 42 -> {48}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - - subgraph cluster_14 { - color=red - 50 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 51 [label="Enter block"]; - subgraph cluster_16 { - color=blue - 52 [label="Enter while loop"]; - subgraph cluster_17 { - color=blue - 53 [label="Enter loop condition"]; - 54 [label="Const: Boolean(true)"]; - 55 [label="Exit loop condition"]; - } - subgraph cluster_18 { - color=blue - 56 [label="Enter loop block"]; - subgraph cluster_19 { - color=blue - 57 [label="Enter block"]; - 58 [label="Access variable R|/x|"]; - 59 [label="Type operator: x as Int"]; - 60 [label="Jump: break@@@[Boolean(true)] "]; - 61 [label="Stub" style="filled" fillcolor=gray]; - 62 [label="Exit block" style="filled" fillcolor=gray]; - } - 63 [label="Exit loop block" style="filled" fillcolor=gray]; - } - 64 [label="Stub" style="filled" fillcolor=gray]; - 65 [label="Exit whileloop"]; - } - 66 [label="Access variable R|/x|"]; - 67 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 68 [label="Exit block"]; - } - 69 [label="Exit function test_3" style="filled" fillcolor=red]; - } - + 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; - 53 -> {54}; + + subgraph cluster_14 { + color=red + 54 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 55 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 56 [label="Enter while loop"]; + subgraph cluster_17 { + color=blue + 57 [label="Enter loop condition"]; + 58 [label="Const: Boolean(true)"]; + 59 [label="Exit loop condition"]; + } + subgraph cluster_18 { + color=blue + 60 [label="Enter loop block"]; + subgraph cluster_19 { + color=blue + 61 [label="Enter block"]; + 62 [label="Access variable R|/x|"]; + 63 [label="Type operator: x as Int"]; + 64 [label="Jump: break@@@[Boolean(true)] "]; + 65 [label="Stub" style="filled" fillcolor=gray]; + 66 [label="Exit block" style="filled" fillcolor=gray]; + } + 67 [label="Exit loop block" style="filled" fillcolor=gray]; + } + 68 [label="Stub" style="filled" fillcolor=gray]; + 69 [label="Exit whileloop"]; + } + 70 [label="Access variable R|/x|"]; + 71 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 72 [label="Exit block"]; + } + 73 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 54 -> {55}; 55 -> {56}; - 55 -> {64} [style=dotted]; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {65}; - 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; - 62 -> {63} [style=dotted]; - 63 -> {53} [style=dotted]; + 59 -> {68} [style=dotted]; + 60 -> {61}; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; + 64 -> {69}; 64 -> {65} [style=dotted]; - 65 -> {66}; - 66 -> {67}; - 67 -> {68}; - 68 -> {69}; - - subgraph cluster_20 { - color=red - 70 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 71 [label="Enter block"]; - subgraph cluster_22 { - color=blue - 72 [label="Enter do-while loop"]; - subgraph cluster_23 { - color=blue - 73 [label="Enter loop block"]; - subgraph cluster_24 { - color=blue - 74 [label="Enter block"]; - 75 [label="Access variable R|/x|"]; - 76 [label="Type operator: x as Int"]; - 77 [label="Jump: break@@@[Boolean(true)] "]; - 78 [label="Stub" style="filled" fillcolor=gray]; - 79 [label="Exit block" style="filled" fillcolor=gray]; - } - 80 [label="Exit loop block" style="filled" fillcolor=gray]; - } - subgraph cluster_25 { - color=blue - 81 [label="Enter loop condition" style="filled" fillcolor=gray]; - 82 [label="Const: Boolean(true)" style="filled" fillcolor=gray]; - 83 [label="Exit loop condition" style="filled" fillcolor=gray]; - } - 84 [label="Stub" style="filled" fillcolor=gray]; - 85 [label="Exit do-whileloop"]; - } - 86 [label="Access variable R|/x|"]; - 87 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 88 [label="Exit block"]; - } - 89 [label="Exit function test_4" style="filled" fillcolor=red]; - } - + 65 -> {66} [style=dotted]; + 66 -> {67} [style=dotted]; + 67 -> {57} [style=dotted]; + 68 -> {69} [style=dotted]; + 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {74}; + + subgraph cluster_20 { + color=red + 74 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 75 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 76 [label="Enter do-while loop"]; + subgraph cluster_23 { + color=blue + 77 [label="Enter loop block"]; + subgraph cluster_24 { + color=blue + 78 [label="Enter block"]; + 79 [label="Access variable R|/x|"]; + 80 [label="Type operator: x as Int"]; + 81 [label="Jump: break@@@[Boolean(true)] "]; + 82 [label="Stub" style="filled" fillcolor=gray]; + 83 [label="Exit block" style="filled" fillcolor=gray]; + } + 84 [label="Exit loop block" style="filled" fillcolor=gray]; + } + subgraph cluster_25 { + color=blue + 85 [label="Enter loop condition" style="filled" fillcolor=gray]; + 86 [label="Const: Boolean(true)" style="filled" fillcolor=gray]; + 87 [label="Exit loop condition" style="filled" fillcolor=gray]; + } + 88 [label="Stub" style="filled" fillcolor=gray]; + 89 [label="Exit do-whileloop"]; + } + 90 [label="Access variable R|/x|"]; + 91 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 92 [label="Exit block"]; + } + 93 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {85}; - 77 -> {78} [style=dotted]; - 78 -> {79} [style=dotted]; - 79 -> {80} [style=dotted]; - 80 -> {81} [style=dotted]; + 77 -> {78}; + 78 -> {79}; + 79 -> {80}; + 80 -> {81}; + 81 -> {89}; 81 -> {82} [style=dotted]; 82 -> {83} [style=dotted]; - 83 -> {73 84} [style=dotted]; + 83 -> {84} [style=dotted]; 84 -> {85} [style=dotted]; - 85 -> {86}; - 86 -> {87}; - 87 -> {88}; - 88 -> {89}; + 85 -> {86} [style=dotted]; + 86 -> {87} [style=dotted]; + 87 -> {77 88} [style=dotted]; + 88 -> {89} [style=dotted]; + 89 -> {90}; + 90 -> {91}; + 91 -> {92}; + 92 -> {93}; subgraph cluster_26 { color=red - 90 [label="Enter function test_5" style="filled" fillcolor=red]; + 94 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_27 { color=blue - 91 [label="Enter block"]; + 95 [label="Enter block"]; subgraph cluster_28 { color=blue - 92 [label="Enter while loop"]; + 96 [label="Enter while loop"]; subgraph cluster_29 { color=blue - 93 [label="Enter loop condition"]; - 94 [label="Access variable R|/b|"]; - 95 [label="Exit loop condition"]; + 97 [label="Enter loop condition"]; + 98 [label="Access variable R|/b|"]; + 99 [label="Exit loop condition"]; } subgraph cluster_30 { color=blue - 96 [label="Enter loop block"]; + 100 [label="Enter loop block"]; subgraph cluster_31 { color=blue - 97 [label="Enter block"]; + 101 [label="Enter block"]; subgraph cluster_32 { color=blue - 98 [label="Enter when"]; + 102 [label="Enter when"]; subgraph cluster_33 { color=blue - 99 [label="Enter when branch condition "]; - 100 [label="Access variable R|/b|"]; - 101 [label="Exit when branch condition"]; + 103 [label="Enter when branch condition "]; + 104 [label="Access variable R|/b|"]; + 105 [label="Exit when branch condition"]; } subgraph cluster_34 { color=blue - 102 [label="Enter block"]; - 103 [label="Jump: continue@@@[R|/b|] "]; - 104 [label="Stub" style="filled" fillcolor=gray]; - 105 [label="Exit block" style="filled" fillcolor=gray]; + 106 [label="Enter when branch condition else"]; + 107 [label="Exit when branch condition"]; } - 106 [label="Exit when branch result" style="filled" fillcolor=gray]; + 108 [label="Enter when branch result"]; subgraph cluster_35 { - color=blue - 107 [label="Enter when branch condition else"]; - 108 [label="Exit when branch condition"]; - } - subgraph cluster_36 { color=blue 109 [label="Enter block"]; 110 [label="Exit block"]; } 111 [label="Exit when branch result"]; - 112 [label="Exit when"]; + 112 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 113 [label="Enter block"]; + 114 [label="Jump: continue@@@[R|/b|] "]; + 115 [label="Stub" style="filled" fillcolor=gray]; + 116 [label="Exit block" style="filled" fillcolor=gray]; + } + 117 [label="Exit when branch result" style="filled" fillcolor=gray]; + 118 [label="Exit when"]; } - 113 [label="Exit block"]; + 119 [label="Exit block"]; } - 114 [label="Exit loop block"]; + 120 [label="Exit loop block"]; } - 115 [label="Exit whileloop"]; + 121 [label="Exit whileloop"]; } - 116 [label="Exit block"]; + 122 [label="Exit block"]; } - 117 [label="Exit function test_5" style="filled" fillcolor=red]; + 123 [label="Exit function test_5" style="filled" fillcolor=red]; } - 90 -> {91}; - 91 -> {92}; - 92 -> {93}; - 93 -> {94}; 94 -> {95}; - 95 -> {115 96}; + 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; - 99 -> {100}; + 99 -> {121 100}; 100 -> {101}; - 101 -> {102 107}; + 101 -> {102}; 102 -> {103}; - 103 -> {92}; - 103 -> {104} [style=dotted]; - 104 -> {105} [style=dotted]; - 105 -> {106} [style=dotted]; - 106 -> {112} [style=dotted]; + 103 -> {104}; + 104 -> {105}; + 105 -> {112 106}; + 106 -> {107}; 107 -> {108}; 108 -> {109}; 109 -> {110}; 110 -> {111}; - 111 -> {112}; + 111 -> {118}; 112 -> {113}; 113 -> {114}; - 114 -> {93}; - 115 -> {116}; - 116 -> {117}; + 114 -> {96}; + 114 -> {115} [style=dotted]; + 115 -> {116} [style=dotted]; + 116 -> {117} [style=dotted]; + 117 -> {118} [style=dotted]; + 118 -> {119}; + 119 -> {120}; + 120 -> {97}; + 121 -> {122}; + 122 -> {123}; subgraph cluster_37 { color=red - 118 [label="Enter function run" style="filled" fillcolor=red]; + 124 [label="Enter function run" style="filled" fillcolor=red]; subgraph cluster_38 { color=blue - 119 [label="Enter block"]; - 120 [label="Function call: R|/block|.R|FakeOverride|()"]; - 121 [label="Exit block"]; + 125 [label="Enter block"]; + 126 [label="Function call: R|/block|.R|FakeOverride|()"]; + 127 [label="Exit block"]; } - 122 [label="Exit function run" style="filled" fillcolor=red]; + 128 [label="Exit function run" style="filled" fillcolor=red]; } - 118 -> {119}; - 119 -> {120}; - 120 -> {121}; - 121 -> {122}; - - subgraph cluster_39 { - color=red - 123 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_40 { - color=blue - 124 [label="Enter block"]; - subgraph cluster_41 { - color=blue - 125 [label="Enter function anonymousFunction"]; - subgraph cluster_42 { - color=blue - 126 [label="Enter block"]; - 127 [label="Jump: ^@run Unit"]; - 128 [label="Stub" style="filled" fillcolor=gray]; - 129 [label="Exit block" style="filled" fillcolor=gray]; - } - 130 [label="Exit function anonymousFunction"]; - } - 131 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { - ^@run Unit -} -)"]; - 132 [label="Exit block"]; - } - 133 [label="Exit function test_6" style="filled" fillcolor=red]; - } - - 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {130}; - 127 -> {128} [style=dotted]; - 128 -> {129} [style=dotted]; - 129 -> {130} [style=dotted]; + 127 -> {128}; + + subgraph cluster_39 { + color=red + 129 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_40 { + color=blue + 130 [label="Enter block"]; + subgraph cluster_41 { + color=blue + 131 [label="Enter function anonymousFunction"]; + subgraph cluster_42 { + color=blue + 132 [label="Enter block"]; + 133 [label="Jump: ^@run Unit"]; + 134 [label="Stub" style="filled" fillcolor=gray]; + 135 [label="Exit block" style="filled" fillcolor=gray]; + } + 136 [label="Exit function anonymousFunction"]; + } + 137 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { + ^@run Unit +} +)"]; + 138 [label="Exit block"]; + } + 139 [label="Exit function test_6" style="filled" fillcolor=red]; + } + + 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; + 133 -> {136}; + 133 -> {134} [style=dotted]; + 134 -> {135} [style=dotted]; + 135 -> {136} [style=dotted]; + 136 -> {137}; + 137 -> {138}; + 138 -> {139}; } diff --git a/compiler/fir/resolve/testData/resolve/cfg/lambdas.dot b/compiler/fir/resolve/testData/resolve/cfg/lambdas.dot index a6fc5f5b642..d629520d52d 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/lambdas.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/lambdas.dot @@ -38,42 +38,44 @@ digraph lambdas_kt { } subgraph cluster_6 { color=blue - 12 [label="Enter block"]; - subgraph cluster_7 { + 12 [label="Enter when branch condition else"]; + 13 [label="Exit when branch condition"]; + } + 14 [label="Enter when branch result"]; + subgraph cluster_7 { + color=blue + 15 [label="Enter block"]; + 16 [label="Exit block"]; + } + 17 [label="Exit when branch result"]; + 18 [label="Enter when branch result"]; + subgraph cluster_8 { + color=blue + 19 [label="Enter block"]; + subgraph cluster_9 { color=blue - 13 [label="Enter function anonymousFunction"]; - subgraph cluster_8 { + 20 [label="Enter function anonymousFunction"]; + subgraph cluster_10 { color=blue - 14 [label="Enter block"]; - 15 [label="Access variable R|/x|"]; - 16 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 17 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Access variable R|/x|"]; + 23 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 24 [label="Exit block"]; } - 18 [label="Exit function anonymousFunction"]; + 25 [label="Exit function anonymousFunction"]; } - 19 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { + 26 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { R|/x|.R|kotlin/Int.inc|() } )"]; - 20 [label="Exit block"]; + 27 [label="Exit block"]; } - 21 [label="Exit when branch result"]; - subgraph cluster_9 { - color=blue - 22 [label="Enter when branch condition else"]; - 23 [label="Exit when branch condition"]; - } - subgraph cluster_10 { - color=blue - 24 [label="Enter block"]; - 25 [label="Exit block"]; - } - 26 [label="Exit when branch result"]; - 27 [label="Exit when"]; + 28 [label="Exit when branch result"]; + 29 [label="Exit when"]; } - 28 [label="Exit block"]; + 30 [label="Exit block"]; } - 29 [label="Exit function test_1" style="filled" fillcolor=red]; + 31 [label="Exit function test_1" style="filled" fillcolor=red]; } 5 -> {6}; @@ -82,17 +84,17 @@ digraph lambdas_kt { 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {12 22}; + 11 -> {18 12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {18}; + 17 -> {29}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {27}; + 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; @@ -100,84 +102,90 @@ digraph lambdas_kt { 26 -> {27}; 27 -> {28}; 28 -> {29}; + 29 -> {30}; + 30 -> {31}; subgraph cluster_11 { color=red - 30 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 32 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 31 [label="Enter block"]; - 32 [label="Access variable R|/x|"]; - 33 [label="Function call: R|/x|.#()"]; - 34 [label="Exit block"]; + 33 [label="Enter block"]; + 34 [label="Access variable R|/x|"]; + 35 [label="Function call: R|/x|.#()"]; + 36 [label="Exit block"]; } - 35 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 37 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 30 -> {31}; - 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; + 35 -> {36}; + 36 -> {37}; subgraph cluster_13 { color=red - 36 [label="Enter function test_2" style="filled" fillcolor=red]; + 38 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 37 [label="Enter block"]; + 39 [label="Enter block"]; subgraph cluster_15 { color=blue - 38 [label="Enter when"]; + 40 [label="Enter when"]; subgraph cluster_16 { color=blue - 39 [label="Enter when branch condition "]; - 40 [label="Access variable R|/x|"]; - 41 [label="Type operator: x is Int"]; - 42 [label="Exit when branch condition"]; + 41 [label="Enter when branch condition "]; + 42 [label="Access variable R|/x|"]; + 43 [label="Type operator: x is Int"]; + 44 [label="Exit when branch condition"]; } subgraph cluster_17 { color=blue - 43 [label="Enter block"]; - 44 [label="Variable declaration: lval lambda: R|kotlin/Function0|"]; - 45 [label="Exit block"]; + 45 [label="Enter when branch condition else"]; + 46 [label="Exit when branch condition"]; } - 46 [label="Exit when branch result"]; + 47 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 47 [label="Enter when branch condition else"]; - 48 [label="Exit when branch condition"]; + 48 [label="Enter block"]; + 49 [label="Exit block"]; } + 50 [label="Exit when branch result"]; + 51 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 49 [label="Enter block"]; - 50 [label="Exit block"]; + 52 [label="Enter block"]; + 53 [label="Variable declaration: lval lambda: R|kotlin/Function0|"]; + 54 [label="Exit block"]; } - 51 [label="Exit when branch result"]; - 52 [label="Exit when"]; + 55 [label="Exit when branch result"]; + 56 [label="Exit when"]; } - 53 [label="Exit block"]; + 57 [label="Exit block"]; } - 54 [label="Exit function test_2" style="filled" fillcolor=red]; + 58 [label="Exit function test_2" style="filled" fillcolor=red]; } - 36 -> {37}; - 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43 47}; + 42 -> {43}; 43 -> {44}; - 44 -> {45}; + 44 -> {51 45}; 45 -> {46}; - 46 -> {52}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {56}; 51 -> {52}; 52 -> {53}; 53 -> {54}; + 54 -> {55}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; } diff --git a/compiler/fir/resolve/testData/resolve/cfg/loops.dot b/compiler/fir/resolve/testData/resolve/cfg/loops.dot index 8edeb76de3c..6fb2f28e759 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/loops.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/loops.dot @@ -274,36 +274,38 @@ digraph loops_kt { } subgraph cluster_32 { color=blue - 93 [label="Enter block"]; - 94 [label="Jump: break@@@[Boolean(true)] "]; - 95 [label="Stub" style="filled" fillcolor=gray]; - 96 [label="Exit block" style="filled" fillcolor=gray]; + 93 [label="Enter when branch condition else"]; + 94 [label="Exit when branch condition"]; } - 97 [label="Exit when branch result" style="filled" fillcolor=gray]; + 95 [label="Enter when branch result"]; subgraph cluster_33 { color=blue - 98 [label="Enter when branch condition else"]; - 99 [label="Exit when branch condition"]; + 96 [label="Enter block"]; + 97 [label="Exit block"]; } + 98 [label="Exit when branch result"]; + 99 [label="Enter when branch result"]; subgraph cluster_34 { color=blue 100 [label="Enter block"]; - 101 [label="Exit block"]; + 101 [label="Jump: break@@@[Boolean(true)] "]; + 102 [label="Stub" style="filled" fillcolor=gray]; + 103 [label="Exit block" style="filled" fillcolor=gray]; } - 102 [label="Exit when branch result"]; - 103 [label="Exit when"]; + 104 [label="Exit when branch result" style="filled" fillcolor=gray]; + 105 [label="Exit when"]; } - 104 [label="Exit block"]; + 106 [label="Exit block"]; } - 105 [label="Exit loop block"]; + 107 [label="Exit loop block"]; } - 106 [label="Stub" style="filled" fillcolor=gray]; - 107 [label="Exit whileloop"]; + 108 [label="Stub" style="filled" fillcolor=gray]; + 109 [label="Exit whileloop"]; } - 108 [label="Const: Int(1)"]; - 109 [label="Exit block"]; + 110 [label="Const: Int(1)"]; + 111 [label="Exit block"]; } - 110 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red]; + 112 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red]; } 81 -> {82}; @@ -312,121 +314,121 @@ digraph loops_kt { 84 -> {85}; 85 -> {86}; 86 -> {87}; - 86 -> {106} [style=dotted]; + 86 -> {108} [style=dotted]; 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; - 92 -> {93 98}; + 92 -> {99 93}; 93 -> {94}; - 94 -> {107}; - 94 -> {95} [style=dotted]; - 95 -> {96} [style=dotted]; - 96 -> {97} [style=dotted]; - 97 -> {103} [style=dotted]; - 98 -> {99}; + 94 -> {95}; + 95 -> {96}; + 96 -> {97}; + 97 -> {98}; + 98 -> {105}; 99 -> {100}; 100 -> {101}; - 101 -> {102}; - 102 -> {103}; - 103 -> {104}; - 104 -> {105}; - 105 -> {84}; - 106 -> {107} [style=dotted]; - 107 -> {108}; - 108 -> {109}; + 101 -> {109}; + 101 -> {102} [style=dotted]; + 102 -> {103} [style=dotted]; + 103 -> {104} [style=dotted]; + 104 -> {105} [style=dotted]; + 105 -> {106}; + 106 -> {107}; + 107 -> {84}; + 108 -> {109} [style=dotted]; 109 -> {110}; + 110 -> {111}; + 111 -> {112}; subgraph cluster_35 { color=red - 111 [label="Enter function testWhileFalse" style="filled" fillcolor=red]; + 113 [label="Enter function testWhileFalse" style="filled" fillcolor=red]; subgraph cluster_36 { color=blue - 112 [label="Enter block"]; + 114 [label="Enter block"]; subgraph cluster_37 { color=blue - 113 [label="Enter while loop"]; + 115 [label="Enter while loop"]; subgraph cluster_38 { color=blue - 114 [label="Enter loop condition"]; - 115 [label="Const: Boolean(false)"]; - 116 [label="Exit loop condition"]; + 116 [label="Enter loop condition"]; + 117 [label="Const: Boolean(false)"]; + 118 [label="Exit loop condition"]; } - 117 [label="Stub" style="filled" fillcolor=gray]; + 119 [label="Stub" style="filled" fillcolor=gray]; subgraph cluster_39 { color=blue - 118 [label="Enter loop block" style="filled" fillcolor=gray]; + 120 [label="Enter loop block" style="filled" fillcolor=gray]; subgraph cluster_40 { color=blue - 119 [label="Enter block" style="filled" fillcolor=gray]; - 120 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 121 [label="Exit block" style="filled" fillcolor=gray]; + 121 [label="Enter block" style="filled" fillcolor=gray]; + 122 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 123 [label="Exit block" style="filled" fillcolor=gray]; } - 122 [label="Exit loop block" style="filled" fillcolor=gray]; + 124 [label="Exit loop block" style="filled" fillcolor=gray]; } - 123 [label="Exit whileloop"]; + 125 [label="Exit whileloop"]; } - 124 [label="Const: Int(1)"]; - 125 [label="Exit block"]; + 126 [label="Const: Int(1)"]; + 127 [label="Exit block"]; } - 126 [label="Exit function testWhileFalse" style="filled" fillcolor=red]; + 128 [label="Exit function testWhileFalse" style="filled" fillcolor=red]; } - 111 -> {112}; - 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; - 116 -> {123}; - 116 -> {117} [style=dotted]; - 117 -> {118} [style=dotted]; + 116 -> {117}; + 117 -> {118}; + 118 -> {125}; 118 -> {119} [style=dotted]; 119 -> {120} [style=dotted]; 120 -> {121} [style=dotted]; 121 -> {122} [style=dotted]; - 122 -> {114} [style=dotted]; - 123 -> {124}; - 124 -> {125}; + 122 -> {123} [style=dotted]; + 123 -> {124} [style=dotted]; + 124 -> {116} [style=dotted]; 125 -> {126}; + 126 -> {127}; + 127 -> {128}; subgraph cluster_41 { color=red - 127 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red]; + 129 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red]; subgraph cluster_42 { color=blue - 128 [label="Enter block"]; + 130 [label="Enter block"]; subgraph cluster_43 { color=blue - 129 [label="Enter do-while loop"]; + 131 [label="Enter do-while loop"]; subgraph cluster_44 { color=blue - 130 [label="Enter loop block"]; + 132 [label="Enter loop block"]; subgraph cluster_45 { color=blue - 131 [label="Enter block"]; - 132 [label="Const: Int(1)"]; - 133 [label="Exit block"]; + 133 [label="Enter block"]; + 134 [label="Const: Int(1)"]; + 135 [label="Exit block"]; } - 134 [label="Exit loop block"]; + 136 [label="Exit loop block"]; } subgraph cluster_46 { color=blue - 135 [label="Enter loop condition"]; - 136 [label="Const: Boolean(true)"]; - 137 [label="Exit loop condition"]; + 137 [label="Enter loop condition"]; + 138 [label="Const: Boolean(true)"]; + 139 [label="Exit loop condition"]; } - 138 [label="Stub" style="filled" fillcolor=gray]; - 139 [label="Exit do-whileloop" style="filled" fillcolor=gray]; + 140 [label="Stub" style="filled" fillcolor=gray]; + 141 [label="Exit do-whileloop" style="filled" fillcolor=gray]; } - 140 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 141 [label="Exit block" style="filled" fillcolor=gray]; + 142 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 143 [label="Exit block" style="filled" fillcolor=gray]; } - 142 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray]; + 144 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray]; } - 127 -> {128}; - 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; @@ -435,148 +437,150 @@ digraph loops_kt { 134 -> {135}; 135 -> {136}; 136 -> {137}; - 137 -> {130}; - 137 -> {138} [style=dotted]; - 138 -> {139} [style=dotted]; + 137 -> {138}; + 138 -> {139}; + 139 -> {132}; 139 -> {140} [style=dotted]; 140 -> {141} [style=dotted]; 141 -> {142} [style=dotted]; + 142 -> {143} [style=dotted]; + 143 -> {144} [style=dotted]; subgraph cluster_47 { color=red - 143 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; + 145 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; subgraph cluster_48 { color=blue - 144 [label="Enter block"]; + 146 [label="Enter block"]; subgraph cluster_49 { color=blue - 145 [label="Enter do-while loop"]; + 147 [label="Enter do-while loop"]; subgraph cluster_50 { color=blue - 146 [label="Enter loop block"]; + 148 [label="Enter loop block"]; subgraph cluster_51 { color=blue - 147 [label="Enter block"]; + 149 [label="Enter block"]; subgraph cluster_52 { color=blue - 148 [label="Enter when"]; + 150 [label="Enter when"]; subgraph cluster_53 { color=blue - 149 [label="Enter when branch condition "]; - 150 [label="Access variable R|/b|"]; - 151 [label="Exit when branch condition"]; + 151 [label="Enter when branch condition "]; + 152 [label="Access variable R|/b|"]; + 153 [label="Exit when branch condition"]; } subgraph cluster_54 { color=blue - 152 [label="Enter block"]; - 153 [label="Jump: break@@@[Boolean(true)] "]; - 154 [label="Stub" style="filled" fillcolor=gray]; - 155 [label="Exit block" style="filled" fillcolor=gray]; + 154 [label="Enter when branch condition else"]; + 155 [label="Exit when branch condition"]; } - 156 [label="Exit when branch result" style="filled" fillcolor=gray]; + 156 [label="Enter when branch result"]; subgraph cluster_55 { color=blue - 157 [label="Enter when branch condition else"]; - 158 [label="Exit when branch condition"]; + 157 [label="Enter block"]; + 158 [label="Exit block"]; } + 159 [label="Exit when branch result"]; + 160 [label="Enter when branch result"]; subgraph cluster_56 { color=blue - 159 [label="Enter block"]; - 160 [label="Exit block"]; + 161 [label="Enter block"]; + 162 [label="Jump: break@@@[Boolean(true)] "]; + 163 [label="Stub" style="filled" fillcolor=gray]; + 164 [label="Exit block" style="filled" fillcolor=gray]; } - 161 [label="Exit when branch result"]; - 162 [label="Exit when"]; + 165 [label="Exit when branch result" style="filled" fillcolor=gray]; + 166 [label="Exit when"]; } - 163 [label="Exit block"]; + 167 [label="Exit block"]; } - 164 [label="Exit loop block"]; + 168 [label="Exit loop block"]; } subgraph cluster_57 { color=blue - 165 [label="Enter loop condition"]; - 166 [label="Const: Boolean(true)"]; - 167 [label="Exit loop condition"]; + 169 [label="Enter loop condition"]; + 170 [label="Const: Boolean(true)"]; + 171 [label="Exit loop condition"]; } - 168 [label="Stub" style="filled" fillcolor=gray]; - 169 [label="Exit do-whileloop"]; + 172 [label="Stub" style="filled" fillcolor=gray]; + 173 [label="Exit do-whileloop"]; } - 170 [label="Const: Int(1)"]; - 171 [label="Exit block"]; + 174 [label="Const: Int(1)"]; + 175 [label="Exit block"]; } - 172 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; + 176 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; } - 143 -> {144}; - 144 -> {145}; 145 -> {146}; 146 -> {147}; 147 -> {148}; 148 -> {149}; 149 -> {150}; 150 -> {151}; - 151 -> {152 157}; + 151 -> {152}; 152 -> {153}; - 153 -> {169}; - 153 -> {154} [style=dotted]; - 154 -> {155} [style=dotted]; - 155 -> {156} [style=dotted]; - 156 -> {162} [style=dotted]; + 153 -> {160 154}; + 154 -> {155}; + 155 -> {156}; + 156 -> {157}; 157 -> {158}; 158 -> {159}; - 159 -> {160}; + 159 -> {166}; 160 -> {161}; 161 -> {162}; - 162 -> {163}; - 163 -> {164}; - 164 -> {165}; - 165 -> {166}; + 162 -> {173}; + 162 -> {163} [style=dotted]; + 163 -> {164} [style=dotted]; + 164 -> {165} [style=dotted]; + 165 -> {166} [style=dotted]; 166 -> {167}; - 167 -> {146}; - 167 -> {168} [style=dotted]; - 168 -> {169} [style=dotted]; + 167 -> {168}; + 168 -> {169}; 169 -> {170}; 170 -> {171}; - 171 -> {172}; - - subgraph cluster_58 { - color=red - 173 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red]; - subgraph cluster_59 { - color=blue - 174 [label="Enter block"]; - subgraph cluster_60 { - color=blue - 175 [label="Enter do-while loop"]; - subgraph cluster_61 { - color=blue - 176 [label="Enter loop block"]; - subgraph cluster_62 { - color=blue - 177 [label="Enter block"]; - 178 [label="Const: Int(1)"]; - 179 [label="Exit block"]; - } - 180 [label="Exit loop block"]; - } - subgraph cluster_63 { - color=blue - 181 [label="Enter loop condition"]; - 182 [label="Const: Boolean(false)"]; - 183 [label="Exit loop condition"]; - } - 184 [label="Exit do-whileloop"]; - } - 185 [label="Const: Int(1)"]; - 186 [label="Exit block"]; - } - 187 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red]; - } - 188 [label="Stub" style="filled" fillcolor=gray]; - + 171 -> {148}; + 171 -> {172} [style=dotted]; + 172 -> {173} [style=dotted]; 173 -> {174}; 174 -> {175}; 175 -> {176}; - 176 -> {177}; + + subgraph cluster_58 { + color=red + 177 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red]; + subgraph cluster_59 { + color=blue + 178 [label="Enter block"]; + subgraph cluster_60 { + color=blue + 179 [label="Enter do-while loop"]; + subgraph cluster_61 { + color=blue + 180 [label="Enter loop block"]; + subgraph cluster_62 { + color=blue + 181 [label="Enter block"]; + 182 [label="Const: Int(1)"]; + 183 [label="Exit block"]; + } + 184 [label="Exit loop block"]; + } + subgraph cluster_63 { + color=blue + 185 [label="Enter loop condition"]; + 186 [label="Const: Boolean(false)"]; + 187 [label="Exit loop condition"]; + } + 188 [label="Exit do-whileloop"]; + } + 189 [label="Const: Int(1)"]; + 190 [label="Exit block"]; + } + 191 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red]; + } + 192 [label="Stub" style="filled" fillcolor=gray]; + 177 -> {178}; 178 -> {179}; 179 -> {180}; @@ -584,10 +588,14 @@ digraph loops_kt { 181 -> {182}; 182 -> {183}; 183 -> {184}; - 183 -> {188} [style=dotted]; 184 -> {185}; 185 -> {186}; 186 -> {187}; - 188 -> {176} [style=dotted]; + 187 -> {188}; + 187 -> {192} [style=dotted]; + 188 -> {189}; + 189 -> {190}; + 190 -> {191}; + 192 -> {180} [style=dotted]; } diff --git a/compiler/fir/resolve/testData/resolve/cfg/tryCatch.dot b/compiler/fir/resolve/testData/resolve/cfg/tryCatch.dot index 6592b42dc46..47fbe804d44 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/tryCatch.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/tryCatch.dot @@ -176,102 +176,106 @@ digraph tryCatch_kt { } subgraph cluster_27 { color=blue - 56 [label="Enter block"]; - 57 [label="Jump: ^test_3 Unit"]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; + 56 [label="Enter when branch condition else"]; + 57 [label="Exit when branch condition"]; } - 60 [label="Exit when branch result" style="filled" fillcolor=gray]; + 58 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 61 [label="Enter when branch condition else"]; - 62 [label="Exit when branch condition"]; + 59 [label="Enter block"]; + 60 [label="Exit block"]; } + 61 [label="Exit when branch result"]; + 62 [label="Enter when branch result"]; subgraph cluster_29 { color=blue 63 [label="Enter block"]; - 64 [label="Exit block"]; + 64 [label="Jump: ^test_3 Unit"]; + 65 [label="Stub" style="filled" fillcolor=gray]; + 66 [label="Exit block" style="filled" fillcolor=gray]; } - 65 [label="Exit when branch result"]; - 66 [label="Exit when"]; + 67 [label="Exit when branch result" style="filled" fillcolor=gray]; + 68 [label="Exit when"]; } - 67 [label="Const: Int(1)"]; - 68 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 69 [label="Const: Int(1)"]; + 70 [label="Variable declaration: lval x: R|kotlin/Int|"]; subgraph cluster_30 { color=blue - 69 [label="Enter when"]; + 71 [label="Enter when"]; subgraph cluster_31 { color=blue - 70 [label="Enter when branch condition "]; - 71 [label="Access variable R|/b|"]; - 72 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 73 [label="Exit when branch condition"]; + 72 [label="Enter when branch condition "]; + 73 [label="Access variable R|/b|"]; + 74 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 75 [label="Exit when branch condition"]; } subgraph cluster_32 { color=blue - 74 [label="Enter block"]; - 75 [label="Jump: break@@@[Boolean(true)] "]; - 76 [label="Stub" style="filled" fillcolor=gray]; - 77 [label="Exit block" style="filled" fillcolor=gray]; + 76 [label="Enter when branch condition else"]; + 77 [label="Exit when branch condition"]; } - 78 [label="Exit when branch result" style="filled" fillcolor=gray]; + 78 [label="Enter when branch result"]; subgraph cluster_33 { color=blue - 79 [label="Enter when branch condition else"]; - 80 [label="Exit when branch condition"]; + 79 [label="Enter block"]; + 80 [label="Exit block"]; } + 81 [label="Exit when branch result"]; + 82 [label="Enter when branch result"]; subgraph cluster_34 { color=blue - 81 [label="Enter block"]; - 82 [label="Exit block"]; + 83 [label="Enter block"]; + 84 [label="Jump: break@@@[Boolean(true)] "]; + 85 [label="Stub" style="filled" fillcolor=gray]; + 86 [label="Exit block" style="filled" fillcolor=gray]; } - 83 [label="Exit when branch result"]; - 84 [label="Exit when"]; + 87 [label="Exit when branch result" style="filled" fillcolor=gray]; + 88 [label="Exit when"]; } - 85 [label="Exit block"]; + 89 [label="Exit block"]; } - 86 [label="Try main block exit"]; + 90 [label="Try main block exit"]; } subgraph cluster_35 { color=blue - 87 [label="Catch enter"]; + 91 [label="Catch enter"]; subgraph cluster_36 { color=blue - 88 [label="Enter block"]; - 89 [label="Jump: break@@@[Boolean(true)] "]; - 90 [label="Stub" style="filled" fillcolor=gray]; - 91 [label="Exit block" style="filled" fillcolor=gray]; + 92 [label="Enter block"]; + 93 [label="Jump: break@@@[Boolean(true)] "]; + 94 [label="Stub" style="filled" fillcolor=gray]; + 95 [label="Exit block" style="filled" fillcolor=gray]; } - 92 [label="Catch exit" style="filled" fillcolor=gray]; + 96 [label="Catch exit" style="filled" fillcolor=gray]; } subgraph cluster_37 { color=blue - 93 [label="Catch enter"]; + 97 [label="Catch enter"]; subgraph cluster_38 { color=blue - 94 [label="Enter block"]; - 95 [label="Jump: continue@@@[Boolean(true)] "]; - 96 [label="Stub" style="filled" fillcolor=gray]; - 97 [label="Exit block" style="filled" fillcolor=gray]; + 98 [label="Enter block"]; + 99 [label="Jump: continue@@@[Boolean(true)] "]; + 100 [label="Stub" style="filled" fillcolor=gray]; + 101 [label="Exit block" style="filled" fillcolor=gray]; } - 98 [label="Catch exit" style="filled" fillcolor=gray]; + 102 [label="Catch exit" style="filled" fillcolor=gray]; } - 99 [label="Try expression exit"]; + 103 [label="Try expression exit"]; } - 100 [label="Const: Int(2)"]; - 101 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 102 [label="Exit block"]; + 104 [label="Const: Int(2)"]; + 105 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 106 [label="Exit block"]; } - 103 [label="Exit loop block"]; + 107 [label="Exit loop block"]; } - 104 [label="Stub" style="filled" fillcolor=gray]; - 105 [label="Exit whileloop"]; + 108 [label="Stub" style="filled" fillcolor=gray]; + 109 [label="Exit whileloop"]; } - 106 [label="Const: Int(3)"]; - 107 [label="Variable declaration: lval z: R|kotlin/Int|"]; - 108 [label="Exit block"]; + 110 [label="Const: Int(3)"]; + 111 [label="Variable declaration: lval z: R|kotlin/Int|"]; + 112 [label="Exit block"]; } - 109 [label="Exit function test_3" style="filled" fillcolor=red]; + 113 [label="Exit function test_3" style="filled" fillcolor=red]; } 41 -> {42}; @@ -280,72 +284,76 @@ digraph tryCatch_kt { 44 -> {45}; 45 -> {46}; 46 -> {47}; - 46 -> {104} [style=dotted]; + 46 -> {108} [style=dotted]; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {109 93 87 51}; + 50 -> {113 97 91 51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {56 61}; + 55 -> {62 56}; 56 -> {57}; - 57 -> {109}; - 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; - 59 -> {60} [style=dotted]; - 60 -> {66} [style=dotted]; - 61 -> {62}; + 57 -> {58}; + 58 -> {59}; + 59 -> {60}; + 60 -> {61}; + 61 -> {68}; 62 -> {63}; 63 -> {64}; - 64 -> {65}; - 65 -> {66}; - 66 -> {67}; - 67 -> {68}; + 64 -> {113}; + 64 -> {65} [style=dotted]; + 65 -> {66} [style=dotted]; + 66 -> {67} [style=dotted]; + 67 -> {68} [style=dotted]; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {74 79}; + 73 -> {74}; 74 -> {75}; - 75 -> {105}; - 75 -> {76} [style=dotted]; - 76 -> {77} [style=dotted]; - 77 -> {78} [style=dotted]; - 78 -> {84} [style=dotted]; + 75 -> {82 76}; + 76 -> {77}; + 77 -> {78}; + 78 -> {79}; 79 -> {80}; 80 -> {81}; - 81 -> {82}; + 81 -> {88}; 82 -> {83}; 83 -> {84}; - 84 -> {85}; - 85 -> {86}; - 86 -> {99}; - 87 -> {109 88}; + 84 -> {109}; + 84 -> {85} [style=dotted]; + 85 -> {86} [style=dotted]; + 86 -> {87} [style=dotted]; + 87 -> {88} [style=dotted]; 88 -> {89}; - 89 -> {105}; - 89 -> {90} [style=dotted]; - 90 -> {91} [style=dotted]; - 91 -> {92} [style=dotted]; - 92 -> {99} [style=dotted]; - 93 -> {109 94}; - 94 -> {95}; - 95 -> {43}; + 89 -> {90}; + 90 -> {103}; + 91 -> {113 92}; + 92 -> {93}; + 93 -> {109}; + 93 -> {94} [style=dotted]; + 94 -> {95} [style=dotted]; 95 -> {96} [style=dotted]; - 96 -> {97} [style=dotted]; - 97 -> {98} [style=dotted]; - 98 -> {99} [style=dotted]; - 99 -> {100}; - 100 -> {101}; - 101 -> {102}; - 102 -> {103}; - 103 -> {44}; - 104 -> {105} [style=dotted]; + 96 -> {103} [style=dotted]; + 97 -> {113 98}; + 98 -> {99}; + 99 -> {43}; + 99 -> {100} [style=dotted]; + 100 -> {101} [style=dotted]; + 101 -> {102} [style=dotted]; + 102 -> {103} [style=dotted]; + 103 -> {104}; + 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {108}; - 108 -> {109}; + 107 -> {44}; + 108 -> {109} [style=dotted]; + 109 -> {110}; + 110 -> {111}; + 111 -> {112}; + 112 -> {113}; } diff --git a/compiler/fir/resolve/testData/resolve/cfg/when.dot b/compiler/fir/resolve/testData/resolve/cfg/when.dot index a175eb6fe4e..c7e7270a230 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/when.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/when.dot @@ -22,38 +22,38 @@ digraph when_kt { } subgraph cluster_4 { color=blue - 8 [label="Enter block"]; - 9 [label="Const: Int(10)"]; - 10 [label="Exit block"]; + 8 [label="Enter when branch condition "]; + 9 [label="Access variable R|/x|"]; + 10 [label="Const: Int(2)"]; + 11 [label="Function call: R|/x|.R|kotlin/Int.rem|(Int(2))"]; + 12 [label="Const: Int(0)"]; + 13 [label="Operator =="]; + 14 [label="Exit when branch condition"]; } - 11 [label="Exit when branch result"]; subgraph cluster_5 { color=blue - 12 [label="Enter when branch condition "]; - 13 [label="Access variable R|/x|"]; - 14 [label="Const: Int(2)"]; - 15 [label="Function call: R|/x|.R|kotlin/Int.rem|(Int(2))"]; - 16 [label="Const: Int(0)"]; - 17 [label="Operator =="]; - 18 [label="Exit when branch condition"]; + 15 [label="Enter when branch condition "]; + 16 [label="Const: Int(1)"]; + 17 [label="Const: Int(1)"]; + 18 [label="Function call: Int(1).R|kotlin/Int.minus|(Int(1))"]; + 19 [label="Const: Int(0)"]; + 20 [label="Operator =="]; + 21 [label="Exit when branch condition"]; } subgraph cluster_6 { color=blue - 19 [label="Enter block"]; - 20 [label="Const: Int(20)"]; - 21 [label="Exit block"]; + 22 [label="Enter when branch condition else"]; + 23 [label="Exit when branch condition"]; } - 22 [label="Exit when branch result"]; + 24 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 23 [label="Enter when branch condition "]; - 24 [label="Const: Int(1)"]; - 25 [label="Const: Int(1)"]; - 26 [label="Function call: Int(1).R|kotlin/Int.minus|(Int(1))"]; - 27 [label="Const: Int(0)"]; - 28 [label="Operator =="]; - 29 [label="Exit when branch condition"]; + 25 [label="Enter block"]; + 26 [label="Const: Int(5)"]; + 27 [label="Exit block"]; } + 28 [label="Exit when branch result"]; + 29 [label="Enter when branch result"]; subgraph cluster_8 { color=blue 30 [label="Enter block"]; @@ -62,24 +62,28 @@ digraph when_kt { 33 [label="Exit block" style="filled" fillcolor=gray]; } 34 [label="Exit when branch result" style="filled" fillcolor=gray]; + 35 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 35 [label="Enter when branch condition else"]; - 36 [label="Exit when branch condition"]; + 36 [label="Enter block"]; + 37 [label="Const: Int(20)"]; + 38 [label="Exit block"]; } + 39 [label="Exit when branch result"]; + 40 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 37 [label="Enter block"]; - 38 [label="Const: Int(5)"]; - 39 [label="Exit block"]; + 41 [label="Enter block"]; + 42 [label="Const: Int(10)"]; + 43 [label="Exit block"]; } - 40 [label="Exit when branch result"]; - 41 [label="Exit when"]; + 44 [label="Exit when branch result"]; + 45 [label="Exit when"]; } - 42 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 43 [label="Exit block"]; + 46 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 47 [label="Exit block"]; } - 44 [label="Exit function test_1" style="filled" fillcolor=red]; + 48 [label="Exit function test_1" style="filled" fillcolor=red]; } 0 -> {1}; @@ -89,120 +93,128 @@ digraph when_kt { 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8 12}; + 7 -> {40 8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {41}; + 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15}; + 14 -> {35 15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {19 23}; + 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22}; - 22 -> {41}; + 21 -> {29 22}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29}; - 29 -> {30 35}; + 28 -> {45}; + 29 -> {30}; 30 -> {31}; - 31 -> {44}; + 31 -> {48}; 31 -> {32} [style=dotted]; 32 -> {33} [style=dotted]; 33 -> {34} [style=dotted]; - 34 -> {41} [style=dotted]; + 34 -> {45} [style=dotted]; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40}; + 39 -> {45}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; + 44 -> {45}; + 45 -> {46}; + 46 -> {47}; + 47 -> {48}; subgraph cluster_11 { color=red - 45 [label="Enter function test_2" style="filled" fillcolor=red]; + 49 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 46 [label="Enter block"]; + 50 [label="Enter block"]; subgraph cluster_13 { color=blue - 47 [label="Enter when"]; + 51 [label="Enter when"]; subgraph cluster_14 { color=blue - 48 [label="Enter when branch condition "]; + 52 [label="Enter when branch condition "]; subgraph cluster_15 { color=blue - 49 [label="Enter &&"]; - 50 [label="Access variable R|/x|"]; - 51 [label="Type operator: x is A"]; - 52 [label="Exit left part of &&"]; - 53 [label="Enter right part of &&"]; + 53 [label="Enter &&"]; 54 [label="Access variable R|/x|"]; - 55 [label="Type operator: x is B"]; - 56 [label="Exit &&"]; + 55 [label="Type operator: x is A"]; + 56 [label="Exit left part of &&"]; + 57 [label="Enter right part of &&"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Type operator: x is B"]; + 60 [label="Exit &&"]; } - 57 [label="Exit when branch condition"]; + 61 [label="Exit when branch condition"]; } subgraph cluster_16 { color=blue - 58 [label="Enter block"]; - 59 [label="Access variable R|/x|"]; - 60 [label="Type operator: x is A"]; - 61 [label="Exit block"]; + 62 [label="Enter when branch condition else"]; + 63 [label="Exit when branch condition"]; } - 62 [label="Exit when branch result"]; + 64 [label="Enter when branch result"]; subgraph cluster_17 { - color=blue - 63 [label="Enter when branch condition else"]; - 64 [label="Exit when branch condition"]; - } - subgraph cluster_18 { color=blue 65 [label="Enter block"]; 66 [label="Exit block"]; } 67 [label="Exit when branch result"]; - 68 [label="Exit when"]; + 68 [label="Enter when branch result"]; + subgraph cluster_18 { + color=blue + 69 [label="Enter block"]; + 70 [label="Access variable R|/x|"]; + 71 [label="Type operator: x is A"]; + 72 [label="Exit block"]; + } + 73 [label="Exit when branch result"]; + 74 [label="Exit when"]; } - 69 [label="Exit block"]; + 75 [label="Exit block"]; } - 70 [label="Exit function test_2" style="filled" fillcolor=red]; + 76 [label="Exit function test_2" style="filled" fillcolor=red]; } - 45 -> {46}; - 46 -> {47}; - 47 -> {48}; - 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {56 53}; + 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57}; - 57 -> {58 63}; + 56 -> {60 57}; + 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {62}; - 62 -> {68}; + 61 -> {68 62}; + 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {68}; + 67 -> {74}; 68 -> {69}; 69 -> {70}; + 70 -> {71}; + 71 -> {72}; + 72 -> {73}; + 73 -> {74}; + 74 -> {75}; + 75 -> {76}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/booleanOperators.dot b/compiler/fir/resolve/testData/resolve/smartcasts/booleanOperators.dot index 9e2cef296e6..32349a37f0d 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/booleanOperators.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/booleanOperators.dot @@ -62,32 +62,34 @@ digraph booleanOperators_kt { } subgraph cluster_9 { color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/x|"]; - 23 [label="Function call: R|/x|.R|/A.foo|()"]; - 24 [label="Access variable R|/x|"]; - 25 [label="Function call: R|/x|.R|/B.bar|()"]; - 26 [label="Access variable R|/x|"]; - 27 [label="Function call: R|/x|.R|/C.baz|()"]; - 28 [label="Exit block"]; + 21 [label="Enter when branch condition else"]; + 22 [label="Exit when branch condition"]; } - 29 [label="Exit when branch result"]; + 23 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 30 [label="Enter when branch condition else"]; - 31 [label="Exit when branch condition"]; + 24 [label="Enter block"]; + 25 [label="Exit block"]; } + 26 [label="Exit when branch result"]; + 27 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 32 [label="Enter block"]; - 33 [label="Exit block"]; + 28 [label="Enter block"]; + 29 [label="Access variable R|/x|"]; + 30 [label="Function call: R|/x|.R|/A.foo|()"]; + 31 [label="Access variable R|/x|"]; + 32 [label="Function call: R|/x|.R|/B.bar|()"]; + 33 [label="Access variable R|/x|"]; + 34 [label="Function call: R|/x|.R|/C.baz|()"]; + 35 [label="Exit block"]; } - 34 [label="Exit when branch result"]; - 35 [label="Exit when"]; + 36 [label="Exit when branch result"]; + 37 [label="Exit when"]; } - 36 [label="Exit block"]; + 38 [label="Exit block"]; } - 37 [label="Exit function test_1" style="filled" fillcolor=red]; + 39 [label="Exit function test_1" style="filled" fillcolor=red]; } 8 -> {9}; @@ -102,16 +104,16 @@ digraph booleanOperators_kt { 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21 30}; + 20 -> {27 21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {27}; + 26 -> {37}; 27 -> {28}; 28 -> {29}; - 29 -> {35}; + 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; @@ -119,84 +121,86 @@ digraph booleanOperators_kt { 34 -> {35}; 35 -> {36}; 36 -> {37}; + 37 -> {38}; + 38 -> {39}; subgraph cluster_12 { color=red - 38 [label="Enter function test_2" style="filled" fillcolor=red]; + 40 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 39 [label="Enter block"]; + 41 [label="Enter block"]; subgraph cluster_14 { color=blue - 40 [label="Enter when"]; + 42 [label="Enter when"]; subgraph cluster_15 { color=blue - 41 [label="Enter when branch condition "]; + 43 [label="Enter when branch condition "]; subgraph cluster_16 { color=blue - 42 [label="Enter ||"]; - 43 [label="Access variable R|/x|"]; - 44 [label="Type operator: x is B"]; - 45 [label="Exit left part of ||"]; - 46 [label="Enter right part of ||"]; - 47 [label="Access variable R|/x|"]; - 48 [label="Type operator: x is C"]; - 49 [label="Exit ||"]; + 44 [label="Enter ||"]; + 45 [label="Access variable R|/x|"]; + 46 [label="Type operator: x is B"]; + 47 [label="Exit left part of ||"]; + 48 [label="Enter right part of ||"]; + 49 [label="Access variable R|/x|"]; + 50 [label="Type operator: x is C"]; + 51 [label="Exit ||"]; } - 50 [label="Exit when branch condition"]; + 52 [label="Exit when branch condition"]; } subgraph cluster_17 { color=blue - 51 [label="Enter block"]; - 52 [label="Access variable R|/x|"]; - 53 [label="Function call: R|/x|.R|/A.foo|()"]; - 54 [label="Access variable R|/x|"]; - 55 [label="Function call: R|/x|.#()"]; - 56 [label="Access variable R|/x|"]; - 57 [label="Function call: R|/x|.#()"]; - 58 [label="Exit block"]; + 53 [label="Enter when branch condition else"]; + 54 [label="Exit when branch condition"]; } - 59 [label="Exit when branch result"]; + 55 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 60 [label="Enter when branch condition else"]; - 61 [label="Exit when branch condition"]; + 56 [label="Enter block"]; + 57 [label="Exit block"]; } + 58 [label="Exit when branch result"]; + 59 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 62 [label="Enter block"]; - 63 [label="Exit block"]; + 60 [label="Enter block"]; + 61 [label="Access variable R|/x|"]; + 62 [label="Function call: R|/x|.R|/A.foo|()"]; + 63 [label="Access variable R|/x|"]; + 64 [label="Function call: R|/x|.#()"]; + 65 [label="Access variable R|/x|"]; + 66 [label="Function call: R|/x|.#()"]; + 67 [label="Exit block"]; } - 64 [label="Exit when branch result"]; - 65 [label="Exit when"]; + 68 [label="Exit when branch result"]; + 69 [label="Exit when"]; } - 66 [label="Exit block"]; + 70 [label="Exit block"]; } - 67 [label="Exit function test_2" style="filled" fillcolor=red]; + 71 [label="Exit function test_2" style="filled" fillcolor=red]; } - 38 -> {39}; - 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {49 46}; + 45 -> {46}; 46 -> {47}; - 47 -> {48}; + 47 -> {51 48}; 48 -> {49}; 49 -> {50}; - 50 -> {51 60}; + 50 -> {51}; 51 -> {52}; - 52 -> {53}; + 52 -> {59 53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {59}; - 59 -> {65}; + 58 -> {69}; + 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; @@ -204,207 +208,160 @@ digraph booleanOperators_kt { 64 -> {65}; 65 -> {66}; 66 -> {67}; + 67 -> {68}; + 68 -> {69}; + 69 -> {70}; + 70 -> {71}; subgraph cluster_20 { color=red - 68 [label="Enter function test_3" style="filled" fillcolor=red]; + 72 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 69 [label="Enter block"]; + 73 [label="Enter block"]; subgraph cluster_22 { color=blue - 70 [label="Enter when"]; + 74 [label="Enter when"]; subgraph cluster_23 { color=blue - 71 [label="Enter when branch condition "]; - 72 [label="Access variable R|/x|"]; - 73 [label="Type operator: x !is A"]; - 74 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()"]; - 75 [label="Exit when branch condition"]; + 75 [label="Enter when branch condition "]; + 76 [label="Access variable R|/x|"]; + 77 [label="Type operator: x !is A"]; + 78 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()"]; + 79 [label="Exit when branch condition"]; } subgraph cluster_24 { color=blue - 76 [label="Enter block"]; - 77 [label="Access variable R|/x|"]; - 78 [label="Function call: R|/x|.R|/A.foo|()"]; - 79 [label="Exit block"]; + 80 [label="Enter when branch condition else"]; + 81 [label="Exit when branch condition"]; } - 80 [label="Exit when branch result"]; + 82 [label="Enter when branch result"]; subgraph cluster_25 { - color=blue - 81 [label="Enter when branch condition else"]; - 82 [label="Exit when branch condition"]; - } - subgraph cluster_26 { color=blue 83 [label="Enter block"]; 84 [label="Exit block"]; } 85 [label="Exit when branch result"]; - 86 [label="Exit when"]; + 86 [label="Enter when branch result"]; + subgraph cluster_26 { + color=blue + 87 [label="Enter block"]; + 88 [label="Access variable R|/x|"]; + 89 [label="Function call: R|/x|.R|/A.foo|()"]; + 90 [label="Exit block"]; + } + 91 [label="Exit when branch result"]; + 92 [label="Exit when"]; } - 87 [label="Exit block"]; + 93 [label="Exit block"]; } - 88 [label="Exit function test_3" style="filled" fillcolor=red]; + 94 [label="Exit function test_3" style="filled" fillcolor=red]; } - 68 -> {69}; - 69 -> {70}; - 70 -> {71}; - 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76 81}; + 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {80}; - 80 -> {86}; + 79 -> {86 80}; + 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; - 85 -> {86}; + 85 -> {92}; 86 -> {87}; 87 -> {88}; - - subgraph cluster_27 { - color=red - 89 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 90 [label="Enter block"]; - subgraph cluster_29 { - color=blue - 91 [label="Enter when"]; - subgraph cluster_30 { - color=blue - 92 [label="Enter when branch condition "]; - subgraph cluster_31 { - color=blue - 93 [label="Enter ||"]; - 94 [label="Access variable R|/x|"]; - 95 [label="Type operator: x !is String"]; - 96 [label="Exit left part of ||"]; - 97 [label="Enter right part of ||"]; - 98 [label="Access variable R|/x|"]; - 99 [label="Access variable R|kotlin/String.length|"]; - 100 [label="Const: Int(0)"]; - 101 [label="Operator =="]; - 102 [label="Exit ||"]; - } - 103 [label="Exit when branch condition"]; - } - subgraph cluster_32 { - color=blue - 104 [label="Enter block"]; - 105 [label="Access variable R|/x|"]; - 106 [label="Access variable #"]; - 107 [label="Exit block"]; - } - 108 [label="Exit when branch result"]; - subgraph cluster_33 { - color=blue - 109 [label="Enter when branch condition else"]; - 110 [label="Exit when branch condition"]; - } - subgraph cluster_34 { - color=blue - 111 [label="Enter block"]; - 112 [label="Exit block"]; - } - 113 [label="Exit when branch result"]; - 114 [label="Exit when"]; - } - 115 [label="Access variable R|/x|"]; - 116 [label="Access variable #"]; - 117 [label="Exit block"]; - } - 118 [label="Exit function test_4" style="filled" fillcolor=red]; - } - + 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; - 94 -> {95}; + + subgraph cluster_27 { + color=red + 95 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 96 [label="Enter block"]; + subgraph cluster_29 { + color=blue + 97 [label="Enter when"]; + subgraph cluster_30 { + color=blue + 98 [label="Enter when branch condition "]; + subgraph cluster_31 { + color=blue + 99 [label="Enter ||"]; + 100 [label="Access variable R|/x|"]; + 101 [label="Type operator: x !is String"]; + 102 [label="Exit left part of ||"]; + 103 [label="Enter right part of ||"]; + 104 [label="Access variable R|/x|"]; + 105 [label="Access variable R|kotlin/String.length|"]; + 106 [label="Const: Int(0)"]; + 107 [label="Operator =="]; + 108 [label="Exit ||"]; + } + 109 [label="Exit when branch condition"]; + } + subgraph cluster_32 { + color=blue + 110 [label="Enter when branch condition else"]; + 111 [label="Exit when branch condition"]; + } + 112 [label="Enter when branch result"]; + subgraph cluster_33 { + color=blue + 113 [label="Enter block"]; + 114 [label="Exit block"]; + } + 115 [label="Exit when branch result"]; + 116 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 117 [label="Enter block"]; + 118 [label="Access variable R|/x|"]; + 119 [label="Access variable #"]; + 120 [label="Exit block"]; + } + 121 [label="Exit when branch result"]; + 122 [label="Exit when"]; + } + 123 [label="Access variable R|/x|"]; + 124 [label="Access variable #"]; + 125 [label="Exit block"]; + } + 126 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 95 -> {96}; - 96 -> {102 97}; + 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; 101 -> {102}; - 102 -> {103}; - 103 -> {104 109}; + 102 -> {108 103}; + 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {114}; - 109 -> {110}; + 108 -> {109}; + 109 -> {116 110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; - 115 -> {116}; + 115 -> {122}; 116 -> {117}; 117 -> {118}; - - subgraph cluster_35 { - color=red - 119 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_36 { - color=blue - 120 [label="Enter block"]; - subgraph cluster_37 { - color=blue - 121 [label="Enter when"]; - subgraph cluster_38 { - color=blue - 122 [label="Enter when branch condition "]; - subgraph cluster_39 { - color=blue - 123 [label="Enter ||"]; - 124 [label="Access variable R|/x|"]; - 125 [label="Const: Null(null)"]; - 126 [label="Operator !="]; - 127 [label="Exit left part of ||"]; - 128 [label="Enter right part of ||"]; - 129 [label="Const: Boolean(false)"]; - 130 [label="Exit ||"]; - } - 131 [label="Exit when branch condition"]; - } - subgraph cluster_40 { - color=blue - 132 [label="Enter block"]; - 133 [label="Access variable R|/x|"]; - 134 [label="Function call: R|/x|.#()"]; - 135 [label="Exit block"]; - } - 136 [label="Exit when branch result"]; - subgraph cluster_41 { - color=blue - 137 [label="Enter when branch condition else"]; - 138 [label="Exit when branch condition"]; - } - subgraph cluster_42 { - color=blue - 139 [label="Enter block"]; - 140 [label="Exit block"]; - } - 141 [label="Exit when branch result"]; - 142 [label="Exit when"]; - } - 143 [label="Exit block"]; - } - 144 [label="Exit function test_5" style="filled" fillcolor=red]; - } - + 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; @@ -412,180 +369,251 @@ digraph booleanOperators_kt { 123 -> {124}; 124 -> {125}; 125 -> {126}; - 126 -> {127}; - 127 -> {130 128}; + + subgraph cluster_35 { + color=red + 127 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_36 { + color=blue + 128 [label="Enter block"]; + subgraph cluster_37 { + color=blue + 129 [label="Enter when"]; + subgraph cluster_38 { + color=blue + 130 [label="Enter when branch condition "]; + subgraph cluster_39 { + color=blue + 131 [label="Enter ||"]; + 132 [label="Access variable R|/x|"]; + 133 [label="Const: Null(null)"]; + 134 [label="Operator !="]; + 135 [label="Exit left part of ||"]; + 136 [label="Enter right part of ||"]; + 137 [label="Const: Boolean(false)"]; + 138 [label="Exit ||"]; + } + 139 [label="Exit when branch condition"]; + } + subgraph cluster_40 { + color=blue + 140 [label="Enter when branch condition else"]; + 141 [label="Exit when branch condition"]; + } + 142 [label="Enter when branch result"]; + subgraph cluster_41 { + color=blue + 143 [label="Enter block"]; + 144 [label="Exit block"]; + } + 145 [label="Exit when branch result"]; + 146 [label="Enter when branch result"]; + subgraph cluster_42 { + color=blue + 147 [label="Enter block"]; + 148 [label="Access variable R|/x|"]; + 149 [label="Function call: R|/x|.#()"]; + 150 [label="Exit block"]; + } + 151 [label="Exit when branch result"]; + 152 [label="Exit when"]; + } + 153 [label="Exit block"]; + } + 154 [label="Exit function test_5" style="filled" fillcolor=red]; + } + + 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; - 131 -> {132 137}; + 131 -> {132}; 132 -> {133}; 133 -> {134}; 134 -> {135}; - 135 -> {136}; - 136 -> {142}; + 135 -> {138 136}; + 136 -> {137}; 137 -> {138}; 138 -> {139}; - 139 -> {140}; + 139 -> {146 140}; 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; - - subgraph cluster_43 { - color=red - 145 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_44 { - color=blue - 146 [label="Enter block"]; - subgraph cluster_45 { - color=blue - 147 [label="Enter when"]; - subgraph cluster_46 { - color=blue - 148 [label="Enter when branch condition "]; - subgraph cluster_47 { - color=blue - 149 [label="Enter ||"]; - 150 [label="Const: Boolean(false)"]; - 151 [label="Exit left part of ||"]; - 152 [label="Enter right part of ||"]; - 153 [label="Access variable R|/x|"]; - 154 [label="Const: Null(null)"]; - 155 [label="Operator !="]; - 156 [label="Stub" style="filled" fillcolor=gray]; - 157 [label="Exit ||"]; - } - 158 [label="Exit when branch condition"]; - } - subgraph cluster_48 { - color=blue - 159 [label="Enter block"]; - 160 [label="Access variable R|/x|"]; - 161 [label="Function call: R|/x|.#()"]; - 162 [label="Exit block"]; - } - 163 [label="Exit when branch result"]; - subgraph cluster_49 { - color=blue - 164 [label="Enter when branch condition else"]; - 165 [label="Exit when branch condition"]; - } - subgraph cluster_50 { - color=blue - 166 [label="Enter block"]; - 167 [label="Exit block"]; - } - 168 [label="Exit when branch result"]; - 169 [label="Exit when"]; - } - 170 [label="Exit block"]; - } - 171 [label="Exit function test_6" style="filled" fillcolor=red]; - } - - 145 -> {146}; + 144 -> {145}; + 145 -> {152}; 146 -> {147}; 147 -> {148}; 148 -> {149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; - 151 -> {156} [style=dotted]; 152 -> {153}; 153 -> {154}; - 154 -> {155}; - 155 -> {157}; - 156 -> {157} [style=dotted]; + + subgraph cluster_43 { + color=red + 155 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_44 { + color=blue + 156 [label="Enter block"]; + subgraph cluster_45 { + color=blue + 157 [label="Enter when"]; + subgraph cluster_46 { + color=blue + 158 [label="Enter when branch condition "]; + subgraph cluster_47 { + color=blue + 159 [label="Enter ||"]; + 160 [label="Const: Boolean(false)"]; + 161 [label="Exit left part of ||"]; + 162 [label="Enter right part of ||"]; + 163 [label="Access variable R|/x|"]; + 164 [label="Const: Null(null)"]; + 165 [label="Operator !="]; + 166 [label="Stub" style="filled" fillcolor=gray]; + 167 [label="Exit ||"]; + } + 168 [label="Exit when branch condition"]; + } + subgraph cluster_48 { + color=blue + 169 [label="Enter when branch condition else"]; + 170 [label="Exit when branch condition"]; + } + 171 [label="Enter when branch result"]; + subgraph cluster_49 { + color=blue + 172 [label="Enter block"]; + 173 [label="Exit block"]; + } + 174 [label="Exit when branch result"]; + 175 [label="Enter when branch result"]; + subgraph cluster_50 { + color=blue + 176 [label="Enter block"]; + 177 [label="Access variable R|/x|"]; + 178 [label="Function call: R|/x|.#()"]; + 179 [label="Exit block"]; + } + 180 [label="Exit when branch result"]; + 181 [label="Exit when"]; + } + 182 [label="Exit block"]; + } + 183 [label="Exit function test_6" style="filled" fillcolor=red]; + } + + 155 -> {156}; + 156 -> {157}; 157 -> {158}; - 158 -> {159 164}; + 158 -> {159}; 159 -> {160}; 160 -> {161}; 161 -> {162}; + 161 -> {166} [style=dotted]; 162 -> {163}; - 163 -> {169}; + 163 -> {164}; 164 -> {165}; - 165 -> {166}; - 166 -> {167}; + 165 -> {167}; + 166 -> {167} [style=dotted]; 167 -> {168}; - 168 -> {169}; + 168 -> {175 169}; 169 -> {170}; 170 -> {171}; - - subgraph cluster_51 { - color=red - 172 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_52 { - color=blue - 173 [label="Enter block"]; - subgraph cluster_53 { - color=blue - 174 [label="Enter when"]; - subgraph cluster_54 { - color=blue - 175 [label="Enter when branch condition "]; - subgraph cluster_55 { - color=blue - 176 [label="Enter &&"]; - 177 [label="Access variable R|/x|"]; - 178 [label="Type operator: x is A"]; - 179 [label="Exit left part of &&"]; - 180 [label="Enter right part of &&"]; - 181 [label="Access variable R|/x|"]; - 182 [label="Function call: R|/x|.R|/A.bool|()"]; - 183 [label="Exit &&"]; - } - 184 [label="Exit when branch condition"]; - } - subgraph cluster_56 { - color=blue - 185 [label="Enter block"]; - 186 [label="Access variable R|/x|"]; - 187 [label="Function call: R|/x|.R|/A.foo|()"]; - 188 [label="Exit block"]; - } - 189 [label="Exit when branch result"]; - subgraph cluster_57 { - color=blue - 190 [label="Enter when branch condition else"]; - 191 [label="Exit when branch condition"]; - } - subgraph cluster_58 { - color=blue - 192 [label="Enter block"]; - 193 [label="Exit block"]; - } - 194 [label="Exit when branch result"]; - 195 [label="Exit when"]; - } - 196 [label="Exit block"]; - } - 197 [label="Exit function test_7" style="filled" fillcolor=red]; - } - + 171 -> {172}; 172 -> {173}; 173 -> {174}; - 174 -> {175}; + 174 -> {181}; 175 -> {176}; 176 -> {177}; 177 -> {178}; 178 -> {179}; - 179 -> {183 180}; + 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; - 183 -> {184}; - 184 -> {185 190}; + + subgraph cluster_51 { + color=red + 184 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_52 { + color=blue + 185 [label="Enter block"]; + subgraph cluster_53 { + color=blue + 186 [label="Enter when"]; + subgraph cluster_54 { + color=blue + 187 [label="Enter when branch condition "]; + subgraph cluster_55 { + color=blue + 188 [label="Enter &&"]; + 189 [label="Access variable R|/x|"]; + 190 [label="Type operator: x is A"]; + 191 [label="Exit left part of &&"]; + 192 [label="Enter right part of &&"]; + 193 [label="Access variable R|/x|"]; + 194 [label="Function call: R|/x|.R|/A.bool|()"]; + 195 [label="Exit &&"]; + } + 196 [label="Exit when branch condition"]; + } + subgraph cluster_56 { + color=blue + 197 [label="Enter when branch condition else"]; + 198 [label="Exit when branch condition"]; + } + 199 [label="Enter when branch result"]; + subgraph cluster_57 { + color=blue + 200 [label="Enter block"]; + 201 [label="Exit block"]; + } + 202 [label="Exit when branch result"]; + 203 [label="Enter when branch result"]; + subgraph cluster_58 { + color=blue + 204 [label="Enter block"]; + 205 [label="Access variable R|/x|"]; + 206 [label="Function call: R|/x|.R|/A.foo|()"]; + 207 [label="Exit block"]; + } + 208 [label="Exit when branch result"]; + 209 [label="Exit when"]; + } + 210 [label="Exit block"]; + } + 211 [label="Exit function test_7" style="filled" fillcolor=red]; + } + + 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; - 189 -> {195}; + 189 -> {190}; 190 -> {191}; - 191 -> {192}; + 191 -> {195 192}; 192 -> {193}; 193 -> {194}; 194 -> {195}; 195 -> {196}; - 196 -> {197}; + 196 -> {203 197}; + 197 -> {198}; + 198 -> {199}; + 199 -> {200}; + 200 -> {201}; + 201 -> {202}; + 202 -> {209}; + 203 -> {204}; + 204 -> {205}; + 205 -> {206}; + 206 -> {207}; + 207 -> {208}; + 208 -> {209}; + 209 -> {210}; + 210 -> {211}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.dot b/compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.dot index 75cd0dc6340..20b9ed93087 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.dot @@ -39,30 +39,32 @@ digraph boundSmartcasts_kt { } subgraph cluster_6 { color=blue - 13 [label="Enter block"]; - 14 [label="Access variable R|/x|"]; - 15 [label="Function call: R|/x|.R|/A.foo|()"]; - 16 [label="Access variable R|/y|"]; - 17 [label="Function call: R|/y|.R|/A.foo|()"]; - 18 [label="Exit block"]; + 13 [label="Enter when branch condition else"]; + 14 [label="Exit when branch condition"]; } - 19 [label="Exit when branch result"]; + 15 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 20 [label="Enter when branch condition else"]; - 21 [label="Exit when branch condition"]; + 16 [label="Enter block"]; + 17 [label="Exit block"]; } + 18 [label="Exit when branch result"]; + 19 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 22 [label="Enter block"]; - 23 [label="Exit block"]; + 20 [label="Enter block"]; + 21 [label="Access variable R|/x|"]; + 22 [label="Function call: R|/x|.R|/A.foo|()"]; + 23 [label="Access variable R|/y|"]; + 24 [label="Function call: R|/y|.R|/A.foo|()"]; + 25 [label="Exit block"]; } - 24 [label="Exit when branch result"]; - 25 [label="Exit when"]; + 26 [label="Exit when branch result"]; + 27 [label="Exit when"]; } - 26 [label="Exit block"]; + 28 [label="Exit block"]; } - 27 [label="Exit function test_1" style="filled" fillcolor=red]; + 29 [label="Exit function test_1" style="filled" fillcolor=red]; } 4 -> {5}; @@ -73,14 +75,14 @@ digraph boundSmartcasts_kt { 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {13 20}; + 12 -> {19 13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {19}; - 19 -> {25}; + 18 -> {27}; + 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; @@ -88,173 +90,179 @@ digraph boundSmartcasts_kt { 24 -> {25}; 25 -> {26}; 26 -> {27}; + 27 -> {28}; + 28 -> {29}; subgraph cluster_9 { color=red - 28 [label="Enter function test_2" style="filled" fillcolor=red]; + 30 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 29 [label="Enter block"]; - 30 [label="Access variable R|/x|"]; - 31 [label="Variable declaration: lval y: R|kotlin/Any|"]; + 31 [label="Enter block"]; + 32 [label="Access variable R|/x|"]; + 33 [label="Variable declaration: lval y: R|kotlin/Any|"]; subgraph cluster_11 { color=blue - 32 [label="Enter when"]; + 34 [label="Enter when"]; subgraph cluster_12 { color=blue - 33 [label="Enter when branch condition "]; - 34 [label="Access variable R|/y|"]; - 35 [label="Type operator: y is A"]; - 36 [label="Exit when branch condition"]; + 35 [label="Enter when branch condition "]; + 36 [label="Access variable R|/y|"]; + 37 [label="Type operator: y is A"]; + 38 [label="Exit when branch condition"]; } subgraph cluster_13 { color=blue - 37 [label="Enter block"]; - 38 [label="Access variable R|/x|"]; - 39 [label="Function call: R|/x|.R|/A.foo|()"]; - 40 [label="Access variable R|/y|"]; - 41 [label="Function call: R|/y|.R|/A.foo|()"]; - 42 [label="Exit block"]; + 39 [label="Enter when branch condition else"]; + 40 [label="Exit when branch condition"]; } - 43 [label="Exit when branch result"]; + 41 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 44 [label="Enter when branch condition else"]; - 45 [label="Exit when branch condition"]; + 42 [label="Enter block"]; + 43 [label="Exit block"]; } + 44 [label="Exit when branch result"]; + 45 [label="Enter when branch result"]; subgraph cluster_15 { color=blue 46 [label="Enter block"]; - 47 [label="Exit block"]; + 47 [label="Access variable R|/x|"]; + 48 [label="Function call: R|/x|.R|/A.foo|()"]; + 49 [label="Access variable R|/y|"]; + 50 [label="Function call: R|/y|.R|/A.foo|()"]; + 51 [label="Exit block"]; } - 48 [label="Exit when branch result"]; - 49 [label="Exit when"]; + 52 [label="Exit when branch result"]; + 53 [label="Exit when"]; } - 50 [label="Exit block"]; + 54 [label="Exit block"]; } - 51 [label="Exit function test_2" style="filled" fillcolor=red]; + 55 [label="Exit function test_2" style="filled" fillcolor=red]; } - 28 -> {29}; - 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37 44}; + 36 -> {37}; 37 -> {38}; - 38 -> {39}; + 38 -> {45 39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {49}; - 44 -> {45}; + 43 -> {44}; + 44 -> {53}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; + 51 -> {52}; + 52 -> {53}; + 53 -> {54}; + 54 -> {55}; subgraph cluster_16 { color=red - 52 [label="Enter function test_3" style="filled" fillcolor=red]; + 56 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 53 [label="Enter block"]; - 54 [label="Access variable R|/x|"]; - 55 [label="Variable declaration: lvar z: R|kotlin/Any|"]; + 57 [label="Enter block"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Variable declaration: lvar z: R|kotlin/Any|"]; subgraph cluster_18 { color=blue - 56 [label="Enter when"]; + 60 [label="Enter when"]; subgraph cluster_19 { color=blue - 57 [label="Enter when branch condition "]; - 58 [label="Access variable R|/x|"]; - 59 [label="Type operator: x is A"]; - 60 [label="Exit when branch condition"]; + 61 [label="Enter when branch condition "]; + 62 [label="Access variable R|/x|"]; + 63 [label="Type operator: x is A"]; + 64 [label="Exit when branch condition"]; } subgraph cluster_20 { color=blue - 61 [label="Enter block"]; - 62 [label="Access variable R|/z|"]; - 63 [label="Function call: R|/z|.R|/A.foo|()"]; - 64 [label="Exit block"]; + 65 [label="Enter when branch condition else"]; + 66 [label="Exit when branch condition"]; } - 65 [label="Exit when branch result"]; + 67 [label="Enter when branch result"]; subgraph cluster_21 { - color=blue - 66 [label="Enter when branch condition else"]; - 67 [label="Exit when branch condition"]; - } - subgraph cluster_22 { color=blue 68 [label="Enter block"]; 69 [label="Exit block"]; } 70 [label="Exit when branch result"]; - 71 [label="Exit when"]; + 71 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 72 [label="Enter block"]; + 73 [label="Access variable R|/z|"]; + 74 [label="Function call: R|/z|.R|/A.foo|()"]; + 75 [label="Exit block"]; + } + 76 [label="Exit when branch result"]; + 77 [label="Exit when"]; } - 72 [label="Access variable R|/y|"]; - 73 [label="Assignmenet: R|/z|"]; + 78 [label="Access variable R|/y|"]; + 79 [label="Assignmenet: R|/z|"]; subgraph cluster_23 { color=blue - 74 [label="Enter when"]; + 80 [label="Enter when"]; subgraph cluster_24 { color=blue - 75 [label="Enter when branch condition "]; - 76 [label="Access variable R|/y|"]; - 77 [label="Type operator: y is B"]; - 78 [label="Exit when branch condition"]; + 81 [label="Enter when branch condition "]; + 82 [label="Access variable R|/y|"]; + 83 [label="Type operator: y is B"]; + 84 [label="Exit when branch condition"]; } subgraph cluster_25 { color=blue - 79 [label="Enter block"]; - 80 [label="Access variable R|/z|"]; - 81 [label="Function call: R|/z|.R|/B.bar|()"]; - 82 [label="Exit block"]; + 85 [label="Enter when branch condition else"]; + 86 [label="Exit when branch condition"]; } - 83 [label="Exit when branch result"]; + 87 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 84 [label="Enter when branch condition else"]; - 85 [label="Exit when branch condition"]; + 88 [label="Enter block"]; + 89 [label="Exit block"]; } + 90 [label="Exit when branch result"]; + 91 [label="Enter when branch result"]; subgraph cluster_27 { color=blue - 86 [label="Enter block"]; - 87 [label="Exit block"]; + 92 [label="Enter block"]; + 93 [label="Access variable R|/z|"]; + 94 [label="Function call: R|/z|.#()"]; + 95 [label="Exit block"]; } - 88 [label="Exit when branch result"]; - 89 [label="Exit when"]; + 96 [label="Exit when branch result"]; + 97 [label="Exit when"]; } - 90 [label="Exit block"]; + 98 [label="Exit block"]; } - 91 [label="Exit function test_3" style="filled" fillcolor=red]; + 99 [label="Exit function test_3" style="filled" fillcolor=red]; } - 52 -> {53}; - 53 -> {54}; - 54 -> {55}; - 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {61 66}; + 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {65}; - 65 -> {71}; + 64 -> {71 65}; + 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; + 70 -> {77}; 71 -> {72}; 72 -> {73}; 73 -> {74}; @@ -262,74 +270,20 @@ digraph boundSmartcasts_kt { 75 -> {76}; 76 -> {77}; 77 -> {78}; - 78 -> {79 84}; + 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {89}; - 84 -> {85}; + 83 -> {84}; + 84 -> {91 85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; - 90 -> {91}; - - subgraph cluster_28 { - color=red - 92 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 93 [label="Enter block"]; - 94 [label="Const: Int(1)"]; - 95 [label="Variable declaration: lvar x: R|kotlin/Any|"]; - 96 [label="Access variable R|/x|"]; - 97 [label="Type operator: x as Int"]; - 98 [label="Access variable R|/x|"]; - 99 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 100 [label="Access variable R|/y|"]; - 101 [label="Assignmenet: R|/x|"]; - 102 [label="Access variable R|/x|"]; - 103 [label="Function call: R|/x|.#()"]; - subgraph cluster_30 { - color=blue - 104 [label="Enter when"]; - subgraph cluster_31 { - color=blue - 105 [label="Enter when branch condition "]; - 106 [label="Access variable R|/y|"]; - 107 [label="Type operator: y is A"]; - 108 [label="Exit when branch condition"]; - } - subgraph cluster_32 { - color=blue - 109 [label="Enter block"]; - 110 [label="Access variable R|/x|"]; - 111 [label="Function call: R|/x|.R|/A.foo|()"]; - 112 [label="Access variable R|/y|"]; - 113 [label="Function call: R|/y|.R|/A.foo|()"]; - 114 [label="Exit block"]; - } - 115 [label="Exit when branch result"]; - subgraph cluster_33 { - color=blue - 116 [label="Enter when branch condition else"]; - 117 [label="Exit when branch condition"]; - } - subgraph cluster_34 { - color=blue - 118 [label="Enter block"]; - 119 [label="Exit block"]; - } - 120 [label="Exit when branch result"]; - 121 [label="Exit when"]; - } - 122 [label="Exit block"]; - } - 123 [label="Exit function test_4" style="filled" fillcolor=red]; - } - + 90 -> {97}; + 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; @@ -337,7 +291,63 @@ digraph boundSmartcasts_kt { 96 -> {97}; 97 -> {98}; 98 -> {99}; - 99 -> {100}; + + subgraph cluster_28 { + color=red + 100 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 101 [label="Enter block"]; + 102 [label="Const: Int(1)"]; + 103 [label="Variable declaration: lvar x: R|kotlin/Any|"]; + 104 [label="Access variable R|/x|"]; + 105 [label="Type operator: x as Int"]; + 106 [label="Access variable R|/x|"]; + 107 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 108 [label="Access variable R|/y|"]; + 109 [label="Assignmenet: R|/x|"]; + 110 [label="Access variable R|/x|"]; + 111 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + subgraph cluster_30 { + color=blue + 112 [label="Enter when"]; + subgraph cluster_31 { + color=blue + 113 [label="Enter when branch condition "]; + 114 [label="Access variable R|/y|"]; + 115 [label="Type operator: y is A"]; + 116 [label="Exit when branch condition"]; + } + subgraph cluster_32 { + color=blue + 117 [label="Enter when branch condition else"]; + 118 [label="Exit when branch condition"]; + } + 119 [label="Enter when branch result"]; + subgraph cluster_33 { + color=blue + 120 [label="Enter block"]; + 121 [label="Exit block"]; + } + 122 [label="Exit when branch result"]; + 123 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 124 [label="Enter block"]; + 125 [label="Access variable R|/x|"]; + 126 [label="Function call: R|/x|.#()"]; + 127 [label="Access variable R|/y|"]; + 128 [label="Function call: R|/y|.R|/A.foo|()"]; + 129 [label="Exit block"]; + } + 130 [label="Exit when branch result"]; + 131 [label="Exit when"]; + } + 132 [label="Exit block"]; + } + 133 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 100 -> {101}; 101 -> {102}; 102 -> {103}; @@ -346,20 +356,30 @@ digraph boundSmartcasts_kt { 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {109 116}; + 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; - 115 -> {121}; - 116 -> {117}; + 115 -> {116}; + 116 -> {123 117}; 117 -> {118}; 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; - 122 -> {123}; + 122 -> {131}; + 123 -> {124}; + 124 -> {125}; + 125 -> {126}; + 126 -> {127}; + 127 -> {128}; + 128 -> {129}; + 129 -> {130}; + 130 -> {131}; + 131 -> {132}; + 132 -> {133}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.txt b/compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.txt index b4720e4118a..5dc8eabc197 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.txt +++ b/compiler/fir/resolve/testData/resolve/smartcasts/boundSmartcasts.txt @@ -44,7 +44,7 @@ FILE: boundSmartcasts.kt R|/z| = R|/y| when () { (R|/y| is R|B|) -> { - R|/z|.R|/B.bar|() + R|/z|.#() } else -> { } @@ -56,10 +56,10 @@ FILE: boundSmartcasts.kt (R|/x| as R|kotlin/Int|) R|/x|.R|kotlin/Int.inc|() R|/x| = R|/y| - R|/x|.#() + R|/x|.R|kotlin/Int.inc|() when () { (R|/y| is R|A|) -> { - R|/x|.R|/A.foo|() + R|/x|.#() R|/y|.R|/A.foo|() } else -> { diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/casts.dot b/compiler/fir/resolve/testData/resolve/smartcasts/casts.dot index d89c4742ca3..ad2092dcf84 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/casts.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/casts.dot @@ -44,30 +44,32 @@ digraph casts_kt { } subgraph cluster_6 { color=blue - 15 [label="Enter block"]; - 16 [label="Access variable R|/x|"]; - 17 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; - 18 [label="Exit block"]; + 15 [label="Enter when branch condition else"]; + 16 [label="Exit when branch condition"]; } - 19 [label="Exit when branch result"]; + 17 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 20 [label="Enter when branch condition else"]; - 21 [label="Exit when branch condition"]; + 18 [label="Enter block"]; + 19 [label="Exit block"]; } + 20 [label="Exit when branch result"]; + 21 [label="Enter when branch result"]; subgraph cluster_8 { color=blue 22 [label="Enter block"]; - 23 [label="Exit block"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; + 25 [label="Exit block"]; } - 24 [label="Exit when branch result"]; - 25 [label="Exit when"]; + 26 [label="Exit when branch result"]; + 27 [label="Exit when"]; } - 26 [label="Access variable R|/x|"]; - 27 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; - 28 [label="Exit block"]; + 28 [label="Access variable R|/x|"]; + 29 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; + 30 [label="Exit block"]; } - 29 [label="Exit function test_2" style="filled" fillcolor=red]; + 31 [label="Exit function test_2" style="filled" fillcolor=red]; } 8 -> {9}; @@ -76,13 +78,13 @@ digraph casts_kt { 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15 20}; + 14 -> {21 15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {25}; - 20 -> {21}; + 19 -> {20}; + 20 -> {27}; 21 -> {22}; 22 -> {23}; 23 -> {24}; @@ -91,163 +93,169 @@ digraph casts_kt { 26 -> {27}; 27 -> {28}; 28 -> {29}; + 29 -> {30}; + 30 -> {31}; subgraph cluster_9 { color=red - 30 [label="Enter function test_3" style="filled" fillcolor=red]; + 32 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 31 [label="Enter block"]; + 33 [label="Enter block"]; subgraph cluster_11 { color=blue - 32 [label="Enter when"]; + 34 [label="Enter when"]; subgraph cluster_12 { color=blue - 33 [label="Enter when branch condition "]; + 35 [label="Enter when branch condition "]; subgraph cluster_13 { color=blue - 34 [label="Enter &&"]; - 35 [label="Access variable R|/b|"]; - 36 [label="Exit left part of &&"]; - 37 [label="Enter right part of &&"]; - 38 [label="Access variable R|/x|"]; - 39 [label="Type operator: x as Boolean"]; - 40 [label="Exit &&"]; + 36 [label="Enter &&"]; + 37 [label="Access variable R|/b|"]; + 38 [label="Exit left part of &&"]; + 39 [label="Enter right part of &&"]; + 40 [label="Access variable R|/x|"]; + 41 [label="Type operator: x as Boolean"]; + 42 [label="Exit &&"]; } - 41 [label="Exit when branch condition"]; + 43 [label="Exit when branch condition"]; } subgraph cluster_14 { color=blue - 42 [label="Enter block"]; - 43 [label="Access variable R|/x|"]; - 44 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; - 45 [label="Exit block"]; + 44 [label="Enter when branch condition else"]; + 45 [label="Exit when branch condition"]; } - 46 [label="Exit when branch result"]; + 46 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 47 [label="Enter when branch condition else"]; - 48 [label="Exit when branch condition"]; + 47 [label="Enter block"]; + 48 [label="Exit block"]; } + 49 [label="Exit when branch result"]; + 50 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 49 [label="Enter block"]; - 50 [label="Exit block"]; + 51 [label="Enter block"]; + 52 [label="Access variable R|/x|"]; + 53 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; + 54 [label="Exit block"]; } - 51 [label="Exit when branch result"]; - 52 [label="Exit when"]; + 55 [label="Exit when branch result"]; + 56 [label="Exit when"]; } - 53 [label="Access variable R|/x|"]; - 54 [label="Function call: R|/x|.#()"]; + 57 [label="Access variable R|/x|"]; + 58 [label="Function call: R|/x|.#()"]; subgraph cluster_17 { color=blue - 55 [label="Enter when"]; + 59 [label="Enter when"]; subgraph cluster_18 { color=blue - 56 [label="Enter when branch condition "]; + 60 [label="Enter when branch condition "]; subgraph cluster_19 { color=blue - 57 [label="Enter &&"]; - 58 [label="Access variable R|/b|"]; - 59 [label="Exit left part of &&"]; - 60 [label="Enter right part of &&"]; - 61 [label="Access variable R|/x|"]; - 62 [label="Type operator: x as Boolean"]; - 63 [label="Const: Boolean(true)"]; - 64 [label="Operator =="]; - 65 [label="Exit &&"]; + 61 [label="Enter &&"]; + 62 [label="Access variable R|/b|"]; + 63 [label="Exit left part of &&"]; + 64 [label="Enter right part of &&"]; + 65 [label="Access variable R|/x|"]; + 66 [label="Type operator: x as Boolean"]; + 67 [label="Const: Boolean(true)"]; + 68 [label="Operator =="]; + 69 [label="Exit &&"]; } - 66 [label="Exit when branch condition"]; + 70 [label="Exit when branch condition"]; } subgraph cluster_20 { color=blue - 67 [label="Enter block"]; - 68 [label="Access variable R|/x|"]; - 69 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; - 70 [label="Exit block"]; + 71 [label="Enter when branch condition else"]; + 72 [label="Exit when branch condition"]; } - 71 [label="Exit when branch result"]; + 73 [label="Enter when branch result"]; subgraph cluster_21 { - color=blue - 72 [label="Enter when branch condition else"]; - 73 [label="Exit when branch condition"]; - } - subgraph cluster_22 { color=blue 74 [label="Enter block"]; 75 [label="Exit block"]; } 76 [label="Exit when branch result"]; - 77 [label="Exit when"]; + 77 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 78 [label="Enter block"]; + 79 [label="Access variable R|/x|"]; + 80 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; + 81 [label="Exit block"]; + } + 82 [label="Exit when branch result"]; + 83 [label="Exit when"]; } - 78 [label="Access variable R|/x|"]; - 79 [label="Function call: R|/x|.#()"]; + 84 [label="Access variable R|/x|"]; + 85 [label="Function call: R|/x|.#()"]; subgraph cluster_23 { color=blue - 80 [label="Enter when"]; + 86 [label="Enter when"]; subgraph cluster_24 { color=blue - 81 [label="Enter when branch condition "]; + 87 [label="Enter when branch condition "]; subgraph cluster_25 { color=blue - 82 [label="Enter ||"]; - 83 [label="Access variable R|/b|"]; - 84 [label="Exit left part of ||"]; - 85 [label="Enter right part of ||"]; - 86 [label="Access variable R|/x|"]; - 87 [label="Type operator: x as Boolean"]; - 88 [label="Exit ||"]; + 88 [label="Enter ||"]; + 89 [label="Access variable R|/b|"]; + 90 [label="Exit left part of ||"]; + 91 [label="Enter right part of ||"]; + 92 [label="Access variable R|/x|"]; + 93 [label="Type operator: x as Boolean"]; + 94 [label="Exit ||"]; } - 89 [label="Exit when branch condition"]; + 95 [label="Exit when branch condition"]; } subgraph cluster_26 { color=blue - 90 [label="Enter block"]; - 91 [label="Access variable R|/x|"]; - 92 [label="Function call: R|/x|.#()"]; - 93 [label="Exit block"]; + 96 [label="Enter when branch condition else"]; + 97 [label="Exit when branch condition"]; } - 94 [label="Exit when branch result"]; + 98 [label="Enter when branch result"]; subgraph cluster_27 { color=blue - 95 [label="Enter when branch condition else"]; - 96 [label="Exit when branch condition"]; + 99 [label="Enter block"]; + 100 [label="Exit block"]; } + 101 [label="Exit when branch result"]; + 102 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 97 [label="Enter block"]; - 98 [label="Exit block"]; + 103 [label="Enter block"]; + 104 [label="Access variable R|/x|"]; + 105 [label="Function call: R|/x|.#()"]; + 106 [label="Exit block"]; } - 99 [label="Exit when branch result"]; - 100 [label="Exit when"]; + 107 [label="Exit when branch result"]; + 108 [label="Exit when"]; } - 101 [label="Access variable R|/x|"]; - 102 [label="Function call: R|/x|.#()"]; - 103 [label="Exit block"]; + 109 [label="Access variable R|/x|"]; + 110 [label="Function call: R|/x|.#()"]; + 111 [label="Exit block"]; } - 104 [label="Exit function test_3" style="filled" fillcolor=red]; + 112 [label="Exit function test_3" style="filled" fillcolor=red]; } - 30 -> {31}; - 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {40 37}; + 36 -> {37}; 37 -> {38}; - 38 -> {39}; + 38 -> {42 39}; 39 -> {40}; 40 -> {41}; - 41 -> {42 47}; + 41 -> {42}; 42 -> {43}; - 43 -> {44}; + 43 -> {50 44}; 44 -> {45}; 45 -> {46}; - 46 -> {52}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {50}; + 49 -> {56}; 50 -> {51}; 51 -> {52}; 52 -> {53}; @@ -257,24 +265,24 @@ digraph casts_kt { 56 -> {57}; 57 -> {58}; 58 -> {59}; - 59 -> {65 60}; + 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {64}; + 63 -> {69 64}; 64 -> {65}; 65 -> {66}; - 66 -> {67 72}; + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; - 71 -> {77}; + 70 -> {77 71}; + 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {77}; + 76 -> {83}; 77 -> {78}; 78 -> {79}; 79 -> {80}; @@ -282,112 +290,27 @@ digraph casts_kt { 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {88 85}; + 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; - 89 -> {90 95}; - 90 -> {91}; + 89 -> {90}; + 90 -> {94 91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; - 94 -> {100}; - 95 -> {96}; + 94 -> {95}; + 95 -> {102 96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {102}; + 101 -> {108}; 102 -> {103}; 103 -> {104}; - - subgraph cluster_29 { - color=red - 105 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_30 { - color=blue - 106 [label="Enter block"]; - subgraph cluster_31 { - color=blue - 107 [label="Enter when"]; - subgraph cluster_32 { - color=blue - 108 [label="Enter when branch condition "]; - 109 [label="Access variable R|/b|"]; - 110 [label="Type operator: b as? Boolean"]; - 111 [label="Const: Null(null)"]; - 112 [label="Operator !="]; - 113 [label="Exit when branch condition"]; - } - subgraph cluster_33 { - color=blue - 114 [label="Enter block"]; - 115 [label="Access variable R|/b|"]; - 116 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 117 [label="Exit block"]; - } - 118 [label="Exit when branch result"]; - subgraph cluster_34 { - color=blue - 119 [label="Enter when branch condition else"]; - 120 [label="Exit when branch condition"]; - } - subgraph cluster_35 { - color=blue - 121 [label="Enter block"]; - 122 [label="Access variable R|/b|"]; - 123 [label="Function call: R|/b|.#()"]; - 124 [label="Exit block"]; - } - 125 [label="Exit when branch result"]; - 126 [label="Exit when"]; - } - 127 [label="Access variable R|/b|"]; - 128 [label="Function call: R|/b|.#()"]; - subgraph cluster_36 { - color=blue - 129 [label="Enter when"]; - subgraph cluster_37 { - color=blue - 130 [label="Enter when branch condition "]; - 131 [label="Access variable R|/b|"]; - 132 [label="Type operator: b as? Boolean"]; - 133 [label="Const: Null(null)"]; - 134 [label="Operator =="]; - 135 [label="Exit when branch condition"]; - } - subgraph cluster_38 { - color=blue - 136 [label="Enter block"]; - 137 [label="Access variable R|/b|"]; - 138 [label="Function call: R|/b|.#()"]; - 139 [label="Exit block"]; - } - 140 [label="Exit when branch result"]; - subgraph cluster_39 { - color=blue - 141 [label="Enter when branch condition else"]; - 142 [label="Exit when branch condition"]; - } - subgraph cluster_40 { - color=blue - 143 [label="Enter block"]; - 144 [label="Access variable R|/b|"]; - 145 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 146 [label="Exit block"]; - } - 147 [label="Exit when branch result"]; - 148 [label="Exit when"]; - } - 149 [label="Access variable R|/b|"]; - 150 [label="Function call: R|/b|.#()"]; - 151 [label="Exit block"]; - } - 152 [label="Exit function test_4" style="filled" fillcolor=red]; - } - + 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; @@ -395,16 +318,105 @@ digraph casts_kt { 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; - 113 -> {114 119}; + + subgraph cluster_29 { + color=red + 113 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 114 [label="Enter block"]; + subgraph cluster_31 { + color=blue + 115 [label="Enter when"]; + subgraph cluster_32 { + color=blue + 116 [label="Enter when branch condition "]; + 117 [label="Access variable R|/b|"]; + 118 [label="Type operator: b as? Boolean"]; + 119 [label="Const: Null(null)"]; + 120 [label="Operator !="]; + 121 [label="Exit when branch condition"]; + } + subgraph cluster_33 { + color=blue + 122 [label="Enter when branch condition else"]; + 123 [label="Exit when branch condition"]; + } + 124 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 125 [label="Enter block"]; + 126 [label="Access variable R|/b|"]; + 127 [label="Function call: R|/b|.#()"]; + 128 [label="Exit block"]; + } + 129 [label="Exit when branch result"]; + 130 [label="Enter when branch result"]; + subgraph cluster_35 { + color=blue + 131 [label="Enter block"]; + 132 [label="Access variable R|/b|"]; + 133 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 134 [label="Exit block"]; + } + 135 [label="Exit when branch result"]; + 136 [label="Exit when"]; + } + 137 [label="Access variable R|/b|"]; + 138 [label="Function call: R|/b|.#()"]; + subgraph cluster_36 { + color=blue + 139 [label="Enter when"]; + subgraph cluster_37 { + color=blue + 140 [label="Enter when branch condition "]; + 141 [label="Access variable R|/b|"]; + 142 [label="Type operator: b as? Boolean"]; + 143 [label="Const: Null(null)"]; + 144 [label="Operator =="]; + 145 [label="Exit when branch condition"]; + } + subgraph cluster_38 { + color=blue + 146 [label="Enter when branch condition else"]; + 147 [label="Exit when branch condition"]; + } + 148 [label="Enter when branch result"]; + subgraph cluster_39 { + color=blue + 149 [label="Enter block"]; + 150 [label="Access variable R|/b|"]; + 151 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 152 [label="Exit block"]; + } + 153 [label="Exit when branch result"]; + 154 [label="Enter when branch result"]; + subgraph cluster_40 { + color=blue + 155 [label="Enter block"]; + 156 [label="Access variable R|/b|"]; + 157 [label="Function call: R|/b|.#()"]; + 158 [label="Exit block"]; + } + 159 [label="Exit when branch result"]; + 160 [label="Exit when"]; + } + 161 [label="Access variable R|/b|"]; + 162 [label="Function call: R|/b|.#()"]; + 163 [label="Exit block"]; + } + 164 [label="Exit function test_4" style="filled" fillcolor=red]; + } + + 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {126}; + 118 -> {119}; 119 -> {120}; 120 -> {121}; - 121 -> {122}; + 121 -> {130 122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; @@ -412,28 +424,40 @@ digraph casts_kt { 126 -> {127}; 127 -> {128}; 128 -> {129}; - 129 -> {130}; + 129 -> {136}; 130 -> {131}; 131 -> {132}; 132 -> {133}; 133 -> {134}; 134 -> {135}; - 135 -> {136 141}; + 135 -> {136}; 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; - 140 -> {148}; + 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; - 145 -> {146}; + 145 -> {154 146}; 146 -> {147}; 147 -> {148}; 148 -> {149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; + 152 -> {153}; + 153 -> {160}; + 154 -> {155}; + 155 -> {156}; + 156 -> {157}; + 157 -> {158}; + 158 -> {159}; + 159 -> {160}; + 160 -> {161}; + 161 -> {162}; + 162 -> {163}; + 163 -> {164}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/elvis.dot b/compiler/fir/resolve/testData/resolve/smartcasts/elvis.dot index bca0d298c6b..2d792cd3abd 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/elvis.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/elvis.dot @@ -46,52 +46,56 @@ digraph elvis_kt { } subgraph cluster_8 { color=blue - 16 [label="Enter block"]; - 17 [label="Jump: ^test_1 Unit"]; - 18 [label="Stub" style="filled" fillcolor=gray]; - 19 [label="Exit block" style="filled" fillcolor=gray]; + 16 [label="Enter when branch condition else"]; + 17 [label="Exit when branch condition"]; } - 20 [label="Exit when branch result" style="filled" fillcolor=gray]; + 18 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 21 [label="Enter when branch condition else"]; - 22 [label="Exit when branch condition"]; + 19 [label="Enter block"]; + 20 [label="Access variable R|/|"]; + 21 [label="Exit block"]; } + 22 [label="Exit when branch result"]; + 23 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 23 [label="Enter block"]; - 24 [label="Access variable R|/|"]; - 25 [label="Exit block"]; + 24 [label="Enter block"]; + 25 [label="Jump: ^test_1 Unit"]; + 26 [label="Stub" style="filled" fillcolor=gray]; + 27 [label="Exit block" style="filled" fillcolor=gray]; } - 26 [label="Exit when branch result"]; - 27 [label="Exit when"]; + 28 [label="Exit when branch result" style="filled" fillcolor=gray]; + 29 [label="Exit when"]; } - 28 [label="Exit when branch condition"]; + 30 [label="Exit when branch condition"]; } subgraph cluster_11 { color=blue - 29 [label="Enter block"]; - 30 [label="Access variable R|/x|"]; - 31 [label="Function call: R|/x|.R|/A.foo|()"]; - 32 [label="Exit block"]; + 31 [label="Enter when branch condition else"]; + 32 [label="Exit when branch condition"]; } - 33 [label="Exit when branch result"]; + 33 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 34 [label="Enter when branch condition else"]; - 35 [label="Exit when branch condition"]; + 34 [label="Enter block"]; + 35 [label="Exit block"]; } + 36 [label="Exit when branch result"]; + 37 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 36 [label="Enter block"]; - 37 [label="Exit block"]; + 38 [label="Enter block"]; + 39 [label="Access variable R|/x|"]; + 40 [label="Function call: R|/x|.R|/A.foo|()"]; + 41 [label="Exit block"]; } - 38 [label="Exit when branch result"]; - 39 [label="Exit when"]; + 42 [label="Exit when branch result"]; + 43 [label="Exit when"]; } - 40 [label="Exit block"]; + 44 [label="Exit block"]; } - 41 [label="Exit function test_1" style="filled" fillcolor=red]; + 45 [label="Exit function test_1" style="filled" fillcolor=red]; } 4 -> {5}; @@ -105,32 +109,36 @@ digraph elvis_kt { 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16 21}; + 15 -> {23 16}; 16 -> {17}; - 17 -> {41}; - 17 -> {18} [style=dotted]; - 18 -> {19} [style=dotted]; - 19 -> {20} [style=dotted]; - 20 -> {27} [style=dotted]; + 17 -> {18}; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; 21 -> {22}; - 22 -> {23}; + 22 -> {29}; 23 -> {24}; 24 -> {25}; - 25 -> {26}; - 26 -> {27}; - 27 -> {28}; - 28 -> {29 34}; + 25 -> {45}; + 25 -> {26} [style=dotted]; + 26 -> {27} [style=dotted]; + 27 -> {28} [style=dotted]; + 28 -> {29} [style=dotted]; 29 -> {30}; - 30 -> {31}; + 30 -> {37 31}; 31 -> {32}; 32 -> {33}; - 33 -> {39}; + 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37}; + 36 -> {43}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; + 41 -> {42}; + 42 -> {43}; + 43 -> {44}; + 44 -> {45}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/endlessLoops.dot b/compiler/fir/resolve/testData/resolve/smartcasts/endlessLoops.dot index 4b65f552b0f..dbd8d616b2d 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/endlessLoops.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/endlessLoops.dot @@ -45,37 +45,39 @@ digraph endlessLoops_kt { } subgraph cluster_9 { color=blue - 16 [label="Enter block"]; - 17 [label="Jump: break@@@[Boolean(true)] "]; - 18 [label="Stub" style="filled" fillcolor=gray]; - 19 [label="Exit block" style="filled" fillcolor=gray]; + 16 [label="Enter when branch condition else"]; + 17 [label="Exit when branch condition"]; } - 20 [label="Exit when branch result" style="filled" fillcolor=gray]; + 18 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 21 [label="Enter when branch condition else"]; - 22 [label="Exit when branch condition"]; + 19 [label="Enter block"]; + 20 [label="Exit block"]; } + 21 [label="Exit when branch result"]; + 22 [label="Enter when branch result"]; subgraph cluster_11 { color=blue 23 [label="Enter block"]; - 24 [label="Exit block"]; + 24 [label="Jump: break@@@[Boolean(true)] "]; + 25 [label="Stub" style="filled" fillcolor=gray]; + 26 [label="Exit block" style="filled" fillcolor=gray]; } - 25 [label="Exit when branch result"]; - 26 [label="Exit when"]; + 27 [label="Exit when branch result" style="filled" fillcolor=gray]; + 28 [label="Exit when"]; } - 27 [label="Exit block"]; + 29 [label="Exit block"]; } - 28 [label="Exit loop block"]; + 30 [label="Exit loop block"]; } - 29 [label="Stub" style="filled" fillcolor=gray]; - 30 [label="Exit whileloop"]; + 31 [label="Stub" style="filled" fillcolor=gray]; + 32 [label="Exit whileloop"]; } - 31 [label="Access variable R|/x|"]; - 32 [label="Function call: R|/x|.R|/A.foo|()"]; - 33 [label="Exit block"]; + 33 [label="Access variable R|/x|"]; + 34 [label="Function call: R|/x|.R|/A.foo|()"]; + 35 [label="Exit block"]; } - 34 [label="Exit function test_1" style="filled" fillcolor=red]; + 36 [label="Exit function test_1" style="filled" fillcolor=red]; } 2 -> {3}; @@ -84,7 +86,7 @@ digraph endlessLoops_kt { 5 -> {6}; 6 -> {7}; 7 -> {8}; - 7 -> {29} [style=dotted]; + 7 -> {31} [style=dotted]; 8 -> {9}; 9 -> {10}; 10 -> {11}; @@ -92,642 +94,668 @@ digraph endlessLoops_kt { 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16 21}; + 15 -> {22 16}; 16 -> {17}; - 17 -> {30}; - 17 -> {18} [style=dotted]; - 18 -> {19} [style=dotted]; - 19 -> {20} [style=dotted]; - 20 -> {26} [style=dotted]; - 21 -> {22}; + 17 -> {18}; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {28}; 22 -> {23}; 23 -> {24}; - 24 -> {25}; - 25 -> {26}; - 26 -> {27}; - 27 -> {28}; - 28 -> {5}; - 29 -> {30} [style=dotted]; - 30 -> {31}; - 31 -> {32}; + 24 -> {32}; + 24 -> {25} [style=dotted]; + 25 -> {26} [style=dotted]; + 26 -> {27} [style=dotted]; + 27 -> {28} [style=dotted]; + 28 -> {29}; + 29 -> {30}; + 30 -> {5}; + 31 -> {32} [style=dotted]; 32 -> {33}; 33 -> {34}; + 34 -> {35}; + 35 -> {36}; subgraph cluster_12 { color=red - 35 [label="Enter function test_2" style="filled" fillcolor=red]; + 37 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 36 [label="Enter block"]; + 38 [label="Enter block"]; subgraph cluster_14 { color=blue - 37 [label="Enter while loop"]; + 39 [label="Enter while loop"]; subgraph cluster_15 { color=blue - 38 [label="Enter loop condition"]; - 39 [label="Const: Boolean(true)"]; - 40 [label="Exit loop condition"]; + 40 [label="Enter loop condition"]; + 41 [label="Const: Boolean(true)"]; + 42 [label="Exit loop condition"]; } subgraph cluster_16 { color=blue - 41 [label="Enter loop block"]; + 43 [label="Enter loop block"]; subgraph cluster_17 { color=blue - 42 [label="Enter block"]; + 44 [label="Enter block"]; subgraph cluster_18 { color=blue - 43 [label="Enter when"]; + 45 [label="Enter when"]; subgraph cluster_19 { color=blue - 44 [label="Enter when branch condition "]; - 45 [label="Access variable R|/b|"]; - 46 [label="Exit when branch condition"]; + 46 [label="Enter when branch condition "]; + 47 [label="Access variable R|/b|"]; + 48 [label="Exit when branch condition"]; } subgraph cluster_20 { color=blue - 47 [label="Enter block"]; - 48 [label="Access variable R|/x|"]; - 49 [label="Type operator: x as A"]; - 50 [label="Jump: break@@@[Boolean(true)] "]; - 51 [label="Stub" style="filled" fillcolor=gray]; - 52 [label="Exit block" style="filled" fillcolor=gray]; + 49 [label="Enter when branch condition else"]; + 50 [label="Exit when branch condition"]; } - 53 [label="Exit when branch result" style="filled" fillcolor=gray]; + 51 [label="Enter when branch result"]; subgraph cluster_21 { color=blue - 54 [label="Enter when branch condition else"]; - 55 [label="Exit when branch condition"]; + 52 [label="Enter block"]; + 53 [label="Exit block"]; } + 54 [label="Exit when branch result"]; + 55 [label="Enter when branch result"]; subgraph cluster_22 { color=blue 56 [label="Enter block"]; - 57 [label="Exit block"]; + 57 [label="Access variable R|/x|"]; + 58 [label="Type operator: x as A"]; + 59 [label="Jump: break@@@[Boolean(true)] "]; + 60 [label="Stub" style="filled" fillcolor=gray]; + 61 [label="Exit block" style="filled" fillcolor=gray]; } - 58 [label="Exit when branch result"]; - 59 [label="Exit when"]; + 62 [label="Exit when branch result" style="filled" fillcolor=gray]; + 63 [label="Exit when"]; } - 60 [label="Exit block"]; + 64 [label="Exit block"]; } - 61 [label="Exit loop block"]; + 65 [label="Exit loop block"]; } - 62 [label="Stub" style="filled" fillcolor=gray]; - 63 [label="Exit whileloop"]; + 66 [label="Stub" style="filled" fillcolor=gray]; + 67 [label="Exit whileloop"]; } - 64 [label="Access variable R|/x|"]; - 65 [label="Function call: R|/x|.R|/A.foo|()"]; - 66 [label="Exit block"]; + 68 [label="Access variable R|/x|"]; + 69 [label="Function call: R|/x|.R|/A.foo|()"]; + 70 [label="Exit block"]; } - 67 [label="Exit function test_2" style="filled" fillcolor=red]; + 71 [label="Exit function test_2" style="filled" fillcolor=red]; } - 35 -> {36}; - 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 40 -> {62} [style=dotted]; 41 -> {42}; 42 -> {43}; + 42 -> {66} [style=dotted]; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47 54}; + 46 -> {47}; 47 -> {48}; - 48 -> {49}; + 48 -> {55 49}; 49 -> {50}; - 50 -> {63}; - 50 -> {51} [style=dotted]; - 51 -> {52} [style=dotted]; - 52 -> {53} [style=dotted]; - 53 -> {59} [style=dotted]; - 54 -> {55}; + 50 -> {51}; + 51 -> {52}; + 52 -> {53}; + 53 -> {54}; + 54 -> {63}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; - 59 -> {60}; - 60 -> {61}; - 61 -> {38}; + 59 -> {67}; + 59 -> {60} [style=dotted]; + 60 -> {61} [style=dotted]; + 61 -> {62} [style=dotted]; 62 -> {63} [style=dotted]; 63 -> {64}; 64 -> {65}; - 65 -> {66}; - 66 -> {67}; + 65 -> {40}; + 66 -> {67} [style=dotted]; + 67 -> {68}; + 68 -> {69}; + 69 -> {70}; + 70 -> {71}; subgraph cluster_23 { color=red - 68 [label="Enter function test_3" style="filled" fillcolor=red]; + 72 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_24 { color=blue - 69 [label="Enter block"]; + 73 [label="Enter block"]; subgraph cluster_25 { color=blue - 70 [label="Enter while loop"]; + 74 [label="Enter while loop"]; subgraph cluster_26 { color=blue - 71 [label="Enter loop condition"]; - 72 [label="Const: Boolean(true)"]; - 73 [label="Exit loop condition"]; + 75 [label="Enter loop condition"]; + 76 [label="Const: Boolean(true)"]; + 77 [label="Exit loop condition"]; } subgraph cluster_27 { color=blue - 74 [label="Enter loop block"]; + 78 [label="Enter loop block"]; subgraph cluster_28 { color=blue - 75 [label="Enter block"]; - 76 [label="Access variable R|/x|"]; - 77 [label="Type operator: x as A"]; + 79 [label="Enter block"]; + 80 [label="Access variable R|/x|"]; + 81 [label="Type operator: x as A"]; subgraph cluster_29 { color=blue - 78 [label="Enter when"]; + 82 [label="Enter when"]; subgraph cluster_30 { color=blue - 79 [label="Enter when branch condition "]; - 80 [label="Access variable R|/b|"]; - 81 [label="Exit when branch condition"]; + 83 [label="Enter when branch condition "]; + 84 [label="Access variable R|/b|"]; + 85 [label="Exit when branch condition"]; } subgraph cluster_31 { color=blue - 82 [label="Enter block"]; - 83 [label="Jump: break@@@[Boolean(true)] "]; - 84 [label="Stub" style="filled" fillcolor=gray]; - 85 [label="Exit block" style="filled" fillcolor=gray]; + 86 [label="Enter when branch condition else"]; + 87 [label="Exit when branch condition"]; } - 86 [label="Exit when branch result" style="filled" fillcolor=gray]; + 88 [label="Enter when branch result"]; subgraph cluster_32 { - color=blue - 87 [label="Enter when branch condition else"]; - 88 [label="Exit when branch condition"]; - } - subgraph cluster_33 { color=blue 89 [label="Enter block"]; 90 [label="Exit block"]; } 91 [label="Exit when branch result"]; - 92 [label="Exit when"]; + 92 [label="Enter when branch result"]; + subgraph cluster_33 { + color=blue + 93 [label="Enter block"]; + 94 [label="Jump: break@@@[Boolean(true)] "]; + 95 [label="Stub" style="filled" fillcolor=gray]; + 96 [label="Exit block" style="filled" fillcolor=gray]; + } + 97 [label="Exit when branch result" style="filled" fillcolor=gray]; + 98 [label="Exit when"]; } subgraph cluster_34 { color=blue - 93 [label="Enter when"]; + 99 [label="Enter when"]; subgraph cluster_35 { color=blue - 94 [label="Enter when branch condition "]; - 95 [label="Access variable R|/b|"]; - 96 [label="Exit when branch condition"]; + 100 [label="Enter when branch condition "]; + 101 [label="Access variable R|/b|"]; + 102 [label="Exit when branch condition"]; } subgraph cluster_36 { color=blue - 97 [label="Enter block"]; - 98 [label="Jump: break@@@[Boolean(true)] "]; - 99 [label="Stub" style="filled" fillcolor=gray]; - 100 [label="Exit block" style="filled" fillcolor=gray]; + 103 [label="Enter when branch condition else"]; + 104 [label="Exit when branch condition"]; } - 101 [label="Exit when branch result" style="filled" fillcolor=gray]; + 105 [label="Enter when branch result"]; subgraph cluster_37 { color=blue - 102 [label="Enter when branch condition else"]; - 103 [label="Exit when branch condition"]; + 106 [label="Enter block"]; + 107 [label="Exit block"]; } + 108 [label="Exit when branch result"]; + 109 [label="Enter when branch result"]; subgraph cluster_38 { color=blue - 104 [label="Enter block"]; - 105 [label="Exit block"]; + 110 [label="Enter block"]; + 111 [label="Jump: break@@@[Boolean(true)] "]; + 112 [label="Stub" style="filled" fillcolor=gray]; + 113 [label="Exit block" style="filled" fillcolor=gray]; } - 106 [label="Exit when branch result"]; - 107 [label="Exit when"]; + 114 [label="Exit when branch result" style="filled" fillcolor=gray]; + 115 [label="Exit when"]; } - 108 [label="Exit block"]; + 116 [label="Exit block"]; } - 109 [label="Exit loop block"]; + 117 [label="Exit loop block"]; } - 110 [label="Stub" style="filled" fillcolor=gray]; - 111 [label="Exit whileloop"]; + 118 [label="Stub" style="filled" fillcolor=gray]; + 119 [label="Exit whileloop"]; } - 112 [label="Access variable R|/x|"]; - 113 [label="Function call: R|/x|.R|/A.foo|()"]; - 114 [label="Exit block"]; + 120 [label="Access variable R|/x|"]; + 121 [label="Function call: R|/x|.R|/A.foo|()"]; + 122 [label="Exit block"]; } - 115 [label="Exit function test_3" style="filled" fillcolor=red]; + 123 [label="Exit function test_3" style="filled" fillcolor=red]; } - 68 -> {69}; - 69 -> {70}; - 70 -> {71}; - 71 -> {72}; 72 -> {73}; 73 -> {74}; - 73 -> {110} [style=dotted]; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; + 77 -> {118} [style=dotted]; 78 -> {79}; 79 -> {80}; 80 -> {81}; - 81 -> {82 87}; + 81 -> {82}; 82 -> {83}; - 83 -> {111}; - 83 -> {84} [style=dotted]; - 84 -> {85} [style=dotted]; - 85 -> {86} [style=dotted]; - 86 -> {92} [style=dotted]; + 83 -> {84}; + 84 -> {85}; + 85 -> {92 86}; + 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; - 91 -> {92}; + 91 -> {98}; 92 -> {93}; 93 -> {94}; - 94 -> {95}; - 95 -> {96}; - 96 -> {97 102}; - 97 -> {98}; - 98 -> {111}; - 98 -> {99} [style=dotted]; - 99 -> {100} [style=dotted]; - 100 -> {101} [style=dotted]; - 101 -> {107} [style=dotted]; - 102 -> {103}; + 94 -> {119}; + 94 -> {95} [style=dotted]; + 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; + 97 -> {98} [style=dotted]; + 98 -> {99}; + 99 -> {100}; + 100 -> {101}; + 101 -> {102}; + 102 -> {109 103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {109}; - 109 -> {71}; - 110 -> {111} [style=dotted]; - 111 -> {112}; - 112 -> {113}; - 113 -> {114}; - 114 -> {115}; - - subgraph cluster_39 { - color=red - 116 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_40 { - color=blue - 117 [label="Enter block"]; - subgraph cluster_41 { - color=blue - 118 [label="Enter while loop"]; - subgraph cluster_42 { - color=blue - 119 [label="Enter loop condition"]; - 120 [label="Const: Boolean(true)"]; - 121 [label="Exit loop condition"]; - } - subgraph cluster_43 { - color=blue - 122 [label="Enter loop block"]; - subgraph cluster_44 { - color=blue - 123 [label="Enter block"]; - subgraph cluster_45 { - color=blue - 124 [label="Enter when"]; - subgraph cluster_46 { - color=blue - 125 [label="Enter when branch condition "]; - 126 [label="Access variable R|/b|"]; - 127 [label="Exit when branch condition"]; - } - subgraph cluster_47 { - color=blue - 128 [label="Enter block"]; - 129 [label="Access variable R|/x|"]; - 130 [label="Type operator: x as A"]; - 131 [label="Jump: break@@@[Boolean(true)] "]; - 132 [label="Stub" style="filled" fillcolor=gray]; - 133 [label="Exit block" style="filled" fillcolor=gray]; - } - 134 [label="Exit when branch result" style="filled" fillcolor=gray]; - subgraph cluster_48 { - color=blue - 135 [label="Enter when branch condition else"]; - 136 [label="Exit when branch condition"]; - } - subgraph cluster_49 { - color=blue - 137 [label="Enter block"]; - 138 [label="Exit block"]; - } - 139 [label="Exit when branch result"]; - 140 [label="Exit when"]; - } - 141 [label="Jump: break@@@[Boolean(true)] "]; - 142 [label="Stub" style="filled" fillcolor=gray]; - 143 [label="Exit block" style="filled" fillcolor=gray]; - } - 144 [label="Exit loop block" style="filled" fillcolor=gray]; - } - 145 [label="Stub" style="filled" fillcolor=gray]; - 146 [label="Exit whileloop"]; - } - 147 [label="Access variable R|/x|"]; - 148 [label="Function call: R|/x|.#()"]; - 149 [label="Exit block"]; - } - 150 [label="Exit function test_4" style="filled" fillcolor=red]; - } - + 108 -> {115}; + 109 -> {110}; + 110 -> {111}; + 111 -> {119}; + 111 -> {112} [style=dotted]; + 112 -> {113} [style=dotted]; + 113 -> {114} [style=dotted]; + 114 -> {115} [style=dotted]; + 115 -> {116}; 116 -> {117}; - 117 -> {118}; - 118 -> {119}; + 117 -> {75}; + 118 -> {119} [style=dotted]; 119 -> {120}; 120 -> {121}; 121 -> {122}; - 121 -> {145} [style=dotted]; 122 -> {123}; - 123 -> {124}; + + subgraph cluster_39 { + color=red + 124 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_40 { + color=blue + 125 [label="Enter block"]; + subgraph cluster_41 { + color=blue + 126 [label="Enter while loop"]; + subgraph cluster_42 { + color=blue + 127 [label="Enter loop condition"]; + 128 [label="Const: Boolean(true)"]; + 129 [label="Exit loop condition"]; + } + subgraph cluster_43 { + color=blue + 130 [label="Enter loop block"]; + subgraph cluster_44 { + color=blue + 131 [label="Enter block"]; + subgraph cluster_45 { + color=blue + 132 [label="Enter when"]; + subgraph cluster_46 { + color=blue + 133 [label="Enter when branch condition "]; + 134 [label="Access variable R|/b|"]; + 135 [label="Exit when branch condition"]; + } + subgraph cluster_47 { + color=blue + 136 [label="Enter when branch condition else"]; + 137 [label="Exit when branch condition"]; + } + 138 [label="Enter when branch result"]; + subgraph cluster_48 { + color=blue + 139 [label="Enter block"]; + 140 [label="Exit block"]; + } + 141 [label="Exit when branch result"]; + 142 [label="Enter when branch result"]; + subgraph cluster_49 { + color=blue + 143 [label="Enter block"]; + 144 [label="Access variable R|/x|"]; + 145 [label="Type operator: x as A"]; + 146 [label="Jump: break@@@[Boolean(true)] "]; + 147 [label="Stub" style="filled" fillcolor=gray]; + 148 [label="Exit block" style="filled" fillcolor=gray]; + } + 149 [label="Exit when branch result" style="filled" fillcolor=gray]; + 150 [label="Exit when"]; + } + 151 [label="Jump: break@@@[Boolean(true)] "]; + 152 [label="Stub" style="filled" fillcolor=gray]; + 153 [label="Exit block" style="filled" fillcolor=gray]; + } + 154 [label="Exit loop block" style="filled" fillcolor=gray]; + } + 155 [label="Stub" style="filled" fillcolor=gray]; + 156 [label="Exit whileloop"]; + } + 157 [label="Access variable R|/x|"]; + 158 [label="Function call: R|/x|.#()"]; + 159 [label="Exit block"]; + } + 160 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {128 135}; + 127 -> {128}; 128 -> {129}; 129 -> {130}; + 129 -> {155} [style=dotted]; 130 -> {131}; - 131 -> {146}; - 131 -> {132} [style=dotted]; - 132 -> {133} [style=dotted]; - 133 -> {134} [style=dotted]; - 134 -> {140} [style=dotted]; - 135 -> {136}; + 131 -> {132}; + 132 -> {133}; + 133 -> {134}; + 134 -> {135}; + 135 -> {142 136}; 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {146}; - 141 -> {142} [style=dotted]; - 142 -> {143} [style=dotted]; - 143 -> {144} [style=dotted]; - 144 -> {119} [style=dotted]; - 145 -> {146} [style=dotted]; - 146 -> {147}; - 147 -> {148}; - 148 -> {149}; - 149 -> {150}; - - subgraph cluster_50 { - color=red - 151 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_51 { - color=blue - 152 [label="Enter block"]; - subgraph cluster_52 { - color=blue - 153 [label="Enter do-while loop"]; - subgraph cluster_53 { - color=blue - 154 [label="Enter loop block"]; - subgraph cluster_54 { - color=blue - 155 [label="Enter block"]; - subgraph cluster_55 { - color=blue - 156 [label="Enter when"]; - subgraph cluster_56 { - color=blue - 157 [label="Enter when branch condition "]; - 158 [label="Access variable R|/b|"]; - 159 [label="Exit when branch condition"]; - } - subgraph cluster_57 { - color=blue - 160 [label="Enter block"]; - 161 [label="Access variable R|/x|"]; - 162 [label="Type operator: x as A"]; - 163 [label="Jump: break@@@[Boolean(true)] "]; - 164 [label="Stub" style="filled" fillcolor=gray]; - 165 [label="Exit block" style="filled" fillcolor=gray]; - } - 166 [label="Exit when branch result" style="filled" fillcolor=gray]; - subgraph cluster_58 { - color=blue - 167 [label="Enter when branch condition else"]; - 168 [label="Exit when branch condition"]; - } - subgraph cluster_59 { - color=blue - 169 [label="Enter block"]; - 170 [label="Exit block"]; - } - 171 [label="Exit when branch result"]; - 172 [label="Exit when"]; - } - 173 [label="Exit block"]; - } - 174 [label="Exit loop block"]; - } - subgraph cluster_60 { - color=blue - 175 [label="Enter loop condition"]; - 176 [label="Const: Boolean(true)"]; - 177 [label="Exit loop condition"]; - } - 178 [label="Stub" style="filled" fillcolor=gray]; - 179 [label="Exit do-whileloop"]; - } - 180 [label="Access variable R|/x|"]; - 181 [label="Function call: R|/x|.R|/A.foo|()"]; - 182 [label="Exit block"]; - } - 183 [label="Exit function test_5" style="filled" fillcolor=red]; - } - - 151 -> {152}; - 152 -> {153}; - 153 -> {154}; - 154 -> {155}; - 155 -> {156}; + 141 -> {150}; + 142 -> {143}; + 143 -> {144}; + 144 -> {145}; + 145 -> {146}; + 146 -> {156}; + 146 -> {147} [style=dotted]; + 147 -> {148} [style=dotted]; + 148 -> {149} [style=dotted]; + 149 -> {150} [style=dotted]; + 150 -> {151}; + 151 -> {156}; + 151 -> {152} [style=dotted]; + 152 -> {153} [style=dotted]; + 153 -> {154} [style=dotted]; + 154 -> {127} [style=dotted]; + 155 -> {156} [style=dotted]; 156 -> {157}; 157 -> {158}; 158 -> {159}; - 159 -> {160 167}; - 160 -> {161}; + 159 -> {160}; + + subgraph cluster_50 { + color=red + 161 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_51 { + color=blue + 162 [label="Enter block"]; + subgraph cluster_52 { + color=blue + 163 [label="Enter do-while loop"]; + subgraph cluster_53 { + color=blue + 164 [label="Enter loop block"]; + subgraph cluster_54 { + color=blue + 165 [label="Enter block"]; + subgraph cluster_55 { + color=blue + 166 [label="Enter when"]; + subgraph cluster_56 { + color=blue + 167 [label="Enter when branch condition "]; + 168 [label="Access variable R|/b|"]; + 169 [label="Exit when branch condition"]; + } + subgraph cluster_57 { + color=blue + 170 [label="Enter when branch condition else"]; + 171 [label="Exit when branch condition"]; + } + 172 [label="Enter when branch result"]; + subgraph cluster_58 { + color=blue + 173 [label="Enter block"]; + 174 [label="Exit block"]; + } + 175 [label="Exit when branch result"]; + 176 [label="Enter when branch result"]; + subgraph cluster_59 { + color=blue + 177 [label="Enter block"]; + 178 [label="Access variable R|/x|"]; + 179 [label="Type operator: x as A"]; + 180 [label="Jump: break@@@[Boolean(true)] "]; + 181 [label="Stub" style="filled" fillcolor=gray]; + 182 [label="Exit block" style="filled" fillcolor=gray]; + } + 183 [label="Exit when branch result" style="filled" fillcolor=gray]; + 184 [label="Exit when"]; + } + 185 [label="Exit block"]; + } + 186 [label="Exit loop block"]; + } + subgraph cluster_60 { + color=blue + 187 [label="Enter loop condition"]; + 188 [label="Const: Boolean(true)"]; + 189 [label="Exit loop condition"]; + } + 190 [label="Stub" style="filled" fillcolor=gray]; + 191 [label="Exit do-whileloop"]; + } + 192 [label="Access variable R|/x|"]; + 193 [label="Function call: R|/x|.R|/A.foo|()"]; + 194 [label="Exit block"]; + } + 195 [label="Exit function test_5" style="filled" fillcolor=red]; + } + 161 -> {162}; 162 -> {163}; - 163 -> {179}; - 163 -> {164} [style=dotted]; - 164 -> {165} [style=dotted]; - 165 -> {166} [style=dotted]; - 166 -> {172} [style=dotted]; + 163 -> {164}; + 164 -> {165}; + 165 -> {166}; + 166 -> {167}; 167 -> {168}; 168 -> {169}; - 169 -> {170}; + 169 -> {176 170}; 170 -> {171}; 171 -> {172}; 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {176}; + 175 -> {184}; 176 -> {177}; - 177 -> {154}; - 177 -> {178} [style=dotted]; - 178 -> {179} [style=dotted]; + 177 -> {178}; + 178 -> {179}; 179 -> {180}; - 180 -> {181}; - 181 -> {182}; - 182 -> {183}; - - subgraph cluster_61 { - color=red - 184 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_62 { - color=blue - 185 [label="Enter block"]; - subgraph cluster_63 { - color=blue - 186 [label="Enter do-while loop"]; - subgraph cluster_64 { - color=blue - 187 [label="Enter loop block"]; - subgraph cluster_65 { - color=blue - 188 [label="Enter block"]; - 189 [label="Access variable R|/x|"]; - 190 [label="Type operator: x as A"]; - subgraph cluster_66 { - color=blue - 191 [label="Enter when"]; - subgraph cluster_67 { - color=blue - 192 [label="Enter when branch condition "]; - 193 [label="Access variable R|/b|"]; - 194 [label="Exit when branch condition"]; - } - subgraph cluster_68 { - color=blue - 195 [label="Enter block"]; - 196 [label="Jump: break@@@[Boolean(true)] "]; - 197 [label="Stub" style="filled" fillcolor=gray]; - 198 [label="Exit block" style="filled" fillcolor=gray]; - } - 199 [label="Exit when branch result" style="filled" fillcolor=gray]; - subgraph cluster_69 { - color=blue - 200 [label="Enter when branch condition else"]; - 201 [label="Exit when branch condition"]; - } - subgraph cluster_70 { - color=blue - 202 [label="Enter block"]; - 203 [label="Exit block"]; - } - 204 [label="Exit when branch result"]; - 205 [label="Exit when"]; - } - 206 [label="Exit block"]; - } - 207 [label="Exit loop block"]; - } - subgraph cluster_71 { - color=blue - 208 [label="Enter loop condition"]; - 209 [label="Const: Boolean(true)"]; - 210 [label="Exit loop condition"]; - } - 211 [label="Stub" style="filled" fillcolor=gray]; - 212 [label="Exit do-whileloop"]; - } - 213 [label="Access variable R|/x|"]; - 214 [label="Function call: R|/x|.R|/A.foo|()"]; - 215 [label="Exit block"]; - } - 216 [label="Exit function test_6" style="filled" fillcolor=red]; - } - + 180 -> {191}; + 180 -> {181} [style=dotted]; + 181 -> {182} [style=dotted]; + 182 -> {183} [style=dotted]; + 183 -> {184} [style=dotted]; 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; - 189 -> {190}; - 190 -> {191}; + 189 -> {164}; + 189 -> {190} [style=dotted]; + 190 -> {191} [style=dotted]; 191 -> {192}; 192 -> {193}; 193 -> {194}; - 194 -> {195 200}; - 195 -> {196}; - 196 -> {212}; - 196 -> {197} [style=dotted]; - 197 -> {198} [style=dotted]; - 198 -> {199} [style=dotted]; - 199 -> {205} [style=dotted]; + 194 -> {195}; + + subgraph cluster_61 { + color=red + 196 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_62 { + color=blue + 197 [label="Enter block"]; + subgraph cluster_63 { + color=blue + 198 [label="Enter do-while loop"]; + subgraph cluster_64 { + color=blue + 199 [label="Enter loop block"]; + subgraph cluster_65 { + color=blue + 200 [label="Enter block"]; + 201 [label="Access variable R|/x|"]; + 202 [label="Type operator: x as A"]; + subgraph cluster_66 { + color=blue + 203 [label="Enter when"]; + subgraph cluster_67 { + color=blue + 204 [label="Enter when branch condition "]; + 205 [label="Access variable R|/b|"]; + 206 [label="Exit when branch condition"]; + } + subgraph cluster_68 { + color=blue + 207 [label="Enter when branch condition else"]; + 208 [label="Exit when branch condition"]; + } + 209 [label="Enter when branch result"]; + subgraph cluster_69 { + color=blue + 210 [label="Enter block"]; + 211 [label="Exit block"]; + } + 212 [label="Exit when branch result"]; + 213 [label="Enter when branch result"]; + subgraph cluster_70 { + color=blue + 214 [label="Enter block"]; + 215 [label="Jump: break@@@[Boolean(true)] "]; + 216 [label="Stub" style="filled" fillcolor=gray]; + 217 [label="Exit block" style="filled" fillcolor=gray]; + } + 218 [label="Exit when branch result" style="filled" fillcolor=gray]; + 219 [label="Exit when"]; + } + 220 [label="Exit block"]; + } + 221 [label="Exit loop block"]; + } + subgraph cluster_71 { + color=blue + 222 [label="Enter loop condition"]; + 223 [label="Const: Boolean(true)"]; + 224 [label="Exit loop condition"]; + } + 225 [label="Stub" style="filled" fillcolor=gray]; + 226 [label="Exit do-whileloop"]; + } + 227 [label="Access variable R|/x|"]; + 228 [label="Function call: R|/x|.R|/A.foo|()"]; + 229 [label="Exit block"]; + } + 230 [label="Exit function test_6" style="filled" fillcolor=red]; + } + + 196 -> {197}; + 197 -> {198}; + 198 -> {199}; + 199 -> {200}; 200 -> {201}; 201 -> {202}; 202 -> {203}; 203 -> {204}; 204 -> {205}; 205 -> {206}; - 206 -> {207}; + 206 -> {213 207}; 207 -> {208}; 208 -> {209}; 209 -> {210}; - 210 -> {187}; - 210 -> {211} [style=dotted]; - 211 -> {212} [style=dotted]; - 212 -> {213}; + 210 -> {211}; + 211 -> {212}; + 212 -> {219}; 213 -> {214}; 214 -> {215}; - 215 -> {216}; - - subgraph cluster_72 { - color=red - 217 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_73 { - color=blue - 218 [label="Enter block"]; - subgraph cluster_74 { - color=blue - 219 [label="Enter do-while loop"]; - subgraph cluster_75 { - color=blue - 220 [label="Enter loop block"]; - subgraph cluster_76 { - color=blue - 221 [label="Enter block"]; - 222 [label="Access variable R|/x|"]; - 223 [label="Type operator: x as A"]; - 224 [label="Exit block"]; - } - 225 [label="Exit loop block"]; - } - subgraph cluster_77 { - color=blue - 226 [label="Enter loop condition"]; - 227 [label="Const: Boolean(true)"]; - 228 [label="Exit loop condition"]; - } - 229 [label="Stub" style="filled" fillcolor=gray]; - 230 [label="Exit do-whileloop" style="filled" fillcolor=gray]; - } - 231 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 232 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 233 [label="Exit block" style="filled" fillcolor=gray]; - } - 234 [label="Exit function test_7" style="filled" fillcolor=red style="filled" fillcolor=gray]; - } - - 217 -> {218}; - 218 -> {219}; + 215 -> {226}; + 215 -> {216} [style=dotted]; + 216 -> {217} [style=dotted]; + 217 -> {218} [style=dotted]; + 218 -> {219} [style=dotted]; 219 -> {220}; 220 -> {221}; 221 -> {222}; 222 -> {223}; 223 -> {224}; - 224 -> {225}; - 225 -> {226}; + 224 -> {199}; + 224 -> {225} [style=dotted]; + 225 -> {226} [style=dotted]; 226 -> {227}; 227 -> {228}; - 228 -> {220}; - 228 -> {229} [style=dotted]; - 229 -> {230} [style=dotted]; - 230 -> {231} [style=dotted]; - 231 -> {232} [style=dotted]; - 232 -> {233} [style=dotted]; - 233 -> {234} [style=dotted]; + 228 -> {229}; + 229 -> {230}; + + subgraph cluster_72 { + color=red + 231 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_73 { + color=blue + 232 [label="Enter block"]; + subgraph cluster_74 { + color=blue + 233 [label="Enter do-while loop"]; + subgraph cluster_75 { + color=blue + 234 [label="Enter loop block"]; + subgraph cluster_76 { + color=blue + 235 [label="Enter block"]; + 236 [label="Access variable R|/x|"]; + 237 [label="Type operator: x as A"]; + 238 [label="Exit block"]; + } + 239 [label="Exit loop block"]; + } + subgraph cluster_77 { + color=blue + 240 [label="Enter loop condition"]; + 241 [label="Const: Boolean(true)"]; + 242 [label="Exit loop condition"]; + } + 243 [label="Stub" style="filled" fillcolor=gray]; + 244 [label="Exit do-whileloop" style="filled" fillcolor=gray]; + } + 245 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 246 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + 247 [label="Exit block" style="filled" fillcolor=gray]; + } + 248 [label="Exit function test_7" style="filled" fillcolor=red style="filled" fillcolor=gray]; + } + + 231 -> {232}; + 232 -> {233}; + 233 -> {234}; + 234 -> {235}; + 235 -> {236}; + 236 -> {237}; + 237 -> {238}; + 238 -> {239}; + 239 -> {240}; + 240 -> {241}; + 241 -> {242}; + 242 -> {234}; + 242 -> {243} [style=dotted]; + 243 -> {244} [style=dotted]; + 244 -> {245} [style=dotted]; + 245 -> {246} [style=dotted]; + 246 -> {247} [style=dotted]; + 247 -> {248} [style=dotted]; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/equalsAndIdentity.dot b/compiler/fir/resolve/testData/resolve/smartcasts/equalsAndIdentity.dot index 24a78d4428c..fb6b5e9bd58 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/equalsAndIdentity.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/equalsAndIdentity.dot @@ -30,64 +30,68 @@ digraph equalsAndIdentity_kt { } subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Access variable R|/x|"]; - 12 [label="Function call: R|/x|.R|/A.foo|()"]; - 13 [label="Access variable R|/y|"]; - 14 [label="Function call: R|/y|.R|/A.foo|()"]; - 15 [label="Exit block"]; + 10 [label="Enter when branch condition else"]; + 11 [label="Exit when branch condition"]; } - 16 [label="Exit when branch result"]; + 12 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 17 [label="Enter when branch condition else"]; - 18 [label="Exit when branch condition"]; + 13 [label="Enter block"]; + 14 [label="Exit block"]; } + 15 [label="Exit when branch result"]; + 16 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 19 [label="Enter block"]; - 20 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Access variable R|/x|"]; + 19 [label="Function call: R|/x|.R|/A.foo|()"]; + 20 [label="Access variable R|/y|"]; + 21 [label="Function call: R|/y|.R|/A.foo|()"]; + 22 [label="Exit block"]; } - 21 [label="Exit when branch result"]; - 22 [label="Exit when"]; + 23 [label="Exit when branch result"]; + 24 [label="Exit when"]; } subgraph cluster_8 { color=blue - 23 [label="Enter when"]; + 25 [label="Enter when"]; subgraph cluster_9 { color=blue - 24 [label="Enter when branch condition "]; - 25 [label="Access variable R|/x|"]; - 26 [label="Access variable R|/y|"]; - 27 [label="Operator ==="]; - 28 [label="Exit when branch condition"]; + 26 [label="Enter when branch condition "]; + 27 [label="Access variable R|/x|"]; + 28 [label="Access variable R|/y|"]; + 29 [label="Operator ==="]; + 30 [label="Exit when branch condition"]; } subgraph cluster_10 { color=blue - 29 [label="Enter block"]; - 30 [label="Access variable R|/x|"]; - 31 [label="Function call: R|/x|.R|/A.foo|()"]; - 32 [label="Access variable R|/y|"]; - 33 [label="Function call: R|/y|.R|/A.foo|()"]; - 34 [label="Exit block"]; + 31 [label="Enter when branch condition else"]; + 32 [label="Exit when branch condition"]; } - 35 [label="Exit when branch result"]; + 33 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 36 [label="Enter when branch condition else"]; - 37 [label="Exit when branch condition"]; + 34 [label="Enter block"]; + 35 [label="Exit block"]; } + 36 [label="Exit when branch result"]; + 37 [label="Enter when branch result"]; subgraph cluster_12 { color=blue 38 [label="Enter block"]; - 39 [label="Exit block"]; + 39 [label="Access variable R|/x|"]; + 40 [label="Function call: R|/x|.R|/A.foo|()"]; + 41 [label="Access variable R|/y|"]; + 42 [label="Function call: R|/y|.R|/A.foo|()"]; + 43 [label="Exit block"]; } - 40 [label="Exit when branch result"]; - 41 [label="Exit when"]; + 44 [label="Exit when branch result"]; + 45 [label="Exit when"]; } - 42 [label="Exit block"]; + 46 [label="Exit block"]; } - 43 [label="Exit function test_1" style="filled" fillcolor=red]; + 47 [label="Exit function test_1" style="filled" fillcolor=red]; } 2 -> {3}; @@ -97,14 +101,14 @@ digraph equalsAndIdentity_kt { 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {10 17}; + 9 -> {16 10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16}; - 16 -> {22}; + 15 -> {24}; + 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; @@ -116,119 +120,123 @@ digraph equalsAndIdentity_kt { 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29 36}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {37 31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {41}; - 36 -> {37}; + 35 -> {36}; + 36 -> {45}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; + 43 -> {44}; + 44 -> {45}; + 45 -> {46}; + 46 -> {47}; subgraph cluster_13 { color=red - 44 [label="Enter function test_2" style="filled" fillcolor=red]; + 48 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 45 [label="Enter block"]; + 49 [label="Enter block"]; subgraph cluster_15 { color=blue - 46 [label="Enter when"]; + 50 [label="Enter when"]; subgraph cluster_16 { color=blue - 47 [label="Enter when branch condition "]; - 48 [label="Access variable R|/x|"]; - 49 [label="Access variable R|/y|"]; - 50 [label="Operator =="]; - 51 [label="Exit when branch condition"]; + 51 [label="Enter when branch condition "]; + 52 [label="Access variable R|/x|"]; + 53 [label="Access variable R|/y|"]; + 54 [label="Operator =="]; + 55 [label="Exit when branch condition"]; } subgraph cluster_17 { color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/x|"]; - 54 [label="Function call: R|/x|.#()"]; - 55 [label="Access variable R|/y|"]; - 56 [label="Function call: R|/y|.#()"]; - 57 [label="Exit block"]; + 56 [label="Enter when branch condition else"]; + 57 [label="Exit when branch condition"]; } - 58 [label="Exit when branch result"]; + 58 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 59 [label="Enter when branch condition else"]; - 60 [label="Exit when branch condition"]; + 59 [label="Enter block"]; + 60 [label="Exit block"]; } + 61 [label="Exit when branch result"]; + 62 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 61 [label="Enter block"]; - 62 [label="Exit block"]; + 63 [label="Enter block"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Function call: R|/x|.#()"]; + 66 [label="Access variable R|/y|"]; + 67 [label="Function call: R|/y|.#()"]; + 68 [label="Exit block"]; } - 63 [label="Exit when branch result"]; - 64 [label="Exit when"]; + 69 [label="Exit when branch result"]; + 70 [label="Exit when"]; } subgraph cluster_20 { color=blue - 65 [label="Enter when"]; + 71 [label="Enter when"]; subgraph cluster_21 { color=blue - 66 [label="Enter when branch condition "]; - 67 [label="Access variable R|/x|"]; - 68 [label="Access variable R|/y|"]; - 69 [label="Operator ==="]; - 70 [label="Exit when branch condition"]; + 72 [label="Enter when branch condition "]; + 73 [label="Access variable R|/x|"]; + 74 [label="Access variable R|/y|"]; + 75 [label="Operator ==="]; + 76 [label="Exit when branch condition"]; } subgraph cluster_22 { color=blue - 71 [label="Enter block"]; - 72 [label="Access variable R|/x|"]; - 73 [label="Function call: R|/x|.#()"]; - 74 [label="Access variable R|/y|"]; - 75 [label="Function call: R|/y|.#()"]; - 76 [label="Exit block"]; + 77 [label="Enter when branch condition else"]; + 78 [label="Exit when branch condition"]; } - 77 [label="Exit when branch result"]; + 79 [label="Enter when branch result"]; subgraph cluster_23 { - color=blue - 78 [label="Enter when branch condition else"]; - 79 [label="Exit when branch condition"]; - } - subgraph cluster_24 { color=blue 80 [label="Enter block"]; 81 [label="Exit block"]; } 82 [label="Exit when branch result"]; - 83 [label="Exit when"]; + 83 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 84 [label="Enter block"]; + 85 [label="Access variable R|/x|"]; + 86 [label="Function call: R|/x|.#()"]; + 87 [label="Access variable R|/y|"]; + 88 [label="Function call: R|/y|.#()"]; + 89 [label="Exit block"]; + } + 90 [label="Exit when branch result"]; + 91 [label="Exit when"]; } - 84 [label="Exit block"]; + 92 [label="Exit block"]; } - 85 [label="Exit function test_2" style="filled" fillcolor=red]; + 93 [label="Exit function test_2" style="filled" fillcolor=red]; } - 44 -> {45}; - 45 -> {46}; - 46 -> {47}; - 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52 59}; + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {56}; + 55 -> {62 56}; 56 -> {57}; 57 -> {58}; - 58 -> {64}; + 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {62}; + 61 -> {70}; 62 -> {63}; 63 -> {64}; 64 -> {65}; @@ -237,133 +245,22 @@ digraph equalsAndIdentity_kt { 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71 78}; + 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {77}; - 77 -> {83}; + 76 -> {83 77}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {83}; + 82 -> {91}; 83 -> {84}; 84 -> {85}; - - subgraph cluster_25 { - color=red - 86 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_26 { - color=blue - 87 [label="Enter block"]; - subgraph cluster_27 { - color=blue - 88 [label="Enter when"]; - subgraph cluster_28 { - color=blue - 89 [label="Enter when branch condition "]; - 90 [label="Access variable R|/y|"]; - 91 [label="Const: Null(null)"]; - 92 [label="Operator =="]; - 93 [label="Exit when branch condition"]; - } - subgraph cluster_29 { - color=blue - 94 [label="Enter block"]; - 95 [label="Jump: ^test_3 Unit"]; - 96 [label="Stub" style="filled" fillcolor=gray]; - 97 [label="Exit block" style="filled" fillcolor=gray]; - } - 98 [label="Exit when branch result" style="filled" fillcolor=gray]; - subgraph cluster_30 { - color=blue - 99 [label="Enter when branch condition else"]; - 100 [label="Exit when branch condition"]; - } - subgraph cluster_31 { - color=blue - 101 [label="Enter block"]; - 102 [label="Exit block"]; - } - 103 [label="Exit when branch result"]; - 104 [label="Exit when"]; - } - subgraph cluster_32 { - color=blue - 105 [label="Enter when"]; - subgraph cluster_33 { - color=blue - 106 [label="Enter when branch condition "]; - 107 [label="Access variable R|/x|"]; - 108 [label="Access variable R|/y|"]; - 109 [label="Operator =="]; - 110 [label="Exit when branch condition"]; - } - subgraph cluster_34 { - color=blue - 111 [label="Enter block"]; - 112 [label="Access variable R|/x|"]; - 113 [label="Function call: R|/x|.R|/A.foo|()"]; - 114 [label="Access variable R|/y|"]; - 115 [label="Function call: R|/y|.R|/A.foo|()"]; - 116 [label="Exit block"]; - } - 117 [label="Exit when branch result"]; - subgraph cluster_35 { - color=blue - 118 [label="Enter when branch condition else"]; - 119 [label="Exit when branch condition"]; - } - subgraph cluster_36 { - color=blue - 120 [label="Enter block"]; - 121 [label="Exit block"]; - } - 122 [label="Exit when branch result"]; - 123 [label="Exit when"]; - } - subgraph cluster_37 { - color=blue - 124 [label="Enter when"]; - subgraph cluster_38 { - color=blue - 125 [label="Enter when branch condition "]; - 126 [label="Access variable R|/x|"]; - 127 [label="Access variable R|/y|"]; - 128 [label="Operator ==="]; - 129 [label="Exit when branch condition"]; - } - subgraph cluster_39 { - color=blue - 130 [label="Enter block"]; - 131 [label="Access variable R|/x|"]; - 132 [label="Function call: R|/x|.R|/A.foo|()"]; - 133 [label="Access variable R|/y|"]; - 134 [label="Function call: R|/y|.R|/A.foo|()"]; - 135 [label="Exit block"]; - } - 136 [label="Exit when branch result"]; - subgraph cluster_40 { - color=blue - 137 [label="Enter when branch condition else"]; - 138 [label="Exit when branch condition"]; - } - subgraph cluster_41 { - color=blue - 139 [label="Enter block"]; - 140 [label="Exit block"]; - } - 141 [label="Exit when branch result"]; - 142 [label="Exit when"]; - } - 143 [label="Exit block"]; - } - 144 [label="Exit function test_3" style="filled" fillcolor=red]; - } - + 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; @@ -371,57 +268,188 @@ digraph equalsAndIdentity_kt { 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {94 99}; + + subgraph cluster_25 { + color=red + 94 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 95 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 96 [label="Enter when"]; + subgraph cluster_28 { + color=blue + 97 [label="Enter when branch condition "]; + 98 [label="Access variable R|/y|"]; + 99 [label="Const: Null(null)"]; + 100 [label="Operator =="]; + 101 [label="Exit when branch condition"]; + } + subgraph cluster_29 { + color=blue + 102 [label="Enter when branch condition else"]; + 103 [label="Exit when branch condition"]; + } + 104 [label="Enter when branch result"]; + subgraph cluster_30 { + color=blue + 105 [label="Enter block"]; + 106 [label="Exit block"]; + } + 107 [label="Exit when branch result"]; + 108 [label="Enter when branch result"]; + subgraph cluster_31 { + color=blue + 109 [label="Enter block"]; + 110 [label="Jump: ^test_3 Unit"]; + 111 [label="Stub" style="filled" fillcolor=gray]; + 112 [label="Exit block" style="filled" fillcolor=gray]; + } + 113 [label="Exit when branch result" style="filled" fillcolor=gray]; + 114 [label="Exit when"]; + } + subgraph cluster_32 { + color=blue + 115 [label="Enter when"]; + subgraph cluster_33 { + color=blue + 116 [label="Enter when branch condition "]; + 117 [label="Access variable R|/x|"]; + 118 [label="Access variable R|/y|"]; + 119 [label="Operator =="]; + 120 [label="Exit when branch condition"]; + } + subgraph cluster_34 { + color=blue + 121 [label="Enter when branch condition else"]; + 122 [label="Exit when branch condition"]; + } + 123 [label="Enter when branch result"]; + subgraph cluster_35 { + color=blue + 124 [label="Enter block"]; + 125 [label="Exit block"]; + } + 126 [label="Exit when branch result"]; + 127 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 128 [label="Enter block"]; + 129 [label="Access variable R|/x|"]; + 130 [label="Function call: R|/x|.R|/A.foo|()"]; + 131 [label="Access variable R|/y|"]; + 132 [label="Function call: R|/y|.R|/A.foo|()"]; + 133 [label="Exit block"]; + } + 134 [label="Exit when branch result"]; + 135 [label="Exit when"]; + } + subgraph cluster_37 { + color=blue + 136 [label="Enter when"]; + subgraph cluster_38 { + color=blue + 137 [label="Enter when branch condition "]; + 138 [label="Access variable R|/x|"]; + 139 [label="Access variable R|/y|"]; + 140 [label="Operator ==="]; + 141 [label="Exit when branch condition"]; + } + subgraph cluster_39 { + color=blue + 142 [label="Enter when branch condition else"]; + 143 [label="Exit when branch condition"]; + } + 144 [label="Enter when branch result"]; + subgraph cluster_40 { + color=blue + 145 [label="Enter block"]; + 146 [label="Exit block"]; + } + 147 [label="Exit when branch result"]; + 148 [label="Enter when branch result"]; + subgraph cluster_41 { + color=blue + 149 [label="Enter block"]; + 150 [label="Access variable R|/x|"]; + 151 [label="Function call: R|/x|.R|/A.foo|()"]; + 152 [label="Access variable R|/y|"]; + 153 [label="Function call: R|/y|.R|/A.foo|()"]; + 154 [label="Exit block"]; + } + 155 [label="Exit when branch result"]; + 156 [label="Exit when"]; + } + 157 [label="Exit block"]; + } + 158 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 94 -> {95}; - 95 -> {144}; - 95 -> {96} [style=dotted]; - 96 -> {97} [style=dotted]; - 97 -> {98} [style=dotted]; - 98 -> {104} [style=dotted]; + 95 -> {96}; + 96 -> {97}; + 97 -> {98}; + 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {102}; + 101 -> {108 102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {108}; + 107 -> {114}; 108 -> {109}; 109 -> {110}; - 110 -> {111 118}; - 111 -> {112}; - 112 -> {113}; - 113 -> {114}; + 110 -> {158}; + 110 -> {111} [style=dotted]; + 111 -> {112} [style=dotted]; + 112 -> {113} [style=dotted]; + 113 -> {114} [style=dotted]; 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {123}; + 117 -> {118}; 118 -> {119}; 119 -> {120}; - 120 -> {121}; + 120 -> {127 121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; - 126 -> {127}; + 126 -> {135}; 127 -> {128}; 128 -> {129}; - 129 -> {130 137}; + 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; 133 -> {134}; 134 -> {135}; 135 -> {136}; - 136 -> {142}; + 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {142}; + 141 -> {148 142}; 142 -> {143}; 143 -> {144}; + 144 -> {145}; + 145 -> {146}; + 146 -> {147}; + 147 -> {156}; + 148 -> {149}; + 149 -> {150}; + 150 -> {151}; + 151 -> {152}; + 152 -> {153}; + 153 -> {154}; + 154 -> {155}; + 155 -> {156}; + 156 -> {157}; + 157 -> {158}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/equalsToBoolean.dot b/compiler/fir/resolve/testData/resolve/smartcasts/equalsToBoolean.dot index 330573c4b9e..b7f74b28f2b 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/equalsToBoolean.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/equalsToBoolean.dot @@ -40,30 +40,32 @@ digraph equalsToBoolean_kt { } subgraph cluster_6 { color=blue - 14 [label="Enter block"]; - 15 [label="Access variable R|/b|"]; - 16 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 17 [label="Exit block"]; + 14 [label="Enter when branch condition else"]; + 15 [label="Exit when branch condition"]; } - 18 [label="Exit when branch result"]; + 16 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 19 [label="Enter when branch condition else"]; - 20 [label="Exit when branch condition"]; + 17 [label="Enter block"]; + 18 [label="Access variable R|/b|"]; + 19 [label="Function call: R|/b|.#()"]; + 20 [label="Exit block"]; } + 21 [label="Exit when branch result"]; + 22 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/b|"]; - 23 [label="Function call: R|/b|.#()"]; - 24 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Access variable R|/b|"]; + 25 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 26 [label="Exit block"]; } - 25 [label="Exit when branch result"]; - 26 [label="Exit when"]; + 27 [label="Exit when branch result"]; + 28 [label="Exit when"]; } - 27 [label="Exit block"]; + 29 [label="Exit block"]; } - 28 [label="Exit function test_1" style="filled" fillcolor=red]; + 30 [label="Exit function test_1" style="filled" fillcolor=red]; } 4 -> {5}; @@ -75,71 +77,73 @@ digraph equalsToBoolean_kt { 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {14 19}; + 13 -> {22 14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {26}; + 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22}; + 21 -> {28}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; + 28 -> {29}; + 29 -> {30}; subgraph cluster_9 { color=red - 29 [label="Enter function test_2" style="filled" fillcolor=red]; + 31 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 30 [label="Enter block"]; + 32 [label="Enter block"]; subgraph cluster_11 { color=blue - 31 [label="Enter when"]; + 33 [label="Enter when"]; subgraph cluster_12 { color=blue - 32 [label="Enter when branch condition "]; - 33 [label="Access variable R|/b|"]; - 34 [label="Const: Boolean(true)"]; - 35 [label="Operator =="]; + 34 [label="Enter when branch condition "]; + 35 [label="Access variable R|/b|"]; 36 [label="Const: Boolean(true)"]; - 37 [label="Operator !="]; - 38 [label="Exit when branch condition"]; + 37 [label="Operator =="]; + 38 [label="Const: Boolean(true)"]; + 39 [label="Operator !="]; + 40 [label="Exit when branch condition"]; } subgraph cluster_13 { color=blue - 39 [label="Enter block"]; - 40 [label="Access variable R|/b|"]; - 41 [label="Function call: R|/b|.#()"]; - 42 [label="Exit block"]; + 41 [label="Enter when branch condition else"]; + 42 [label="Exit when branch condition"]; } - 43 [label="Exit when branch result"]; + 43 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 44 [label="Enter when branch condition else"]; - 45 [label="Exit when branch condition"]; + 44 [label="Enter block"]; + 45 [label="Access variable R|/b|"]; + 46 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 47 [label="Exit block"]; } + 48 [label="Exit when branch result"]; + 49 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 46 [label="Enter block"]; - 47 [label="Access variable R|/b|"]; - 48 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 49 [label="Exit block"]; + 50 [label="Enter block"]; + 51 [label="Access variable R|/b|"]; + 52 [label="Function call: R|/b|.#()"]; + 53 [label="Exit block"]; } - 50 [label="Exit when branch result"]; - 51 [label="Exit when"]; + 54 [label="Exit when branch result"]; + 55 [label="Exit when"]; } - 52 [label="Exit block"]; + 56 [label="Exit block"]; } - 53 [label="Exit function test_2" style="filled" fillcolor=red]; + 57 [label="Exit function test_2" style="filled" fillcolor=red]; } - 29 -> {30}; - 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; @@ -147,55 +151,52 @@ digraph equalsToBoolean_kt { 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {39 44}; + 38 -> {39}; 39 -> {40}; - 40 -> {41}; + 40 -> {49 41}; 41 -> {42}; 42 -> {43}; - 43 -> {51}; + 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {49}; + 48 -> {55}; 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; + 53 -> {54}; + 54 -> {55}; + 55 -> {56}; + 56 -> {57}; subgraph cluster_16 { color=red - 54 [label="Enter function test_3" style="filled" fillcolor=red]; + 58 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 55 [label="Enter block"]; + 59 [label="Enter block"]; subgraph cluster_18 { color=blue - 56 [label="Enter when"]; + 60 [label="Enter when"]; subgraph cluster_19 { color=blue - 57 [label="Enter when branch condition "]; - 58 [label="Access variable R|/b|"]; - 59 [label="Const: Boolean(true)"]; - 60 [label="Operator =="]; - 61 [label="Const: Boolean(false)"]; - 62 [label="Operator =="]; - 63 [label="Exit when branch condition"]; + 61 [label="Enter when branch condition "]; + 62 [label="Access variable R|/b|"]; + 63 [label="Const: Boolean(true)"]; + 64 [label="Operator =="]; + 65 [label="Const: Boolean(false)"]; + 66 [label="Operator =="]; + 67 [label="Exit when branch condition"]; } subgraph cluster_20 { color=blue - 64 [label="Enter block"]; - 65 [label="Access variable R|/b|"]; - 66 [label="Function call: R|/b|.#()"]; - 67 [label="Exit block"]; + 68 [label="Enter when branch condition else"]; + 69 [label="Exit when branch condition"]; } - 68 [label="Exit when branch result"]; + 70 [label="Enter when branch result"]; subgraph cluster_21 { - color=blue - 69 [label="Enter when branch condition else"]; - 70 [label="Exit when branch condition"]; - } - subgraph cluster_22 { color=blue 71 [label="Enter block"]; 72 [label="Access variable R|/b|"]; @@ -203,101 +204,108 @@ digraph equalsToBoolean_kt { 74 [label="Exit block"]; } 75 [label="Exit when branch result"]; - 76 [label="Exit when"]; + 76 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 77 [label="Enter block"]; + 78 [label="Access variable R|/b|"]; + 79 [label="Function call: R|/b|.#()"]; + 80 [label="Exit block"]; + } + 81 [label="Exit when branch result"]; + 82 [label="Exit when"]; } - 77 [label="Exit block"]; + 83 [label="Exit block"]; } - 78 [label="Exit function test_3" style="filled" fillcolor=red]; + 84 [label="Exit function test_3" style="filled" fillcolor=red]; } - 54 -> {55}; - 55 -> {56}; - 56 -> {57}; - 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {64 69}; + 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {68}; - 68 -> {76}; + 67 -> {76 68}; + 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76}; + 75 -> {82}; 76 -> {77}; 77 -> {78}; - - subgraph cluster_23 { - color=red - 79 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 80 [label="Enter block"]; - subgraph cluster_25 { - color=blue - 81 [label="Enter when"]; - subgraph cluster_26 { - color=blue - 82 [label="Enter when branch condition "]; - 83 [label="Access variable R|/b|"]; - 84 [label="Const: Boolean(true)"]; - 85 [label="Operator =="]; - 86 [label="Const: Boolean(false)"]; - 87 [label="Operator !="]; - 88 [label="Exit when branch condition"]; - } - subgraph cluster_27 { - color=blue - 89 [label="Enter block"]; - 90 [label="Access variable R|/b|"]; - 91 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 92 [label="Exit block"]; - } - 93 [label="Exit when branch result"]; - subgraph cluster_28 { - color=blue - 94 [label="Enter when branch condition else"]; - 95 [label="Exit when branch condition"]; - } - subgraph cluster_29 { - color=blue - 96 [label="Enter block"]; - 97 [label="Access variable R|/b|"]; - 98 [label="Function call: R|/b|.#()"]; - 99 [label="Exit block"]; - } - 100 [label="Exit when branch result"]; - 101 [label="Exit when"]; - } - 102 [label="Exit block"]; - } - 103 [label="Exit function test_4" style="filled" fillcolor=red]; - } - + 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {85}; + + subgraph cluster_23 { + color=red + 85 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 86 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 87 [label="Enter when"]; + subgraph cluster_26 { + color=blue + 88 [label="Enter when branch condition "]; + 89 [label="Access variable R|/b|"]; + 90 [label="Const: Boolean(true)"]; + 91 [label="Operator =="]; + 92 [label="Const: Boolean(false)"]; + 93 [label="Operator !="]; + 94 [label="Exit when branch condition"]; + } + subgraph cluster_27 { + color=blue + 95 [label="Enter when branch condition else"]; + 96 [label="Exit when branch condition"]; + } + 97 [label="Enter when branch result"]; + subgraph cluster_28 { + color=blue + 98 [label="Enter block"]; + 99 [label="Access variable R|/b|"]; + 100 [label="Function call: R|/b|.#()"]; + 101 [label="Exit block"]; + } + 102 [label="Exit when branch result"]; + 103 [label="Enter when branch result"]; + subgraph cluster_29 { + color=blue + 104 [label="Enter block"]; + 105 [label="Access variable R|/b|"]; + 106 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 107 [label="Exit block"]; + } + 108 [label="Exit when branch result"]; + 109 [label="Exit when"]; + } + 110 [label="Exit block"]; + } + 111 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {89 94}; + 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {101}; - 94 -> {95}; + 93 -> {94}; + 94 -> {103 95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; @@ -305,55 +313,8 @@ digraph equalsToBoolean_kt { 99 -> {100}; 100 -> {101}; 101 -> {102}; - 102 -> {103}; - - subgraph cluster_30 { - color=red - 104 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 105 [label="Enter block"]; - subgraph cluster_32 { - color=blue - 106 [label="Enter when"]; - subgraph cluster_33 { - color=blue - 107 [label="Enter when branch condition "]; - 108 [label="Access variable R|/b|"]; - 109 [label="Const: Boolean(true)"]; - 110 [label="Operator !="]; - 111 [label="Const: Boolean(true)"]; - 112 [label="Operator =="]; - 113 [label="Exit when branch condition"]; - } - subgraph cluster_34 { - color=blue - 114 [label="Enter block"]; - 115 [label="Access variable R|/b|"]; - 116 [label="Function call: R|/b|.#()"]; - 117 [label="Exit block"]; - } - 118 [label="Exit when branch result"]; - subgraph cluster_35 { - color=blue - 119 [label="Enter when branch condition else"]; - 120 [label="Exit when branch condition"]; - } - subgraph cluster_36 { - color=blue - 121 [label="Enter block"]; - 122 [label="Access variable R|/b|"]; - 123 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 124 [label="Exit block"]; - } - 125 [label="Exit when branch result"]; - 126 [label="Exit when"]; - } - 127 [label="Exit block"]; - } - 128 [label="Exit function test_5" style="filled" fillcolor=red]; - } - + 102 -> {109}; + 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; @@ -361,72 +322,74 @@ digraph equalsToBoolean_kt { 108 -> {109}; 109 -> {110}; 110 -> {111}; - 111 -> {112}; + + subgraph cluster_30 { + color=red + 112 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 113 [label="Enter block"]; + subgraph cluster_32 { + color=blue + 114 [label="Enter when"]; + subgraph cluster_33 { + color=blue + 115 [label="Enter when branch condition "]; + 116 [label="Access variable R|/b|"]; + 117 [label="Const: Boolean(true)"]; + 118 [label="Operator !="]; + 119 [label="Const: Boolean(true)"]; + 120 [label="Operator =="]; + 121 [label="Exit when branch condition"]; + } + subgraph cluster_34 { + color=blue + 122 [label="Enter when branch condition else"]; + 123 [label="Exit when branch condition"]; + } + 124 [label="Enter when branch result"]; + subgraph cluster_35 { + color=blue + 125 [label="Enter block"]; + 126 [label="Access variable R|/b|"]; + 127 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 128 [label="Exit block"]; + } + 129 [label="Exit when branch result"]; + 130 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 131 [label="Enter block"]; + 132 [label="Access variable R|/b|"]; + 133 [label="Function call: R|/b|.#()"]; + 134 [label="Exit block"]; + } + 135 [label="Exit when branch result"]; + 136 [label="Exit when"]; + } + 137 [label="Exit block"]; + } + 138 [label="Exit function test_5" style="filled" fillcolor=red]; + } + 112 -> {113}; - 113 -> {114 119}; + 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {126}; + 118 -> {119}; 119 -> {120}; 120 -> {121}; - 121 -> {122}; + 121 -> {130 122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; - - subgraph cluster_37 { - color=red - 129 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 130 [label="Enter block"]; - subgraph cluster_39 { - color=blue - 131 [label="Enter when"]; - subgraph cluster_40 { - color=blue - 132 [label="Enter when branch condition "]; - 133 [label="Access variable R|/b|"]; - 134 [label="Const: Boolean(true)"]; - 135 [label="Operator !="]; - 136 [label="Const: Boolean(true)"]; - 137 [label="Operator !="]; - 138 [label="Exit when branch condition"]; - } - subgraph cluster_41 { - color=blue - 139 [label="Enter block"]; - 140 [label="Access variable R|/b|"]; - 141 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 142 [label="Exit block"]; - } - 143 [label="Exit when branch result"]; - subgraph cluster_42 { - color=blue - 144 [label="Enter when branch condition else"]; - 145 [label="Exit when branch condition"]; - } - subgraph cluster_43 { - color=blue - 146 [label="Enter block"]; - 147 [label="Access variable R|/b|"]; - 148 [label="Function call: R|/b|.#()"]; - 149 [label="Exit block"]; - } - 150 [label="Exit when branch result"]; - 151 [label="Exit when"]; - } - 152 [label="Exit block"]; - } - 153 [label="Exit function test_6" style="filled" fillcolor=red]; - } - - 129 -> {130}; + 128 -> {129}; + 129 -> {136}; 130 -> {131}; 131 -> {132}; 132 -> {133}; @@ -435,156 +398,209 @@ digraph equalsToBoolean_kt { 135 -> {136}; 136 -> {137}; 137 -> {138}; - 138 -> {139 144}; + + subgraph cluster_37 { + color=red + 139 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 140 [label="Enter block"]; + subgraph cluster_39 { + color=blue + 141 [label="Enter when"]; + subgraph cluster_40 { + color=blue + 142 [label="Enter when branch condition "]; + 143 [label="Access variable R|/b|"]; + 144 [label="Const: Boolean(true)"]; + 145 [label="Operator !="]; + 146 [label="Const: Boolean(true)"]; + 147 [label="Operator !="]; + 148 [label="Exit when branch condition"]; + } + subgraph cluster_41 { + color=blue + 149 [label="Enter when branch condition else"]; + 150 [label="Exit when branch condition"]; + } + 151 [label="Enter when branch result"]; + subgraph cluster_42 { + color=blue + 152 [label="Enter block"]; + 153 [label="Access variable R|/b|"]; + 154 [label="Function call: R|/b|.#()"]; + 155 [label="Exit block"]; + } + 156 [label="Exit when branch result"]; + 157 [label="Enter when branch result"]; + subgraph cluster_43 { + color=blue + 158 [label="Enter block"]; + 159 [label="Access variable R|/b|"]; + 160 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 161 [label="Exit block"]; + } + 162 [label="Exit when branch result"]; + 163 [label="Exit when"]; + } + 164 [label="Exit block"]; + } + 165 [label="Exit function test_6" style="filled" fillcolor=red]; + } + 139 -> {140}; 140 -> {141}; 141 -> {142}; 142 -> {143}; - 143 -> {151}; + 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; 147 -> {148}; - 148 -> {149}; + 148 -> {157 149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; 152 -> {153}; - - subgraph cluster_44 { - color=red - 154 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_45 { - color=blue - 155 [label="Enter block"]; - subgraph cluster_46 { - color=blue - 156 [label="Enter when"]; - subgraph cluster_47 { - color=blue - 157 [label="Enter when branch condition "]; - 158 [label="Access variable R|/b|"]; - 159 [label="Const: Boolean(true)"]; - 160 [label="Operator !="]; - 161 [label="Const: Boolean(false)"]; - 162 [label="Operator =="]; - 163 [label="Exit when branch condition"]; - } - subgraph cluster_48 { - color=blue - 164 [label="Enter block"]; - 165 [label="Access variable R|/b|"]; - 166 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 167 [label="Exit block"]; - } - 168 [label="Exit when branch result"]; - subgraph cluster_49 { - color=blue - 169 [label="Enter when branch condition else"]; - 170 [label="Exit when branch condition"]; - } - subgraph cluster_50 { - color=blue - 171 [label="Enter block"]; - 172 [label="Access variable R|/b|"]; - 173 [label="Function call: R|/b|.#()"]; - 174 [label="Exit block"]; - } - 175 [label="Exit when branch result"]; - 176 [label="Exit when"]; - } - 177 [label="Exit block"]; - } - 178 [label="Exit function test_7" style="filled" fillcolor=red]; - } - + 153 -> {154}; 154 -> {155}; 155 -> {156}; - 156 -> {157}; + 156 -> {163}; 157 -> {158}; 158 -> {159}; 159 -> {160}; 160 -> {161}; 161 -> {162}; 162 -> {163}; - 163 -> {164 169}; + 163 -> {164}; 164 -> {165}; - 165 -> {166}; + + subgraph cluster_44 { + color=red + 166 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_45 { + color=blue + 167 [label="Enter block"]; + subgraph cluster_46 { + color=blue + 168 [label="Enter when"]; + subgraph cluster_47 { + color=blue + 169 [label="Enter when branch condition "]; + 170 [label="Access variable R|/b|"]; + 171 [label="Const: Boolean(true)"]; + 172 [label="Operator !="]; + 173 [label="Const: Boolean(false)"]; + 174 [label="Operator =="]; + 175 [label="Exit when branch condition"]; + } + subgraph cluster_48 { + color=blue + 176 [label="Enter when branch condition else"]; + 177 [label="Exit when branch condition"]; + } + 178 [label="Enter when branch result"]; + subgraph cluster_49 { + color=blue + 179 [label="Enter block"]; + 180 [label="Access variable R|/b|"]; + 181 [label="Function call: R|/b|.#()"]; + 182 [label="Exit block"]; + } + 183 [label="Exit when branch result"]; + 184 [label="Enter when branch result"]; + subgraph cluster_50 { + color=blue + 185 [label="Enter block"]; + 186 [label="Access variable R|/b|"]; + 187 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 188 [label="Exit block"]; + } + 189 [label="Exit when branch result"]; + 190 [label="Exit when"]; + } + 191 [label="Exit block"]; + } + 192 [label="Exit function test_7" style="filled" fillcolor=red]; + } + 166 -> {167}; 167 -> {168}; - 168 -> {176}; + 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {176}; + 175 -> {184 176}; 176 -> {177}; 177 -> {178}; - - subgraph cluster_51 { - color=red - 179 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_52 { - color=blue - 180 [label="Enter block"]; - subgraph cluster_53 { - color=blue - 181 [label="Enter when"]; - subgraph cluster_54 { - color=blue - 182 [label="Enter when branch condition "]; - 183 [label="Access variable R|/b|"]; - 184 [label="Const: Boolean(true)"]; - 185 [label="Operator !="]; - 186 [label="Const: Boolean(false)"]; - 187 [label="Operator !="]; - 188 [label="Exit when branch condition"]; - } - subgraph cluster_55 { - color=blue - 189 [label="Enter block"]; - 190 [label="Access variable R|/b|"]; - 191 [label="Function call: R|/b|.#()"]; - 192 [label="Exit block"]; - } - 193 [label="Exit when branch result"]; - subgraph cluster_56 { - color=blue - 194 [label="Enter when branch condition else"]; - 195 [label="Exit when branch condition"]; - } - subgraph cluster_57 { - color=blue - 196 [label="Enter block"]; - 197 [label="Access variable R|/b|"]; - 198 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 199 [label="Exit block"]; - } - 200 [label="Exit when branch result"]; - 201 [label="Exit when"]; - } - 202 [label="Exit block"]; - } - 203 [label="Exit function test_8" style="filled" fillcolor=red]; - } - + 178 -> {179}; 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; - 183 -> {184}; + 183 -> {190}; 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; - 188 -> {189 194}; + 188 -> {189}; 189 -> {190}; 190 -> {191}; 191 -> {192}; - 192 -> {193}; - 193 -> {201}; + + subgraph cluster_51 { + color=red + 193 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_52 { + color=blue + 194 [label="Enter block"]; + subgraph cluster_53 { + color=blue + 195 [label="Enter when"]; + subgraph cluster_54 { + color=blue + 196 [label="Enter when branch condition "]; + 197 [label="Access variable R|/b|"]; + 198 [label="Const: Boolean(true)"]; + 199 [label="Operator !="]; + 200 [label="Const: Boolean(false)"]; + 201 [label="Operator !="]; + 202 [label="Exit when branch condition"]; + } + subgraph cluster_55 { + color=blue + 203 [label="Enter when branch condition else"]; + 204 [label="Exit when branch condition"]; + } + 205 [label="Enter when branch result"]; + subgraph cluster_56 { + color=blue + 206 [label="Enter block"]; + 207 [label="Access variable R|/b|"]; + 208 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 209 [label="Exit block"]; + } + 210 [label="Exit when branch result"]; + 211 [label="Enter when branch result"]; + subgraph cluster_57 { + color=blue + 212 [label="Enter block"]; + 213 [label="Access variable R|/b|"]; + 214 [label="Function call: R|/b|.#()"]; + 215 [label="Exit block"]; + } + 216 [label="Exit when branch result"]; + 217 [label="Exit when"]; + } + 218 [label="Exit block"]; + } + 219 [label="Exit function test_8" style="filled" fillcolor=red]; + } + + 193 -> {194}; 194 -> {195}; 195 -> {196}; 196 -> {197}; @@ -593,6 +609,22 @@ digraph equalsToBoolean_kt { 199 -> {200}; 200 -> {201}; 201 -> {202}; - 202 -> {203}; + 202 -> {211 203}; + 203 -> {204}; + 204 -> {205}; + 205 -> {206}; + 206 -> {207}; + 207 -> {208}; + 208 -> {209}; + 209 -> {210}; + 210 -> {217}; + 211 -> {212}; + 212 -> {213}; + 213 -> {214}; + 214 -> {215}; + 215 -> {216}; + 216 -> {217}; + 217 -> {218}; + 218 -> {219}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot index 352e44a593c..e58cf388020 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot @@ -59,35 +59,37 @@ digraph implicitReceivers_kt { } subgraph cluster_9 { color=blue - 17 [label="Enter block"]; - 18 [label="Access variable this@R|/test_1|"]; - 19 [label="Function call: this@R|/test_1|.R|/A.foo|()"]; - 20 [label="Function call: this@R|/A|.R|/A.foo|()"]; - 21 [label="Exit block"]; + 17 [label="Enter when branch condition else"]; + 18 [label="Exit when branch condition"]; } - 22 [label="Exit when branch result"]; + 19 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 23 [label="Enter when branch condition else"]; - 24 [label="Exit when branch condition"]; + 20 [label="Enter block"]; + 21 [label="Access variable this@R|/test_1|"]; + 22 [label="Function call: this@R|/test_1|.#()"]; + 23 [label="Function call: #()"]; + 24 [label="Exit block"]; } + 25 [label="Exit when branch result"]; + 26 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 25 [label="Enter block"]; - 26 [label="Access variable this@R|/test_1|"]; - 27 [label="Function call: this@R|/test_1|.#()"]; - 28 [label="Function call: #()"]; - 29 [label="Exit block"]; + 27 [label="Enter block"]; + 28 [label="Access variable this@R|/test_1|"]; + 29 [label="Function call: this@R|/test_1|.R|/A.foo|()"]; + 30 [label="Function call: this@R|/A|.R|/A.foo|()"]; + 31 [label="Exit block"]; } - 30 [label="Exit when branch result"]; - 31 [label="Exit when"]; + 32 [label="Exit when branch result"]; + 33 [label="Exit when"]; } - 32 [label="Access variable this@R|/test_1|"]; - 33 [label="Function call: this@R|/test_1|.#()"]; - 34 [label="Function call: #()"]; - 35 [label="Exit block"]; + 34 [label="Access variable this@R|/test_1|"]; + 35 [label="Function call: this@R|/test_1|.#()"]; + 36 [label="Function call: #()"]; + 37 [label="Exit block"]; } - 36 [label="Exit function test_1" style="filled" fillcolor=red]; + 38 [label="Exit function test_1" style="filled" fillcolor=red]; } 10 -> {11}; @@ -96,16 +98,16 @@ digraph implicitReceivers_kt { 13 -> {14}; 14 -> {15}; 15 -> {16}; - 16 -> {17 23}; + 16 -> {26 17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {31}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {26}; + 25 -> {33}; 26 -> {27}; 27 -> {28}; 28 -> {29}; @@ -116,74 +118,76 @@ digraph implicitReceivers_kt { 33 -> {34}; 34 -> {35}; 35 -> {36}; + 36 -> {37}; + 37 -> {38}; subgraph cluster_12 { color=red - 37 [label="Enter function test_2" style="filled" fillcolor=red]; + 39 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 38 [label="Enter block"]; + 40 [label="Enter block"]; subgraph cluster_14 { color=blue - 39 [label="Enter when"]; + 41 [label="Enter when"]; subgraph cluster_15 { color=blue - 40 [label="Enter when branch condition "]; - 41 [label="Access variable this@R|/test_2|"]; - 42 [label="Type operator: this !is A"]; - 43 [label="Exit when branch condition"]; + 42 [label="Enter when branch condition "]; + 43 [label="Access variable this@R|/test_2|"]; + 44 [label="Type operator: this !is A"]; + 45 [label="Exit when branch condition"]; } subgraph cluster_16 { color=blue - 44 [label="Enter block"]; - 45 [label="Access variable this@R|/test_2|"]; - 46 [label="Function call: this@R|/test_2|.#()"]; - 47 [label="Function call: #()"]; - 48 [label="Exit block"]; + 46 [label="Enter when branch condition else"]; + 47 [label="Exit when branch condition"]; } - 49 [label="Exit when branch result"]; + 48 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 50 [label="Enter when branch condition else"]; - 51 [label="Exit when branch condition"]; + 49 [label="Enter block"]; + 50 [label="Access variable this@R|/test_2|"]; + 51 [label="Function call: this@R|/test_2|.R|/A.foo|()"]; + 52 [label="Function call: this@R|/A|.R|/A.foo|()"]; + 53 [label="Exit block"]; } + 54 [label="Exit when branch result"]; + 55 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 52 [label="Enter block"]; - 53 [label="Access variable this@R|/test_2|"]; - 54 [label="Function call: this@R|/test_2|.R|/A.foo|()"]; - 55 [label="Function call: this@R|/A|.R|/A.foo|()"]; - 56 [label="Exit block"]; + 56 [label="Enter block"]; + 57 [label="Access variable this@R|/test_2|"]; + 58 [label="Function call: this@R|/test_2|.#()"]; + 59 [label="Function call: #()"]; + 60 [label="Exit block"]; } - 57 [label="Exit when branch result"]; - 58 [label="Exit when"]; + 61 [label="Exit when branch result"]; + 62 [label="Exit when"]; } - 59 [label="Access variable this@R|/test_2|"]; - 60 [label="Function call: this@R|/test_2|.#()"]; - 61 [label="Function call: #()"]; - 62 [label="Exit block"]; + 63 [label="Access variable this@R|/test_2|"]; + 64 [label="Function call: this@R|/test_2|.#()"]; + 65 [label="Function call: #()"]; + 66 [label="Exit block"]; } - 63 [label="Exit function test_2" style="filled" fillcolor=red]; + 67 [label="Exit function test_2" style="filled" fillcolor=red]; } - 37 -> {38}; - 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {44 50}; + 43 -> {44}; 44 -> {45}; - 45 -> {46}; + 45 -> {55 46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {58}; + 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {55}; + 54 -> {62}; 55 -> {56}; 56 -> {57}; 57 -> {58}; @@ -192,57 +196,61 @@ digraph implicitReceivers_kt { 60 -> {61}; 61 -> {62}; 62 -> {63}; + 63 -> {64}; + 64 -> {65}; + 65 -> {66}; + 66 -> {67}; subgraph cluster_19 { color=red - 64 [label="Enter function test_3" style="filled" fillcolor=red]; + 68 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_20 { color=blue - 65 [label="Enter block"]; - 66 [label="Access variable R|/a|"]; + 69 [label="Enter block"]; + 70 [label="Access variable R|/a|"]; subgraph cluster_21 { color=blue - 67 [label="Enter function anonymousFunction"]; + 71 [label="Enter function anonymousFunction"]; subgraph cluster_22 { color=blue - 68 [label="Enter block"]; - 69 [label="Access variable R|/b|"]; + 72 [label="Enter block"]; + 73 [label="Access variable R|/b|"]; subgraph cluster_23 { color=blue - 70 [label="Enter function anonymousFunction"]; + 74 [label="Enter function anonymousFunction"]; subgraph cluster_24 { color=blue - 71 [label="Enter block"]; - 72 [label="Access variable R|/c|"]; + 75 [label="Enter block"]; + 76 [label="Access variable R|/c|"]; subgraph cluster_25 { color=blue - 73 [label="Enter function anonymousFunction"]; + 77 [label="Enter function anonymousFunction"]; subgraph cluster_26 { color=blue - 74 [label="Enter block"]; - 75 [label="Access variable this@R|special/anonymous|"]; - 76 [label="Type operator: this@wb as A"]; - 77 [label="Access variable this@R|special/anonymous|"]; - 78 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; - 79 [label="Function call: this@R|/A|.R|/A.foo|()"]; - 80 [label="Exit block"]; + 78 [label="Enter block"]; + 79 [label="Access variable this@R|special/anonymous|"]; + 80 [label="Type operator: this@wb as A"]; + 81 [label="Access variable this@R|special/anonymous|"]; + 82 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; + 83 [label="Function call: this@R|/A|.R|/A.foo|()"]; + 84 [label="Exit block"]; } - 81 [label="Exit function anonymousFunction"]; + 85 [label="Exit function anonymousFunction"]; } - 82 [label="Function call: R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { + 86 [label="Function call: R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { (this@R|special/anonymous| as R|A|) this@R|special/anonymous|.R|/A.foo|() this@R|/A|.R|/A.foo|() } )"]; - 83 [label="Access variable this@R|special/anonymous|"]; - 84 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; - 85 [label="Function call: this@R|/A|.R|/A.foo|()"]; - 86 [label="Exit block"]; + 87 [label="Access variable this@R|special/anonymous|"]; + 88 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; + 89 [label="Function call: this@R|/A|.R|/A.foo|()"]; + 90 [label="Exit block"]; } - 87 [label="Exit function anonymousFunction"]; + 91 [label="Exit function anonymousFunction"]; } - 88 [label="Function call: R|kotlin/with|(R|/b|, = wb@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { + 92 [label="Function call: R|kotlin/with|(R|/b|, = wb@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { (this@R|special/anonymous| as R|A|) this@R|special/anonymous|.R|/A.foo|() @@ -253,11 +261,11 @@ digraph implicitReceivers_kt { this@R|/A|.R|/A.foo|() } )"]; - 89 [label="Exit block"]; + 93 [label="Exit block"]; } - 90 [label="Exit function anonymousFunction"]; + 94 [label="Exit function anonymousFunction"]; } - 91 [label="Function call: R|kotlin/with|(R|/a|, = wa@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { + 95 [label="Function call: R|kotlin/with|(R|/a|, = wa@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { R|kotlin/with|(R|/b|, = wb@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { (this@R|special/anonymous| as R|A|) @@ -271,15 +279,11 @@ digraph implicitReceivers_kt { ) } )"]; - 92 [label="Exit block"]; + 96 [label="Exit block"]; } - 93 [label="Exit function test_3" style="filled" fillcolor=red]; + 97 [label="Exit function test_3" style="filled" fillcolor=red]; } - 64 -> {65}; - 65 -> {66}; - 66 -> {67}; - 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; @@ -305,5 +309,9 @@ digraph implicitReceivers_kt { 90 -> {91}; 91 -> {92}; 92 -> {93}; + 93 -> {94}; + 94 -> {95}; + 95 -> {96}; + 96 -> {97}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.dot b/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.dot index 053b059a17a..5a35e967c06 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.dot @@ -54,42 +54,44 @@ digraph inPlaceLambdas_kt { } subgraph cluster_8 { color=blue - 16 [label="Enter block"]; - subgraph cluster_9 { + 16 [label="Enter when branch condition else"]; + 17 [label="Exit when branch condition"]; + } + 18 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 19 [label="Enter block"]; + 20 [label="Exit block"]; + } + 21 [label="Exit when branch result"]; + 22 [label="Enter when branch result"]; + subgraph cluster_10 { + color=blue + 23 [label="Enter block"]; + subgraph cluster_11 { color=blue - 17 [label="Enter function anonymousFunction"]; - subgraph cluster_10 { + 24 [label="Enter function anonymousFunction"]; + subgraph cluster_12 { color=blue - 18 [label="Enter block"]; - 19 [label="Access variable R|/x|"]; - 20 [label="Function call: R|/x|.R|/A.foo|()"]; - 21 [label="Exit block"]; + 25 [label="Enter block"]; + 26 [label="Access variable R|/x|"]; + 27 [label="Function call: R|/x|.R|/A.foo|()"]; + 28 [label="Exit block"]; } - 22 [label="Exit function anonymousFunction"]; + 29 [label="Exit function anonymousFunction"]; } - 23 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { + 30 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { R|/x|.R|/A.foo|() } )"]; - 24 [label="Exit block"]; + 31 [label="Exit block"]; } - 25 [label="Exit when branch result"]; - subgraph cluster_11 { - color=blue - 26 [label="Enter when branch condition else"]; - 27 [label="Exit when branch condition"]; - } - subgraph cluster_12 { - color=blue - 28 [label="Enter block"]; - 29 [label="Exit block"]; - } - 30 [label="Exit when branch result"]; - 31 [label="Exit when"]; + 32 [label="Exit when branch result"]; + 33 [label="Exit when"]; } - 32 [label="Exit block"]; + 34 [label="Exit block"]; } - 33 [label="Exit function test_1" style="filled" fillcolor=red]; + 35 [label="Exit function test_1" style="filled" fillcolor=red]; } 9 -> {10}; @@ -98,17 +100,17 @@ digraph inPlaceLambdas_kt { 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16 26}; + 15 -> {22 16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22}; + 21 -> {33}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {31}; + 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; @@ -116,38 +118,38 @@ digraph inPlaceLambdas_kt { 30 -> {31}; 31 -> {32}; 32 -> {33}; + 33 -> {34}; + 34 -> {35}; subgraph cluster_13 { color=red - 34 [label="Enter function test_2" style="filled" fillcolor=red]; + 36 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 35 [label="Enter block"]; + 37 [label="Enter block"]; subgraph cluster_15 { color=blue - 36 [label="Enter function anonymousFunction"]; + 38 [label="Enter function anonymousFunction"]; subgraph cluster_16 { color=blue - 37 [label="Enter block"]; - 38 [label="Access variable R|/x|"]; - 39 [label="Type operator: x as B"]; - 40 [label="Exit block"]; + 39 [label="Enter block"]; + 40 [label="Access variable R|/x|"]; + 41 [label="Type operator: x as B"]; + 42 [label="Exit block"]; } - 41 [label="Exit function anonymousFunction"]; + 43 [label="Exit function anonymousFunction"]; } - 42 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { + 44 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { (R|/x| as R|B|) } )"]; - 43 [label="Access variable R|/x|"]; - 44 [label="Function call: R|/x|.R|/B.bar|()"]; - 45 [label="Exit block"]; + 45 [label="Access variable R|/x|"]; + 46 [label="Function call: R|/x|.R|/B.bar|()"]; + 47 [label="Exit block"]; } - 46 [label="Exit function test_2" style="filled" fillcolor=red]; + 48 [label="Exit function test_2" style="filled" fillcolor=red]; } - 34 -> {35}; - 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; @@ -158,89 +160,91 @@ digraph inPlaceLambdas_kt { 43 -> {44}; 44 -> {45}; 45 -> {46}; + 46 -> {47}; + 47 -> {48}; subgraph cluster_17 { color=red - 47 [label="Enter function test_3" style="filled" fillcolor=red]; + 49 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_18 { color=blue - 48 [label="Enter block"]; + 50 [label="Enter block"]; subgraph cluster_19 { color=blue - 49 [label="Enter when"]; + 51 [label="Enter when"]; subgraph cluster_20 { color=blue - 50 [label="Enter when branch condition "]; - 51 [label="Access variable R|/x|"]; - 52 [label="Type operator: x is A"]; - 53 [label="Exit when branch condition"]; + 52 [label="Enter when branch condition "]; + 53 [label="Access variable R|/x|"]; + 54 [label="Type operator: x is A"]; + 55 [label="Exit when branch condition"]; } subgraph cluster_21 { color=blue - 54 [label="Enter block"]; - subgraph cluster_22 { + 56 [label="Enter when branch condition else"]; + 57 [label="Exit when branch condition"]; + } + 58 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 59 [label="Enter block"]; + 60 [label="Exit block"]; + } + 61 [label="Exit when branch result"]; + 62 [label="Enter when branch result"]; + subgraph cluster_23 { + color=blue + 63 [label="Enter block"]; + subgraph cluster_24 { color=blue - 55 [label="Enter function anonymousFunction"]; - subgraph cluster_23 { + 64 [label="Enter function anonymousFunction"]; + subgraph cluster_25 { color=blue - 56 [label="Enter block"]; - 57 [label="Access variable R|/x|"]; - 58 [label="Function call: R|/x|.R|/A.foo|()"]; - 59 [label="Access variable R|/x|"]; - 60 [label="Type operator: x as B"]; - 61 [label="Exit block"]; + 65 [label="Enter block"]; + 66 [label="Access variable R|/x|"]; + 67 [label="Function call: R|/x|.R|/A.foo|()"]; + 68 [label="Access variable R|/x|"]; + 69 [label="Type operator: x as B"]; + 70 [label="Exit block"]; } - 62 [label="Exit function anonymousFunction"]; + 71 [label="Exit function anonymousFunction"]; } - 63 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { + 72 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { R|/x|.R|/A.foo|() (R|/x| as R|B|) } )"]; - 64 [label="Access variable R|/x|"]; - 65 [label="Function call: R|/x|.R|/B.bar|()"]; - 66 [label="Exit block"]; + 73 [label="Access variable R|/x|"]; + 74 [label="Function call: R|/x|.R|/B.bar|()"]; + 75 [label="Exit block"]; } - 67 [label="Exit when branch result"]; - subgraph cluster_24 { - color=blue - 68 [label="Enter when branch condition else"]; - 69 [label="Exit when branch condition"]; - } - subgraph cluster_25 { - color=blue - 70 [label="Enter block"]; - 71 [label="Exit block"]; - } - 72 [label="Exit when branch result"]; - 73 [label="Exit when"]; + 76 [label="Exit when branch result"]; + 77 [label="Exit when"]; } - 74 [label="Exit block"]; + 78 [label="Exit block"]; } - 75 [label="Exit function test_3" style="filled" fillcolor=red]; + 79 [label="Exit function test_3" style="filled" fillcolor=red]; } - 47 -> {48}; - 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; - 53 -> {54 68}; + 53 -> {54}; 54 -> {55}; - 55 -> {56}; + 55 -> {62 56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {62}; + 61 -> {77}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {73}; + 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; @@ -248,5 +252,9 @@ digraph inPlaceLambdas_kt { 72 -> {73}; 73 -> {74}; 74 -> {75}; + 75 -> {76}; + 76 -> {77}; + 77 -> {78}; + 78 -> {79}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/nullability.dot b/compiler/fir/resolve/testData/resolve/smartcasts/nullability.dot index 060076e890d..920297bb553 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/nullability.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/nullability.dot @@ -70,32 +70,34 @@ digraph nullability_kt { } subgraph cluster_10 { color=blue - 20 [label="Enter block"]; - 21 [label="Access variable R|/x|"]; - 22 [label="Function call: R|/x|.R|/A.foo|()"]; - 23 [label="Exit block"]; + 20 [label="Enter when branch condition else"]; + 21 [label="Exit when branch condition"]; } - 24 [label="Exit when branch result"]; + 22 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 25 [label="Enter when branch condition else"]; - 26 [label="Exit when branch condition"]; + 23 [label="Enter block"]; + 24 [label="Access variable R|/x|"]; + 25 [label="Function call: R|/x|.#()"]; + 26 [label="Exit block"]; } + 27 [label="Exit when branch result"]; + 28 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 27 [label="Enter block"]; - 28 [label="Access variable R|/x|"]; - 29 [label="Function call: R|/x|.#()"]; - 30 [label="Exit block"]; + 29 [label="Enter block"]; + 30 [label="Access variable R|/x|"]; + 31 [label="Function call: R|/x|.R|/A.foo|()"]; + 32 [label="Exit block"]; } - 31 [label="Exit when branch result"]; - 32 [label="Exit when"]; + 33 [label="Exit when branch result"]; + 34 [label="Exit when"]; } - 33 [label="Access variable R|/x|"]; - 34 [label="Function call: R|/x|.#()"]; - 35 [label="Exit block"]; + 35 [label="Access variable R|/x|"]; + 36 [label="Function call: R|/x|.#()"]; + 37 [label="Exit block"]; } - 36 [label="Exit function test_1" style="filled" fillcolor=red]; + 38 [label="Exit function test_1" style="filled" fillcolor=red]; } 12 -> {13}; @@ -105,15 +107,15 @@ digraph nullability_kt { 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 25}; + 19 -> {28 20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {32}; + 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {28}; + 27 -> {34}; 28 -> {29}; 29 -> {30}; 30 -> {31}; @@ -122,287 +124,295 @@ digraph nullability_kt { 33 -> {34}; 34 -> {35}; 35 -> {36}; + 36 -> {37}; + 37 -> {38}; subgraph cluster_13 { color=red - 37 [label="Enter function test_2" style="filled" fillcolor=red]; + 39 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 38 [label="Enter block"]; + 40 [label="Enter block"]; subgraph cluster_15 { color=blue - 39 [label="Enter when"]; + 41 [label="Enter when"]; subgraph cluster_16 { color=blue - 40 [label="Enter when branch condition "]; - 41 [label="Access variable R|/x|"]; - 42 [label="Const: Null(null)"]; - 43 [label="Operator =="]; - 44 [label="Exit when branch condition"]; + 42 [label="Enter when branch condition "]; + 43 [label="Access variable R|/x|"]; + 44 [label="Const: Null(null)"]; + 45 [label="Operator =="]; + 46 [label="Exit when branch condition"]; } subgraph cluster_17 { color=blue - 45 [label="Enter block"]; - 46 [label="Access variable R|/x|"]; - 47 [label="Function call: R|/x|.#()"]; - 48 [label="Exit block"]; + 47 [label="Enter when branch condition else"]; + 48 [label="Exit when branch condition"]; } - 49 [label="Exit when branch result"]; + 49 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 50 [label="Enter when branch condition else"]; - 51 [label="Exit when branch condition"]; + 50 [label="Enter block"]; + 51 [label="Access variable R|/x|"]; + 52 [label="Function call: R|/x|.R|/A.foo|()"]; + 53 [label="Exit block"]; } + 54 [label="Exit when branch result"]; + 55 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/x|"]; - 54 [label="Function call: R|/x|.R|/A.foo|()"]; - 55 [label="Exit block"]; + 56 [label="Enter block"]; + 57 [label="Access variable R|/x|"]; + 58 [label="Function call: R|/x|.#()"]; + 59 [label="Exit block"]; } - 56 [label="Exit when branch result"]; - 57 [label="Exit when"]; + 60 [label="Exit when branch result"]; + 61 [label="Exit when"]; } - 58 [label="Access variable R|/x|"]; - 59 [label="Function call: R|/x|.#()"]; - 60 [label="Exit block"]; + 62 [label="Access variable R|/x|"]; + 63 [label="Function call: R|/x|.#()"]; + 64 [label="Exit block"]; } - 61 [label="Exit function test_2" style="filled" fillcolor=red]; + 65 [label="Exit function test_2" style="filled" fillcolor=red]; } - 37 -> {38}; - 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45 50}; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + 46 -> {55 47}; 47 -> {48}; 48 -> {49}; - 49 -> {57}; + 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {55}; + 54 -> {61}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; + 64 -> {65}; subgraph cluster_20 { color=red - 62 [label="Enter function test_3" style="filled" fillcolor=red]; + 66 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 63 [label="Enter block"]; + 67 [label="Enter block"]; subgraph cluster_22 { color=blue - 64 [label="Enter when"]; - 65 [label="Access variable R|/x|"]; - 66 [label="Variable declaration: lval : R|A?|"]; + 68 [label="Enter when"]; + 69 [label="Access variable R|/x|"]; + 70 [label="Variable declaration: lval : R|A?|"]; subgraph cluster_23 { color=blue - 67 [label="Enter when branch condition "]; - 68 [label="Const: Null(null)"]; - 69 [label="Operator =="]; - 70 [label="Exit when branch condition"]; + 71 [label="Enter when branch condition "]; + 72 [label="Const: Null(null)"]; + 73 [label="Operator =="]; + 74 [label="Exit when branch condition"]; } subgraph cluster_24 { color=blue - 71 [label="Enter block"]; - 72 [label="Jump: ^test_3 Unit"]; - 73 [label="Stub" style="filled" fillcolor=gray]; - 74 [label="Exit block" style="filled" fillcolor=gray]; + 75 [label="Enter when branch condition else"]; + 76 [label="Exit when branch condition"]; } - 75 [label="Exit when branch result" style="filled" fillcolor=gray]; + 77 [label="Enter when branch result"]; subgraph cluster_25 { - color=blue - 76 [label="Enter when branch condition else"]; - 77 [label="Exit when branch condition"]; - } - subgraph cluster_26 { color=blue 78 [label="Enter block"]; 79 [label="Access variable R|/|"]; 80 [label="Exit block"]; } 81 [label="Exit when branch result"]; - 82 [label="Exit when"]; + 82 [label="Enter when branch result"]; + subgraph cluster_26 { + color=blue + 83 [label="Enter block"]; + 84 [label="Jump: ^test_3 Unit"]; + 85 [label="Stub" style="filled" fillcolor=gray]; + 86 [label="Exit block" style="filled" fillcolor=gray]; + } + 87 [label="Exit when branch result" style="filled" fillcolor=gray]; + 88 [label="Exit when"]; } - 83 [label="Access variable R|/x|"]; - 84 [label="Function call: R|/x|.R|/A.foo|()"]; - 85 [label="Exit block"]; + 89 [label="Access variable R|/x|"]; + 90 [label="Function call: R|/x|.R|/A.foo|()"]; + 91 [label="Exit block"]; } - 86 [label="Exit function test_3" style="filled" fillcolor=red]; + 92 [label="Exit function test_3" style="filled" fillcolor=red]; } - 62 -> {63}; - 63 -> {64}; - 64 -> {65}; - 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71 76}; + 70 -> {71}; 71 -> {72}; - 72 -> {86}; - 72 -> {73} [style=dotted]; - 73 -> {74} [style=dotted]; - 74 -> {75} [style=dotted]; - 75 -> {82} [style=dotted]; + 72 -> {73}; + 73 -> {74}; + 74 -> {82 75}; + 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; - 81 -> {82}; + 81 -> {88}; 82 -> {83}; 83 -> {84}; - 84 -> {85}; - 85 -> {86}; - - subgraph cluster_27 { - color=red - 87 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 88 [label="Enter block"]; - subgraph cluster_29 { - color=blue - 89 [label="Enter when"]; - subgraph cluster_30 { - color=blue - 90 [label="Enter when branch condition "]; - 91 [label="Access variable R|/x|"]; - 92 [label="Function call: R|/x|?.R|/A.getA|()"]; - 93 [label="Const: Null(null)"]; - 94 [label="Operator =="]; - 95 [label="Exit when branch condition"]; - } - subgraph cluster_31 { - color=blue - 96 [label="Enter block"]; - 97 [label="Jump: ^test_4 Unit"]; - 98 [label="Stub" style="filled" fillcolor=gray]; - 99 [label="Exit block" style="filled" fillcolor=gray]; - } - 100 [label="Exit when branch result" style="filled" fillcolor=gray]; - subgraph cluster_32 { - color=blue - 101 [label="Enter when branch condition else"]; - 102 [label="Exit when branch condition"]; - } - subgraph cluster_33 { - color=blue - 103 [label="Enter block"]; - 104 [label="Exit block"]; - } - 105 [label="Exit when branch result"]; - 106 [label="Exit when"]; - } - 107 [label="Access variable R|/x|"]; - 108 [label="Function call: R|/x|.R|/A.foo|()"]; - 109 [label="Exit block"]; - } - 110 [label="Exit function test_4" style="filled" fillcolor=red]; - } - - 87 -> {88}; + 84 -> {92}; + 84 -> {85} [style=dotted]; + 85 -> {86} [style=dotted]; + 86 -> {87} [style=dotted]; + 87 -> {88} [style=dotted]; 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; - 92 -> {93}; + + subgraph cluster_27 { + color=red + 93 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 94 [label="Enter block"]; + subgraph cluster_29 { + color=blue + 95 [label="Enter when"]; + subgraph cluster_30 { + color=blue + 96 [label="Enter when branch condition "]; + 97 [label="Access variable R|/x|"]; + 98 [label="Function call: R|/x|?.R|/A.getA|()"]; + 99 [label="Const: Null(null)"]; + 100 [label="Operator =="]; + 101 [label="Exit when branch condition"]; + } + subgraph cluster_31 { + color=blue + 102 [label="Enter when branch condition else"]; + 103 [label="Exit when branch condition"]; + } + 104 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 105 [label="Enter block"]; + 106 [label="Exit block"]; + } + 107 [label="Exit when branch result"]; + 108 [label="Enter when branch result"]; + subgraph cluster_33 { + color=blue + 109 [label="Enter block"]; + 110 [label="Jump: ^test_4 Unit"]; + 111 [label="Stub" style="filled" fillcolor=gray]; + 112 [label="Exit block" style="filled" fillcolor=gray]; + } + 113 [label="Exit when branch result" style="filled" fillcolor=gray]; + 114 [label="Exit when"]; + } + 115 [label="Access variable R|/x|"]; + 116 [label="Function call: R|/x|.R|/A.foo|()"]; + 117 [label="Exit block"]; + } + 118 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 93 -> {94}; 94 -> {95}; - 95 -> {96 101}; + 95 -> {96}; 96 -> {97}; - 97 -> {110}; - 97 -> {98} [style=dotted]; - 98 -> {99} [style=dotted]; - 99 -> {100} [style=dotted]; - 100 -> {106} [style=dotted]; - 101 -> {102}; + 97 -> {98}; + 98 -> {99}; + 99 -> {100}; + 100 -> {101}; + 101 -> {108 102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {108}; + 107 -> {114}; 108 -> {109}; 109 -> {110}; - - subgraph cluster_34 { - color=red - 111 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_35 { - color=blue - 112 [label="Enter block"]; - subgraph cluster_36 { - color=blue - 113 [label="Enter when"]; - subgraph cluster_37 { - color=blue - 114 [label="Enter when branch condition "]; - 115 [label="Access variable R|/q|"]; - 116 [label="Access variable R|/Q.data|"]; - 117 [label="Access variable R|/MyData.s|"]; - 118 [label="Function call: R|/q|?.R|/Q.data|?.R|/MyData.s|?.R|kotlin/Int.inc|()"]; - 119 [label="Const: Null(null)"]; - 120 [label="Operator !="]; - 121 [label="Exit when branch condition"]; - } - subgraph cluster_38 { - color=blue - 122 [label="Enter block"]; - 123 [label="Access variable R|/q|"]; - 124 [label="Access variable R|/Q.data|"]; - 125 [label="Access variable R|/q|"]; - 126 [label="Access variable R|/Q.data|"]; - 127 [label="Access variable R|/MyData.s|"]; - 128 [label="Access variable R|/q|"]; - 129 [label="Access variable R|/Q.data|"]; - 130 [label="Access variable R|/MyData.s|"]; - 131 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s|.R|kotlin/Int.inc|()"]; - 132 [label="Exit block"]; - } - 133 [label="Exit when branch result"]; - subgraph cluster_39 { - color=blue - 134 [label="Enter when branch condition else"]; - 135 [label="Exit when branch condition"]; - } - subgraph cluster_40 { - color=blue - 136 [label="Enter block"]; - 137 [label="Exit block"]; - } - 138 [label="Exit when branch result"]; - 139 [label="Exit when"]; - } - 140 [label="Exit block"]; - } - 141 [label="Exit function test_5" style="filled" fillcolor=red]; - } - - 111 -> {112}; - 112 -> {113}; - 113 -> {114}; + 110 -> {118}; + 110 -> {111} [style=dotted]; + 111 -> {112} [style=dotted]; + 112 -> {113} [style=dotted]; + 113 -> {114} [style=dotted]; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {119}; + + subgraph cluster_34 { + color=red + 119 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_35 { + color=blue + 120 [label="Enter block"]; + subgraph cluster_36 { + color=blue + 121 [label="Enter when"]; + subgraph cluster_37 { + color=blue + 122 [label="Enter when branch condition "]; + 123 [label="Access variable R|/q|"]; + 124 [label="Access variable R|/Q.data|"]; + 125 [label="Access variable R|/MyData.s|"]; + 126 [label="Function call: R|/q|?.R|/Q.data|?.R|/MyData.s|?.R|kotlin/Int.inc|()"]; + 127 [label="Const: Null(null)"]; + 128 [label="Operator !="]; + 129 [label="Exit when branch condition"]; + } + subgraph cluster_38 { + color=blue + 130 [label="Enter when branch condition else"]; + 131 [label="Exit when branch condition"]; + } + 132 [label="Enter when branch result"]; + subgraph cluster_39 { + color=blue + 133 [label="Enter block"]; + 134 [label="Exit block"]; + } + 135 [label="Exit when branch result"]; + 136 [label="Enter when branch result"]; + subgraph cluster_40 { + color=blue + 137 [label="Enter block"]; + 138 [label="Access variable R|/q|"]; + 139 [label="Access variable R|/Q.data|"]; + 140 [label="Access variable R|/q|"]; + 141 [label="Access variable R|/Q.data|"]; + 142 [label="Access variable R|/MyData.s|"]; + 143 [label="Access variable R|/q|"]; + 144 [label="Access variable R|/Q.data|"]; + 145 [label="Access variable R|/MyData.s|"]; + 146 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s|.R|kotlin/Int.inc|()"]; + 147 [label="Exit block"]; + } + 148 [label="Exit when branch result"]; + 149 [label="Exit when"]; + } + 150 [label="Exit block"]; + } + 151 [label="Exit function test_5" style="filled" fillcolor=red]; + } + 119 -> {120}; 120 -> {121}; - 121 -> {122 134}; + 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; @@ -410,76 +420,19 @@ digraph nullability_kt { 126 -> {127}; 127 -> {128}; 128 -> {129}; - 129 -> {130}; + 129 -> {136 130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {139}; + 133 -> {134}; 134 -> {135}; - 135 -> {136}; + 135 -> {149}; 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; 140 -> {141}; - - subgraph cluster_41 { - color=red - 142 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_42 { - color=blue - 143 [label="Enter block"]; - subgraph cluster_43 { - color=blue - 144 [label="Enter when"]; - 145 [label="Access variable R|/q|"]; - 146 [label="Access variable R|/Q.data|"]; - 147 [label="Access variable R|/MyData.s|"]; - 148 [label="Function call: R|/q|?.R|/Q.data|?.R|/MyData.s|?.R|kotlin/Int.inc|()"]; - 149 [label="Variable declaration: lval : R|kotlin/Int?|"]; - subgraph cluster_44 { - color=blue - 150 [label="Enter when branch condition "]; - 151 [label="Const: Null(null)"]; - 152 [label="Operator =="]; - 153 [label="Exit when branch condition"]; - } - subgraph cluster_45 { - color=blue - 154 [label="Enter block"]; - 155 [label="Jump: ^test_6 Unit"]; - 156 [label="Stub" style="filled" fillcolor=gray]; - 157 [label="Exit block" style="filled" fillcolor=gray]; - } - 158 [label="Exit when branch result" style="filled" fillcolor=gray]; - subgraph cluster_46 { - color=blue - 159 [label="Enter when branch condition else"]; - 160 [label="Exit when branch condition"]; - } - subgraph cluster_47 { - color=blue - 161 [label="Enter block"]; - 162 [label="Access variable R|/|"]; - 163 [label="Exit block"]; - } - 164 [label="Exit when branch result"]; - 165 [label="Exit when"]; - } - 166 [label="Access variable R|/q|"]; - 167 [label="Access variable R|/Q.data|"]; - 168 [label="Access variable R|/q|"]; - 169 [label="Access variable R|/Q.data|"]; - 170 [label="Access variable R|/MyData.s|"]; - 171 [label="Access variable R|/q|"]; - 172 [label="Access variable R|/Q.data|"]; - 173 [label="Access variable R|/MyData.s|"]; - 174 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s|.R|kotlin/Int.inc|()"]; - 175 [label="Exit block"]; - } - 176 [label="Exit function test_6" style="filled" fillcolor=red]; - } - + 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; @@ -489,86 +442,92 @@ digraph nullability_kt { 148 -> {149}; 149 -> {150}; 150 -> {151}; - 151 -> {152}; + + subgraph cluster_41 { + color=red + 152 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_42 { + color=blue + 153 [label="Enter block"]; + subgraph cluster_43 { + color=blue + 154 [label="Enter when"]; + 155 [label="Access variable R|/q|"]; + 156 [label="Access variable R|/Q.data|"]; + 157 [label="Access variable R|/MyData.s|"]; + 158 [label="Function call: R|/q|?.R|/Q.data|?.R|/MyData.s|?.R|kotlin/Int.inc|()"]; + 159 [label="Variable declaration: lval : R|kotlin/Int?|"]; + subgraph cluster_44 { + color=blue + 160 [label="Enter when branch condition "]; + 161 [label="Const: Null(null)"]; + 162 [label="Operator =="]; + 163 [label="Exit when branch condition"]; + } + subgraph cluster_45 { + color=blue + 164 [label="Enter when branch condition else"]; + 165 [label="Exit when branch condition"]; + } + 166 [label="Enter when branch result"]; + subgraph cluster_46 { + color=blue + 167 [label="Enter block"]; + 168 [label="Access variable R|/|"]; + 169 [label="Exit block"]; + } + 170 [label="Exit when branch result"]; + 171 [label="Enter when branch result"]; + subgraph cluster_47 { + color=blue + 172 [label="Enter block"]; + 173 [label="Jump: ^test_6 Unit"]; + 174 [label="Stub" style="filled" fillcolor=gray]; + 175 [label="Exit block" style="filled" fillcolor=gray]; + } + 176 [label="Exit when branch result" style="filled" fillcolor=gray]; + 177 [label="Exit when"]; + } + 178 [label="Access variable R|/q|"]; + 179 [label="Access variable R|/Q.data|"]; + 180 [label="Access variable R|/q|"]; + 181 [label="Access variable R|/Q.data|"]; + 182 [label="Access variable R|/MyData.s|"]; + 183 [label="Access variable R|/q|"]; + 184 [label="Access variable R|/Q.data|"]; + 185 [label="Access variable R|/MyData.s|"]; + 186 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s|.R|kotlin/Int.inc|()"]; + 187 [label="Exit block"]; + } + 188 [label="Exit function test_6" style="filled" fillcolor=red]; + } + 152 -> {153}; - 153 -> {154 159}; + 153 -> {154}; 154 -> {155}; - 155 -> {176}; - 155 -> {156} [style=dotted]; - 156 -> {157} [style=dotted]; - 157 -> {158} [style=dotted]; - 158 -> {165} [style=dotted]; + 155 -> {156}; + 156 -> {157}; + 157 -> {158}; + 158 -> {159}; 159 -> {160}; 160 -> {161}; 161 -> {162}; 162 -> {163}; - 163 -> {164}; + 163 -> {171 164}; 164 -> {165}; 165 -> {166}; 166 -> {167}; 167 -> {168}; 168 -> {169}; 169 -> {170}; - 170 -> {171}; + 170 -> {177}; 171 -> {172}; 172 -> {173}; - 173 -> {174}; - 174 -> {175}; - 175 -> {176}; - - subgraph cluster_48 { - color=red - 177 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_49 { - color=blue - 178 [label="Enter block"]; - subgraph cluster_50 { - color=blue - 179 [label="Enter when"]; - subgraph cluster_51 { - color=blue - 180 [label="Enter when branch condition "]; - 181 [label="Access variable R|/q|"]; - 182 [label="Function call: R|/q|?.R|/Q.fdata|()"]; - 183 [label="Function call: R|/q|?.R|/Q.fdata|()?.R|/MyData.fs|()"]; - 184 [label="Function call: R|/q|?.R|/Q.fdata|()?.R|/MyData.fs|()?.R|kotlin/Int.inc|()"]; - 185 [label="Const: Null(null)"]; - 186 [label="Operator !="]; - 187 [label="Exit when branch condition"]; - } - subgraph cluster_52 { - color=blue - 188 [label="Enter block"]; - 189 [label="Access variable R|/q|"]; - 190 [label="Function call: R|/q|.R|/Q.fdata|()"]; - 191 [label="Access variable R|/q|"]; - 192 [label="Function call: R|/q|.R|/Q.fdata|()"]; - 193 [label="Function call: R|/q|.R|/Q.fdata|().#()"]; - 194 [label="Access variable R|/q|"]; - 195 [label="Function call: R|/q|.R|/Q.fdata|()"]; - 196 [label="Function call: R|/q|.R|/Q.fdata|().#()"]; - 197 [label="Function call: R|/q|.R|/Q.fdata|().#().#()"]; - 198 [label="Exit block"]; - } - 199 [label="Exit when branch result"]; - subgraph cluster_53 { - color=blue - 200 [label="Enter when branch condition else"]; - 201 [label="Exit when branch condition"]; - } - subgraph cluster_54 { - color=blue - 202 [label="Enter block"]; - 203 [label="Exit block"]; - } - 204 [label="Exit when branch result"]; - 205 [label="Exit when"]; - } - 206 [label="Exit block"]; - } - 207 [label="Exit function test_7" style="filled" fillcolor=red]; - } - + 173 -> {188}; + 173 -> {174} [style=dotted]; + 174 -> {175} [style=dotted]; + 175 -> {176} [style=dotted]; + 176 -> {177} [style=dotted]; 177 -> {178}; 178 -> {179}; 179 -> {180}; @@ -579,8 +538,63 @@ digraph nullability_kt { 184 -> {185}; 185 -> {186}; 186 -> {187}; - 187 -> {188 200}; - 188 -> {189}; + 187 -> {188}; + + subgraph cluster_48 { + color=red + 189 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 190 [label="Enter block"]; + subgraph cluster_50 { + color=blue + 191 [label="Enter when"]; + subgraph cluster_51 { + color=blue + 192 [label="Enter when branch condition "]; + 193 [label="Access variable R|/q|"]; + 194 [label="Function call: R|/q|?.R|/Q.fdata|()"]; + 195 [label="Function call: R|/q|?.R|/Q.fdata|()?.R|/MyData.fs|()"]; + 196 [label="Function call: R|/q|?.R|/Q.fdata|()?.R|/MyData.fs|()?.R|kotlin/Int.inc|()"]; + 197 [label="Const: Null(null)"]; + 198 [label="Operator !="]; + 199 [label="Exit when branch condition"]; + } + subgraph cluster_52 { + color=blue + 200 [label="Enter when branch condition else"]; + 201 [label="Exit when branch condition"]; + } + 202 [label="Enter when branch result"]; + subgraph cluster_53 { + color=blue + 203 [label="Enter block"]; + 204 [label="Exit block"]; + } + 205 [label="Exit when branch result"]; + 206 [label="Enter when branch result"]; + subgraph cluster_54 { + color=blue + 207 [label="Enter block"]; + 208 [label="Access variable R|/q|"]; + 209 [label="Function call: R|/q|.R|/Q.fdata|()"]; + 210 [label="Access variable R|/q|"]; + 211 [label="Function call: R|/q|.R|/Q.fdata|()"]; + 212 [label="Function call: R|/q|.R|/Q.fdata|().#()"]; + 213 [label="Access variable R|/q|"]; + 214 [label="Function call: R|/q|.R|/Q.fdata|()"]; + 215 [label="Function call: R|/q|.R|/Q.fdata|().#()"]; + 216 [label="Function call: R|/q|.R|/Q.fdata|().#().#()"]; + 217 [label="Exit block"]; + } + 218 [label="Exit when branch result"]; + 219 [label="Exit when"]; + } + 220 [label="Exit block"]; + } + 221 [label="Exit function test_7" style="filled" fillcolor=red]; + } + 189 -> {190}; 190 -> {191}; 191 -> {192}; @@ -591,58 +605,15 @@ digraph nullability_kt { 196 -> {197}; 197 -> {198}; 198 -> {199}; - 199 -> {205}; + 199 -> {206 200}; 200 -> {201}; 201 -> {202}; 202 -> {203}; 203 -> {204}; 204 -> {205}; - 205 -> {206}; + 205 -> {219}; 206 -> {207}; - - subgraph cluster_55 { - color=red - 208 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_56 { - color=blue - 209 [label="Enter block"]; - subgraph cluster_57 { - color=blue - 210 [label="Enter when"]; - subgraph cluster_58 { - color=blue - 211 [label="Enter when branch condition "]; - 212 [label="Access variable R|/b|"]; - 213 [label="Const: Boolean(true)"]; - 214 [label="Operator =="]; - 215 [label="Exit when branch condition"]; - } - subgraph cluster_59 { - color=blue - 216 [label="Enter block"]; - 217 [label="Access variable R|/b|"]; - 218 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 219 [label="Exit block"]; - } - 220 [label="Exit when branch result"]; - subgraph cluster_60 { - color=blue - 221 [label="Enter when branch condition else"]; - 222 [label="Exit when branch condition"]; - } - subgraph cluster_61 { - color=blue - 223 [label="Enter block"]; - 224 [label="Exit block"]; - } - 225 [label="Exit when branch result"]; - 226 [label="Exit when"]; - } - 227 [label="Exit block"]; - } - 228 [label="Exit function test_8" style="filled" fillcolor=red]; - } - + 207 -> {208}; 208 -> {209}; 209 -> {210}; 210 -> {211}; @@ -650,183 +621,236 @@ digraph nullability_kt { 212 -> {213}; 213 -> {214}; 214 -> {215}; - 215 -> {216 221}; + 215 -> {216}; 216 -> {217}; 217 -> {218}; 218 -> {219}; 219 -> {220}; - 220 -> {226}; - 221 -> {222}; + 220 -> {221}; + + subgraph cluster_55 { + color=red + 222 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_56 { + color=blue + 223 [label="Enter block"]; + subgraph cluster_57 { + color=blue + 224 [label="Enter when"]; + subgraph cluster_58 { + color=blue + 225 [label="Enter when branch condition "]; + 226 [label="Access variable R|/b|"]; + 227 [label="Const: Boolean(true)"]; + 228 [label="Operator =="]; + 229 [label="Exit when branch condition"]; + } + subgraph cluster_59 { + color=blue + 230 [label="Enter when branch condition else"]; + 231 [label="Exit when branch condition"]; + } + 232 [label="Enter when branch result"]; + subgraph cluster_60 { + color=blue + 233 [label="Enter block"]; + 234 [label="Exit block"]; + } + 235 [label="Exit when branch result"]; + 236 [label="Enter when branch result"]; + subgraph cluster_61 { + color=blue + 237 [label="Enter block"]; + 238 [label="Access variable R|/b|"]; + 239 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 240 [label="Exit block"]; + } + 241 [label="Exit when branch result"]; + 242 [label="Exit when"]; + } + 243 [label="Exit block"]; + } + 244 [label="Exit function test_8" style="filled" fillcolor=red]; + } + 222 -> {223}; 223 -> {224}; 224 -> {225}; 225 -> {226}; 226 -> {227}; 227 -> {228}; - - subgraph cluster_62 { - color=red - 229 [label="Enter function test_9" style="filled" fillcolor=red]; - subgraph cluster_63 { - color=blue - 230 [label="Enter block"]; - subgraph cluster_64 { - color=blue - 231 [label="Enter when"]; - subgraph cluster_65 { - color=blue - 232 [label="Enter when branch condition "]; - 233 [label="Access variable R|/a|"]; - 234 [label="Access variable R|/b|"]; - 235 [label="Operator =="]; - 236 [label="Exit when branch condition"]; - } - subgraph cluster_66 { - color=blue - 237 [label="Enter block"]; - 238 [label="Access variable R|/b|"]; - 239 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; - 240 [label="Exit block"]; - } - 241 [label="Exit when branch result"]; - subgraph cluster_67 { - color=blue - 242 [label="Enter when branch condition else"]; - 243 [label="Exit when branch condition"]; - } - subgraph cluster_68 { - color=blue - 244 [label="Enter block"]; - 245 [label="Exit block"]; - } - 246 [label="Exit when branch result"]; - 247 [label="Exit when"]; - } - 248 [label="Access variable R|/b|"]; - 249 [label="Function call: R|/b|.#()"]; - subgraph cluster_69 { - color=blue - 250 [label="Enter when"]; - subgraph cluster_70 { - color=blue - 251 [label="Enter when branch condition "]; - 252 [label="Access variable R|/a|"]; - 253 [label="Access variable R|/b|"]; - 254 [label="Operator ==="]; - 255 [label="Exit when branch condition"]; - } - subgraph cluster_71 { - color=blue - 256 [label="Enter block"]; - 257 [label="Access variable R|/b|"]; - 258 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; - 259 [label="Exit block"]; - } - 260 [label="Exit when branch result"]; - subgraph cluster_72 { - color=blue - 261 [label="Enter when branch condition else"]; - 262 [label="Exit when branch condition"]; - } - subgraph cluster_73 { - color=blue - 263 [label="Enter block"]; - 264 [label="Exit block"]; - } - 265 [label="Exit when branch result"]; - 266 [label="Exit when"]; - } - 267 [label="Access variable R|/b|"]; - 268 [label="Function call: R|/b|.#()"]; - subgraph cluster_74 { - color=blue - 269 [label="Enter when"]; - subgraph cluster_75 { - color=blue - 270 [label="Enter when branch condition "]; - 271 [label="Access variable R|/b|"]; - 272 [label="Access variable R|/a|"]; - 273 [label="Operator =="]; - 274 [label="Exit when branch condition"]; - } - subgraph cluster_76 { - color=blue - 275 [label="Enter block"]; - 276 [label="Access variable R|/b|"]; - 277 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; - 278 [label="Exit block"]; - } - 279 [label="Exit when branch result"]; - subgraph cluster_77 { - color=blue - 280 [label="Enter when branch condition else"]; - 281 [label="Exit when branch condition"]; - } - subgraph cluster_78 { - color=blue - 282 [label="Enter block"]; - 283 [label="Exit block"]; - } - 284 [label="Exit when branch result"]; - 285 [label="Exit when"]; - } - 286 [label="Access variable R|/b|"]; - 287 [label="Function call: R|/b|.#()"]; - subgraph cluster_79 { - color=blue - 288 [label="Enter when"]; - subgraph cluster_80 { - color=blue - 289 [label="Enter when branch condition "]; - 290 [label="Access variable R|/b|"]; - 291 [label="Access variable R|/a|"]; - 292 [label="Operator ==="]; - 293 [label="Exit when branch condition"]; - } - subgraph cluster_81 { - color=blue - 294 [label="Enter block"]; - 295 [label="Access variable R|/b|"]; - 296 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; - 297 [label="Exit block"]; - } - 298 [label="Exit when branch result"]; - subgraph cluster_82 { - color=blue - 299 [label="Enter when branch condition else"]; - 300 [label="Exit when branch condition"]; - } - subgraph cluster_83 { - color=blue - 301 [label="Enter block"]; - 302 [label="Exit block"]; - } - 303 [label="Exit when branch result"]; - 304 [label="Exit when"]; - } - 305 [label="Access variable R|/b|"]; - 306 [label="Function call: R|/b|.#()"]; - 307 [label="Exit block"]; - } - 308 [label="Exit function test_9" style="filled" fillcolor=red]; - } - - 229 -> {230}; + 228 -> {229}; + 229 -> {236 230}; 230 -> {231}; 231 -> {232}; 232 -> {233}; 233 -> {234}; 234 -> {235}; - 235 -> {236}; - 236 -> {237 242}; + 235 -> {242}; + 236 -> {237}; 237 -> {238}; 238 -> {239}; 239 -> {240}; 240 -> {241}; - 241 -> {247}; + 241 -> {242}; 242 -> {243}; 243 -> {244}; - 244 -> {245}; + + subgraph cluster_62 { + color=red + 245 [label="Enter function test_9" style="filled" fillcolor=red]; + subgraph cluster_63 { + color=blue + 246 [label="Enter block"]; + subgraph cluster_64 { + color=blue + 247 [label="Enter when"]; + subgraph cluster_65 { + color=blue + 248 [label="Enter when branch condition "]; + 249 [label="Access variable R|/a|"]; + 250 [label="Access variable R|/b|"]; + 251 [label="Operator =="]; + 252 [label="Exit when branch condition"]; + } + subgraph cluster_66 { + color=blue + 253 [label="Enter when branch condition else"]; + 254 [label="Exit when branch condition"]; + } + 255 [label="Enter when branch result"]; + subgraph cluster_67 { + color=blue + 256 [label="Enter block"]; + 257 [label="Exit block"]; + } + 258 [label="Exit when branch result"]; + 259 [label="Enter when branch result"]; + subgraph cluster_68 { + color=blue + 260 [label="Enter block"]; + 261 [label="Access variable R|/b|"]; + 262 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; + 263 [label="Exit block"]; + } + 264 [label="Exit when branch result"]; + 265 [label="Exit when"]; + } + 266 [label="Access variable R|/b|"]; + 267 [label="Function call: R|/b|.#()"]; + subgraph cluster_69 { + color=blue + 268 [label="Enter when"]; + subgraph cluster_70 { + color=blue + 269 [label="Enter when branch condition "]; + 270 [label="Access variable R|/a|"]; + 271 [label="Access variable R|/b|"]; + 272 [label="Operator ==="]; + 273 [label="Exit when branch condition"]; + } + subgraph cluster_71 { + color=blue + 274 [label="Enter when branch condition else"]; + 275 [label="Exit when branch condition"]; + } + 276 [label="Enter when branch result"]; + subgraph cluster_72 { + color=blue + 277 [label="Enter block"]; + 278 [label="Exit block"]; + } + 279 [label="Exit when branch result"]; + 280 [label="Enter when branch result"]; + subgraph cluster_73 { + color=blue + 281 [label="Enter block"]; + 282 [label="Access variable R|/b|"]; + 283 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; + 284 [label="Exit block"]; + } + 285 [label="Exit when branch result"]; + 286 [label="Exit when"]; + } + 287 [label="Access variable R|/b|"]; + 288 [label="Function call: R|/b|.#()"]; + subgraph cluster_74 { + color=blue + 289 [label="Enter when"]; + subgraph cluster_75 { + color=blue + 290 [label="Enter when branch condition "]; + 291 [label="Access variable R|/b|"]; + 292 [label="Access variable R|/a|"]; + 293 [label="Operator =="]; + 294 [label="Exit when branch condition"]; + } + subgraph cluster_76 { + color=blue + 295 [label="Enter when branch condition else"]; + 296 [label="Exit when branch condition"]; + } + 297 [label="Enter when branch result"]; + subgraph cluster_77 { + color=blue + 298 [label="Enter block"]; + 299 [label="Exit block"]; + } + 300 [label="Exit when branch result"]; + 301 [label="Enter when branch result"]; + subgraph cluster_78 { + color=blue + 302 [label="Enter block"]; + 303 [label="Access variable R|/b|"]; + 304 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; + 305 [label="Exit block"]; + } + 306 [label="Exit when branch result"]; + 307 [label="Exit when"]; + } + 308 [label="Access variable R|/b|"]; + 309 [label="Function call: R|/b|.#()"]; + subgraph cluster_79 { + color=blue + 310 [label="Enter when"]; + subgraph cluster_80 { + color=blue + 311 [label="Enter when branch condition "]; + 312 [label="Access variable R|/b|"]; + 313 [label="Access variable R|/a|"]; + 314 [label="Operator ==="]; + 315 [label="Exit when branch condition"]; + } + subgraph cluster_81 { + color=blue + 316 [label="Enter when branch condition else"]; + 317 [label="Exit when branch condition"]; + } + 318 [label="Enter when branch result"]; + subgraph cluster_82 { + color=blue + 319 [label="Enter block"]; + 320 [label="Exit block"]; + } + 321 [label="Exit when branch result"]; + 322 [label="Enter when branch result"]; + subgraph cluster_83 { + color=blue + 323 [label="Enter block"]; + 324 [label="Access variable R|/b|"]; + 325 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; + 326 [label="Exit block"]; + } + 327 [label="Exit when branch result"]; + 328 [label="Exit when"]; + } + 329 [label="Access variable R|/b|"]; + 330 [label="Function call: R|/b|.#()"]; + 331 [label="Exit block"]; + } + 332 [label="Exit function test_9" style="filled" fillcolor=red]; + } + 245 -> {246}; 246 -> {247}; 247 -> {248}; @@ -834,15 +858,15 @@ digraph nullability_kt { 249 -> {250}; 250 -> {251}; 251 -> {252}; - 252 -> {253}; + 252 -> {259 253}; 253 -> {254}; 254 -> {255}; - 255 -> {256 261}; + 255 -> {256}; 256 -> {257}; 257 -> {258}; - 258 -> {259}; + 258 -> {265}; 259 -> {260}; - 260 -> {266}; + 260 -> {261}; 261 -> {262}; 262 -> {263}; 263 -> {264}; @@ -855,13 +879,13 @@ digraph nullability_kt { 270 -> {271}; 271 -> {272}; 272 -> {273}; - 273 -> {274}; - 274 -> {275 280}; + 273 -> {280 274}; + 274 -> {275}; 275 -> {276}; 276 -> {277}; 277 -> {278}; 278 -> {279}; - 279 -> {285}; + 279 -> {286}; 280 -> {281}; 281 -> {282}; 282 -> {283}; @@ -875,14 +899,14 @@ digraph nullability_kt { 290 -> {291}; 291 -> {292}; 292 -> {293}; - 293 -> {294 299}; - 294 -> {295}; + 293 -> {294}; + 294 -> {301 295}; 295 -> {296}; 296 -> {297}; 297 -> {298}; - 298 -> {304}; + 298 -> {299}; 299 -> {300}; - 300 -> {301}; + 300 -> {307}; 301 -> {302}; 302 -> {303}; 303 -> {304}; @@ -890,167 +914,20 @@ digraph nullability_kt { 305 -> {306}; 306 -> {307}; 307 -> {308}; - - subgraph cluster_84 { - color=red - 309 [label="Enter function test_10" style="filled" fillcolor=red]; - subgraph cluster_85 { - color=blue - 310 [label="Enter block"]; - subgraph cluster_86 { - color=blue - 311 [label="Enter when"]; - subgraph cluster_87 { - color=blue - 312 [label="Enter when branch condition "]; - 313 [label="Access variable R|/a|"]; - 314 [label="Access variable R|/b|"]; - 315 [label="Operator =="]; - 316 [label="Exit when branch condition"]; - } - subgraph cluster_88 { - color=blue - 317 [label="Enter block"]; - 318 [label="Access variable R|/b|"]; - 319 [label="Function call: R|/b|.#()"]; - 320 [label="Exit block"]; - } - 321 [label="Exit when branch result"]; - subgraph cluster_89 { - color=blue - 322 [label="Enter when branch condition else"]; - 323 [label="Exit when branch condition"]; - } - subgraph cluster_90 { - color=blue - 324 [label="Enter block"]; - 325 [label="Exit block"]; - } - 326 [label="Exit when branch result"]; - 327 [label="Exit when"]; - } - 328 [label="Access variable R|/b|"]; - 329 [label="Function call: R|/b|.#()"]; - subgraph cluster_91 { - color=blue - 330 [label="Enter when"]; - subgraph cluster_92 { - color=blue - 331 [label="Enter when branch condition "]; - 332 [label="Access variable R|/a|"]; - 333 [label="Access variable R|/b|"]; - 334 [label="Operator ==="]; - 335 [label="Exit when branch condition"]; - } - subgraph cluster_93 { - color=blue - 336 [label="Enter block"]; - 337 [label="Access variable R|/b|"]; - 338 [label="Function call: R|/b|.#()"]; - 339 [label="Exit block"]; - } - 340 [label="Exit when branch result"]; - subgraph cluster_94 { - color=blue - 341 [label="Enter when branch condition else"]; - 342 [label="Exit when branch condition"]; - } - subgraph cluster_95 { - color=blue - 343 [label="Enter block"]; - 344 [label="Exit block"]; - } - 345 [label="Exit when branch result"]; - 346 [label="Exit when"]; - } - 347 [label="Access variable R|/b|"]; - 348 [label="Function call: R|/b|.#()"]; - subgraph cluster_96 { - color=blue - 349 [label="Enter when"]; - subgraph cluster_97 { - color=blue - 350 [label="Enter when branch condition "]; - 351 [label="Access variable R|/b|"]; - 352 [label="Access variable R|/a|"]; - 353 [label="Operator =="]; - 354 [label="Exit when branch condition"]; - } - subgraph cluster_98 { - color=blue - 355 [label="Enter block"]; - 356 [label="Access variable R|/b|"]; - 357 [label="Function call: R|/b|.#()"]; - 358 [label="Exit block"]; - } - 359 [label="Exit when branch result"]; - subgraph cluster_99 { - color=blue - 360 [label="Enter when branch condition else"]; - 361 [label="Exit when branch condition"]; - } - subgraph cluster_100 { - color=blue - 362 [label="Enter block"]; - 363 [label="Exit block"]; - } - 364 [label="Exit when branch result"]; - 365 [label="Exit when"]; - } - 366 [label="Access variable R|/b|"]; - 367 [label="Function call: R|/b|.#()"]; - subgraph cluster_101 { - color=blue - 368 [label="Enter when"]; - subgraph cluster_102 { - color=blue - 369 [label="Enter when branch condition "]; - 370 [label="Access variable R|/b|"]; - 371 [label="Access variable R|/a|"]; - 372 [label="Operator ==="]; - 373 [label="Exit when branch condition"]; - } - subgraph cluster_103 { - color=blue - 374 [label="Enter block"]; - 375 [label="Access variable R|/b|"]; - 376 [label="Function call: R|/b|.#()"]; - 377 [label="Exit block"]; - } - 378 [label="Exit when branch result"]; - subgraph cluster_104 { - color=blue - 379 [label="Enter when branch condition else"]; - 380 [label="Exit when branch condition"]; - } - subgraph cluster_105 { - color=blue - 381 [label="Enter block"]; - 382 [label="Exit block"]; - } - 383 [label="Exit when branch result"]; - 384 [label="Exit when"]; - } - 385 [label="Access variable R|/b|"]; - 386 [label="Function call: R|/b|.#()"]; - 387 [label="Exit block"]; - } - 388 [label="Exit function test_10" style="filled" fillcolor=red]; - } - + 308 -> {309}; 309 -> {310}; 310 -> {311}; 311 -> {312}; 312 -> {313}; 313 -> {314}; 314 -> {315}; - 315 -> {316}; - 316 -> {317 322}; + 315 -> {322 316}; + 316 -> {317}; 317 -> {318}; 318 -> {319}; 319 -> {320}; 320 -> {321}; - 321 -> {327}; + 321 -> {328}; 322 -> {323}; 323 -> {324}; 324 -> {325}; @@ -1061,21 +938,176 @@ digraph nullability_kt { 329 -> {330}; 330 -> {331}; 331 -> {332}; - 332 -> {333}; + + subgraph cluster_84 { + color=red + 333 [label="Enter function test_10" style="filled" fillcolor=red]; + subgraph cluster_85 { + color=blue + 334 [label="Enter block"]; + subgraph cluster_86 { + color=blue + 335 [label="Enter when"]; + subgraph cluster_87 { + color=blue + 336 [label="Enter when branch condition "]; + 337 [label="Access variable R|/a|"]; + 338 [label="Access variable R|/b|"]; + 339 [label="Operator =="]; + 340 [label="Exit when branch condition"]; + } + subgraph cluster_88 { + color=blue + 341 [label="Enter when branch condition else"]; + 342 [label="Exit when branch condition"]; + } + 343 [label="Enter when branch result"]; + subgraph cluster_89 { + color=blue + 344 [label="Enter block"]; + 345 [label="Exit block"]; + } + 346 [label="Exit when branch result"]; + 347 [label="Enter when branch result"]; + subgraph cluster_90 { + color=blue + 348 [label="Enter block"]; + 349 [label="Access variable R|/b|"]; + 350 [label="Function call: R|/b|.#()"]; + 351 [label="Exit block"]; + } + 352 [label="Exit when branch result"]; + 353 [label="Exit when"]; + } + 354 [label="Access variable R|/b|"]; + 355 [label="Function call: R|/b|.#()"]; + subgraph cluster_91 { + color=blue + 356 [label="Enter when"]; + subgraph cluster_92 { + color=blue + 357 [label="Enter when branch condition "]; + 358 [label="Access variable R|/a|"]; + 359 [label="Access variable R|/b|"]; + 360 [label="Operator ==="]; + 361 [label="Exit when branch condition"]; + } + subgraph cluster_93 { + color=blue + 362 [label="Enter when branch condition else"]; + 363 [label="Exit when branch condition"]; + } + 364 [label="Enter when branch result"]; + subgraph cluster_94 { + color=blue + 365 [label="Enter block"]; + 366 [label="Exit block"]; + } + 367 [label="Exit when branch result"]; + 368 [label="Enter when branch result"]; + subgraph cluster_95 { + color=blue + 369 [label="Enter block"]; + 370 [label="Access variable R|/b|"]; + 371 [label="Function call: R|/b|.#()"]; + 372 [label="Exit block"]; + } + 373 [label="Exit when branch result"]; + 374 [label="Exit when"]; + } + 375 [label="Access variable R|/b|"]; + 376 [label="Function call: R|/b|.#()"]; + subgraph cluster_96 { + color=blue + 377 [label="Enter when"]; + subgraph cluster_97 { + color=blue + 378 [label="Enter when branch condition "]; + 379 [label="Access variable R|/b|"]; + 380 [label="Access variable R|/a|"]; + 381 [label="Operator =="]; + 382 [label="Exit when branch condition"]; + } + subgraph cluster_98 { + color=blue + 383 [label="Enter when branch condition else"]; + 384 [label="Exit when branch condition"]; + } + 385 [label="Enter when branch result"]; + subgraph cluster_99 { + color=blue + 386 [label="Enter block"]; + 387 [label="Exit block"]; + } + 388 [label="Exit when branch result"]; + 389 [label="Enter when branch result"]; + subgraph cluster_100 { + color=blue + 390 [label="Enter block"]; + 391 [label="Access variable R|/b|"]; + 392 [label="Function call: R|/b|.#()"]; + 393 [label="Exit block"]; + } + 394 [label="Exit when branch result"]; + 395 [label="Exit when"]; + } + 396 [label="Access variable R|/b|"]; + 397 [label="Function call: R|/b|.#()"]; + subgraph cluster_101 { + color=blue + 398 [label="Enter when"]; + subgraph cluster_102 { + color=blue + 399 [label="Enter when branch condition "]; + 400 [label="Access variable R|/b|"]; + 401 [label="Access variable R|/a|"]; + 402 [label="Operator ==="]; + 403 [label="Exit when branch condition"]; + } + subgraph cluster_103 { + color=blue + 404 [label="Enter when branch condition else"]; + 405 [label="Exit when branch condition"]; + } + 406 [label="Enter when branch result"]; + subgraph cluster_104 { + color=blue + 407 [label="Enter block"]; + 408 [label="Exit block"]; + } + 409 [label="Exit when branch result"]; + 410 [label="Enter when branch result"]; + subgraph cluster_105 { + color=blue + 411 [label="Enter block"]; + 412 [label="Access variable R|/b|"]; + 413 [label="Function call: R|/b|.#()"]; + 414 [label="Exit block"]; + } + 415 [label="Exit when branch result"]; + 416 [label="Exit when"]; + } + 417 [label="Access variable R|/b|"]; + 418 [label="Function call: R|/b|.#()"]; + 419 [label="Exit block"]; + } + 420 [label="Exit function test_10" style="filled" fillcolor=red]; + } + 333 -> {334}; 334 -> {335}; - 335 -> {336 341}; + 335 -> {336}; 336 -> {337}; 337 -> {338}; 338 -> {339}; 339 -> {340}; - 340 -> {346}; + 340 -> {347 341}; 341 -> {342}; 342 -> {343}; 343 -> {344}; 344 -> {345}; 345 -> {346}; - 346 -> {347}; + 346 -> {353}; 347 -> {348}; 348 -> {349}; 349 -> {350}; @@ -1083,39 +1115,71 @@ digraph nullability_kt { 351 -> {352}; 352 -> {353}; 353 -> {354}; - 354 -> {355 360}; + 354 -> {355}; 355 -> {356}; 356 -> {357}; 357 -> {358}; 358 -> {359}; - 359 -> {365}; + 359 -> {360}; 360 -> {361}; - 361 -> {362}; + 361 -> {368 362}; 362 -> {363}; 363 -> {364}; 364 -> {365}; 365 -> {366}; 366 -> {367}; - 367 -> {368}; + 367 -> {374}; 368 -> {369}; 369 -> {370}; 370 -> {371}; 371 -> {372}; 372 -> {373}; - 373 -> {374 379}; + 373 -> {374}; 374 -> {375}; 375 -> {376}; 376 -> {377}; 377 -> {378}; - 378 -> {384}; + 378 -> {379}; 379 -> {380}; 380 -> {381}; 381 -> {382}; - 382 -> {383}; + 382 -> {389 383}; 383 -> {384}; 384 -> {385}; 385 -> {386}; 386 -> {387}; 387 -> {388}; + 388 -> {395}; + 389 -> {390}; + 390 -> {391}; + 391 -> {392}; + 392 -> {393}; + 393 -> {394}; + 394 -> {395}; + 395 -> {396}; + 396 -> {397}; + 397 -> {398}; + 398 -> {399}; + 399 -> {400}; + 400 -> {401}; + 401 -> {402}; + 402 -> {403}; + 403 -> {410 404}; + 404 -> {405}; + 405 -> {406}; + 406 -> {407}; + 407 -> {408}; + 408 -> {409}; + 409 -> {416}; + 410 -> {411}; + 411 -> {412}; + 412 -> {413}; + 413 -> {414}; + 414 -> {415}; + 415 -> {416}; + 416 -> {417}; + 417 -> {418}; + 418 -> {419}; + 419 -> {420}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/returns.dot b/compiler/fir/resolve/testData/resolve/smartcasts/returns.dot index cf295f2d72f..42c736f6a09 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/returns.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/returns.dot @@ -21,30 +21,32 @@ digraph returns_kt { } subgraph cluster_4 { color=blue - 7 [label="Enter block"]; - 8 [label="Access variable R|/x|"]; - 9 [label="Access variable R|kotlin/String.length|"]; - 10 [label="Exit block"]; + 7 [label="Enter when branch condition else"]; + 8 [label="Exit when branch condition"]; } - 11 [label="Exit when branch result"]; + 9 [label="Enter when branch result"]; subgraph cluster_5 { color=blue - 12 [label="Enter when branch condition else"]; - 13 [label="Exit when branch condition"]; + 10 [label="Enter block"]; + 11 [label="Exit block"]; } + 12 [label="Exit when branch result"]; + 13 [label="Enter when branch result"]; subgraph cluster_6 { color=blue 14 [label="Enter block"]; - 15 [label="Exit block"]; + 15 [label="Access variable R|/x|"]; + 16 [label="Access variable R|kotlin/String.length|"]; + 17 [label="Exit block"]; } - 16 [label="Exit when branch result"]; - 17 [label="Exit when"]; + 18 [label="Exit when branch result"]; + 19 [label="Exit when"]; } - 18 [label="Access variable R|/x|"]; - 19 [label="Access variable #"]; - 20 [label="Exit block"]; + 20 [label="Access variable R|/x|"]; + 21 [label="Access variable #"]; + 22 [label="Exit block"]; } - 21 [label="Exit function test_0" style="filled" fillcolor=red]; + 23 [label="Exit function test_0" style="filled" fillcolor=red]; } 0 -> {1}; @@ -53,13 +55,13 @@ digraph returns_kt { 3 -> {4}; 4 -> {5}; 5 -> {6}; - 6 -> {7 12}; + 6 -> {13 7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {17}; - 12 -> {13}; + 11 -> {12}; + 12 -> {19}; 13 -> {14}; 14 -> {15}; 15 -> {16}; @@ -68,197 +70,202 @@ digraph returns_kt { 18 -> {19}; 19 -> {20}; 20 -> {21}; + 21 -> {22}; + 22 -> {23}; subgraph cluster_7 { color=red - 22 [label="Enter function test_1" style="filled" fillcolor=red]; + 24 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 23 [label="Enter block"]; + 25 [label="Enter block"]; subgraph cluster_9 { color=blue - 24 [label="Enter when"]; + 26 [label="Enter when"]; subgraph cluster_10 { color=blue - 25 [label="Enter when branch condition "]; - 26 [label="Access variable R|/x|"]; - 27 [label="Type operator: x is String"]; - 28 [label="Exit when branch condition"]; + 27 [label="Enter when branch condition "]; + 28 [label="Access variable R|/x|"]; + 29 [label="Type operator: x is String"]; + 30 [label="Exit when branch condition"]; } subgraph cluster_11 { color=blue - 29 [label="Enter block"]; - 30 [label="Access variable R|/x|"]; - 31 [label="Access variable R|kotlin/String.length|"]; - 32 [label="Exit block"]; + 31 [label="Enter when branch condition else"]; + 32 [label="Exit when branch condition"]; } - 33 [label="Exit when branch result"]; + 33 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 34 [label="Enter when branch condition else"]; - 35 [label="Exit when branch condition"]; + 34 [label="Enter block"]; + 35 [label="Jump: ^test_1 Unit"]; + 36 [label="Stub" style="filled" fillcolor=gray]; + 37 [label="Exit block" style="filled" fillcolor=gray]; } + 38 [label="Exit when branch result" style="filled" fillcolor=gray]; + 39 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 36 [label="Enter block"]; - 37 [label="Jump: ^test_1 Unit"]; - 38 [label="Stub" style="filled" fillcolor=gray]; - 39 [label="Exit block" style="filled" fillcolor=gray]; + 40 [label="Enter block"]; + 41 [label="Access variable R|/x|"]; + 42 [label="Access variable R|kotlin/String.length|"]; + 43 [label="Exit block"]; } - 40 [label="Exit when branch result" style="filled" fillcolor=gray]; - 41 [label="Exit when"]; + 44 [label="Exit when branch result"]; + 45 [label="Exit when"]; } - 42 [label="Access variable R|/x|"]; - 43 [label="Access variable R|kotlin/String.length|"]; - 44 [label="Exit block"]; + 46 [label="Access variable R|/x|"]; + 47 [label="Access variable R|kotlin/String.length|"]; + 48 [label="Exit block"]; } - 45 [label="Exit function test_1" style="filled" fillcolor=red]; + 49 [label="Exit function test_1" style="filled" fillcolor=red]; } - 22 -> {23}; - 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29 34}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {39 31}; 31 -> {32}; 32 -> {33}; - 33 -> {41}; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; - 36 -> {37}; - 37 -> {45}; + 35 -> {49}; + 35 -> {36} [style=dotted]; + 36 -> {37} [style=dotted]; 37 -> {38} [style=dotted]; - 38 -> {39} [style=dotted]; - 39 -> {40} [style=dotted]; - 40 -> {41} [style=dotted]; + 38 -> {45} [style=dotted]; + 39 -> {40}; + 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; + 45 -> {46}; + 46 -> {47}; + 47 -> {48}; + 48 -> {49}; subgraph cluster_14 { color=red - 46 [label="Enter function foo" style="filled" fillcolor=red]; - 47 [label="Exit function foo" style="filled" fillcolor=red]; - } - - 46 -> {47}; - - subgraph cluster_15 { - color=red - 48 [label="Enter function bar" style="filled" fillcolor=red]; - 49 [label="Exit function bar" style="filled" fillcolor=red]; - } - - 48 -> {49}; - - subgraph cluster_16 { - color=red - 50 [label="Enter function baz" style="filled" fillcolor=red]; - 51 [label="Exit function baz" style="filled" fillcolor=red]; + 50 [label="Enter function foo" style="filled" fillcolor=red]; + 51 [label="Exit function foo" style="filled" fillcolor=red]; } 50 -> {51}; - subgraph cluster_17 { + subgraph cluster_15 { color=red - 52 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 53 [label="Enter block"]; - subgraph cluster_19 { - color=blue - 54 [label="Enter when"]; - subgraph cluster_20 { - color=blue - 55 [label="Enter when branch condition "]; - 56 [label="Access variable R|/x|"]; - 57 [label="Type operator: x is B"]; - 58 [label="Exit when branch condition"]; - } - subgraph cluster_21 { - color=blue - 59 [label="Enter block"]; - 60 [label="Access variable R|/x|"]; - 61 [label="Function call: R|/x|.R|/B.bar|()"]; - 62 [label="Exit block"]; - } - 63 [label="Exit when branch result"]; - subgraph cluster_22 { - color=blue - 64 [label="Enter when branch condition "]; - 65 [label="Access variable R|/x|"]; - 66 [label="Type operator: x is C"]; - 67 [label="Exit when branch condition"]; - } - subgraph cluster_23 { - color=blue - 68 [label="Enter block"]; - 69 [label="Access variable R|/x|"]; - 70 [label="Function call: R|/x|.R|/C.baz|()"]; - 71 [label="Exit block"]; - } - 72 [label="Exit when branch result"]; - subgraph cluster_24 { - color=blue - 73 [label="Enter when branch condition else"]; - 74 [label="Exit when branch condition"]; - } - subgraph cluster_25 { - color=blue - 75 [label="Enter block"]; - 76 [label="Jump: ^test_2 Unit"]; - 77 [label="Stub" style="filled" fillcolor=gray]; - 78 [label="Exit block" style="filled" fillcolor=gray]; - } - 79 [label="Exit when branch result" style="filled" fillcolor=gray]; - 80 [label="Exit when"]; - } - 81 [label="Access variable R|/x|"]; - 82 [label="Function call: R|/x|.R|/A.foo|()"]; - 83 [label="Access variable R|/x|"]; - 84 [label="Function call: R|/x|.#()"]; - 85 [label="Access variable R|/x|"]; - 86 [label="Function call: R|/x|.#()"]; - 87 [label="Exit block"]; - } - 88 [label="Exit function test_2" style="filled" fillcolor=red]; + 52 [label="Enter function bar" style="filled" fillcolor=red]; + 53 [label="Exit function bar" style="filled" fillcolor=red]; } 52 -> {53}; - 53 -> {54}; + + subgraph cluster_16 { + color=red + 54 [label="Enter function baz" style="filled" fillcolor=red]; + 55 [label="Exit function baz" style="filled" fillcolor=red]; + } + 54 -> {55}; - 55 -> {56}; + + subgraph cluster_17 { + color=red + 56 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 57 [label="Enter block"]; + subgraph cluster_19 { + color=blue + 58 [label="Enter when"]; + subgraph cluster_20 { + color=blue + 59 [label="Enter when branch condition "]; + 60 [label="Access variable R|/x|"]; + 61 [label="Type operator: x is B"]; + 62 [label="Exit when branch condition"]; + } + subgraph cluster_21 { + color=blue + 63 [label="Enter when branch condition "]; + 64 [label="Access variable R|/x|"]; + 65 [label="Type operator: x is C"]; + 66 [label="Exit when branch condition"]; + } + subgraph cluster_22 { + color=blue + 67 [label="Enter when branch condition else"]; + 68 [label="Exit when branch condition"]; + } + 69 [label="Enter when branch result"]; + subgraph cluster_23 { + color=blue + 70 [label="Enter block"]; + 71 [label="Jump: ^test_2 Unit"]; + 72 [label="Stub" style="filled" fillcolor=gray]; + 73 [label="Exit block" style="filled" fillcolor=gray]; + } + 74 [label="Exit when branch result" style="filled" fillcolor=gray]; + 75 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 76 [label="Enter block"]; + 77 [label="Access variable R|/x|"]; + 78 [label="Function call: R|/x|.R|/C.baz|()"]; + 79 [label="Exit block"]; + } + 80 [label="Exit when branch result"]; + 81 [label="Enter when branch result"]; + subgraph cluster_25 { + color=blue + 82 [label="Enter block"]; + 83 [label="Access variable R|/x|"]; + 84 [label="Function call: R|/x|.R|/B.bar|()"]; + 85 [label="Exit block"]; + } + 86 [label="Exit when branch result"]; + 87 [label="Exit when"]; + } + 88 [label="Access variable R|/x|"]; + 89 [label="Function call: R|/x|.R|/A.foo|()"]; + 90 [label="Access variable R|/x|"]; + 91 [label="Function call: R|/x|.#()"]; + 92 [label="Access variable R|/x|"]; + 93 [label="Function call: R|/x|.#()"]; + 94 [label="Exit block"]; + } + 95 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 56 -> {57}; 57 -> {58}; - 58 -> {59 64}; + 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {63}; - 63 -> {80}; + 62 -> {81 63}; + 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {67}; - 67 -> {68 73}; + 66 -> {75 67}; + 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72}; - 72 -> {80}; - 73 -> {74}; - 74 -> {75}; + 71 -> {95}; + 71 -> {72} [style=dotted]; + 72 -> {73} [style=dotted]; + 73 -> {74} [style=dotted]; + 74 -> {87} [style=dotted]; 75 -> {76}; - 76 -> {88}; - 76 -> {77} [style=dotted]; - 77 -> {78} [style=dotted]; - 78 -> {79} [style=dotted]; - 79 -> {80} [style=dotted]; - 80 -> {81}; + 76 -> {77}; + 77 -> {78}; + 78 -> {79}; + 79 -> {80}; + 80 -> {87}; 81 -> {82}; 82 -> {83}; 83 -> {84}; @@ -266,103 +273,116 @@ digraph returns_kt { 85 -> {86}; 86 -> {87}; 87 -> {88}; - - subgraph cluster_26 { - color=red - 89 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 90 [label="Enter block"]; - subgraph cluster_28 { - color=blue - 91 [label="Enter when"]; - subgraph cluster_29 { - color=blue - 92 [label="Enter when branch condition "]; - 93 [label="Access variable R|/x|"]; - 94 [label="Type operator: x is B"]; - 95 [label="Exit when branch condition"]; - } - subgraph cluster_30 { - color=blue - 96 [label="Enter block"]; - 97 [label="Access variable R|/x|"]; - 98 [label="Function call: R|/x|.R|/B.bar|()"]; - 99 [label="Exit block"]; - } - 100 [label="Exit when branch result"]; - subgraph cluster_31 { - color=blue - 101 [label="Enter when branch condition "]; - 102 [label="Access variable R|/x|"]; - 103 [label="Type operator: x is C"]; - 104 [label="Exit when branch condition"]; - } - subgraph cluster_32 { - color=blue - 105 [label="Enter block"]; - 106 [label="Access variable R|/x|"]; - 107 [label="Function call: R|/x|.R|/C.baz|()"]; - 108 [label="Exit block"]; - } - 109 [label="Exit when branch result"]; - subgraph cluster_33 { - color=blue - 110 [label="Enter when branch condition else"]; - 111 [label="Exit when branch condition"]; - } - subgraph cluster_34 { - color=blue - 112 [label="Enter block"]; - 113 [label="Exit block"]; - } - 114 [label="Exit when branch result"]; - 115 [label="Exit when"]; - } - 116 [label="Access variable R|/x|"]; - 117 [label="Function call: R|/x|.#()"]; - 118 [label="Access variable R|/x|"]; - 119 [label="Function call: R|/x|.#()"]; - 120 [label="Access variable R|/x|"]; - 121 [label="Function call: R|/x|.#()"]; - 122 [label="Exit block"]; - } - 123 [label="Exit function test_3" style="filled" fillcolor=red]; - } - + 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; - 95 -> {96 101}; + + subgraph cluster_26 { + color=red + 96 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_27 { + color=blue + 97 [label="Enter block"]; + subgraph cluster_28 { + color=blue + 98 [label="Enter when"]; + subgraph cluster_29 { + color=blue + 99 [label="Enter when branch condition "]; + 100 [label="Access variable R|/x|"]; + 101 [label="Type operator: x is B"]; + 102 [label="Exit when branch condition"]; + } + subgraph cluster_30 { + color=blue + 103 [label="Enter when branch condition "]; + 104 [label="Access variable R|/x|"]; + 105 [label="Type operator: x is C"]; + 106 [label="Exit when branch condition"]; + } + subgraph cluster_31 { + color=blue + 107 [label="Enter when branch condition else"]; + 108 [label="Exit when branch condition"]; + } + 109 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 110 [label="Enter block"]; + 111 [label="Exit block"]; + } + 112 [label="Exit when branch result"]; + 113 [label="Enter when branch result"]; + subgraph cluster_33 { + color=blue + 114 [label="Enter block"]; + 115 [label="Access variable R|/x|"]; + 116 [label="Function call: R|/x|.R|/C.baz|()"]; + 117 [label="Exit block"]; + } + 118 [label="Exit when branch result"]; + 119 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 120 [label="Enter block"]; + 121 [label="Access variable R|/x|"]; + 122 [label="Function call: R|/x|.R|/B.bar|()"]; + 123 [label="Exit block"]; + } + 124 [label="Exit when branch result"]; + 125 [label="Exit when"]; + } + 126 [label="Access variable R|/x|"]; + 127 [label="Function call: R|/x|.#()"]; + 128 [label="Access variable R|/x|"]; + 129 [label="Function call: R|/x|.#()"]; + 130 [label="Access variable R|/x|"]; + 131 [label="Function call: R|/x|.#()"]; + 132 [label="Exit block"]; + } + 133 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; - 100 -> {115}; + 100 -> {101}; 101 -> {102}; - 102 -> {103}; + 102 -> {119 103}; 103 -> {104}; - 104 -> {105 110}; + 104 -> {105}; 105 -> {106}; - 106 -> {107}; + 106 -> {113 107}; 107 -> {108}; 108 -> {109}; - 109 -> {115}; + 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; + 112 -> {125}; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {119}; + 118 -> {125}; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; + 123 -> {124}; + 124 -> {125}; + 125 -> {126}; + 126 -> {127}; + 127 -> {128}; + 128 -> {129}; + 129 -> {130}; + 130 -> {131}; + 131 -> {132}; + 132 -> {133}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/simpleIf.dot b/compiler/fir/resolve/testData/resolve/smartcasts/simpleIf.dot index b3d68e74ab0..37bea432166 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/simpleIf.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/simpleIf.dot @@ -21,30 +21,32 @@ digraph simpleIf_kt { } subgraph cluster_4 { color=blue - 7 [label="Enter block"]; - 8 [label="Access variable R|/x|"]; - 9 [label="Access variable R|kotlin/String.length|"]; - 10 [label="Exit block"]; + 7 [label="Enter when branch condition else"]; + 8 [label="Exit when branch condition"]; } - 11 [label="Exit when branch result"]; + 9 [label="Enter when branch result"]; subgraph cluster_5 { color=blue - 12 [label="Enter when branch condition else"]; - 13 [label="Exit when branch condition"]; + 10 [label="Enter block"]; + 11 [label="Exit block"]; } + 12 [label="Exit when branch result"]; + 13 [label="Enter when branch result"]; subgraph cluster_6 { color=blue 14 [label="Enter block"]; - 15 [label="Exit block"]; + 15 [label="Access variable R|/x|"]; + 16 [label="Access variable R|kotlin/String.length|"]; + 17 [label="Exit block"]; } - 16 [label="Exit when branch result"]; - 17 [label="Exit when"]; + 18 [label="Exit when branch result"]; + 19 [label="Exit when"]; } - 18 [label="Access variable R|/x|"]; - 19 [label="Access variable #"]; - 20 [label="Exit block"]; + 20 [label="Access variable R|/x|"]; + 21 [label="Access variable #"]; + 22 [label="Exit block"]; } - 21 [label="Exit function test_1" style="filled" fillcolor=red]; + 23 [label="Exit function test_1" style="filled" fillcolor=red]; } 0 -> {1}; @@ -53,13 +55,13 @@ digraph simpleIf_kt { 3 -> {4}; 4 -> {5}; 5 -> {6}; - 6 -> {7 12}; + 6 -> {13 7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {17}; - 12 -> {13}; + 11 -> {12}; + 12 -> {19}; 13 -> {14}; 14 -> {15}; 15 -> {16}; @@ -68,151 +70,156 @@ digraph simpleIf_kt { 18 -> {19}; 19 -> {20}; 20 -> {21}; + 21 -> {22}; + 22 -> {23}; subgraph cluster_7 { color=red - 22 [label="Enter function test_2" style="filled" fillcolor=red]; + 24 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 23 [label="Enter block"]; - 24 [label="Access variable R|/x|"]; - 25 [label="Type operator: x is String"]; - 26 [label="Variable declaration: lval b: R|kotlin/Boolean|"]; + 25 [label="Enter block"]; + 26 [label="Access variable R|/x|"]; + 27 [label="Type operator: x is String"]; + 28 [label="Variable declaration: lval b: R|kotlin/Boolean|"]; subgraph cluster_9 { color=blue - 27 [label="Enter when"]; + 29 [label="Enter when"]; subgraph cluster_10 { color=blue - 28 [label="Enter when branch condition "]; - 29 [label="Access variable R|/b|"]; - 30 [label="Exit when branch condition"]; + 30 [label="Enter when branch condition "]; + 31 [label="Access variable R|/b|"]; + 32 [label="Exit when branch condition"]; } subgraph cluster_11 { color=blue - 31 [label="Enter block"]; - 32 [label="Access variable R|/x|"]; - 33 [label="Access variable R|kotlin/String.length|"]; - 34 [label="Exit block"]; + 33 [label="Enter when branch condition else"]; + 34 [label="Exit when branch condition"]; } - 35 [label="Exit when branch result"]; + 35 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 36 [label="Enter when branch condition else"]; - 37 [label="Exit when branch condition"]; + 36 [label="Enter block"]; + 37 [label="Exit block"]; } + 38 [label="Exit when branch result"]; + 39 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 38 [label="Enter block"]; - 39 [label="Exit block"]; + 40 [label="Enter block"]; + 41 [label="Access variable R|/x|"]; + 42 [label="Access variable R|kotlin/String.length|"]; + 43 [label="Exit block"]; } - 40 [label="Exit when branch result"]; - 41 [label="Exit when"]; + 44 [label="Exit when branch result"]; + 45 [label="Exit when"]; } - 42 [label="Access variable R|/x|"]; - 43 [label="Access variable #"]; - 44 [label="Exit block"]; + 46 [label="Access variable R|/x|"]; + 47 [label="Access variable #"]; + 48 [label="Exit block"]; } - 45 [label="Exit function test_2" style="filled" fillcolor=red]; + 49 [label="Exit function test_2" style="filled" fillcolor=red]; } - 22 -> {23}; - 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31 36}; + 30 -> {31}; 31 -> {32}; - 32 -> {33}; + 32 -> {39 33}; 33 -> {34}; 34 -> {35}; - 35 -> {41}; + 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {39}; + 38 -> {45}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - - subgraph cluster_14 { - color=red - 46 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 47 [label="Enter block"]; - subgraph cluster_16 { - color=blue - 48 [label="Enter when"]; - subgraph cluster_17 { - color=blue - 49 [label="Enter when branch condition "]; - 50 [label="Access variable R|/x|"]; - 51 [label="Type operator: x !is String"]; - 52 [label="Exit when branch condition"]; - } - subgraph cluster_18 { - color=blue - 53 [label="Enter block"]; - 54 [label="Exit block"]; - } - 55 [label="Exit when branch result"]; - subgraph cluster_19 { - color=blue - 56 [label="Enter when branch condition "]; - 57 [label="Access variable R|/x|"]; - 58 [label="Type operator: x !is Int"]; - 59 [label="Exit when branch condition"]; - } - subgraph cluster_20 { - color=blue - 60 [label="Enter block"]; - 61 [label="Exit block"]; - } - 62 [label="Exit when branch result"]; - subgraph cluster_21 { - color=blue - 63 [label="Enter when branch condition else"]; - 64 [label="Exit when branch condition"]; - } - subgraph cluster_22 { - color=blue - 65 [label="Enter block"]; - 66 [label="Access variable R|/x|"]; - 67 [label="Access variable R|kotlin/String.length|"]; - 68 [label="Access variable R|/x|"]; - 69 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 70 [label="Exit block"]; - } - 71 [label="Exit when branch result"]; - 72 [label="Exit when"]; - } - 73 [label="Exit block"]; - } - 74 [label="Exit function test_3" style="filled" fillcolor=red]; - } - + 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {50}; + + subgraph cluster_14 { + color=red + 50 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 51 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 52 [label="Enter when"]; + subgraph cluster_17 { + color=blue + 53 [label="Enter when branch condition "]; + 54 [label="Access variable R|/x|"]; + 55 [label="Type operator: x !is String"]; + 56 [label="Exit when branch condition"]; + } + subgraph cluster_18 { + color=blue + 57 [label="Enter when branch condition "]; + 58 [label="Access variable R|/x|"]; + 59 [label="Type operator: x !is Int"]; + 60 [label="Exit when branch condition"]; + } + subgraph cluster_19 { + color=blue + 61 [label="Enter when branch condition else"]; + 62 [label="Exit when branch condition"]; + } + 63 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 64 [label="Enter block"]; + 65 [label="Access variable R|/x|"]; + 66 [label="Access variable R|kotlin/String.length|"]; + 67 [label="Access variable R|/x|"]; + 68 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 69 [label="Exit block"]; + } + 70 [label="Exit when branch result"]; + 71 [label="Enter when branch result"]; + subgraph cluster_21 { + color=blue + 72 [label="Enter block"]; + 73 [label="Exit block"]; + } + 74 [label="Exit when branch result"]; + 75 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 76 [label="Enter block"]; + 77 [label="Exit block"]; + } + 78 [label="Exit when branch result"]; + 79 [label="Exit when"]; + } + 80 [label="Exit block"]; + } + 81 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 50 -> {51}; 51 -> {52}; - 52 -> {53 56}; + 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {72}; - 56 -> {57}; + 55 -> {56}; + 56 -> {75 57}; 57 -> {58}; 58 -> {59}; - 59 -> {60 63}; - 60 -> {61}; + 59 -> {60}; + 60 -> {71 61}; 61 -> {62}; - 62 -> {72}; + 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; @@ -220,9 +227,16 @@ digraph simpleIf_kt { 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; + 70 -> {79}; 71 -> {72}; 72 -> {73}; 73 -> {74}; + 74 -> {79}; + 75 -> {76}; + 76 -> {77}; + 77 -> {78}; + 78 -> {79}; + 79 -> {80}; + 80 -> {81}; } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/when.dot b/compiler/fir/resolve/testData/resolve/smartcasts/when.dot index 9664c4fb88a..0a6e1751d98 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/when.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/when.dot @@ -37,110 +37,117 @@ digraph when_kt { } subgraph cluster_6 { color=blue - 11 [label="Enter block"]; + 11 [label="Enter when branch condition "]; 12 [label="Access variable R|/x|"]; - 13 [label="Function call: R|/x|.R|/A.foo|()"]; - 14 [label="Exit block"]; + 13 [label="Type operator: x is B"]; + 14 [label="Exit when branch condition"]; } - 15 [label="Exit when branch result"]; subgraph cluster_7 { color=blue - 16 [label="Enter when branch condition "]; - 17 [label="Access variable R|/x|"]; - 18 [label="Type operator: x is B"]; - 19 [label="Exit when branch condition"]; + 15 [label="Enter when branch condition else"]; + 16 [label="Exit when branch condition"]; } + 17 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 20 [label="Enter block"]; - 21 [label="Access variable R|/x|"]; - 22 [label="Function call: R|/x|.R|/B.bar|()"]; - 23 [label="Exit block"]; + 18 [label="Enter block"]; + 19 [label="Exit block"]; } - 24 [label="Exit when branch result"]; + 20 [label="Exit when branch result"]; + 21 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 25 [label="Enter when branch condition else"]; - 26 [label="Exit when branch condition"]; + 22 [label="Enter block"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Function call: R|/x|.R|/B.bar|()"]; + 25 [label="Exit block"]; } + 26 [label="Exit when branch result"]; + 27 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 27 [label="Enter block"]; - 28 [label="Exit block"]; + 28 [label="Enter block"]; + 29 [label="Access variable R|/x|"]; + 30 [label="Function call: R|/x|.R|/A.foo|()"]; + 31 [label="Exit block"]; } - 29 [label="Exit when branch result"]; - 30 [label="Exit when"]; + 32 [label="Exit when branch result"]; + 33 [label="Exit when"]; } subgraph cluster_11 { color=blue - 31 [label="Enter when"]; + 34 [label="Enter when"]; subgraph cluster_12 { color=blue - 32 [label="Enter when branch condition "]; - 33 [label="Access variable R|/x|"]; - 34 [label="Type operator: x !is A"]; - 35 [label="Exit when branch condition"]; + 35 [label="Enter when branch condition "]; + 36 [label="Access variable R|/x|"]; + 37 [label="Type operator: x !is A"]; + 38 [label="Exit when branch condition"]; } subgraph cluster_13 { - color=blue - 36 [label="Enter block"]; - 37 [label="Exit block"]; - } - 38 [label="Exit when branch result"]; - subgraph cluster_14 { color=blue 39 [label="Enter when branch condition "]; 40 [label="Access variable R|/x|"]; 41 [label="Type operator: x !is B"]; 42 [label="Exit when branch condition"]; } + subgraph cluster_14 { + color=blue + 43 [label="Enter when branch condition "]; + 44 [label="Access variable R|/x|"]; + 45 [label="Type operator: x is Int"]; + 46 [label="Exit when branch condition"]; + } subgraph cluster_15 { color=blue - 43 [label="Enter block"]; - 44 [label="Access variable R|/x|"]; - 45 [label="Function call: R|/x|.R|/A.foo|()"]; - 46 [label="Exit block"]; + 47 [label="Enter when branch condition else"]; + 48 [label="Exit when branch condition"]; } - 47 [label="Exit when branch result"]; + 49 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 48 [label="Enter when branch condition "]; - 49 [label="Access variable R|/x|"]; - 50 [label="Type operator: x is Int"]; - 51 [label="Exit when branch condition"]; + 50 [label="Enter block"]; + 51 [label="Access variable R|/x|"]; + 52 [label="Function call: R|/x|.R|/A.foo|()"]; + 53 [label="Access variable R|/x|"]; + 54 [label="Function call: R|/x|.R|/B.bar|()"]; + 55 [label="Exit block"]; } + 56 [label="Exit when branch result"]; + 57 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/x|"]; - 54 [label="Function call: R|/x|.R|/A.foo|()"]; - 55 [label="Access variable R|/x|"]; - 56 [label="Function call: R|/x|.R|/B.bar|()"]; - 57 [label="Access variable R|/x|"]; - 58 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 59 [label="Exit block"]; + 58 [label="Enter block"]; + 59 [label="Access variable R|/x|"]; + 60 [label="Function call: R|/x|.R|/A.foo|()"]; + 61 [label="Access variable R|/x|"]; + 62 [label="Function call: R|/x|.R|/B.bar|()"]; + 63 [label="Access variable R|/x|"]; + 64 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 65 [label="Exit block"]; } - 60 [label="Exit when branch result"]; + 66 [label="Exit when branch result"]; + 67 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 61 [label="Enter when branch condition else"]; - 62 [label="Exit when branch condition"]; + 68 [label="Enter block"]; + 69 [label="Access variable R|/x|"]; + 70 [label="Function call: R|/x|.R|/A.foo|()"]; + 71 [label="Exit block"]; } + 72 [label="Exit when branch result"]; + 73 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 63 [label="Enter block"]; - 64 [label="Access variable R|/x|"]; - 65 [label="Function call: R|/x|.R|/A.foo|()"]; - 66 [label="Access variable R|/x|"]; - 67 [label="Function call: R|/x|.R|/B.bar|()"]; - 68 [label="Exit block"]; + 74 [label="Enter block"]; + 75 [label="Exit block"]; } - 69 [label="Exit when branch result"]; - 70 [label="Exit when"]; + 76 [label="Exit when branch result"]; + 77 [label="Exit when"]; } - 71 [label="Exit block"]; + 78 [label="Exit block"]; } - 72 [label="Exit function test_1" style="filled" fillcolor=red]; + 79 [label="Exit function test_1" style="filled" fillcolor=red]; } 4 -> {5}; @@ -149,23 +156,23 @@ digraph when_kt { 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {11 16}; + 10 -> {27 11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15}; - 15 -> {30}; + 14 -> {21 15}; + 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 25}; - 20 -> {21}; + 19 -> {20}; + 20 -> {33}; 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {30}; + 24 -> {25}; 25 -> {26}; - 26 -> {27}; + 26 -> {33}; 27 -> {28}; 28 -> {29}; 29 -> {30}; @@ -174,222 +181,229 @@ digraph when_kt { 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36 39}; + 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {70}; + 38 -> {73 39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43 48}; + 42 -> {67 43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47}; - 47 -> {70}; + 46 -> {57 47}; + 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52 61}; + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57}; + 56 -> {77}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {70}; + 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {67}; + 66 -> {77}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; - - subgraph cluster_20 { - color=red - 73 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 74 [label="Enter block"]; - subgraph cluster_22 { - color=blue - 75 [label="Enter when"]; - 76 [label="Access variable R|/x|"]; - subgraph cluster_23 { - color=blue - 77 [label="Enter when branch condition "]; - 78 [label="Type operator: A"]; - 79 [label="Exit when branch condition"]; - } - subgraph cluster_24 { - color=blue - 80 [label="Enter block"]; - 81 [label="Access variable R|/x|"]; - 82 [label="Function call: R|/x|.R|/A.foo|()"]; - 83 [label="Exit block"]; - } - 84 [label="Exit when branch result"]; - subgraph cluster_25 { - color=blue - 85 [label="Enter when branch condition "]; - 86 [label="Type operator: B"]; - 87 [label="Exit when branch condition"]; - } - subgraph cluster_26 { - color=blue - 88 [label="Enter block"]; - 89 [label="Access variable R|/x|"]; - 90 [label="Function call: R|/x|.R|/B.bar|()"]; - 91 [label="Exit block"]; - } - 92 [label="Exit when branch result"]; - subgraph cluster_27 { - color=blue - 93 [label="Enter when branch condition else"]; - 94 [label="Exit when branch condition"]; - } - subgraph cluster_28 { - color=blue - 95 [label="Enter block"]; - 96 [label="Exit block"]; - } - 97 [label="Exit when branch result"]; - 98 [label="Exit when"]; - } - subgraph cluster_29 { - color=blue - 99 [label="Enter when"]; - 100 [label="Access variable R|/x|"]; - subgraph cluster_30 { - color=blue - 101 [label="Enter when branch condition "]; - 102 [label="Type operator: A"]; - 103 [label="Exit when branch condition"]; - } - subgraph cluster_31 { - color=blue - 104 [label="Enter block"]; - 105 [label="Exit block"]; - } - 106 [label="Exit when branch result"]; - subgraph cluster_32 { - color=blue - 107 [label="Enter when branch condition "]; - 108 [label="Type operator: B"]; - 109 [label="Exit when branch condition"]; - } - subgraph cluster_33 { - color=blue - 110 [label="Enter block"]; - 111 [label="Access variable R|/x|"]; - 112 [label="Function call: R|/x|.R|/A.foo|()"]; - 113 [label="Exit block"]; - } - 114 [label="Exit when branch result"]; - subgraph cluster_34 { - color=blue - 115 [label="Enter when branch condition "]; - 116 [label="Type operator: Int"]; - 117 [label="Exit when branch condition"]; - } - subgraph cluster_35 { - color=blue - 118 [label="Enter block"]; - 119 [label="Access variable R|/x|"]; - 120 [label="Function call: R|/x|.R|/A.foo|()"]; - 121 [label="Access variable R|/x|"]; - 122 [label="Function call: R|/x|.R|/B.bar|()"]; - 123 [label="Access variable R|/x|"]; - 124 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 125 [label="Exit block"]; - } - 126 [label="Exit when branch result"]; - subgraph cluster_36 { - color=blue - 127 [label="Enter when branch condition else"]; - 128 [label="Exit when branch condition"]; - } - subgraph cluster_37 { - color=blue - 129 [label="Enter block"]; - 130 [label="Access variable R|/x|"]; - 131 [label="Function call: R|/x|.R|/A.foo|()"]; - 132 [label="Access variable R|/x|"]; - 133 [label="Function call: R|/x|.R|/B.bar|()"]; - 134 [label="Exit block"]; - } - 135 [label="Exit when branch result"]; - 136 [label="Exit when"]; - } - 137 [label="Exit block"]; - } - 138 [label="Exit function test_2" style="filled" fillcolor=red]; - } - + 72 -> {77}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {80 85}; + + subgraph cluster_20 { + color=red + 80 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 81 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 82 [label="Enter when"]; + 83 [label="Access variable R|/x|"]; + subgraph cluster_23 { + color=blue + 84 [label="Enter when branch condition "]; + 85 [label="Type operator: A"]; + 86 [label="Exit when branch condition"]; + } + subgraph cluster_24 { + color=blue + 87 [label="Enter when branch condition "]; + 88 [label="Type operator: B"]; + 89 [label="Exit when branch condition"]; + } + subgraph cluster_25 { + color=blue + 90 [label="Enter when branch condition else"]; + 91 [label="Exit when branch condition"]; + } + 92 [label="Enter when branch result"]; + subgraph cluster_26 { + color=blue + 93 [label="Enter block"]; + 94 [label="Exit block"]; + } + 95 [label="Exit when branch result"]; + 96 [label="Enter when branch result"]; + subgraph cluster_27 { + color=blue + 97 [label="Enter block"]; + 98 [label="Access variable R|/x|"]; + 99 [label="Function call: R|/x|.R|/B.bar|()"]; + 100 [label="Exit block"]; + } + 101 [label="Exit when branch result"]; + 102 [label="Enter when branch result"]; + subgraph cluster_28 { + color=blue + 103 [label="Enter block"]; + 104 [label="Access variable R|/x|"]; + 105 [label="Function call: R|/x|.R|/A.foo|()"]; + 106 [label="Exit block"]; + } + 107 [label="Exit when branch result"]; + 108 [label="Exit when"]; + } + subgraph cluster_29 { + color=blue + 109 [label="Enter when"]; + 110 [label="Access variable R|/x|"]; + subgraph cluster_30 { + color=blue + 111 [label="Enter when branch condition "]; + 112 [label="Type operator: A"]; + 113 [label="Exit when branch condition"]; + } + subgraph cluster_31 { + color=blue + 114 [label="Enter when branch condition "]; + 115 [label="Type operator: B"]; + 116 [label="Exit when branch condition"]; + } + subgraph cluster_32 { + color=blue + 117 [label="Enter when branch condition "]; + 118 [label="Type operator: Int"]; + 119 [label="Exit when branch condition"]; + } + subgraph cluster_33 { + color=blue + 120 [label="Enter when branch condition else"]; + 121 [label="Exit when branch condition"]; + } + 122 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 123 [label="Enter block"]; + 124 [label="Access variable R|/x|"]; + 125 [label="Function call: R|/x|.R|/A.foo|()"]; + 126 [label="Access variable R|/x|"]; + 127 [label="Function call: R|/x|.R|/B.bar|()"]; + 128 [label="Exit block"]; + } + 129 [label="Exit when branch result"]; + 130 [label="Enter when branch result"]; + subgraph cluster_35 { + color=blue + 131 [label="Enter block"]; + 132 [label="Access variable R|/x|"]; + 133 [label="Function call: R|/x|.R|/A.foo|()"]; + 134 [label="Access variable R|/x|"]; + 135 [label="Function call: R|/x|.R|/B.bar|()"]; + 136 [label="Access variable R|/x|"]; + 137 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 138 [label="Exit block"]; + } + 139 [label="Exit when branch result"]; + 140 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 141 [label="Enter block"]; + 142 [label="Access variable R|/x|"]; + 143 [label="Function call: R|/x|.R|/A.foo|()"]; + 144 [label="Exit block"]; + } + 145 [label="Exit when branch result"]; + 146 [label="Enter when branch result"]; + subgraph cluster_37 { + color=blue + 147 [label="Enter block"]; + 148 [label="Exit block"]; + } + 149 [label="Exit when branch result"]; + 150 [label="Exit when"]; + } + 151 [label="Exit block"]; + } + 152 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {98}; + 84 -> {85}; 85 -> {86}; - 86 -> {87}; - 87 -> {88 93}; + 86 -> {102 87}; + 87 -> {88}; 88 -> {89}; - 89 -> {90}; + 89 -> {96 90}; 90 -> {91}; 91 -> {92}; - 92 -> {98}; + 92 -> {93}; 93 -> {94}; 94 -> {95}; - 95 -> {96}; + 95 -> {108}; 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {102}; + 101 -> {108}; 102 -> {103}; - 103 -> {104 107}; + 103 -> {104}; 104 -> {105}; 105 -> {106}; - 106 -> {136}; + 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {110 115}; + 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; - 113 -> {114}; - 114 -> {136}; + 113 -> {146 114}; + 114 -> {115}; 115 -> {116}; - 116 -> {117}; - 117 -> {118 127}; + 116 -> {140 117}; + 117 -> {118}; 118 -> {119}; - 119 -> {120}; + 119 -> {130 120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; - 126 -> {136}; + 126 -> {127}; 127 -> {128}; 128 -> {129}; - 129 -> {130}; + 129 -> {150}; 130 -> {131}; 131 -> {132}; 132 -> {133}; @@ -398,206 +412,213 @@ digraph when_kt { 135 -> {136}; 136 -> {137}; 137 -> {138}; - - subgraph cluster_38 { - color=red - 139 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_39 { - color=blue - 140 [label="Enter block"]; - subgraph cluster_40 { - color=blue - 141 [label="Enter when"]; - 142 [label="Access variable R|/x|"]; - 143 [label="Variable declaration: lval y: R|kotlin/Any?|"]; - subgraph cluster_41 { - color=blue - 144 [label="Enter when branch condition "]; - 145 [label="Type operator: A"]; - 146 [label="Exit when branch condition"]; - } - subgraph cluster_42 { - color=blue - 147 [label="Enter block"]; - 148 [label="Access variable R|/x|"]; - 149 [label="Function call: R|/x|.R|/A.foo|()"]; - 150 [label="Access variable R|/y|"]; - 151 [label="Function call: R|/y|.R|/A.foo|()"]; - 152 [label="Exit block"]; - } - 153 [label="Exit when branch result"]; - subgraph cluster_43 { - color=blue - 154 [label="Enter when branch condition "]; - 155 [label="Type operator: B"]; - 156 [label="Exit when branch condition"]; - } - subgraph cluster_44 { - color=blue - 157 [label="Enter block"]; - 158 [label="Access variable R|/x|"]; - 159 [label="Function call: R|/x|.R|/B.bar|()"]; - 160 [label="Access variable R|/y|"]; - 161 [label="Function call: R|/y|.R|/B.bar|()"]; - 162 [label="Exit block"]; - } - 163 [label="Exit when branch result"]; - subgraph cluster_45 { - color=blue - 164 [label="Enter when branch condition else"]; - 165 [label="Exit when branch condition"]; - } - subgraph cluster_46 { - color=blue - 166 [label="Enter block"]; - 167 [label="Exit block"]; - } - 168 [label="Exit when branch result"]; - 169 [label="Exit when"]; - } - subgraph cluster_47 { - color=blue - 170 [label="Enter when"]; - 171 [label="Access variable R|/x|"]; - 172 [label="Variable declaration: lval y: R|kotlin/Any?|"]; - subgraph cluster_48 { - color=blue - 173 [label="Enter when branch condition "]; - 174 [label="Type operator: A"]; - 175 [label="Exit when branch condition"]; - } - subgraph cluster_49 { - color=blue - 176 [label="Enter block"]; - 177 [label="Exit block"]; - } - 178 [label="Exit when branch result"]; - subgraph cluster_50 { - color=blue - 179 [label="Enter when branch condition "]; - 180 [label="Type operator: B"]; - 181 [label="Exit when branch condition"]; - } - subgraph cluster_51 { - color=blue - 182 [label="Enter block"]; - 183 [label="Access variable R|/x|"]; - 184 [label="Function call: R|/x|.R|/A.foo|()"]; - 185 [label="Access variable R|/y|"]; - 186 [label="Function call: R|/y|.R|/A.foo|()"]; - 187 [label="Exit block"]; - } - 188 [label="Exit when branch result"]; - subgraph cluster_52 { - color=blue - 189 [label="Enter when branch condition "]; - 190 [label="Type operator: Int"]; - 191 [label="Exit when branch condition"]; - } - subgraph cluster_53 { - color=blue - 192 [label="Enter block"]; - 193 [label="Access variable R|/x|"]; - 194 [label="Function call: R|/x|.R|/A.foo|()"]; - 195 [label="Access variable R|/x|"]; - 196 [label="Function call: R|/x|.R|/B.bar|()"]; - 197 [label="Access variable R|/x|"]; - 198 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 199 [label="Access variable R|/y|"]; - 200 [label="Function call: R|/y|.R|/A.foo|()"]; - 201 [label="Access variable R|/y|"]; - 202 [label="Function call: R|/y|.R|/B.bar|()"]; - 203 [label="Access variable R|/y|"]; - 204 [label="Function call: R|/y|.R|kotlin/Int.inc|()"]; - 205 [label="Exit block"]; - } - 206 [label="Exit when branch result"]; - subgraph cluster_54 { - color=blue - 207 [label="Enter when branch condition else"]; - 208 [label="Exit when branch condition"]; - } - subgraph cluster_55 { - color=blue - 209 [label="Enter block"]; - 210 [label="Access variable R|/x|"]; - 211 [label="Function call: R|/x|.R|/A.foo|()"]; - 212 [label="Access variable R|/x|"]; - 213 [label="Function call: R|/x|.R|/B.bar|()"]; - 214 [label="Access variable R|/y|"]; - 215 [label="Function call: R|/y|.R|/A.foo|()"]; - 216 [label="Access variable R|/y|"]; - 217 [label="Function call: R|/y|.R|/B.bar|()"]; - 218 [label="Exit block"]; - } - 219 [label="Exit when branch result"]; - 220 [label="Exit when"]; - } - 221 [label="Exit block"]; - } - 222 [label="Exit function test_3" style="filled" fillcolor=red]; - } - - 139 -> {140}; + 138 -> {139}; + 139 -> {150}; 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; - 145 -> {146}; - 146 -> {147 154}; + 145 -> {150}; + 146 -> {147}; 147 -> {148}; 148 -> {149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; - 152 -> {153}; - 153 -> {169}; + + subgraph cluster_38 { + color=red + 153 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_39 { + color=blue + 154 [label="Enter block"]; + subgraph cluster_40 { + color=blue + 155 [label="Enter when"]; + 156 [label="Access variable R|/x|"]; + 157 [label="Variable declaration: lval y: R|kotlin/Any?|"]; + subgraph cluster_41 { + color=blue + 158 [label="Enter when branch condition "]; + 159 [label="Type operator: A"]; + 160 [label="Exit when branch condition"]; + } + subgraph cluster_42 { + color=blue + 161 [label="Enter when branch condition "]; + 162 [label="Type operator: B"]; + 163 [label="Exit when branch condition"]; + } + subgraph cluster_43 { + color=blue + 164 [label="Enter when branch condition else"]; + 165 [label="Exit when branch condition"]; + } + 166 [label="Enter when branch result"]; + subgraph cluster_44 { + color=blue + 167 [label="Enter block"]; + 168 [label="Exit block"]; + } + 169 [label="Exit when branch result"]; + 170 [label="Enter when branch result"]; + subgraph cluster_45 { + color=blue + 171 [label="Enter block"]; + 172 [label="Access variable R|/x|"]; + 173 [label="Function call: R|/x|.R|/B.bar|()"]; + 174 [label="Access variable R|/y|"]; + 175 [label="Function call: R|/y|.R|/B.bar|()"]; + 176 [label="Exit block"]; + } + 177 [label="Exit when branch result"]; + 178 [label="Enter when branch result"]; + subgraph cluster_46 { + color=blue + 179 [label="Enter block"]; + 180 [label="Access variable R|/x|"]; + 181 [label="Function call: R|/x|.R|/A.foo|()"]; + 182 [label="Access variable R|/y|"]; + 183 [label="Function call: R|/y|.R|/A.foo|()"]; + 184 [label="Exit block"]; + } + 185 [label="Exit when branch result"]; + 186 [label="Exit when"]; + } + subgraph cluster_47 { + color=blue + 187 [label="Enter when"]; + 188 [label="Access variable R|/x|"]; + 189 [label="Variable declaration: lval y: R|kotlin/Any?|"]; + subgraph cluster_48 { + color=blue + 190 [label="Enter when branch condition "]; + 191 [label="Type operator: A"]; + 192 [label="Exit when branch condition"]; + } + subgraph cluster_49 { + color=blue + 193 [label="Enter when branch condition "]; + 194 [label="Type operator: B"]; + 195 [label="Exit when branch condition"]; + } + subgraph cluster_50 { + color=blue + 196 [label="Enter when branch condition "]; + 197 [label="Type operator: Int"]; + 198 [label="Exit when branch condition"]; + } + subgraph cluster_51 { + color=blue + 199 [label="Enter when branch condition else"]; + 200 [label="Exit when branch condition"]; + } + 201 [label="Enter when branch result"]; + subgraph cluster_52 { + color=blue + 202 [label="Enter block"]; + 203 [label="Access variable R|/x|"]; + 204 [label="Function call: R|/x|.R|/A.foo|()"]; + 205 [label="Access variable R|/x|"]; + 206 [label="Function call: R|/x|.R|/B.bar|()"]; + 207 [label="Access variable R|/y|"]; + 208 [label="Function call: R|/y|.R|/A.foo|()"]; + 209 [label="Access variable R|/y|"]; + 210 [label="Function call: R|/y|.R|/B.bar|()"]; + 211 [label="Exit block"]; + } + 212 [label="Exit when branch result"]; + 213 [label="Enter when branch result"]; + subgraph cluster_53 { + color=blue + 214 [label="Enter block"]; + 215 [label="Access variable R|/x|"]; + 216 [label="Function call: R|/x|.R|/A.foo|()"]; + 217 [label="Access variable R|/x|"]; + 218 [label="Function call: R|/x|.R|/B.bar|()"]; + 219 [label="Access variable R|/x|"]; + 220 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 221 [label="Access variable R|/y|"]; + 222 [label="Function call: R|/y|.R|/A.foo|()"]; + 223 [label="Access variable R|/y|"]; + 224 [label="Function call: R|/y|.R|/B.bar|()"]; + 225 [label="Access variable R|/y|"]; + 226 [label="Function call: R|/y|.R|kotlin/Int.inc|()"]; + 227 [label="Exit block"]; + } + 228 [label="Exit when branch result"]; + 229 [label="Enter when branch result"]; + subgraph cluster_54 { + color=blue + 230 [label="Enter block"]; + 231 [label="Access variable R|/x|"]; + 232 [label="Function call: R|/x|.R|/A.foo|()"]; + 233 [label="Access variable R|/y|"]; + 234 [label="Function call: R|/y|.R|/A.foo|()"]; + 235 [label="Exit block"]; + } + 236 [label="Exit when branch result"]; + 237 [label="Enter when branch result"]; + subgraph cluster_55 { + color=blue + 238 [label="Enter block"]; + 239 [label="Exit block"]; + } + 240 [label="Exit when branch result"]; + 241 [label="Exit when"]; + } + 242 [label="Exit block"]; + } + 243 [label="Exit function test_3" style="filled" fillcolor=red]; + } + + 153 -> {154}; 154 -> {155}; 155 -> {156}; - 156 -> {157 164}; + 156 -> {157}; 157 -> {158}; 158 -> {159}; 159 -> {160}; - 160 -> {161}; + 160 -> {178 161}; 161 -> {162}; 162 -> {163}; - 163 -> {169}; + 163 -> {170 164}; 164 -> {165}; 165 -> {166}; 166 -> {167}; 167 -> {168}; 168 -> {169}; - 169 -> {170}; + 169 -> {186}; 170 -> {171}; 171 -> {172}; 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {176 179}; + 175 -> {176}; 176 -> {177}; - 177 -> {178}; - 178 -> {220}; + 177 -> {186}; + 178 -> {179}; 179 -> {180}; 180 -> {181}; - 181 -> {182 189}; + 181 -> {182}; 182 -> {183}; 183 -> {184}; 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; - 188 -> {220}; + 188 -> {189}; 189 -> {190}; 190 -> {191}; - 191 -> {192 207}; - 192 -> {193}; + 191 -> {192}; + 192 -> {237 193}; 193 -> {194}; 194 -> {195}; - 195 -> {196}; + 195 -> {229 196}; 196 -> {197}; 197 -> {198}; - 198 -> {199}; + 198 -> {213 199}; 199 -> {200}; 200 -> {201}; 201 -> {202}; @@ -605,13 +626,13 @@ digraph when_kt { 203 -> {204}; 204 -> {205}; 205 -> {206}; - 206 -> {220}; + 206 -> {207}; 207 -> {208}; 208 -> {209}; 209 -> {210}; 210 -> {211}; 211 -> {212}; - 212 -> {213}; + 212 -> {241}; 213 -> {214}; 214 -> {215}; 215 -> {216}; @@ -621,75 +642,100 @@ digraph when_kt { 219 -> {220}; 220 -> {221}; 221 -> {222}; - - subgraph cluster_56 { - color=red - 223 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_57 { - color=blue - 224 [label="Enter block"]; - subgraph cluster_58 { - color=blue - 225 [label="Enter when"]; - 226 [label="Access variable R|/x|"]; - 227 [label="Type operator: x as Int"]; - subgraph cluster_59 { - color=blue - 228 [label="Enter when branch condition "]; - 229 [label="Const: Int(1)"]; - 230 [label="Operator =="]; - 231 [label="Exit when branch condition"]; - } - subgraph cluster_60 { - color=blue - 232 [label="Enter block"]; - 233 [label="Access variable R|/x|"]; - 234 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 235 [label="Exit block"]; - } - 236 [label="Exit when branch result"]; - subgraph cluster_61 { - color=blue - 237 [label="Enter when branch condition else"]; - 238 [label="Exit when branch condition"]; - } - subgraph cluster_62 { - color=blue - 239 [label="Enter block"]; - 240 [label="Exit block"]; - } - 241 [label="Exit when branch result"]; - 242 [label="Exit when"]; - } - 243 [label="Access variable R|/x|"]; - 244 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 245 [label="Exit block"]; - } - 246 [label="Exit function test_4" style="filled" fillcolor=red]; - } - + 222 -> {223}; 223 -> {224}; 224 -> {225}; 225 -> {226}; 226 -> {227}; 227 -> {228}; - 228 -> {229}; + 228 -> {241}; 229 -> {230}; 230 -> {231}; - 231 -> {232 237}; + 231 -> {232}; 232 -> {233}; 233 -> {234}; 234 -> {235}; 235 -> {236}; - 236 -> {242}; + 236 -> {241}; 237 -> {238}; 238 -> {239}; 239 -> {240}; 240 -> {241}; 241 -> {242}; 242 -> {243}; - 243 -> {244}; + + subgraph cluster_56 { + color=red + 244 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_57 { + color=blue + 245 [label="Enter block"]; + subgraph cluster_58 { + color=blue + 246 [label="Enter when"]; + 247 [label="Access variable R|/x|"]; + 248 [label="Type operator: x as Int"]; + subgraph cluster_59 { + color=blue + 249 [label="Enter when branch condition "]; + 250 [label="Const: Int(1)"]; + 251 [label="Operator =="]; + 252 [label="Exit when branch condition"]; + } + subgraph cluster_60 { + color=blue + 253 [label="Enter when branch condition else"]; + 254 [label="Exit when branch condition"]; + } + 255 [label="Enter when branch result"]; + subgraph cluster_61 { + color=blue + 256 [label="Enter block"]; + 257 [label="Exit block"]; + } + 258 [label="Exit when branch result"]; + 259 [label="Enter when branch result"]; + subgraph cluster_62 { + color=blue + 260 [label="Enter block"]; + 261 [label="Access variable R|/x|"]; + 262 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 263 [label="Exit block"]; + } + 264 [label="Exit when branch result"]; + 265 [label="Exit when"]; + } + 266 [label="Access variable R|/x|"]; + 267 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 268 [label="Exit block"]; + } + 269 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 244 -> {245}; 245 -> {246}; + 246 -> {247}; + 247 -> {248}; + 248 -> {249}; + 249 -> {250}; + 250 -> {251}; + 251 -> {252}; + 252 -> {259 253}; + 253 -> {254}; + 254 -> {255}; + 255 -> {256}; + 256 -> {257}; + 257 -> {258}; + 258 -> {265}; + 259 -> {260}; + 260 -> {261}; + 261 -> {262}; + 262 -> {263}; + 263 -> {264}; + 264 -> {265}; + 265 -> {266}; + 266 -> {267}; + 267 -> {268}; + 268 -> {269}; }