From 12ed8c3bb42faf4fd40a57f1d6fff4cccd284d87 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 16 Jun 2020 12:17:31 +0300 Subject: [PATCH] [FIR-TEST] Update CFG dumps according to new nodes order --- .../resolve/cfg/annotatedLocalClass.dot | 96 +- .../testData/resolve/cfg/binaryOperations.dot | 282 +-- .../cfg/booleanOperatorsWithConsts.dot | 508 +++--- .../testData/resolve/cfg/complex.dot | 262 +-- .../testData/resolve/cfg/defaultArguments.dot | 76 +- .../testData/resolve/cfg/emptyWhen.dot | 70 +- .../resolve/cfg/flowFromInplaceLambda.dot | 596 +++--- .../testData/resolve/cfg/initBlock.dot | 74 +- .../resolve/cfg/initBlockAndInPlaceLambda.dot | 94 +- .../cfg/innerClassInAnonymousObject.dot | 46 +- .../inplaceLambdaInControlFlowExpressions.dot | 232 +-- .../testData/resolve/cfg/jumps.dot | 406 ++--- .../resolve/cfg/lambdaAsReturnOfLambda.dot | 88 +- .../resolve/cfg/lambdaReturningObject.dot | 96 +- .../testData/resolve/cfg/lambdas.dot | 288 +-- .../resolve/cfg/localClassesWithImplicit.dot | 464 ++--- .../testData/resolve/cfg/loops.dot | 506 +++--- .../cfg/postponedLambdaInConstructor.dot | 102 +- .../testData/resolve/cfg/postponedLambdas.dot | 52 +- .../resolve/cfg/propertiesAndInitBlocks.dot | 292 +-- .../resolve/cfg/returnValuesFromLambda.dot | 218 +-- .../testData/resolve/cfg/safeCalls.dot | 84 +- .../testData/resolve/cfg/simple.dot | 34 +- .../testData/resolve/cfg/tryCatch.dot | 352 ++-- .../testData/resolve/cfg/when.dot | 216 +-- .../resolve/exhaustiveWhenAndDNNType.dot | 308 ++-- .../problems/secondaryConstructorCfg.dot | 76 +- .../testData/resolve/smartcasts/bangbang.dot | 406 ++--- .../smartcasts/booleans/booleanOperators.dot | 974 +++++----- .../smartcasts/booleans/equalsToBoolean.dot | 518 +++--- .../booleans/jumpFromRhsOfOperator.dot | 542 +++--- .../boundSmartcasts/boundSmartcasts.dot | 538 +++--- .../boundSmartcastsInBranches.dot | 834 ++++----- .../boundSmartcasts/functionCallBound.dot | 148 +- .../testData/resolve/smartcasts/casts.dot | 392 ++-- .../smartcasts/controlStructures/elvis.dot | 296 +-- .../smartcasts/controlStructures/returns.dot | 520 +++--- .../smartcasts/controlStructures/simpleIf.dot | 200 +- .../smartcastFromArgument.dot | 144 +- .../smartcasts/controlStructures/when.dot | 644 +++---- .../resolve/smartcasts/equalsAndIdentity.dot | 358 ++-- .../smartcasts/lambdas/inPlaceLambdas.dot | 222 +-- .../smartcasts/lambdas/smartcastOnLambda.dot | 50 +- .../loops/dataFlowInfoFromWhileCondition.dot | 90 +- .../resolve/smartcasts/loops/endlessLoops.dot | 640 +++---- .../resolve/smartcasts/multipleCasts.dot | 148 +- .../resolve/smartcasts/nullability.dot | 1618 ++++++++--------- .../implicitReceiverAsWhenSubject.dot | 200 +- .../receivers/implicitReceivers.dot | 554 +++--- .../receivers/thisOfExtensionProperty.dot | 94 +- .../smartcasts/safeCalls/assignSafeCall.dot | 524 +++--- .../safeCalls/safeCallAndEqualityToBool.dot | 324 ++-- .../smartcasts/safeCalls/safeCalls.dot | 332 ++-- .../resolve/smartcasts/smartCastInInit.dot | 72 +- .../resolve/smartcasts/smartcastToNothing.dot | 314 ++-- .../smartcasts/stability/overridenOpenVal.dot | 144 +- .../variables/delayedAssignment.dot | 96 +- .../variables/smartcastAfterReassignment.dot | 112 +- .../resolveWithStdlib/complexPostponedCfg.dot | 152 +- .../contracts/fromLibrary/callsInPlace.dot | 414 ++--- .../fromLibrary/conditionalEffects.dot | 332 ++-- .../good/callsInPlace/atLeastOnce.dot | 116 +- .../good/callsInPlace/atMostOnce.dot | 112 +- .../good/callsInPlace/exactlyOnce.dot | 120 +- .../fromSource/good/callsInPlace/unknown.dot | 116 +- .../delegates/delegateWithAnonymousObject.dot | 216 +-- .../smartcasts/tryWithLambdaInside.dot | 180 +- 67 files changed, 9862 insertions(+), 9862 deletions(-) diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot index ec3f4697a9b..e25617f64db 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot @@ -6,99 +6,99 @@ digraph annotatedLocalClass_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red - 4 [label="Enter class Ann" style="filled" fillcolor=red]; - 3 [label="Exit class Ann" style="filled" fillcolor=red]; + 3 [label="Enter class Ann" style="filled" fillcolor=red]; + 4 [label="Exit class Ann" style="filled" fillcolor=red]; } - 4 -> {3} [color=green]; + 3 -> {4} [color=green]; subgraph cluster_2 { color=red 5 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 24 [label="Enter class Local" style="filled" fillcolor=red]; - 23 [label="Exit class Local" style="filled" fillcolor=red]; + 23 [label="Enter class Local" style="filled" fillcolor=red]; + 24 [label="Exit class Local" style="filled" fillcolor=red]; } subgraph cluster_4 { color=blue - 7 [label="Enter block"]; + 6 [label="Enter block"]; subgraph cluster_5 { color=blue - 8 [label="Enter when"]; + 7 [label="Enter when"]; subgraph cluster_6 { color=blue - 10 [label="Enter when branch condition "]; - 11 [label="Access variable R|/b|"]; - 12 [label="Exit when branch condition"]; + 8 [label="Enter when branch condition "]; + 9 [label="Access variable R|/b|"]; + 10 [label="Exit when branch condition"]; } - 19 [label="Synthetic else branch"]; - 13 [label="Enter when branch result"]; + 11 [label="Synthetic else branch"]; + 12 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 14 [label="Enter block"]; - 15 [label="Jump: ^foo Unit"]; - 16 [label="Stub" style="filled" fillcolor=gray]; - 17 [label="Exit block" style="filled" fillcolor=gray]; + 13 [label="Enter block"]; + 14 [label="Jump: ^foo Unit"]; + 15 [label="Stub" style="filled" fillcolor=gray]; + 16 [label="Exit block" style="filled" fillcolor=gray]; } - 18 [label="Exit when branch result" style="filled" fillcolor=gray]; - 9 [label="Exit when"]; + 17 [label="Exit when branch result" style="filled" fillcolor=gray]; + 18 [label="Exit when"]; } - 20 [label="Exit local class foo"]; - 21 [label="Function call: R|/bar|()"]; - 22 [label="Exit block"]; + 19 [label="Exit local class foo"]; + 20 [label="Function call: R|/bar|()"]; + 21 [label="Exit block"]; } - 6 [label="Exit function foo" style="filled" fillcolor=red]; + 22 [label="Exit function foo" style="filled" fillcolor=red]; } - 5 -> {7}; + 5 -> {6}; + 6 -> {7}; 7 -> {8}; - 8 -> {10}; - 9 -> {20}; - 9 -> {25} [color=red]; - 10 -> {11}; - 11 -> {12}; - 12 -> {13 19}; + 8 -> {9}; + 9 -> {10}; + 10 -> {12 11}; + 11 -> {18}; + 12 -> {13}; 13 -> {14}; - 14 -> {15}; - 15 -> {6}; + 14 -> {22}; + 14 -> {15} [style=dotted]; 15 -> {16} [style=dotted]; 16 -> {17} [style=dotted]; 17 -> {18} [style=dotted]; - 18 -> {9} [style=dotted]; - 19 -> {9}; + 18 -> {19}; + 18 -> {25} [color=red]; + 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {6}; - 24 -> {23} [color=green]; + 23 -> {24} [color=green]; subgraph cluster_8 { color=red 25 [label="Enter function " style="filled" fillcolor=red]; - 27 [label="Delegated constructor call: super()"]; - 26 [label="Exit function " style="filled" fillcolor=red]; + 26 [label="Delegated constructor call: super()"]; + 27 [label="Exit function " style="filled" fillcolor=red]; } - 25 -> {27}; - 27 -> {26}; + 25 -> {26}; + 26 -> {27}; subgraph cluster_9 { color=red 28 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 30 [label="Enter block"]; - 31 [label="Exit block"]; + 29 [label="Enter block"]; + 30 [label="Exit block"]; } - 29 [label="Exit function bar" style="filled" fillcolor=red]; + 31 [label="Exit function bar" style="filled" fillcolor=red]; } - 28 -> {30}; + 28 -> {29}; + 29 -> {30}; 30 -> {31}; - 31 -> {29}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/binaryOperations.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/binaryOperations.dot index d18fe558b4f..046f7fe3bbc 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/binaryOperations.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/binaryOperations.dot @@ -8,257 +8,257 @@ digraph binaryOperations_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Enter when"]; + 2 [label="Enter when"]; subgraph cluster_3 { color=blue - 5 [label="Enter when branch condition "]; + 3 [label="Enter when branch condition "]; subgraph cluster_4 { color=blue - 7 [label="Enter ||"]; - 8 [label="Access variable R|/b1|"]; - 9 [label="Exit left part of ||"]; - 10 [label="Enter right part of ||"]; - 11 [label="Access variable R|/b2|"]; - 6 [label="Exit ||"]; + 4 [label="Enter ||"]; + 5 [label="Access variable R|/b1|"]; + 6 [label="Exit left part of ||"]; + 7 [label="Enter right part of ||"]; + 8 [label="Access variable R|/b2|"]; + 9 [label="Exit ||"]; } - 12 [label="Exit when branch condition"]; + 10 [label="Exit when branch condition"]; } - 18 [label="Synthetic else branch"]; - 13 [label="Enter when branch result"]; + 11 [label="Synthetic else branch"]; + 12 [label="Enter when branch result"]; subgraph cluster_5 { color=blue - 14 [label="Enter block"]; - 15 [label="Const: Int(1)"]; - 16 [label="Exit block"]; + 13 [label="Enter block"]; + 14 [label="Const: Int(1)"]; + 15 [label="Exit block"]; } - 17 [label="Exit when branch result"]; - 4 [label="Exit when"]; + 16 [label="Exit when branch result"]; + 17 [label="Exit when"]; } - 19 [label="Exit block"]; + 18 [label="Exit block"]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 19 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {19}; - 5 -> {7}; - 6 -> {12}; + 3 -> {4}; + 4 -> {5}; + 5 -> {6}; + 6 -> {9 7}; 7 -> {8}; 8 -> {9}; - 9 -> {6 10}; - 10 -> {11}; - 11 -> {6}; - 12 -> {13 18}; + 9 -> {10}; + 10 -> {12 11}; + 11 -> {17}; + 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {4}; - 18 -> {4}; - 19 -> {1}; + 17 -> {18}; + 18 -> {19}; subgraph cluster_6 { color=red 20 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 22 [label="Enter block"]; + 21 [label="Enter block"]; subgraph cluster_8 { color=blue - 23 [label="Enter when"]; + 22 [label="Enter when"]; subgraph cluster_9 { color=blue - 25 [label="Enter when branch condition "]; + 23 [label="Enter when branch condition "]; subgraph cluster_10 { 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|"]; - 26 [label="Exit &&"]; + 24 [label="Enter &&"]; + 25 [label="Access variable R|/b1|"]; + 26 [label="Exit left part of &&"]; + 27 [label="Enter right part of &&"]; + 28 [label="Access variable R|/b2|"]; + 29 [label="Exit &&"]; } - 32 [label="Exit when branch condition"]; + 30 [label="Exit when branch condition"]; } - 38 [label="Synthetic else branch"]; - 33 [label="Enter when branch result"]; + 31 [label="Synthetic else branch"]; + 32 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 34 [label="Enter block"]; - 35 [label="Const: Int(1)"]; - 36 [label="Exit block"]; + 33 [label="Enter block"]; + 34 [label="Const: Int(1)"]; + 35 [label="Exit block"]; } - 37 [label="Exit when branch result"]; - 24 [label="Exit when"]; + 36 [label="Exit when branch result"]; + 37 [label="Exit when"]; } - 39 [label="Exit block"]; + 38 [label="Exit block"]; } - 21 [label="Exit function test_2" style="filled" fillcolor=red]; + 39 [label="Exit function test_2" style="filled" fillcolor=red]; } - 20 -> {22}; + 20 -> {21}; + 21 -> {22}; 22 -> {23}; - 23 -> {25}; - 24 -> {39}; - 25 -> {27}; - 26 -> {32}; + 23 -> {24}; + 24 -> {25}; + 25 -> {26}; + 26 -> {29 27}; 27 -> {28}; 28 -> {29}; - 29 -> {26 30}; - 30 -> {31}; - 31 -> {26}; - 32 -> {33 38}; + 29 -> {30}; + 30 -> {32 31}; + 31 -> {37}; + 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {24}; - 38 -> {24}; - 39 -> {21}; + 37 -> {38}; + 38 -> {39}; subgraph cluster_12 { color=red 40 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 42 [label="Enter block"]; + 41 [label="Enter block"]; subgraph cluster_14 { color=blue - 43 [label="Enter when"]; + 42 [label="Enter when"]; subgraph cluster_15 { color=blue - 45 [label="Enter when branch condition "]; + 43 [label="Enter when branch condition "]; subgraph cluster_16 { color=blue - 47 [label="Enter ||"]; + 44 [label="Enter ||"]; subgraph cluster_17 { color=blue - 49 [label="Enter &&"]; - 50 [label="Access variable R|/b1|"]; - 51 [label="Exit left part of &&"]; - 52 [label="Enter right part of &&"]; - 53 [label="Access variable R|/b2|"]; - 48 [label="Exit &&"]; + 45 [label="Enter &&"]; + 46 [label="Access variable R|/b1|"]; + 47 [label="Exit left part of &&"]; + 48 [label="Enter right part of &&"]; + 49 [label="Access variable R|/b2|"]; + 50 [label="Exit &&"]; } - 54 [label="Exit left part of ||"]; - 55 [label="Enter right part of ||"]; - 56 [label="Access variable R|/b3|"]; - 46 [label="Exit ||"]; + 51 [label="Exit left part of ||"]; + 52 [label="Enter right part of ||"]; + 53 [label="Access variable R|/b3|"]; + 54 [label="Exit ||"]; } - 57 [label="Exit when branch condition"]; + 55 [label="Exit when branch condition"]; } - 63 [label="Synthetic else branch"]; - 58 [label="Enter when branch result"]; + 56 [label="Synthetic else branch"]; + 57 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 59 [label="Enter block"]; - 60 [label="Const: Int(1)"]; - 61 [label="Exit block"]; + 58 [label="Enter block"]; + 59 [label="Const: Int(1)"]; + 60 [label="Exit block"]; } - 62 [label="Exit when branch result"]; - 44 [label="Exit when"]; + 61 [label="Exit when branch result"]; + 62 [label="Exit when"]; } - 64 [label="Exit block"]; + 63 [label="Exit block"]; } - 41 [label="Exit function test_3" style="filled" fillcolor=red]; + 64 [label="Exit function test_3" style="filled" fillcolor=red]; } - 40 -> {42}; + 40 -> {41}; + 41 -> {42}; 42 -> {43}; - 43 -> {45}; - 44 -> {64}; - 45 -> {47}; - 46 -> {57}; - 47 -> {49}; - 48 -> {54}; + 43 -> {44}; + 44 -> {45}; + 45 -> {46}; + 46 -> {47}; + 47 -> {50 48}; + 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {48 52}; + 51 -> {54 52}; 52 -> {53}; - 53 -> {48}; - 54 -> {46 55}; - 55 -> {56}; - 56 -> {46}; - 57 -> {58 63}; + 53 -> {54}; + 54 -> {55}; + 55 -> {57 56}; + 56 -> {62}; + 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {44}; - 63 -> {44}; - 64 -> {41}; + 62 -> {63}; + 63 -> {64}; subgraph cluster_19 { color=red 65 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_20 { color=blue - 67 [label="Enter block"]; + 66 [label="Enter block"]; subgraph cluster_21 { color=blue - 68 [label="Enter when"]; + 67 [label="Enter when"]; subgraph cluster_22 { color=blue - 70 [label="Enter when branch condition "]; + 68 [label="Enter when branch condition "]; subgraph cluster_23 { color=blue - 72 [label="Enter ||"]; - 73 [label="Access variable R|/b1|"]; - 74 [label="Exit left part of ||"]; - 75 [label="Enter right part of ||"]; + 69 [label="Enter ||"]; + 70 [label="Access variable R|/b1|"]; + 71 [label="Exit left part of ||"]; + 72 [label="Enter right part of ||"]; subgraph cluster_24 { color=blue - 77 [label="Enter &&"]; - 78 [label="Access variable R|/b2|"]; - 79 [label="Exit left part of &&"]; - 80 [label="Enter right part of &&"]; - 81 [label="Access variable R|/b3|"]; - 76 [label="Exit &&"]; + 73 [label="Enter &&"]; + 74 [label="Access variable R|/b2|"]; + 75 [label="Exit left part of &&"]; + 76 [label="Enter right part of &&"]; + 77 [label="Access variable R|/b3|"]; + 78 [label="Exit &&"]; } - 71 [label="Exit ||"]; + 79 [label="Exit ||"]; } - 82 [label="Exit when branch condition"]; + 80 [label="Exit when branch condition"]; } - 88 [label="Synthetic else branch"]; - 83 [label="Enter when branch result"]; + 81 [label="Synthetic else branch"]; + 82 [label="Enter when branch result"]; subgraph cluster_25 { color=blue - 84 [label="Enter block"]; - 85 [label="Const: Int(1)"]; - 86 [label="Exit block"]; + 83 [label="Enter block"]; + 84 [label="Const: Int(1)"]; + 85 [label="Exit block"]; } - 87 [label="Exit when branch result"]; - 69 [label="Exit when"]; + 86 [label="Exit when branch result"]; + 87 [label="Exit when"]; } - 89 [label="Exit block"]; + 88 [label="Exit block"]; } - 66 [label="Exit function test_4" style="filled" fillcolor=red]; + 89 [label="Exit function test_4" style="filled" fillcolor=red]; } - 65 -> {67}; + 65 -> {66}; + 66 -> {67}; 67 -> {68}; - 68 -> {70}; - 69 -> {89}; - 70 -> {72}; - 71 -> {82}; + 68 -> {69}; + 69 -> {70}; + 70 -> {71}; + 71 -> {79 72}; 72 -> {73}; 73 -> {74}; - 74 -> {71 75}; - 75 -> {77}; - 76 -> {71}; + 74 -> {75}; + 75 -> {78 76}; + 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {76 80}; - 80 -> {81}; - 81 -> {76}; - 82 -> {83 88}; + 79 -> {80}; + 80 -> {82 81}; + 81 -> {87}; + 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; - 87 -> {69}; - 88 -> {69}; - 89 -> {66}; + 87 -> {88}; + 88 -> {89}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/booleanOperatorsWithConsts.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/booleanOperatorsWithConsts.dot index 8a04ccb6642..74df8534392 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/booleanOperatorsWithConsts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/booleanOperatorsWithConsts.dot @@ -8,467 +8,467 @@ digraph booleanOperatorsWithConsts_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Enter when"]; + 2 [label="Enter when"]; subgraph cluster_3 { color=blue - 5 [label="Enter when branch condition "]; + 3 [label="Enter when branch condition "]; subgraph cluster_4 { color=blue - 7 [label="Enter ||"]; - 8 [label="Access variable R|/b|"]; - 9 [label="Exit left part of ||"]; - 10 [label="Enter right part of ||"]; - 11 [label="Const: Boolean(false)"]; - 6 [label="Exit ||"]; + 4 [label="Enter ||"]; + 5 [label="Access variable R|/b|"]; + 6 [label="Exit left part of ||"]; + 7 [label="Enter right part of ||"]; + 8 [label="Const: Boolean(false)"]; + 9 [label="Exit ||"]; } - 12 [label="Exit when branch condition"]; + 10 [label="Exit when branch condition"]; } - 18 [label="Synthetic else branch"]; - 13 [label="Enter when branch result"]; + 11 [label="Synthetic else branch"]; + 12 [label="Enter when branch result"]; subgraph cluster_5 { color=blue - 14 [label="Enter block"]; - 15 [label="Const: Int(1)"]; - 16 [label="Exit block"]; + 13 [label="Enter block"]; + 14 [label="Const: Int(1)"]; + 15 [label="Exit block"]; } - 17 [label="Exit when branch result"]; - 4 [label="Exit when"]; + 16 [label="Exit when branch result"]; + 17 [label="Exit when"]; } - 19 [label="Exit block"]; + 18 [label="Exit block"]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 19 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {19}; - 5 -> {7}; - 6 -> {12}; + 3 -> {4}; + 4 -> {5}; + 5 -> {6}; + 6 -> {9 7}; 7 -> {8}; 8 -> {9}; - 9 -> {6 10}; - 10 -> {11}; - 11 -> {6}; - 12 -> {13 18}; + 9 -> {10}; + 10 -> {12 11}; + 11 -> {17}; + 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {4}; - 18 -> {4}; - 19 -> {1}; + 17 -> {18}; + 18 -> {19}; subgraph cluster_6 { color=red 20 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 22 [label="Enter block"]; + 21 [label="Enter block"]; subgraph cluster_8 { color=blue - 23 [label="Enter when"]; + 22 [label="Enter when"]; subgraph cluster_9 { color=blue - 25 [label="Enter when branch condition "]; + 23 [label="Enter when branch condition "]; subgraph cluster_10 { 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|"]; - 26 [label="Exit ||"]; + 24 [label="Enter ||"]; + 25 [label="Const: Boolean(false)"]; + 26 [label="Exit left part of ||"]; + 27 [label="Enter right part of ||"]; + 28 [label="Access variable R|/b|"]; + 29 [label="Exit ||"]; } - 32 [label="Exit when branch condition"]; + 30 [label="Exit when branch condition"]; } - 38 [label="Synthetic else branch"]; - 33 [label="Enter when branch result"]; + 31 [label="Synthetic else branch"]; + 32 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 34 [label="Enter block"]; - 35 [label="Const: Int(1)"]; - 36 [label="Exit block"]; + 33 [label="Enter block"]; + 34 [label="Const: Int(1)"]; + 35 [label="Exit block"]; } - 37 [label="Exit when branch result"]; - 24 [label="Exit when"]; + 36 [label="Exit when branch result"]; + 37 [label="Exit when"]; } - 39 [label="Exit block"]; + 38 [label="Exit block"]; } - 21 [label="Exit function test_2" style="filled" fillcolor=red]; + 39 [label="Exit function test_2" style="filled" fillcolor=red]; } - 20 -> {22}; + 20 -> {21}; + 21 -> {22}; 22 -> {23}; - 23 -> {25}; - 24 -> {39}; - 25 -> {27}; - 26 -> {32}; + 23 -> {24}; + 24 -> {25}; + 25 -> {26}; + 26 -> {27}; + 26 -> {29} [style=dotted]; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 29 -> {26} [style=dotted]; - 30 -> {31}; - 31 -> {26}; - 32 -> {33 38}; + 30 -> {32 31}; + 31 -> {37}; + 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {24}; - 38 -> {24}; - 39 -> {21}; + 37 -> {38}; + 38 -> {39}; subgraph cluster_12 { color=red 40 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 42 [label="Enter block"]; + 41 [label="Enter block"]; subgraph cluster_14 { color=blue - 43 [label="Enter when"]; + 42 [label="Enter when"]; subgraph cluster_15 { color=blue - 45 [label="Enter when branch condition "]; + 43 [label="Enter when branch condition "]; subgraph cluster_16 { color=blue - 47 [label="Enter ||"]; - 48 [label="Access variable R|/b|"]; - 49 [label="Exit left part of ||"]; - 50 [label="Enter right part of ||"]; - 51 [label="Const: Boolean(true)"]; - 46 [label="Exit ||"]; + 44 [label="Enter ||"]; + 45 [label="Access variable R|/b|"]; + 46 [label="Exit left part of ||"]; + 47 [label="Enter right part of ||"]; + 48 [label="Const: Boolean(true)"]; + 49 [label="Exit ||"]; } - 52 [label="Exit when branch condition"]; + 50 [label="Exit when branch condition"]; } - 58 [label="Synthetic else branch"]; - 53 [label="Enter when branch result"]; + 51 [label="Synthetic else branch"]; + 52 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 54 [label="Enter block"]; - 55 [label="Const: Int(1)"]; - 56 [label="Exit block"]; + 53 [label="Enter block"]; + 54 [label="Const: Int(1)"]; + 55 [label="Exit block"]; } - 57 [label="Exit when branch result"]; - 44 [label="Exit when"]; + 56 [label="Exit when branch result"]; + 57 [label="Exit when"]; } - 59 [label="Exit block"]; + 58 [label="Exit block"]; } - 41 [label="Exit function test_3" style="filled" fillcolor=red]; + 59 [label="Exit function test_3" style="filled" fillcolor=red]; } - 40 -> {42}; + 40 -> {41}; + 41 -> {42}; 42 -> {43}; - 43 -> {45}; - 44 -> {59}; - 45 -> {47}; - 46 -> {52}; + 43 -> {44}; + 44 -> {45}; + 45 -> {46}; + 46 -> {49 47}; 47 -> {48}; 48 -> {49}; - 49 -> {46 50}; - 50 -> {51}; - 51 -> {46}; - 52 -> {53 58}; + 49 -> {50}; + 50 -> {52 51}; + 51 -> {57}; + 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {44}; - 58 -> {44}; - 59 -> {41}; + 57 -> {58}; + 58 -> {59}; subgraph cluster_18 { color=red 60 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 62 [label="Enter block"]; + 61 [label="Enter block"]; subgraph cluster_20 { color=blue - 63 [label="Enter when"]; + 62 [label="Enter when"]; subgraph cluster_21 { color=blue - 65 [label="Enter when branch condition "]; + 63 [label="Enter when branch condition "]; subgraph cluster_22 { color=blue - 67 [label="Enter ||"]; - 68 [label="Const: Boolean(true)"]; - 69 [label="Exit left part of ||"]; - 70 [label="Enter right part of ||" style="filled" fillcolor=gray]; - 71 [label="Access variable R|/b|" style="filled" fillcolor=gray]; - 66 [label="Exit ||"]; + 64 [label="Enter ||"]; + 65 [label="Const: Boolean(true)"]; + 66 [label="Exit left part of ||"]; + 67 [label="Enter right part of ||" style="filled" fillcolor=gray]; + 68 [label="Access variable R|/b|" style="filled" fillcolor=gray]; + 69 [label="Exit ||"]; } - 72 [label="Exit when branch condition"]; + 70 [label="Exit when branch condition"]; } - 78 [label="Synthetic else branch"]; - 73 [label="Enter when branch result"]; + 71 [label="Synthetic else branch"]; + 72 [label="Enter when branch result"]; subgraph cluster_23 { color=blue - 74 [label="Enter block"]; - 75 [label="Const: Int(1)"]; - 76 [label="Exit block"]; + 73 [label="Enter block"]; + 74 [label="Const: Int(1)"]; + 75 [label="Exit block"]; } - 77 [label="Exit when branch result"]; - 64 [label="Exit when"]; + 76 [label="Exit when branch result"]; + 77 [label="Exit when"]; } - 79 [label="Exit block"]; + 78 [label="Exit block"]; } - 61 [label="Exit function test_4" style="filled" fillcolor=red]; + 79 [label="Exit function test_4" style="filled" fillcolor=red]; } - 60 -> {62}; + 60 -> {61}; + 61 -> {62}; 62 -> {63}; - 63 -> {65}; - 64 -> {79}; - 65 -> {67}; - 66 -> {72}; - 67 -> {68}; - 68 -> {69}; - 69 -> {66}; - 69 -> {70} [style=dotted]; - 70 -> {71} [style=dotted]; - 71 -> {66} [style=dotted]; - 72 -> {73 78}; + 63 -> {64}; + 64 -> {65}; + 65 -> {66}; + 66 -> {69}; + 66 -> {67} [style=dotted]; + 67 -> {68} [style=dotted]; + 68 -> {69} [style=dotted]; + 69 -> {70}; + 70 -> {72 71}; + 71 -> {77}; + 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {64}; - 78 -> {64}; - 79 -> {61}; + 77 -> {78}; + 78 -> {79}; subgraph cluster_24 { color=red 80 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 82 [label="Enter block"]; + 81 [label="Enter block"]; subgraph cluster_26 { color=blue - 83 [label="Enter when"]; + 82 [label="Enter when"]; subgraph cluster_27 { color=blue - 85 [label="Enter when branch condition "]; + 83 [label="Enter when branch condition "]; subgraph cluster_28 { color=blue - 87 [label="Enter &&"]; - 88 [label="Access variable R|/b|"]; - 89 [label="Exit left part of &&"]; - 90 [label="Enter right part of &&"]; - 91 [label="Const: Boolean(false)"]; - 86 [label="Exit &&"]; + 84 [label="Enter &&"]; + 85 [label="Access variable R|/b|"]; + 86 [label="Exit left part of &&"]; + 87 [label="Enter right part of &&"]; + 88 [label="Const: Boolean(false)"]; + 89 [label="Exit &&"]; } - 92 [label="Exit when branch condition"]; + 90 [label="Exit when branch condition"]; } - 98 [label="Synthetic else branch"]; - 93 [label="Enter when branch result"]; + 91 [label="Synthetic else branch"]; + 92 [label="Enter when branch result"]; subgraph cluster_29 { color=blue - 94 [label="Enter block"]; - 95 [label="Const: Int(1)"]; - 96 [label="Exit block"]; + 93 [label="Enter block"]; + 94 [label="Const: Int(1)"]; + 95 [label="Exit block"]; } - 97 [label="Exit when branch result"]; - 84 [label="Exit when"]; + 96 [label="Exit when branch result"]; + 97 [label="Exit when"]; } - 99 [label="Exit block"]; + 98 [label="Exit block"]; } - 81 [label="Exit function test_5" style="filled" fillcolor=red]; + 99 [label="Exit function test_5" style="filled" fillcolor=red]; } - 80 -> {82}; + 80 -> {81}; + 81 -> {82}; 82 -> {83}; - 83 -> {85}; - 84 -> {99}; - 85 -> {87}; - 86 -> {92}; + 83 -> {84}; + 84 -> {85}; + 85 -> {86}; + 86 -> {89 87}; 87 -> {88}; 88 -> {89}; - 89 -> {86 90}; - 90 -> {91}; - 91 -> {86}; - 92 -> {93 98}; + 89 -> {90}; + 90 -> {92 91}; + 91 -> {97}; + 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; 96 -> {97}; - 97 -> {84}; - 98 -> {84}; - 99 -> {81}; + 97 -> {98}; + 98 -> {99}; subgraph cluster_30 { color=red 100 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_31 { color=blue - 102 [label="Enter block"]; + 101 [label="Enter block"]; subgraph cluster_32 { color=blue - 103 [label="Enter when"]; + 102 [label="Enter when"]; subgraph cluster_33 { color=blue - 105 [label="Enter when branch condition "]; + 103 [label="Enter when branch condition "]; subgraph cluster_34 { color=blue - 107 [label="Enter &&"]; - 108 [label="Const: Boolean(false)"]; - 109 [label="Exit left part of &&"]; - 110 [label="Enter right part of &&" style="filled" fillcolor=gray]; - 111 [label="Access variable R|/b|" style="filled" fillcolor=gray]; - 106 [label="Exit &&"]; + 104 [label="Enter &&"]; + 105 [label="Const: Boolean(false)"]; + 106 [label="Exit left part of &&"]; + 107 [label="Enter right part of &&" style="filled" fillcolor=gray]; + 108 [label="Access variable R|/b|" style="filled" fillcolor=gray]; + 109 [label="Exit &&"]; } - 112 [label="Exit when branch condition"]; + 110 [label="Exit when branch condition"]; } - 118 [label="Synthetic else branch"]; - 113 [label="Enter when branch result"]; + 111 [label="Synthetic else branch"]; + 112 [label="Enter when branch result"]; subgraph cluster_35 { color=blue - 114 [label="Enter block"]; - 115 [label="Const: Int(1)"]; - 116 [label="Exit block"]; + 113 [label="Enter block"]; + 114 [label="Const: Int(1)"]; + 115 [label="Exit block"]; } - 117 [label="Exit when branch result"]; - 104 [label="Exit when"]; + 116 [label="Exit when branch result"]; + 117 [label="Exit when"]; } - 119 [label="Exit block"]; + 118 [label="Exit block"]; } - 101 [label="Exit function test_6" style="filled" fillcolor=red]; + 119 [label="Exit function test_6" style="filled" fillcolor=red]; } - 100 -> {102}; + 100 -> {101}; + 101 -> {102}; 102 -> {103}; - 103 -> {105}; - 104 -> {119}; - 105 -> {107}; - 106 -> {112}; - 107 -> {108}; - 108 -> {109}; - 109 -> {106}; - 109 -> {110} [style=dotted]; - 110 -> {111} [style=dotted]; - 111 -> {106} [style=dotted]; - 112 -> {113 118}; + 103 -> {104}; + 104 -> {105}; + 105 -> {106}; + 106 -> {109}; + 106 -> {107} [style=dotted]; + 107 -> {108} [style=dotted]; + 108 -> {109} [style=dotted]; + 109 -> {110}; + 110 -> {112 111}; + 111 -> {117}; + 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {104}; - 118 -> {104}; - 119 -> {101}; + 117 -> {118}; + 118 -> {119}; subgraph cluster_36 { color=red 120 [label="Enter function test_7" style="filled" fillcolor=red]; subgraph cluster_37 { color=blue - 122 [label="Enter block"]; + 121 [label="Enter block"]; subgraph cluster_38 { color=blue - 123 [label="Enter when"]; + 122 [label="Enter when"]; subgraph cluster_39 { color=blue - 125 [label="Enter when branch condition "]; + 123 [label="Enter when branch condition "]; subgraph cluster_40 { color=blue - 127 [label="Enter &&"]; - 128 [label="Access variable R|/b|"]; - 129 [label="Exit left part of &&"]; - 130 [label="Enter right part of &&"]; - 131 [label="Const: Boolean(true)"]; - 126 [label="Exit &&"]; + 124 [label="Enter &&"]; + 125 [label="Access variable R|/b|"]; + 126 [label="Exit left part of &&"]; + 127 [label="Enter right part of &&"]; + 128 [label="Const: Boolean(true)"]; + 129 [label="Exit &&"]; } - 132 [label="Exit when branch condition"]; + 130 [label="Exit when branch condition"]; } - 138 [label="Synthetic else branch"]; - 133 [label="Enter when branch result"]; + 131 [label="Synthetic else branch"]; + 132 [label="Enter when branch result"]; subgraph cluster_41 { color=blue - 134 [label="Enter block"]; - 135 [label="Const: Int(1)"]; - 136 [label="Exit block"]; + 133 [label="Enter block"]; + 134 [label="Const: Int(1)"]; + 135 [label="Exit block"]; } - 137 [label="Exit when branch result"]; - 124 [label="Exit when"]; + 136 [label="Exit when branch result"]; + 137 [label="Exit when"]; } - 139 [label="Exit block"]; + 138 [label="Exit block"]; } - 121 [label="Exit function test_7" style="filled" fillcolor=red]; + 139 [label="Exit function test_7" style="filled" fillcolor=red]; } - 120 -> {122}; + 120 -> {121}; + 121 -> {122}; 122 -> {123}; - 123 -> {125}; - 124 -> {139}; - 125 -> {127}; - 126 -> {132}; + 123 -> {124}; + 124 -> {125}; + 125 -> {126}; + 126 -> {129 127}; 127 -> {128}; 128 -> {129}; - 129 -> {126 130}; - 130 -> {131}; - 131 -> {126}; - 132 -> {133 138}; + 129 -> {130}; + 130 -> {132 131}; + 131 -> {137}; + 132 -> {133}; 133 -> {134}; 134 -> {135}; 135 -> {136}; 136 -> {137}; - 137 -> {124}; - 138 -> {124}; - 139 -> {121}; + 137 -> {138}; + 138 -> {139}; subgraph cluster_42 { color=red 140 [label="Enter function test_8" style="filled" fillcolor=red]; subgraph cluster_43 { color=blue - 142 [label="Enter block"]; + 141 [label="Enter block"]; subgraph cluster_44 { color=blue - 143 [label="Enter when"]; + 142 [label="Enter when"]; subgraph cluster_45 { color=blue - 145 [label="Enter when branch condition "]; + 143 [label="Enter when branch condition "]; subgraph cluster_46 { color=blue - 147 [label="Enter &&"]; - 148 [label="Const: Boolean(true)"]; - 149 [label="Exit left part of &&"]; - 150 [label="Enter right part of &&"]; - 151 [label="Access variable R|/b|"]; - 146 [label="Exit &&"]; + 144 [label="Enter &&"]; + 145 [label="Const: Boolean(true)"]; + 146 [label="Exit left part of &&"]; + 147 [label="Enter right part of &&"]; + 148 [label="Access variable R|/b|"]; + 149 [label="Exit &&"]; } - 152 [label="Exit when branch condition"]; + 150 [label="Exit when branch condition"]; } - 158 [label="Synthetic else branch"]; - 153 [label="Enter when branch result"]; + 151 [label="Synthetic else branch"]; + 152 [label="Enter when branch result"]; subgraph cluster_47 { color=blue - 154 [label="Enter block"]; - 155 [label="Const: Int(1)"]; - 156 [label="Exit block"]; + 153 [label="Enter block"]; + 154 [label="Const: Int(1)"]; + 155 [label="Exit block"]; } - 157 [label="Exit when branch result"]; - 144 [label="Exit when"]; + 156 [label="Exit when branch result"]; + 157 [label="Exit when"]; } - 159 [label="Exit block"]; + 158 [label="Exit block"]; } - 141 [label="Exit function test_8" style="filled" fillcolor=red]; + 159 [label="Exit function test_8" style="filled" fillcolor=red]; } - 140 -> {142}; + 140 -> {141}; + 141 -> {142}; 142 -> {143}; - 143 -> {145}; - 144 -> {159}; - 145 -> {147}; - 146 -> {152}; + 143 -> {144}; + 144 -> {145}; + 145 -> {146}; + 146 -> {147}; + 146 -> {149} [style=dotted]; 147 -> {148}; 148 -> {149}; 149 -> {150}; - 149 -> {146} [style=dotted]; - 150 -> {151}; - 151 -> {146}; - 152 -> {153 158}; + 150 -> {152 151}; + 151 -> {157}; + 152 -> {153}; 153 -> {154}; 154 -> {155}; 155 -> {156}; 156 -> {157}; - 157 -> {144}; - 158 -> {144}; - 159 -> {141}; + 157 -> {158}; + 158 -> {159}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot index 5054e7ac1b7..cc38073fd76 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot @@ -12,109 +12,109 @@ digraph complex_kt { subgraph cluster_1 { color=red - 3 [label="Enter class AutoCloseable" style="filled" fillcolor=red]; - 2 [label="Exit class AutoCloseable" style="filled" fillcolor=red]; + 2 [label="Enter class AutoCloseable" style="filled" fillcolor=red]; + 3 [label="Exit class AutoCloseable" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red 4 [label="Enter function addSuppressed" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; - 7 [label="Exit block"]; + 5 [label="Enter block"]; + 6 [label="Exit block"]; } - 5 [label="Exit function addSuppressed" style="filled" fillcolor=red]; + 7 [label="Exit function addSuppressed" style="filled" fillcolor=red]; } - 4 -> {6}; + 4 -> {5}; + 5 -> {6}; 6 -> {7}; - 7 -> {5}; subgraph cluster_4 { color=red 8 [label="Enter function closeFinally" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; + 9 [label="Enter block"]; subgraph cluster_6 { color=blue - 11 [label="Enter when"]; + 10 [label="Enter when"]; subgraph cluster_7 { color=blue - 13 [label="Enter when branch condition "]; - 14 [label="Access variable this@R|/closeFinally|"]; - 15 [label="Const: Null(null)"]; - 16 [label="Operator =="]; - 17 [label="Exit when branch condition"]; + 11 [label="Enter when branch condition "]; + 12 [label="Access variable this@R|/closeFinally|"]; + 13 [label="Const: Null(null)"]; + 14 [label="Operator =="]; + 15 [label="Exit when branch condition"]; } subgraph cluster_8 { color=blue - 22 [label="Enter when branch condition "]; - 23 [label="Access variable R|/cause|"]; - 24 [label="Const: Null(null)"]; - 25 [label="Operator =="]; - 26 [label="Exit when branch condition"]; + 16 [label="Enter when branch condition "]; + 17 [label="Access variable R|/cause|"]; + 18 [label="Const: Null(null)"]; + 19 [label="Operator =="]; + 20 [label="Exit when branch condition"]; } subgraph cluster_9 { color=blue - 32 [label="Enter when branch condition else"]; - 33 [label="Exit when branch condition"]; + 21 [label="Enter when branch condition else"]; + 22 [label="Exit when branch condition"]; } - 34 [label="Enter when branch result"]; + 23 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 35 [label="Enter block"]; + 24 [label="Enter block"]; subgraph cluster_11 { color=blue - 36 [label="Try expression enter"]; + 25 [label="Try expression enter"]; subgraph cluster_12 { color=blue - 38 [label="Try main block enter"]; + 26 [label="Try main block enter"]; subgraph cluster_13 { color=blue - 40 [label="Enter block"]; - 41 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"]; - 42 [label="Exit block"]; + 27 [label="Enter block"]; + 28 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"]; + 29 [label="Exit block"]; } - 43 [label="Try main block exit"]; + 30 [label="Try main block exit"]; } subgraph cluster_14 { color=blue - 39 [label="Catch enter"]; + 31 [label="Catch enter"]; subgraph cluster_15 { color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/cause|"]; - 46 [label="Access variable R|/closeException|"]; - 47 [label="Function call: R|/cause|.R|/addSuppressed|(...)"]; - 48 [label="Exit block"]; + 32 [label="Enter block"]; + 33 [label="Access variable R|/cause|"]; + 34 [label="Access variable R|/closeException|"]; + 35 [label="Function call: R|/cause|.R|/addSuppressed|(...)"]; + 36 [label="Exit block"]; } - 49 [label="Catch exit"]; + 37 [label="Catch exit"]; } - 37 [label="Try expression exit"]; + 38 [label="Try expression exit"]; } - 50 [label="Exit block"]; + 39 [label="Exit block"]; } - 51 [label="Exit when branch result"]; - 27 [label="Enter when branch result"]; + 40 [label="Exit when branch result"]; + 41 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 28 [label="Enter block"]; - 29 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"]; - 30 [label="Exit block"]; + 42 [label="Enter block"]; + 43 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"]; + 44 [label="Exit block"]; } - 31 [label="Exit when branch result"]; - 18 [label="Enter when branch result"]; + 45 [label="Exit when branch result"]; + 46 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 19 [label="Enter block"]; - 20 [label="Exit block"]; + 47 [label="Enter block"]; + 48 [label="Exit block"]; } - 21 [label="Exit when branch result"]; - 12 [label="Exit when"]; + 49 [label="Exit when branch result"]; + 50 [label="Exit when"]; } - 52 [label="Jump: ^closeFinally when () { + 51 [label="Jump: ^closeFinally when () { ==(this@R|/closeFinally|, Null(null)) -> { } ==(R|/cause|, Null(null)) -> { @@ -131,160 +131,160 @@ digraph complex_kt { } } "]; - 53 [label="Stub" style="filled" fillcolor=gray]; - 54 [label="Exit block" style="filled" fillcolor=gray]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; } - 9 [label="Exit function closeFinally" style="filled" fillcolor=red]; + 54 [label="Exit function closeFinally" style="filled" fillcolor=red]; } - 8 -> {10}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; - 11 -> {13}; - 12 -> {52}; + 11 -> {12}; + 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16}; + 15 -> {46 16}; 16 -> {17}; - 17 -> {18 22}; + 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21}; - 21 -> {12}; + 20 -> {41 21}; + 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {27 32}; + 26 -> {54 31 27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31}; - 31 -> {12}; + 30 -> {38}; + 31 -> {54 32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {38}; - 37 -> {50}; - 38 -> {9 39 40}; - 39 -> {9 44}; - 40 -> {41}; + 36 -> {37}; + 37 -> {38}; + 38 -> {39}; + 39 -> {40}; + 40 -> {50}; 41 -> {42}; 42 -> {43}; - 43 -> {37}; + 43 -> {44}; 44 -> {45}; - 45 -> {46}; + 45 -> {50}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {37}; + 49 -> {50}; 50 -> {51}; - 51 -> {12}; - 52 -> {9}; + 51 -> {54}; + 51 -> {52} [style=dotted]; 52 -> {53} [style=dotted]; 53 -> {54} [style=dotted]; - 54 -> {9} [style=dotted]; subgraph cluster_18 { color=red 55 [label="Enter function firstIsInstanceOrNull" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 57 [label="Enter block"]; - 58 [label="Access variable this@R|/firstIsInstanceOrNull|"]; - 59 [label="Function call: this@R|/firstIsInstanceOrNull|.R|FakeOverride|>|()"]; - 60 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; + 56 [label="Enter block"]; + 57 [label="Access variable this@R|/firstIsInstanceOrNull|"]; + 58 [label="Function call: this@R|/firstIsInstanceOrNull|.R|FakeOverride|>|()"]; + 59 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; subgraph cluster_20 { color=blue - 61 [label="Enter while loop"]; + 60 [label="Enter while loop"]; subgraph cluster_21 { color=blue - 63 [label="Enter loop condition"]; - 64 [label="Access variable R|/|"]; - 65 [label="Function call: R|/|.R|kotlin/collections/Iterator.hasNext|()"]; - 66 [label="Exit loop condition"]; + 61 [label="Enter loop condition"]; + 62 [label="Access variable R|/|"]; + 63 [label="Function call: R|/|.R|kotlin/collections/Iterator.hasNext|()"]; + 64 [label="Exit loop condition"]; } subgraph cluster_22 { color=blue - 67 [label="Enter loop block"]; + 65 [label="Enter loop block"]; subgraph cluster_23 { color=blue - 68 [label="Enter block"]; - 69 [label="Access variable R|/|"]; - 70 [label="Function call: R|/|.R|FakeOverride|()"]; - 71 [label="Variable declaration: lval element: R|kotlin/Any?|"]; + 66 [label="Enter block"]; + 67 [label="Access variable R|/|"]; + 68 [label="Function call: R|/|.R|FakeOverride|()"]; + 69 [label="Variable declaration: lval element: R|kotlin/Any?|"]; subgraph cluster_24 { color=blue - 72 [label="Enter when"]; + 70 [label="Enter when"]; subgraph cluster_25 { color=blue - 74 [label="Enter when branch condition "]; - 75 [label="Access variable R|/element|"]; - 76 [label="Type operator: (R|/element| is R|T|)"]; - 77 [label="Exit when branch condition"]; + 71 [label="Enter when branch condition "]; + 72 [label="Access variable R|/element|"]; + 73 [label="Type operator: (R|/element| is R|T|)"]; + 74 [label="Exit when branch condition"]; } - 85 [label="Synthetic else branch"]; - 78 [label="Enter when branch result"]; + 75 [label="Synthetic else branch"]; + 76 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 79 [label="Enter block"]; - 80 [label="Access variable R|/element|"]; - 81 [label="Jump: ^firstIsInstanceOrNull R|/element|"]; - 82 [label="Stub" style="filled" fillcolor=gray]; - 83 [label="Exit block" style="filled" fillcolor=gray]; + 77 [label="Enter block"]; + 78 [label="Access variable R|/element|"]; + 79 [label="Jump: ^firstIsInstanceOrNull R|/element|"]; + 80 [label="Stub" style="filled" fillcolor=gray]; + 81 [label="Exit block" style="filled" fillcolor=gray]; } - 84 [label="Exit when branch result" style="filled" fillcolor=gray]; - 73 [label="Exit when"]; + 82 [label="Exit when branch result" style="filled" fillcolor=gray]; + 83 [label="Exit when"]; } - 86 [label="Exit block"]; + 84 [label="Exit block"]; } - 87 [label="Exit loop block"]; + 85 [label="Exit loop block"]; } - 62 [label="Exit whileloop"]; + 86 [label="Exit whileloop"]; } - 88 [label="Const: Null(null)"]; - 89 [label="Jump: ^firstIsInstanceOrNull Null(null)"]; - 90 [label="Stub" style="filled" fillcolor=gray]; - 91 [label="Exit block" style="filled" fillcolor=gray]; + 87 [label="Const: Null(null)"]; + 88 [label="Jump: ^firstIsInstanceOrNull Null(null)"]; + 89 [label="Stub" style="filled" fillcolor=gray]; + 90 [label="Exit block" style="filled" fillcolor=gray]; } - 56 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red]; + 91 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red]; } - 55 -> {57}; + 55 -> {56}; + 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {63}; - 62 -> {88}; + 61 -> {62}; + 62 -> {63}; 63 -> {64}; - 64 -> {65}; + 64 -> {86 65}; 65 -> {66}; - 66 -> {62 67}; + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {74}; - 73 -> {86}; - 74 -> {75}; - 75 -> {76}; + 72 -> {73}; + 73 -> {74}; + 74 -> {76 75}; + 75 -> {83}; 76 -> {77}; - 77 -> {78 85}; + 77 -> {78}; 78 -> {79}; - 79 -> {80}; - 80 -> {81}; - 81 -> {56}; + 79 -> {91}; + 79 -> {80} [style=dotted]; + 80 -> {81} [style=dotted]; 81 -> {82} [style=dotted]; 82 -> {83} [style=dotted]; - 83 -> {84} [style=dotted]; - 84 -> {73} [style=dotted]; - 85 -> {73}; + 83 -> {84}; + 84 -> {85}; + 85 -> {61} [color=green style=dashed]; 86 -> {87}; - 87 -> {63} [color=green style=dashed]; - 88 -> {89}; - 89 -> {56}; + 87 -> {88}; + 88 -> {91}; + 88 -> {89} [style=dotted]; 89 -> {90} [style=dotted]; 90 -> {91} [style=dotted]; - 91 -> {56} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot index 9ea9ee2bd88..f7552d4655f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot @@ -8,78 +8,78 @@ digraph defaultArguments_kt { 0 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Const: Int(1)"]; - 4 [label="Jump: ^foo Int(1)"]; - 5 [label="Stub" style="filled" fillcolor=gray]; - 6 [label="Exit block" style="filled" fillcolor=gray]; + 1 [label="Enter block"]; + 2 [label="Const: Int(1)"]; + 3 [label="Jump: ^foo Int(1)"]; + 4 [label="Stub" style="filled" fillcolor=gray]; + 5 [label="Exit block" style="filled" fillcolor=gray]; } - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 6 [label="Exit function foo" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {4}; - 4 -> {1}; + 3 -> {6}; + 3 -> {4} [style=dotted]; 4 -> {5} [style=dotted]; 5 -> {6} [style=dotted]; - 6 -> {1} [style=dotted]; subgraph cluster_2 { color=red 7 [label="Enter function test" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 17 [label="Enter default value of z" style="filled" fillcolor=red]; - 18 [label="Postponed enter to lambda"]; + 16 [label="Enter default value of z" style="filled" fillcolor=red]; + 17 [label="Postponed enter to lambda"]; subgraph cluster_4 { color=blue 22 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 24 [label="Enter block"]; - 25 [label="Function call: R|/foo|()"]; - 26 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Function call: R|/foo|()"]; + 25 [label="Exit block"]; } - 23 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 26 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 21 [label="Call arguments union" style="filled" fillcolor=yellow]; + 18 [label="Call arguments union" style="filled" fillcolor=yellow]; 19 [label="Postponed exit from lambda"]; 20 [label="Function call: R|kotlin/run|(...)"]; - 16 [label="Exit default value of z" style="filled" fillcolor=red]; + 21 [label="Exit default value of z" style="filled" fillcolor=red]; } subgraph cluster_6 { color=blue - 13 [label="Enter default value of y" style="filled" fillcolor=red]; - 14 [label="Access variable R|/x|"]; - 15 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 12 [label="Exit default value of y" style="filled" fillcolor=red]; + 12 [label="Enter default value of y" style="filled" fillcolor=red]; + 13 [label="Access variable R|/x|"]; + 14 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 15 [label="Exit default value of y" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 9 [label="Enter block"]; - 10 [label="Function call: R|/foo|()"]; - 11 [label="Exit block"]; + 8 [label="Enter block"]; + 9 [label="Function call: R|/foo|()"]; + 10 [label="Exit block"]; } - 8 [label="Exit function test" style="filled" fillcolor=red]; + 11 [label="Exit function test" style="filled" fillcolor=red]; } - 7 -> {13 17 9}; + 7 -> {12 16 8}; + 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {8}; + 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {12}; - 17 -> {18}; - 18 -> {22}; - 18 -> {19} [color=red]; + 16 -> {17}; + 17 -> {22}; + 17 -> {19} [color=red]; + 18 -> {20} [color=red]; 19 -> {20} [color=green]; - 20 -> {16}; - 21 -> {20} [color=red]; - 22 -> {24}; - 23 -> {19} [color=green]; - 23 -> {21} [color=red]; + 20 -> {21}; + 22 -> {23}; + 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {23}; + 26 -> {19} [color=green]; + 26 -> {18} [color=red]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/emptyWhen.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/emptyWhen.dot index 2e396b849b2..d7c04d028ae 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/emptyWhen.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/emptyWhen.dot @@ -8,74 +8,74 @@ digraph emptyWhen_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Enter when"]; - 5 [label="Synthetic else branch"]; + 2 [label="Enter when"]; + 3 [label="Synthetic else branch"]; 4 [label="Exit when"]; } - 6 [label="Exit block"]; + 5 [label="Exit block"]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 6 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {6}; - 5 -> {4}; - 6 -> {1}; + 3 -> {4}; + 4 -> {5}; + 5 -> {6}; subgraph cluster_3 { color=red 7 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 9 [label="Enter block"]; + 8 [label="Enter block"]; subgraph cluster_5 { color=blue - 10 [label="Enter when"]; - 12 [label="Access variable R|/x|"]; - 13 [label="Synthetic else branch"]; - 11 [label="Exit when"]; + 9 [label="Enter when"]; + 10 [label="Access variable R|/x|"]; + 11 [label="Synthetic else branch"]; + 12 [label="Exit when"]; } - 14 [label="Exit block"]; + 13 [label="Exit block"]; } - 8 [label="Exit function test_2" style="filled" fillcolor=red]; + 14 [label="Exit function test_2" style="filled" fillcolor=red]; } - 7 -> {9}; + 7 -> {8}; + 8 -> {9}; 9 -> {10}; - 10 -> {12}; - 11 -> {14}; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; - 13 -> {11}; - 14 -> {8}; + 13 -> {14}; subgraph cluster_6 { color=red 15 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 17 [label="Enter block"]; + 16 [label="Enter block"]; subgraph cluster_8 { color=blue - 18 [label="Enter when"]; - 20 [label="Access variable R|/x|"]; - 21 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 22 [label="Synthetic else branch"]; - 19 [label="Exit when"]; + 17 [label="Enter when"]; + 18 [label="Access variable R|/x|"]; + 19 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 20 [label="Synthetic else branch"]; + 21 [label="Exit when"]; } - 23 [label="Exit block"]; + 22 [label="Exit block"]; } - 16 [label="Exit function test_3" style="filled" fillcolor=red]; + 23 [label="Exit function test_3" style="filled" fillcolor=red]; } - 15 -> {17}; + 15 -> {16}; + 16 -> {17}; 17 -> {18}; - 18 -> {20}; - 19 -> {23}; + 18 -> {19}; + 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {19}; - 23 -> {16}; + 22 -> {23}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot index 2a57e42464f..f601eddd3a0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot @@ -8,225 +8,226 @@ digraph flowFromInplaceLambda_kt { 0 [label="Enter function takeInt" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Exit block"]; } - 1 [label="Exit function takeInt" style="filled" fillcolor=red]; + 3 [label="Exit function takeInt" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {1}; subgraph cluster_2 { color=red 4 [label="Enter function select" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; - 7 [label="Access variable R|/x|"]; - 8 [label="Const: Int(0)"]; - 9 [label="Function call: R|/x|.R|FakeOverride|(...)"]; - 10 [label="Jump: ^select R|/x|.R|FakeOverride|(Int(0))"]; - 11 [label="Stub" style="filled" fillcolor=gray]; - 12 [label="Exit block" style="filled" fillcolor=gray]; + 5 [label="Enter block"]; + 6 [label="Access variable R|/x|"]; + 7 [label="Const: Int(0)"]; + 8 [label="Function call: R|/x|.R|FakeOverride|(...)"]; + 9 [label="Jump: ^select R|/x|.R|FakeOverride|(Int(0))"]; + 10 [label="Stub" style="filled" fillcolor=gray]; + 11 [label="Exit block" style="filled" fillcolor=gray]; } - 5 [label="Exit function select" style="filled" fillcolor=red]; + 12 [label="Exit function select" style="filled" fillcolor=red]; } - 4 -> {6}; + 4 -> {5}; + 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {10}; - 10 -> {5}; + 9 -> {12}; + 9 -> {10} [style=dotted]; 10 -> {11} [style=dotted]; 11 -> {12} [style=dotted]; - 12 -> {5} [style=dotted]; subgraph cluster_4 { color=red 13 [label="Enter function id" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 15 [label="Enter block"]; - 16 [label="Access variable R|/x|"]; - 17 [label="Jump: ^id R|/x|"]; - 18 [label="Stub" style="filled" fillcolor=gray]; - 19 [label="Exit block" style="filled" fillcolor=gray]; + 14 [label="Enter block"]; + 15 [label="Access variable R|/x|"]; + 16 [label="Jump: ^id R|/x|"]; + 17 [label="Stub" style="filled" fillcolor=gray]; + 18 [label="Exit block" style="filled" fillcolor=gray]; } - 14 [label="Exit function id" style="filled" fillcolor=red]; + 19 [label="Exit function id" style="filled" fillcolor=red]; } - 13 -> {15}; + 13 -> {14}; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; - 17 -> {14}; + 16 -> {19}; + 16 -> {17} [style=dotted]; 17 -> {18} [style=dotted]; 18 -> {19} [style=dotted]; - 19 -> {14} [style=dotted]; subgraph cluster_6 { color=red 20 [label="Enter function materialize" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 22 [label="Enter block"]; - 23 [label="Const: Null(null)"]; - 24 [label="Check not null: Null(null)!!"]; - 25 [label="Jump: ^materialize Null(null)!!"]; - 26 [label="Stub" style="filled" fillcolor=gray]; - 27 [label="Exit block" style="filled" fillcolor=gray]; + 21 [label="Enter block"]; + 22 [label="Const: Null(null)"]; + 23 [label="Check not null: Null(null)!!"]; + 24 [label="Jump: ^materialize Null(null)!!"]; + 25 [label="Stub" style="filled" fillcolor=gray]; + 26 [label="Exit block" style="filled" fillcolor=gray]; } - 21 [label="Exit function materialize" style="filled" fillcolor=red]; + 27 [label="Exit function materialize" style="filled" fillcolor=red]; } - 20 -> {22}; + 20 -> {21}; + 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25}; - 25 -> {21}; + 24 -> {27}; + 24 -> {25} [style=dotted]; 25 -> {26} [style=dotted]; 26 -> {27} [style=dotted]; - 27 -> {21} [style=dotted]; subgraph cluster_8 { color=red 28 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 30 [label="Enter block"]; - 31 [label="Function call: R|/block|.R|FakeOverride|()"]; - 32 [label="Jump: ^myRun R|/block|.R|FakeOverride|()"]; - 33 [label="Stub" style="filled" fillcolor=gray]; - 34 [label="Exit block" style="filled" fillcolor=gray]; + 29 [label="Enter block"]; + 30 [label="Function call: R|/block|.R|FakeOverride|()"]; + 31 [label="Jump: ^myRun R|/block|.R|FakeOverride|()"]; + 32 [label="Stub" style="filled" fillcolor=gray]; + 33 [label="Exit block" style="filled" fillcolor=gray]; } - 29 [label="Exit function myRun" style="filled" fillcolor=red]; + 34 [label="Exit function myRun" style="filled" fillcolor=red]; } - 28 -> {30}; + 28 -> {29}; + 29 -> {30}; 30 -> {31}; - 31 -> {32}; - 32 -> {29}; + 31 -> {34}; + 31 -> {32} [style=dotted]; 32 -> {33} [style=dotted]; 33 -> {34} [style=dotted]; - 34 -> {29} [style=dotted]; subgraph cluster_10 { color=red 35 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 37 [label="Enter block"]; - 38 [label="Postponed enter to lambda"]; + 36 [label="Enter block"]; + 37 [label="Postponed enter to lambda"]; subgraph cluster_12 { color=blue 45 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 47 [label="Enter block"]; - 48 [label="Access variable R|/x|"]; - 49 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 50 [label="Exit block"]; + 46 [label="Enter block"]; + 47 [label="Access variable R|/x|"]; + 48 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 49 [label="Exit block"]; } - 46 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 50 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 41 [label="Call arguments union" style="filled" fillcolor=yellow]; + 38 [label="Call arguments union" style="filled" fillcolor=yellow]; 39 [label="Postponed exit from lambda"]; 40 [label="Function call: R|kotlin/run|(...)"]; - 42 [label="Access variable R|/x|"]; - 43 [label="Function call: R|/takeInt|(...)"]; - 44 [label="Exit block"]; + 41 [label="Access variable R|/x|"]; + 42 [label="Function call: R|/takeInt|(...)"]; + 43 [label="Exit block"]; } - 36 [label="Exit function test_1" style="filled" fillcolor=red]; + 44 [label="Exit function test_1" style="filled" fillcolor=red]; } - 35 -> {37}; - 37 -> {38}; - 38 -> {45}; - 38 -> {39} [color=red]; + 35 -> {36}; + 36 -> {37}; + 37 -> {45}; + 37 -> {39} [color=red]; + 38 -> {40} [color=red]; 39 -> {40} [color=green]; - 40 -> {42}; - 41 -> {40} [color=red]; + 40 -> {41}; + 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {36}; - 45 -> {47}; - 46 -> {39} [color=green]; - 46 -> {41} [color=red]; + 45 -> {46}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {46}; + 50 -> {39} [color=green]; + 50 -> {38} [color=red]; subgraph cluster_14 { color=red 51 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 53 [label="Enter block"]; - 54 [label="Postponed enter to lambda"]; + 52 [label="Enter block"]; + 53 [label="Postponed enter to lambda"]; subgraph cluster_16 { color=blue 74 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 76 [label="Enter block"]; - 77 [label="Access variable R|/y|"]; - 78 [label="Function call: R|/y|.#()"]; - 79 [label="Access variable R|/x|"]; - 80 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 81 [label="Exit block"]; + 75 [label="Enter block"]; + 76 [label="Access variable R|/y|"]; + 77 [label="Function call: R|/y|.#()"]; + 78 [label="Access variable R|/x|"]; + 79 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 80 [label="Exit block"]; } - 75 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 81 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 55 [label="Postponed exit from lambda"]; - 56 [label="Function call: R|kotlin/run|(...)"]; - 58 [label="Call arguments union" style="filled" fillcolor=yellow]; + 54 [label="Postponed exit from lambda"]; + 55 [label="Function call: R|kotlin/run|(...)"]; + 56 [label="Call arguments union" style="filled" fillcolor=yellow]; 57 [label="Function call: R|/id|(...)"]; - 59 [label="Access variable R|/y|"]; - 60 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 61 [label="Postponed enter to lambda"]; + 58 [label="Access variable R|/y|"]; + 59 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 60 [label="Postponed enter to lambda"]; subgraph cluster_18 { color=blue 82 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 84 [label="Enter block"]; - 85 [label="Access variable R|/x|"]; - 86 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 87 [label="Access variable R|/y|"]; - 88 [label="Function call: R|/y|.R|kotlin/Int.inc|()"]; - 89 [label="Const: Int(1)"]; - 90 [label="Exit block"]; + 83 [label="Enter block"]; + 84 [label="Access variable R|/x|"]; + 85 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 86 [label="Access variable R|/y|"]; + 87 [label="Function call: R|/y|.R|kotlin/Int.inc|()"]; + 88 [label="Const: Int(1)"]; + 89 [label="Exit block"]; } - 83 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 90 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 62 [label="Postponed exit from lambda"]; - 63 [label="Function call: R|kotlin/run|(...)"]; - 65 [label="Call arguments union" style="filled" fillcolor=yellow]; + 61 [label="Postponed exit from lambda"]; + 62 [label="Function call: R|kotlin/run|(...)"]; + 63 [label="Call arguments union" style="filled" fillcolor=yellow]; 64 [label="Function call: R|/select|(...)"]; - 66 [label="Variable declaration: lval a: R|kotlin/Int|"]; - 67 [label="Access variable R|/x|"]; - 68 [label="Function call: R|/takeInt|(...)"]; - 69 [label="Access variable R|/y|"]; - 70 [label="Function call: R|/takeInt|(...)"]; - 71 [label="Access variable R|/a|"]; - 72 [label="Function call: R|/takeInt|(...)"]; - 73 [label="Exit block"]; + 65 [label="Variable declaration: lval a: R|kotlin/Int|"]; + 66 [label="Access variable R|/x|"]; + 67 [label="Function call: R|/takeInt|(...)"]; + 68 [label="Access variable R|/y|"]; + 69 [label="Function call: R|/takeInt|(...)"]; + 70 [label="Access variable R|/a|"]; + 71 [label="Function call: R|/takeInt|(...)"]; + 72 [label="Exit block"]; } - 52 [label="Exit function test_2" style="filled" fillcolor=red]; + 73 [label="Exit function test_2" style="filled" fillcolor=red]; } - 51 -> {53}; - 53 -> {54}; - 54 -> {74}; - 54 -> {55} [color=red]; + 51 -> {52}; + 52 -> {53}; + 53 -> {74}; + 53 -> {54} [color=red]; + 54 -> {55}; 55 -> {56}; - 56 -> {58}; - 57 -> {59}; - 58 -> {57}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; 59 -> {60}; - 60 -> {61}; - 61 -> {82}; - 61 -> {62} [color=red]; + 60 -> {82}; + 60 -> {61} [color=red]; + 61 -> {62}; 62 -> {63}; - 63 -> {65}; - 64 -> {66}; - 65 -> {64}; + 63 -> {64}; + 64 -> {65}; + 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; @@ -234,98 +235,98 @@ digraph flowFromInplaceLambda_kt { 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {52}; - 74 -> {76}; - 75 -> {55} [color=green]; - 75 -> {58} [color=red]; + 74 -> {75}; + 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; - 81 -> {75}; - 82 -> {84}; - 83 -> {62} [color=green]; - 83 -> {65} [color=red]; + 81 -> {54} [color=green]; + 81 -> {56} [color=red]; + 82 -> {83}; + 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; - 90 -> {83}; + 90 -> {61} [color=green]; + 90 -> {63} [color=red]; subgraph cluster_20 { color=red 91 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 93 [label="Enter block"]; - 94 [label="Postponed enter to lambda"]; + 92 [label="Enter block"]; + 93 [label="Postponed enter to lambda"]; subgraph cluster_22 { color=blue 111 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 113 [label="Enter block"]; - 114 [label="Access variable R|/y|"]; - 115 [label="Function call: R|/y|.#()"]; - 116 [label="Access variable R|/x|"]; - 117 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 118 [label="Function call: R|/materialize|()"]; - 119 [label="Exit block"]; + 112 [label="Enter block"]; + 113 [label="Access variable R|/y|"]; + 114 [label="Function call: R|/y|.#()"]; + 115 [label="Access variable R|/x|"]; + 116 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 117 [label="Function call: R|/materialize|()"]; + 118 [label="Exit block"]; } - 112 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 119 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 95 [label="Postponed exit from lambda"]; - 96 [label="Function call: R|kotlin/run|(...)"]; - 97 [label="Function call: R|/id|(...)"]; - 98 [label="Postponed enter to lambda"]; + 94 [label="Postponed exit from lambda"]; + 95 [label="Function call: R|kotlin/run|(...)"]; + 96 [label="Function call: R|/id|(...)"]; + 97 [label="Postponed enter to lambda"]; subgraph cluster_24 { color=blue 120 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 122 [label="Enter block"]; - 123 [label="Access variable R|/y|"]; - 124 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 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|kotlin/Int.inc|()"]; - 129 [label="Const: Int(1)"]; - 130 [label="Exit block"]; + 121 [label="Enter block"]; + 122 [label="Access variable R|/y|"]; + 123 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 124 [label="Access variable R|/x|"]; + 125 [label="Function call: R|/x|.#()"]; + 126 [label="Access variable R|/y|"]; + 127 [label="Function call: R|/y|.R|kotlin/Int.inc|()"]; + 128 [label="Const: Int(1)"]; + 129 [label="Exit block"]; } - 121 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 130 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 99 [label="Postponed exit from lambda"]; - 100 [label="Function call: R|kotlin/run|(...)"]; - 102 [label="Call arguments union" style="filled" fillcolor=yellow]; + 98 [label="Postponed exit from lambda"]; + 99 [label="Function call: R|kotlin/run|(...)"]; + 100 [label="Call arguments union" style="filled" fillcolor=yellow]; 101 [label="Function call: R|/select|(...)"]; - 103 [label="Variable declaration: lval a: R|kotlin/Int|"]; - 104 [label="Access variable R|/x|"]; - 105 [label="Function call: R|/takeInt|(...)"]; - 106 [label="Access variable R|/y|"]; - 107 [label="Function call: R|/takeInt|(...)"]; - 108 [label="Access variable R|/a|"]; - 109 [label="Function call: R|/takeInt|(...)"]; - 110 [label="Exit block"]; + 102 [label="Variable declaration: lval a: R|kotlin/Int|"]; + 103 [label="Access variable R|/x|"]; + 104 [label="Function call: R|/takeInt|(...)"]; + 105 [label="Access variable R|/y|"]; + 106 [label="Function call: R|/takeInt|(...)"]; + 107 [label="Access variable R|/a|"]; + 108 [label="Function call: R|/takeInt|(...)"]; + 109 [label="Exit block"]; } - 92 [label="Exit function test_3" style="filled" fillcolor=red]; + 110 [label="Exit function test_3" style="filled" fillcolor=red]; } - 91 -> {93}; - 93 -> {94}; - 94 -> {111}; - 94 -> {95} [color=red]; + 91 -> {92}; + 92 -> {93}; + 93 -> {111}; + 93 -> {94} [color=red]; + 94 -> {95}; 95 -> {96}; 96 -> {97}; - 97 -> {98}; - 98 -> {120}; - 98 -> {99} [color=red]; + 97 -> {120}; + 97 -> {98} [color=red]; + 98 -> {99}; 99 -> {100}; - 100 -> {102}; - 101 -> {103}; - 102 -> {101}; + 100 -> {101}; + 101 -> {102}; + 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; @@ -333,20 +334,18 @@ digraph flowFromInplaceLambda_kt { 107 -> {108}; 108 -> {109}; 109 -> {110}; - 110 -> {92}; - 111 -> {113}; - 112 -> {95} [color=green]; - 112 -> {102} [color=red]; + 111 -> {112}; + 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; 118 -> {119}; - 119 -> {112}; - 120 -> {122}; - 121 -> {99} [color=green]; - 121 -> {102} [color=red]; + 119 -> {94} [color=green]; + 119 -> {100} [color=red]; + 120 -> {121}; + 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; @@ -355,73 +354,75 @@ digraph flowFromInplaceLambda_kt { 127 -> {128}; 128 -> {129}; 129 -> {130}; - 130 -> {121}; + 130 -> {98} [color=green]; + 130 -> {100} [color=red]; subgraph cluster_26 { color=red 131 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_27 { color=blue - 133 [label="Enter block"]; - 134 [label="Postponed enter to lambda"]; + 132 [label="Enter block"]; + 133 [label="Postponed enter to lambda"]; subgraph cluster_28 { color=blue 152 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_29 { color=blue - 154 [label="Enter block"]; - 155 [label="Access variable R|/y|"]; - 156 [label="Function call: R|/y|.#()"]; - 157 [label="Access variable R|/x|"]; - 158 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 159 [label="Exit block"]; + 153 [label="Enter block"]; + 154 [label="Access variable R|/y|"]; + 155 [label="Function call: R|/y|.#()"]; + 156 [label="Access variable R|/x|"]; + 157 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 158 [label="Exit block"]; } - 153 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 159 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 135 [label="Postponed exit from lambda"]; - 136 [label="Function call: R|/myRun|(...)"]; - 137 [label="Function call: R|/id|(...)"]; - 138 [label="Access variable R|/y|"]; - 139 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 140 [label="Postponed enter to lambda"]; + 134 [label="Postponed exit from lambda"]; + 135 [label="Function call: R|/myRun|(...)"]; + 136 [label="Function call: R|/id|(...)"]; + 137 [label="Access variable R|/y|"]; + 138 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 139 [label="Postponed enter to lambda"]; subgraph cluster_30 { color=blue 160 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_31 { color=blue - 162 [label="Enter block"]; - 163 [label="Access variable R|/x|"]; - 164 [label="Function call: R|/x|.#()"]; - 165 [label="Access variable R|/y|"]; - 166 [label="Function call: R|/y|.R|kotlin/Int.inc|()"]; - 167 [label="Const: Int(1)"]; - 168 [label="Exit block"]; + 161 [label="Enter block"]; + 162 [label="Access variable R|/x|"]; + 163 [label="Function call: R|/x|.#()"]; + 164 [label="Access variable R|/y|"]; + 165 [label="Function call: R|/y|.R|kotlin/Int.inc|()"]; + 166 [label="Const: Int(1)"]; + 167 [label="Exit block"]; } - 161 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 168 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 141 [label="Postponed exit from lambda"]; - 142 [label="Function call: R|/myRun|(...)"]; - 143 [label="Function call: R|/select|(...)"]; - 144 [label="Variable declaration: lval a: R|kotlin/Int|"]; - 145 [label="Access variable R|/x|"]; - 146 [label="Function call: #(...)"]; - 147 [label="Access variable R|/y|"]; - 148 [label="Function call: R|/takeInt|(...)"]; - 149 [label="Access variable R|/a|"]; - 150 [label="Function call: R|/takeInt|(...)"]; - 151 [label="Exit block"]; + 140 [label="Postponed exit from lambda"]; + 141 [label="Function call: R|/myRun|(...)"]; + 142 [label="Function call: R|/select|(...)"]; + 143 [label="Variable declaration: lval a: R|kotlin/Int|"]; + 144 [label="Access variable R|/x|"]; + 145 [label="Function call: #(...)"]; + 146 [label="Access variable R|/y|"]; + 147 [label="Function call: R|/takeInt|(...)"]; + 148 [label="Access variable R|/a|"]; + 149 [label="Function call: R|/takeInt|(...)"]; + 150 [label="Exit block"]; } - 132 [label="Exit function test_4" style="filled" fillcolor=red]; + 151 [label="Exit function test_4" style="filled" fillcolor=red]; } - 131 -> {133}; - 133 -> {134}; - 134 -> {135 152}; + 131 -> {132}; + 132 -> {133}; + 133 -> {134 152}; + 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; 138 -> {139}; - 139 -> {140}; - 140 -> {141 160}; + 139 -> {140 160}; + 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; @@ -432,153 +433,152 @@ digraph flowFromInplaceLambda_kt { 148 -> {149}; 149 -> {150}; 150 -> {151}; - 151 -> {132}; - 152 -> {154}; + 152 -> {153}; + 153 -> {154}; 154 -> {155}; 155 -> {156}; 156 -> {157}; 157 -> {158}; 158 -> {159}; - 159 -> {153}; - 160 -> {162}; + 160 -> {161}; + 161 -> {162}; 162 -> {163}; 163 -> {164}; 164 -> {165}; 165 -> {166}; 166 -> {167}; 167 -> {168}; - 168 -> {161}; subgraph cluster_32 { color=red 169 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_33 { color=blue - 171 [label="Enter block"]; - 172 [label="Postponed enter to lambda"]; + 170 [label="Enter block"]; + 171 [label="Postponed enter to lambda"]; subgraph cluster_34 { color=blue 184 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_35 { color=blue - 186 [label="Enter block"]; - 187 [label="Function call: R|/materialize|()"]; - 188 [label="Exit block"]; + 185 [label="Enter block"]; + 186 [label="Function call: R|/materialize|()"]; + 187 [label="Exit block"]; } - 185 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 188 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 173 [label="Postponed exit from lambda"]; - 174 [label="Function call: R|kotlin/run|(...)"]; - 175 [label="Postponed enter to lambda"]; + 172 [label="Postponed exit from lambda"]; + 173 [label="Function call: R|kotlin/run|(...)"]; + 174 [label="Postponed enter to lambda"]; subgraph cluster_36 { color=blue 189 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_37 { color=blue - 191 [label="Enter block"]; - 192 [label="Function call: R|/materialize|()"]; - 193 [label="Exit block"]; + 190 [label="Enter block"]; + 191 [label="Function call: R|/materialize|()"]; + 192 [label="Exit block"]; } - 190 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 193 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 176 [label="Postponed exit from lambda"]; - 177 [label="Function call: R|kotlin/run|(...)"]; - 179 [label="Call arguments union" style="filled" fillcolor=yellow]; + 175 [label="Postponed exit from lambda"]; + 176 [label="Function call: R|kotlin/run|(...)"]; + 177 [label="Call arguments union" style="filled" fillcolor=yellow]; 178 [label="Function call: R|/select|(...)"]; - 180 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 181 [label="Access variable R|/x|"]; - 182 [label="Function call: R|/takeInt|(...)"]; - 183 [label="Exit block"]; + 179 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 180 [label="Access variable R|/x|"]; + 181 [label="Function call: R|/takeInt|(...)"]; + 182 [label="Exit block"]; } - 170 [label="Exit function test_5" style="filled" fillcolor=red]; + 183 [label="Exit function test_5" style="filled" fillcolor=red]; } - 169 -> {171}; - 171 -> {172}; - 172 -> {184}; - 172 -> {173} [color=red]; + 169 -> {170}; + 170 -> {171}; + 171 -> {184}; + 171 -> {172} [color=red]; + 172 -> {173}; 173 -> {174}; - 174 -> {175}; - 175 -> {189}; - 175 -> {176} [color=red]; + 174 -> {189}; + 174 -> {175} [color=red]; + 175 -> {176}; 176 -> {177}; - 177 -> {179}; - 178 -> {180}; - 179 -> {178}; + 177 -> {178}; + 178 -> {179}; + 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; - 183 -> {170}; - 184 -> {186}; - 185 -> {173} [color=green]; - 185 -> {179} [color=red]; + 184 -> {185}; + 185 -> {186}; 186 -> {187}; 187 -> {188}; - 188 -> {185}; - 189 -> {191}; - 190 -> {176} [color=green]; - 190 -> {179} [color=red]; + 188 -> {172} [color=green]; + 188 -> {177} [color=red]; + 189 -> {190}; + 190 -> {191}; 191 -> {192}; 192 -> {193}; - 193 -> {190}; + 193 -> {175} [color=green]; + 193 -> {177} [color=red]; subgraph cluster_38 { color=red 194 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_39 { color=blue - 196 [label="Enter block"]; - 197 [label="Postponed enter to lambda"]; + 195 [label="Enter block"]; + 196 [label="Postponed enter to lambda"]; subgraph cluster_40 { color=blue 203 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_41 { color=blue - 205 [label="Enter block"]; - 206 [label="Postponed enter to lambda"]; + 204 [label="Enter block"]; + 205 [label="Postponed enter to lambda"]; subgraph cluster_42 { color=blue 210 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_43 { color=blue - 212 [label="Enter block"]; - 213 [label="Function call: R|/materialize|()"]; - 214 [label="Exit block"]; + 211 [label="Enter block"]; + 212 [label="Function call: R|/materialize|()"]; + 213 [label="Exit block"]; } - 211 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 214 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 207 [label="Postponed exit from lambda"]; - 208 [label="Function call: R|kotlin/run|(...)"]; - 209 [label="Exit block"]; + 206 [label="Postponed exit from lambda"]; + 207 [label="Function call: R|kotlin/run|(...)"]; + 208 [label="Exit block"]; } - 204 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 209 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 198 [label="Postponed exit from lambda"]; - 199 [label="Function call: R|/myRun|(...)"]; - 200 [label="Function call: R|/id|(...)"]; - 201 [label="Variable declaration: lval x: R|kotlin/String|"]; - 202 [label="Exit block"]; + 197 [label="Postponed exit from lambda"]; + 198 [label="Function call: R|/myRun|(...)"]; + 199 [label="Function call: R|/id|(...)"]; + 200 [label="Variable declaration: lval x: R|kotlin/String|"]; + 201 [label="Exit block"]; } - 195 [label="Exit function test_6" style="filled" fillcolor=red]; + 202 [label="Exit function test_6" style="filled" fillcolor=red]; } - 194 -> {196}; - 196 -> {197}; - 197 -> {198 203}; + 194 -> {195}; + 195 -> {196}; + 196 -> {197 203}; + 197 -> {198}; 198 -> {199}; 199 -> {200}; 200 -> {201}; 201 -> {202}; - 202 -> {195}; - 203 -> {205}; - 205 -> {206}; - 206 -> {210}; - 206 -> {207} [color=red]; + 203 -> {204}; + 204 -> {205}; + 205 -> {210}; + 205 -> {206} [color=red]; + 206 -> {207}; 207 -> {208}; 208 -> {209}; - 209 -> {204}; - 210 -> {212}; - 211 -> {207} [color=green]; + 210 -> {211}; + 211 -> {212}; 212 -> {213}; 213 -> {214}; - 214 -> {211}; + 214 -> {206} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot index 4e7305aea29..d19679b4341 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot @@ -6,80 +6,80 @@ digraph initBlock_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red - 10 [label="Enter class Foo" style="filled" fillcolor=red]; + 9 [label="Enter class Foo" style="filled" fillcolor=red]; subgraph cluster_2 { color=blue 3 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 5 [label="Enter block"]; - 6 [label="Const: Int(1)"]; - 7 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 8 [label="Exit block"]; + 4 [label="Enter block"]; + 5 [label="Const: Int(1)"]; + 6 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 7 [label="Exit block"]; } - 4 [label="Exit init block" style="filled" fillcolor=red]; + 8 [label="Exit init block" style="filled" fillcolor=red]; } - 9 [label="Exit class Foo" style="filled" fillcolor=red]; + 10 [label="Exit class Foo" style="filled" fillcolor=red]; } - 10 -> {3} [color=green]; - 3 -> {5}; - 4 -> {9} [color=green]; + 9 -> {3} [color=green]; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; 6 -> {7}; 7 -> {8}; - 8 -> {4}; + 8 -> {10} [color=green]; subgraph cluster_4 { color=red 11 [label="Enter function " style="filled" fillcolor=red]; - 13 [label="Delegated constructor call: super()"]; - 12 [label="Exit function " style="filled" fillcolor=red]; + 12 [label="Delegated constructor call: super()"]; + 13 [label="Exit function " style="filled" fillcolor=red]; } - 11 -> {13}; - 13 -> {12}; + 11 -> {12}; + 12 -> {13}; subgraph cluster_5 { color=red - 26 [label="Enter class Bar" style="filled" fillcolor=red]; + 25 [label="Enter class Bar" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue 14 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 16 [label="Enter block"]; - 17 [label="Const: Int(1)"]; - 18 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 19 [label="Function call: R|java/lang/Exception.Exception|()"]; - 20 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 21 [label="Stub" style="filled" fillcolor=gray]; - 22 [label="Const: Int(2)" style="filled" fillcolor=gray]; - 23 [label="Variable declaration: lval y: R|kotlin/Int|" style="filled" fillcolor=gray]; - 24 [label="Exit block" style="filled" fillcolor=gray]; + 15 [label="Enter block"]; + 16 [label="Const: Int(1)"]; + 17 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 18 [label="Function call: R|java/lang/Exception.Exception|()"]; + 19 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 20 [label="Stub" style="filled" fillcolor=gray]; + 21 [label="Const: Int(2)" style="filled" fillcolor=gray]; + 22 [label="Variable declaration: lval y: R|kotlin/Int|" style="filled" fillcolor=gray]; + 23 [label="Exit block" style="filled" fillcolor=gray]; } - 15 [label="Exit init block" style="filled" fillcolor=red]; + 24 [label="Exit init block" style="filled" fillcolor=red]; } - 25 [label="Exit class Bar" style="filled" fillcolor=red]; + 26 [label="Exit class Bar" style="filled" fillcolor=red]; } - 26 -> {14} [color=green]; - 14 -> {16}; - 15 -> {25} [color=green]; + 25 -> {14} [color=green]; + 14 -> {15}; + 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20}; - 20 -> {15}; + 19 -> {24}; + 19 -> {20} [style=dotted]; 20 -> {21} [style=dotted]; 21 -> {22} [style=dotted]; 22 -> {23} [style=dotted]; 23 -> {24} [style=dotted]; - 24 -> {15} [style=dotted]; + 24 -> {26} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot index 309fd53e5ce..61de6cb5954 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot @@ -5,10 +5,10 @@ digraph initBlockAndInPlaceLambda_kt { subgraph cluster_0 { color=red - 1 [label="Enter class B" style="filled" fillcolor=red]; - 0 [label="Exit class B" style="filled" fillcolor=red]; + 0 [label="Enter class B" style="filled" fillcolor=red]; + 1 [label="Exit class B" style="filled" fillcolor=red]; } - 1 -> {0} [color=green]; + 0 -> {1} [color=green]; subgraph cluster_1 { color=red @@ -19,79 +19,79 @@ digraph initBlockAndInPlaceLambda_kt { subgraph cluster_2 { color=red - 5 [label="Enter class A" style="filled" fillcolor=red]; - 4 [label="Exit class A" style="filled" fillcolor=red]; + 4 [label="Enter class A" style="filled" fillcolor=red]; + 5 [label="Exit class A" style="filled" fillcolor=red]; } - 5 -> {4} [color=green]; + 4 -> {5} [color=green]; subgraph cluster_3 { color=red 6 [label="Enter function " style="filled" fillcolor=red]; - 8 [label="Delegated constructor call: super()"]; - 7 [label="Exit function " style="filled" fillcolor=red]; + 7 [label="Delegated constructor call: super()"]; + 8 [label="Exit function " style="filled" fillcolor=red]; } - 6 -> {8}; - 8 -> {7}; + 6 -> {7}; + 7 -> {8}; subgraph cluster_4 { color=red - 30 [label="Enter class C" style="filled" fillcolor=red]; + 29 [label="Enter class C" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue 16 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 18 [label="Enter block"]; - 19 [label="Access variable R|/a|"]; - 20 [label="Access variable R|/A.b|"]; - 21 [label="Enter safe call"]; - 23 [label="Postponed enter to lambda"]; + 17 [label="Enter block"]; + 18 [label="Access variable R|/a|"]; + 19 [label="Access variable R|/A.b|"]; + 20 [label="Enter safe call"]; + 21 [label="Postponed enter to lambda"]; subgraph cluster_7 { color=blue 9 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 11 [label="Enter block"]; - 12 [label="Access variable R|/a|"]; - 13 [label="Access variable R|/it|"]; - 14 [label="Function call: R|/C.C|(...)"]; - 15 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Access variable R|/a|"]; + 12 [label="Access variable R|/it|"]; + 13 [label="Function call: R|/C.C|(...)"]; + 14 [label="Exit block"]; } - 10 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 15 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 26 [label="Call arguments union" style="filled" fillcolor=yellow]; - 24 [label="Postponed exit from lambda"]; - 25 [label="Function call: $subj$.R|kotlin/let|(...)"]; - 22 [label="Exit safe call"]; - 27 [label="Variable declaration: lval c: R|C?|"]; - 28 [label="Exit block"]; + 22 [label="Call arguments union" style="filled" fillcolor=yellow]; + 23 [label="Postponed exit from lambda"]; + 24 [label="Function call: $subj$.R|kotlin/let|(...)"]; + 25 [label="Exit safe call"]; + 26 [label="Variable declaration: lval c: R|C?|"]; + 27 [label="Exit block"]; } - 17 [label="Exit init block" style="filled" fillcolor=red]; + 28 [label="Exit init block" style="filled" fillcolor=red]; } - 29 [label="Exit class C" style="filled" fillcolor=red]; + 30 [label="Exit class C" style="filled" fillcolor=red]; } - 30 -> {16} [color=green]; - 16 -> {18}; - 17 -> {29} [color=green]; + 29 -> {16} [color=green]; + 16 -> {17}; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; - 20 -> {21 22}; - 21 -> {23}; - 22 -> {27}; - 23 -> {9}; - 23 -> {24} [color=red]; - 24 -> {25} [color=green]; - 25 -> {22}; - 26 -> {25} [color=red]; + 19 -> {20 25}; + 20 -> {21}; + 21 -> {9}; + 21 -> {23} [color=red]; + 22 -> {24} [color=red]; + 23 -> {24} [color=green]; + 24 -> {25}; + 25 -> {26}; + 26 -> {27}; 27 -> {28}; - 28 -> {17}; - 9 -> {11}; - 10 -> {24} [color=green]; - 10 -> {26} [color=red]; + 28 -> {30} [color=green]; + 9 -> {10}; + 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {10}; + 15 -> {23} [color=green]; + 15 -> {22} [color=red]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot index 657fe870dd9..61a9287632f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot @@ -6,41 +6,41 @@ digraph innerClassInAnonymousObject_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red 3 [label="Enter function " style="filled" fillcolor=red]; - 5 [label="Delegated constructor call: super()"]; - 4 [label="Exit function " style="filled" fillcolor=red]; + 4 [label="Delegated constructor call: super()"]; + 5 [label="Exit function " style="filled" fillcolor=red]; } - 3 -> {5}; - 5 -> {4}; + 3 -> {4}; + 4 -> {5}; subgraph cluster_2 { color=red 6 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 8 [label="Enter block"]; - 9 [label="Exit block"]; + 7 [label="Enter block"]; + 8 [label="Exit block"]; } - 7 [label="Exit function foo" style="filled" fillcolor=red]; + 9 [label="Exit function foo" style="filled" fillcolor=red]; } - 6 -> {8}; + 6 -> {7}; + 7 -> {8}; 8 -> {9}; - 9 -> {7}; subgraph cluster_4 { color=red - 11 [label="Enter class Nested" style="filled" fillcolor=red]; - 10 [label="Exit class Nested" style="filled" fillcolor=red]; + 10 [label="Enter class Nested" style="filled" fillcolor=red]; + 11 [label="Exit class Nested" style="filled" fillcolor=red]; } - 11 -> {10} [color=green]; + 10 -> {11} [color=green]; subgraph cluster_5 { color=red @@ -54,15 +54,15 @@ digraph innerClassInAnonymousObject_kt { 16 [label="Enter property" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 13 [label="Enter class " style="filled" fillcolor=red]; - 12 [label="Exit class " style="filled" fillcolor=red]; + 12 [label="Enter class " style="filled" fillcolor=red]; + 13 [label="Exit class " style="filled" fillcolor=red]; } - 18 [label="Exit anonymous object"]; - 17 [label="Exit property" style="filled" fillcolor=red]; + 17 [label="Exit anonymous object"]; + 18 [label="Exit property" style="filled" fillcolor=red]; } - 16 -> {18}; + 16 -> {17}; 16 -> {0 3 6} [color=red]; - 18 -> {17}; - 13 -> {12} [color=green]; + 17 -> {18}; + 12 -> {13} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot index e50c128f585..f2e4058e481 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot @@ -8,234 +8,234 @@ digraph inplaceLambdaInControlFlowExpressions_kt { 0 [label="Enter function materialize" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Const: Null(null)"]; - 4 [label="Check not null: Null(null)!!"]; - 5 [label="Jump: ^materialize Null(null)!!"]; - 6 [label="Stub" style="filled" fillcolor=gray]; - 7 [label="Exit block" style="filled" fillcolor=gray]; + 1 [label="Enter block"]; + 2 [label="Const: Null(null)"]; + 3 [label="Check not null: Null(null)!!"]; + 4 [label="Jump: ^materialize Null(null)!!"]; + 5 [label="Stub" style="filled" fillcolor=gray]; + 6 [label="Exit block" style="filled" fillcolor=gray]; } - 1 [label="Exit function materialize" style="filled" fillcolor=red]; + 7 [label="Exit function materialize" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {5}; - 5 -> {1}; + 4 -> {7}; + 4 -> {5} [style=dotted]; 5 -> {6} [style=dotted]; 6 -> {7} [style=dotted]; - 7 -> {1} [style=dotted]; subgraph cluster_2 { color=red 8 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 10 [label="Enter block"]; + 9 [label="Enter block"]; subgraph cluster_4 { color=blue - 11 [label="Enter when"]; + 10 [label="Enter when"]; subgraph cluster_5 { color=blue - 13 [label="Enter when branch condition "]; - 14 [label="Const: Boolean(true)"]; - 15 [label="Exit when branch condition"]; + 11 [label="Enter when branch condition "]; + 12 [label="Const: Boolean(true)"]; + 13 [label="Exit when branch condition"]; } subgraph cluster_6 { color=blue - 23 [label="Enter when branch condition else"]; - 24 [label="Exit when branch condition"]; + 14 [label="Enter when branch condition else"]; + 15 [label="Exit when branch condition"]; } - 25 [label="Enter when branch result"]; + 16 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 26 [label="Enter block"]; - 27 [label="Const: String()"]; - 28 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Const: String()"]; + 19 [label="Exit block"]; } - 29 [label="Exit when branch result"]; - 16 [label="Enter when branch result"]; + 20 [label="Exit when branch result"]; + 21 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 17 [label="Enter block"]; - 18 [label="Postponed enter to lambda"]; + 22 [label="Enter block"]; + 23 [label="Postponed enter to lambda"]; subgraph cluster_9 { color=blue 33 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 35 [label="Enter block"]; - 36 [label="Function call: R|/materialize|()"]; - 37 [label="Exit block"]; + 34 [label="Enter block"]; + 35 [label="Function call: R|/materialize|()"]; + 36 [label="Exit block"]; } - 34 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 37 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 19 [label="Postponed exit from lambda"]; - 20 [label="Function call: R|kotlin/run|(...)"]; - 21 [label="Exit block"]; + 24 [label="Postponed exit from lambda"]; + 25 [label="Function call: R|kotlin/run|(...)"]; + 26 [label="Exit block"]; } - 22 [label="Exit when branch result"]; - 12 [label="Exit when"]; + 27 [label="Exit when branch result"]; + 28 [label="Exit when"]; } - 30 [label="Call arguments union" style="filled" fillcolor=yellow]; - 31 [label="Variable declaration: lval x: R|kotlin/String|"]; - 32 [label="Exit block"]; + 29 [label="Call arguments union" style="filled" fillcolor=yellow]; + 30 [label="Variable declaration: lval x: R|kotlin/String|"]; + 31 [label="Exit block"]; } - 9 [label="Exit function test_1" style="filled" fillcolor=red]; + 32 [label="Exit function test_1" style="filled" fillcolor=red]; } - 8 -> {10}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; - 11 -> {13}; - 12 -> {30}; - 13 -> {14}; + 11 -> {12}; + 12 -> {13}; + 13 -> {21 14}; 14 -> {15}; - 15 -> {16 23}; + 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {33}; - 18 -> {19} [color=red]; + 18 -> {19}; 19 -> {20}; - 20 -> {21}; + 20 -> {28}; 21 -> {22}; - 22 -> {12}; - 23 -> {24}; + 22 -> {23}; + 23 -> {33}; + 23 -> {24} [color=red]; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {12}; + 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {9}; - 33 -> {35}; - 34 -> {19} [color=green]; - 34 -> {30} [color=red]; + 33 -> {34}; + 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {34}; + 37 -> {24} [color=green]; + 37 -> {29} [color=red]; subgraph cluster_11 { color=red 38 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 40 [label="Enter block"]; + 39 [label="Enter block"]; subgraph cluster_13 { color=blue - 41 [label="Try expression enter"]; + 40 [label="Try expression enter"]; subgraph cluster_14 { color=blue - 43 [label="Try main block enter"]; + 41 [label="Try main block enter"]; subgraph cluster_15 { color=blue - 45 [label="Enter block"]; - 46 [label="Postponed enter to lambda"]; + 42 [label="Enter block"]; + 43 [label="Postponed enter to lambda"]; subgraph cluster_16 { color=blue 58 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 60 [label="Enter block"]; - 61 [label="Function call: R|/materialize|()"]; - 62 [label="Exit block"]; + 59 [label="Enter block"]; + 60 [label="Function call: R|/materialize|()"]; + 61 [label="Exit block"]; } - 59 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 62 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 47 [label="Postponed exit from lambda"]; - 48 [label="Function call: R|kotlin/run|(...)"]; - 49 [label="Exit block"]; + 44 [label="Postponed exit from lambda"]; + 45 [label="Function call: R|kotlin/run|(...)"]; + 46 [label="Exit block"]; } - 50 [label="Try main block exit"]; + 47 [label="Try main block exit"]; } subgraph cluster_18 { color=blue - 44 [label="Catch enter"]; + 48 [label="Catch enter"]; subgraph cluster_19 { color=blue - 51 [label="Enter block"]; - 52 [label="Const: String()"]; - 53 [label="Exit block"]; + 49 [label="Enter block"]; + 50 [label="Const: String()"]; + 51 [label="Exit block"]; } - 54 [label="Catch exit"]; + 52 [label="Catch exit"]; } - 42 [label="Try expression exit"]; + 53 [label="Try expression exit"]; } - 55 [label="Call arguments union" style="filled" fillcolor=yellow]; - 56 [label="Variable declaration: lval x: R|kotlin/String|"]; - 57 [label="Exit block"]; + 54 [label="Call arguments union" style="filled" fillcolor=yellow]; + 55 [label="Variable declaration: lval x: R|kotlin/String|"]; + 56 [label="Exit block"]; } - 39 [label="Exit function test_2" style="filled" fillcolor=red]; + 57 [label="Exit function test_2" style="filled" fillcolor=red]; } - 38 -> {40}; + 38 -> {39}; + 39 -> {40}; 40 -> {41}; - 41 -> {43}; - 42 -> {55}; - 43 -> {39 44 45}; - 44 -> {39 51}; + 41 -> {57 48 42}; + 42 -> {43}; + 43 -> {58}; + 43 -> {44} [color=red]; + 44 -> {45}; 45 -> {46}; - 46 -> {58}; - 46 -> {47} [color=red]; - 47 -> {48}; - 48 -> {49}; + 46 -> {47}; + 47 -> {53}; + 48 -> {57 49}; 49 -> {50}; - 50 -> {42}; + 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {42}; + 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {39}; - 58 -> {60}; - 59 -> {47} [color=green]; - 59 -> {55} [color=red]; + 58 -> {59}; + 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {59}; + 62 -> {44} [color=green]; + 62 -> {54} [color=red]; subgraph cluster_20 { color=red 63 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 65 [label="Enter block"]; - 66 [label="Postponed enter to lambda"]; + 64 [label="Enter block"]; + 65 [label="Postponed enter to lambda"]; subgraph cluster_22 { color=blue 73 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 75 [label="Enter block"]; - 76 [label="Function call: R|/materialize|()"]; - 77 [label="Exit block"]; + 74 [label="Enter block"]; + 75 [label="Function call: R|/materialize|()"]; + 76 [label="Exit block"]; } - 74 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 77 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 67 [label="Postponed exit from lambda"]; - 68 [label="Function call: R|kotlin/run|(...)"]; - 69 [label="Check not null: R|kotlin/run|(...)!!"]; - 70 [label="Call arguments union" style="filled" fillcolor=yellow]; - 71 [label="Variable declaration: lval x: R|kotlin/String|"]; - 72 [label="Exit block"]; + 66 [label="Postponed exit from lambda"]; + 67 [label="Function call: R|kotlin/run|(...)"]; + 68 [label="Check not null: R|kotlin/run|(...)!!"]; + 69 [label="Call arguments union" style="filled" fillcolor=yellow]; + 70 [label="Variable declaration: lval x: R|kotlin/String|"]; + 71 [label="Exit block"]; } - 64 [label="Exit function test_3" style="filled" fillcolor=red]; + 72 [label="Exit function test_3" style="filled" fillcolor=red]; } - 63 -> {65}; - 65 -> {66}; - 66 -> {73}; - 66 -> {67} [color=red]; + 63 -> {64}; + 64 -> {65}; + 65 -> {73}; + 65 -> {66} [color=red]; + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {64}; - 73 -> {75}; - 74 -> {67} [color=green]; - 74 -> {70} [color=red]; + 73 -> {74}; + 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {74}; + 77 -> {66} [color=green]; + 77 -> {69} [color=red]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot index 42208b518ba..203a7982e59 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot @@ -8,405 +8,405 @@ digraph jumps_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Enter when"]; + 2 [label="Enter when"]; subgraph cluster_3 { color=blue - 5 [label="Enter when branch condition "]; - 6 [label="Access variable R|/x|"]; - 7 [label="Const: Null(null)"]; - 8 [label="Operator =="]; - 9 [label="Exit when branch condition"]; + 3 [label="Enter when branch condition "]; + 4 [label="Access variable R|/x|"]; + 5 [label="Const: Null(null)"]; + 6 [label="Operator =="]; + 7 [label="Exit when branch condition"]; } subgraph cluster_4 { color=blue - 17 [label="Enter when branch condition else"]; - 18 [label="Exit when branch condition"]; + 8 [label="Enter when branch condition else"]; + 9 [label="Exit when branch condition"]; } - 19 [label="Enter when branch result"]; + 10 [label="Enter when branch result"]; subgraph cluster_5 { color=blue - 20 [label="Enter block"]; - 21 [label="Access variable R|/x|"]; - 22 [label="Exit block"]; + 11 [label="Enter block"]; + 12 [label="Access variable R|/x|"]; + 13 [label="Exit block"]; } - 23 [label="Exit when branch result"]; - 10 [label="Enter when branch result"]; + 14 [label="Exit when branch result"]; + 15 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 11 [label="Enter block"]; - 12 [label="Function call: R|java/lang/Exception.Exception|()"]; - 13 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 14 [label="Stub" style="filled" fillcolor=gray]; - 15 [label="Exit block" style="filled" fillcolor=gray]; + 16 [label="Enter block"]; + 17 [label="Function call: R|java/lang/Exception.Exception|()"]; + 18 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 19 [label="Stub" style="filled" fillcolor=gray]; + 20 [label="Exit block" style="filled" fillcolor=gray]; } - 16 [label="Exit when branch result" style="filled" fillcolor=gray]; - 4 [label="Exit when"]; + 21 [label="Exit when branch result" style="filled" fillcolor=gray]; + 22 [label="Exit when"]; } - 24 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 25 [label="Access variable R|/y|"]; - 26 [label="Function call: R|/y|.R|kotlin/Int.inc|()"]; - 27 [label="Access variable R|/x|"]; - 28 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 29 [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="Access variable R|/x|"]; + 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 28 [label="Exit block"]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 29 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {24}; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8}; + 7 -> {15 8}; 8 -> {9}; - 9 -> {10 17}; + 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {1}; - 13 -> {14} [style=dotted]; - 14 -> {15} [style=dotted]; - 15 -> {16} [style=dotted]; - 16 -> {4} [style=dotted]; + 13 -> {14}; + 14 -> {22}; + 15 -> {16}; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; - 19 -> {20}; - 20 -> {21}; - 21 -> {22}; + 18 -> {29}; + 18 -> {19} [style=dotted]; + 19 -> {20} [style=dotted]; + 20 -> {21} [style=dotted]; + 21 -> {22} [style=dotted]; 22 -> {23}; - 23 -> {4}; + 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {1}; subgraph cluster_7 { color=red 30 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 32 [label="Enter block"]; + 31 [label="Enter block"]; subgraph cluster_9 { color=blue - 33 [label="Enter when"]; + 32 [label="Enter when"]; subgraph cluster_10 { color=blue - 35 [label="Enter when branch condition "]; - 36 [label="Access variable R|/x|"]; - 37 [label="Const: Null(null)"]; - 38 [label="Operator =="]; - 39 [label="Exit when branch condition"]; + 33 [label="Enter when branch condition "]; + 34 [label="Access variable R|/x|"]; + 35 [label="Const: Null(null)"]; + 36 [label="Operator =="]; + 37 [label="Exit when branch condition"]; } subgraph cluster_11 { color=blue - 45 [label="Enter when branch condition else"]; - 46 [label="Exit when branch condition"]; + 38 [label="Enter when branch condition else"]; + 39 [label="Exit when branch condition"]; } - 47 [label="Enter when branch result"]; - subgraph cluster_12 { - color=blue - 48 [label="Enter block"]; - 49 [label="Access variable R|/x|"]; - 50 [label="Exit block"]; - } - 51 [label="Exit when branch result"]; 40 [label="Enter when branch result"]; - subgraph cluster_13 { + subgraph cluster_12 { color=blue 41 [label="Enter block"]; 42 [label="Access variable R|/x|"]; 43 [label="Exit block"]; } 44 [label="Exit when branch result"]; - 34 [label="Exit when"]; + 45 [label="Enter when branch result"]; + subgraph cluster_13 { + color=blue + 46 [label="Enter block"]; + 47 [label="Access variable R|/x|"]; + 48 [label="Exit block"]; + } + 49 [label="Exit when branch result"]; + 50 [label="Exit when"]; } - 52 [label="Variable declaration: lval y: R|kotlin/Int?|"]; - 53 [label="Access variable R|/y|"]; - 54 [label="Function call: R|/y|.#()"]; - 55 [label="Exit block"]; + 51 [label="Variable declaration: lval y: R|kotlin/Int?|"]; + 52 [label="Access variable R|/y|"]; + 53 [label="Function call: R|/y|.#()"]; + 54 [label="Exit block"]; } - 31 [label="Exit function test_2" style="filled" fillcolor=red]; + 55 [label="Exit function test_2" style="filled" fillcolor=red]; } - 30 -> {32}; + 30 -> {31}; + 31 -> {32}; 32 -> {33}; - 33 -> {35}; - 34 -> {52}; + 33 -> {34}; + 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38}; + 37 -> {45 38}; 38 -> {39}; - 39 -> {40 45}; + 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {34}; + 44 -> {50}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {34}; + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {31}; subgraph cluster_14 { color=red 56 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 58 [label="Enter block"]; + 57 [label="Enter block"]; subgraph cluster_16 { color=blue - 59 [label="Enter while loop"]; + 58 [label="Enter while loop"]; subgraph cluster_17 { color=blue - 61 [label="Enter loop condition"]; - 62 [label="Const: Boolean(true)"]; - 63 [label="Exit loop condition"]; + 59 [label="Enter loop condition"]; + 60 [label="Const: Boolean(true)"]; + 61 [label="Exit loop condition"]; } subgraph cluster_18 { color=blue - 64 [label="Enter loop block"]; + 62 [label="Enter loop block"]; subgraph cluster_19 { color=blue - 65 [label="Enter block"]; - 66 [label="Access variable R|/x|"]; - 67 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 68 [label="Jump: break@@@[Boolean(true)] "]; - 69 [label="Stub" style="filled" fillcolor=gray]; - 70 [label="Exit block" style="filled" fillcolor=gray]; + 63 [label="Enter block"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 66 [label="Jump: break@@@[Boolean(true)] "]; + 67 [label="Stub" style="filled" fillcolor=gray]; + 68 [label="Exit block" style="filled" fillcolor=gray]; } - 71 [label="Exit loop block" style="filled" fillcolor=gray]; + 69 [label="Exit loop block" style="filled" fillcolor=gray]; } - 60 [label="Exit whileloop"]; + 70 [label="Exit whileloop"]; } - 72 [label="Access variable R|/x|"]; - 73 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 74 [label="Exit block"]; + 71 [label="Access variable R|/x|"]; + 72 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 73 [label="Exit block"]; } - 57 [label="Exit function test_3" style="filled" fillcolor=red]; + 74 [label="Exit function test_3" style="filled" fillcolor=red]; } - 56 -> {58}; + 56 -> {57}; + 57 -> {58}; 58 -> {59}; - 59 -> {61}; - 60 -> {72}; + 59 -> {60}; + 60 -> {61}; 61 -> {62}; + 61 -> {70} [style=dotted]; 62 -> {63}; 63 -> {64}; - 63 -> {60} [style=dotted]; 64 -> {65}; 65 -> {66}; - 66 -> {67}; - 67 -> {68}; - 68 -> {60}; + 66 -> {70}; + 66 -> {67} [style=dotted]; + 67 -> {68} [style=dotted]; 68 -> {69} [style=dotted]; - 69 -> {70} [style=dotted]; - 70 -> {71} [style=dotted]; - 71 -> {61} [color=green style=dotted]; + 69 -> {59} [color=green style=dotted]; + 70 -> {71}; + 71 -> {72}; 72 -> {73}; 73 -> {74}; - 74 -> {57}; subgraph cluster_20 { color=red 75 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 77 [label="Enter block"]; + 76 [label="Enter block"]; subgraph cluster_22 { color=blue - 78 [label="Enter do-while loop"]; + 77 [label="Enter do-while loop"]; subgraph cluster_23 { color=blue - 80 [label="Enter loop block"]; + 78 [label="Enter loop block"]; subgraph cluster_24 { color=blue - 81 [label="Enter block"]; - 82 [label="Access variable R|/x|"]; - 83 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 84 [label="Jump: break@@@[Boolean(true)] "]; - 85 [label="Stub" style="filled" fillcolor=gray]; - 86 [label="Exit block" style="filled" fillcolor=gray]; + 79 [label="Enter block"]; + 80 [label="Access variable R|/x|"]; + 81 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 82 [label="Jump: break@@@[Boolean(true)] "]; + 83 [label="Stub" style="filled" fillcolor=gray]; + 84 [label="Exit block" style="filled" fillcolor=gray]; } - 87 [label="Exit loop block" style="filled" fillcolor=gray]; + 85 [label="Exit loop block" style="filled" fillcolor=gray]; } subgraph cluster_25 { color=blue - 88 [label="Enter loop condition" style="filled" fillcolor=gray]; - 89 [label="Const: Boolean(true)" style="filled" fillcolor=gray]; - 90 [label="Exit loop condition" style="filled" fillcolor=gray]; + 86 [label="Enter loop condition" style="filled" fillcolor=gray]; + 87 [label="Const: Boolean(true)" style="filled" fillcolor=gray]; + 88 [label="Exit loop condition" style="filled" fillcolor=gray]; } - 79 [label="Exit do-whileloop"]; + 89 [label="Exit do-whileloop"]; } - 91 [label="Access variable R|/x|"]; - 92 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 93 [label="Exit block"]; + 90 [label="Access variable R|/x|"]; + 91 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 92 [label="Exit block"]; } - 76 [label="Exit function test_4" style="filled" fillcolor=red]; + 93 [label="Exit function test_4" style="filled" fillcolor=red]; } - 75 -> {77}; + 75 -> {76}; + 76 -> {77}; 77 -> {78}; - 78 -> {80}; - 79 -> {91}; + 78 -> {79}; + 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {83}; - 83 -> {84}; - 84 -> {79}; + 82 -> {89}; + 82 -> {83} [style=dotted]; + 83 -> {84} [style=dotted]; 84 -> {85} [style=dotted]; 85 -> {86} [style=dotted]; 86 -> {87} [style=dotted]; 87 -> {88} [style=dotted]; 88 -> {89} [style=dotted]; - 89 -> {90} [style=dotted]; - 90 -> {79} [style=dotted]; - 90 -> {80} [color=green style=dotted]; + 88 -> {78} [color=green style=dotted]; + 89 -> {90}; + 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {76}; subgraph cluster_26 { color=red 94 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_27 { color=blue - 96 [label="Enter block"]; + 95 [label="Enter block"]; subgraph cluster_28 { color=blue - 97 [label="Enter while loop"]; + 96 [label="Enter while loop"]; subgraph cluster_29 { color=blue - 99 [label="Enter loop condition"]; - 100 [label="Access variable R|/b|"]; - 101 [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 - 102 [label="Enter loop block"]; + 100 [label="Enter loop block"]; subgraph cluster_31 { color=blue - 103 [label="Enter block"]; + 101 [label="Enter block"]; subgraph cluster_32 { color=blue - 104 [label="Enter when"]; + 102 [label="Enter when"]; subgraph cluster_33 { color=blue - 106 [label="Enter when branch condition "]; - 107 [label="Access variable R|/b|"]; - 108 [label="Exit when branch condition"]; + 103 [label="Enter when branch condition "]; + 104 [label="Access variable R|/b|"]; + 105 [label="Exit when branch condition"]; } - 115 [label="Synthetic else branch"]; - 109 [label="Enter when branch result"]; + 106 [label="Synthetic else branch"]; + 107 [label="Enter when branch result"]; subgraph cluster_34 { color=blue - 110 [label="Enter block"]; - 111 [label="Jump: continue@@@[R|/b|] "]; - 112 [label="Stub" style="filled" fillcolor=gray]; - 113 [label="Exit block" style="filled" fillcolor=gray]; + 108 [label="Enter block"]; + 109 [label="Jump: continue@@@[R|/b|] "]; + 110 [label="Stub" style="filled" fillcolor=gray]; + 111 [label="Exit block" style="filled" fillcolor=gray]; } - 114 [label="Exit when branch result" style="filled" fillcolor=gray]; - 105 [label="Exit when"]; + 112 [label="Exit when branch result" style="filled" fillcolor=gray]; + 113 [label="Exit when"]; } - 116 [label="Exit block"]; + 114 [label="Exit block"]; } - 117 [label="Exit loop block"]; + 115 [label="Exit loop block"]; } - 98 [label="Exit whileloop"]; + 116 [label="Exit whileloop"]; } - 118 [label="Exit block"]; + 117 [label="Exit block"]; } - 95 [label="Exit function test_5" style="filled" fillcolor=red]; + 118 [label="Exit function test_5" style="filled" fillcolor=red]; } - 94 -> {96}; + 94 -> {95}; + 95 -> {96}; 96 -> {97}; - 97 -> {99}; - 98 -> {118}; - 99 -> {100}; + 97 -> {98}; + 98 -> {99}; + 99 -> {116 100}; 100 -> {101}; - 101 -> {98 102}; + 101 -> {102}; 102 -> {103}; 103 -> {104}; - 104 -> {106}; - 105 -> {116}; - 106 -> {107}; + 104 -> {105}; + 105 -> {107 106}; + 106 -> {113}; 107 -> {108}; - 108 -> {109 115}; - 109 -> {110}; - 110 -> {111}; + 108 -> {109}; + 109 -> {110} [style=dotted]; + 109 -> {96} [color=green style=dashed]; + 110 -> {111} [style=dotted]; 111 -> {112} [style=dotted]; - 111 -> {97} [color=green style=dashed]; 112 -> {113} [style=dotted]; - 113 -> {114} [style=dotted]; - 114 -> {105} [style=dotted]; - 115 -> {105}; + 113 -> {114}; + 114 -> {115}; + 115 -> {97} [color=green style=dashed]; 116 -> {117}; - 117 -> {99} [color=green style=dashed]; - 118 -> {95}; + 117 -> {118}; subgraph cluster_35 { color=red 119 [label="Enter function run" style="filled" fillcolor=red]; subgraph cluster_36 { color=blue - 121 [label="Enter block"]; - 122 [label="Function call: R|/block|.R|FakeOverride|()"]; - 123 [label="Exit block"]; + 120 [label="Enter block"]; + 121 [label="Function call: R|/block|.R|FakeOverride|()"]; + 122 [label="Exit block"]; } - 120 [label="Exit function run" style="filled" fillcolor=red]; + 123 [label="Exit function run" style="filled" fillcolor=red]; } - 119 -> {121}; + 119 -> {120}; + 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {120}; subgraph cluster_37 { color=red 124 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_38 { color=blue - 126 [label="Enter block"]; - 127 [label="Postponed enter to lambda"]; + 125 [label="Enter block"]; + 126 [label="Postponed enter to lambda"]; subgraph cluster_39 { color=blue 131 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_40 { color=blue - 133 [label="Enter block"]; - 134 [label="Jump: ^@run Unit"]; - 135 [label="Stub" style="filled" fillcolor=gray]; - 136 [label="Exit block" style="filled" fillcolor=gray]; + 132 [label="Enter block"]; + 133 [label="Jump: ^@run Unit"]; + 134 [label="Stub" style="filled" fillcolor=gray]; + 135 [label="Exit block" style="filled" fillcolor=gray]; } - 132 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 136 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 128 [label="Postponed exit from lambda"]; - 129 [label="Function call: R|/run|(...)"]; - 130 [label="Exit block"]; + 127 [label="Postponed exit from lambda"]; + 128 [label="Function call: R|/run|(...)"]; + 129 [label="Exit block"]; } - 125 [label="Exit function test_6" style="filled" fillcolor=red]; + 130 [label="Exit function test_6" style="filled" fillcolor=red]; } - 124 -> {126}; - 126 -> {127}; - 127 -> {131}; - 127 -> {128} [color=red]; + 124 -> {125}; + 125 -> {126}; + 126 -> {131}; + 126 -> {127} [color=red]; + 127 -> {128}; 128 -> {129}; 129 -> {130}; - 130 -> {125}; - 131 -> {132 133}; - 132 -> {128} [color=green]; - 132 -> {131} [color=green style=dashed]; - 133 -> {134}; - 134 -> {132}; + 131 -> {136 132}; + 132 -> {133}; + 133 -> {136}; + 133 -> {134} [style=dotted]; 134 -> {135} [style=dotted]; 135 -> {136} [style=dotted]; - 136 -> {132} [style=dotted]; + 136 -> {127} [color=green]; + 136 -> {131} [color=green style=dashed]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot index b748d0c7440..b69222c5a33 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot @@ -13,98 +13,98 @@ digraph lambdaAsReturnOfLambda_kt { subgraph cluster_1 { color=red 16 [label="Enter property" style="filled" fillcolor=red]; - 18 [label="Postponed enter to lambda"]; + 17 [label="Postponed enter to lambda"]; subgraph cluster_2 { color=blue 0 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 2 [label="Enter block"]; - 3 [label="Postponed enter to lambda"]; + 1 [label="Enter block"]; + 2 [label="Postponed enter to lambda"]; subgraph cluster_4 { color=blue 8 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Access variable R|/foo|"]; - 12 [label="Function call: R|/bar|(...)"]; - 13 [label="Exit block"]; + 9 [label="Enter block"]; + 10 [label="Access variable R|/foo|"]; + 11 [label="Function call: R|/bar|(...)"]; + 12 [label="Exit block"]; } - 9 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 13 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 4 [label="Postponed exit from lambda"]; - 5 [label="Jump: ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { + 3 [label="Postponed exit from lambda"]; + 4 [label="Jump: ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { R|/bar|(R|/foo|) } "]; - 6 [label="Stub" style="filled" fillcolor=gray]; - 7 [label="Exit block" style="filled" fillcolor=gray]; + 5 [label="Stub" style="filled" fillcolor=gray]; + 6 [label="Exit block" style="filled" fillcolor=gray]; } - 1 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 7 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 19 [label="Postponed exit from lambda"]; + 18 [label="Postponed exit from lambda"]; subgraph cluster_6 { color=blue - 20 [label="Enter block"]; - 21 [label="Exit block"]; + 19 [label="Enter block"]; + 20 [label="Exit block"]; } - 22 [label="Function call: R|/run| kotlin/Unit|>(...)"]; - 17 [label="Exit property" style="filled" fillcolor=red]; + 21 [label="Function call: R|/run| kotlin/Unit|>(...)"]; + 22 [label="Exit property" style="filled" fillcolor=red]; } - 16 -> {18}; - 18 -> {19 0}; + 16 -> {17}; + 17 -> {18 0}; + 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {17}; - 0 -> {2}; - 2 -> {3}; - 3 -> {4 8}; - 4 -> {5}; - 5 -> {1}; + 0 -> {1}; + 1 -> {2}; + 2 -> {3 8}; + 3 -> {4}; + 4 -> {7}; + 4 -> {5} [style=dotted]; 5 -> {6} [style=dotted]; 6 -> {7} [style=dotted]; - 7 -> {1} [style=dotted]; - 8 -> {10}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {9}; subgraph cluster_7 { color=red 23 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 25 [label="Enter block"]; - 26 [label="Exit block"]; + 24 [label="Enter block"]; + 25 [label="Exit block"]; } - 24 [label="Exit function bar" style="filled" fillcolor=red]; + 26 [label="Exit function bar" style="filled" fillcolor=red]; } - 23 -> {25}; + 23 -> {24}; + 24 -> {25}; 25 -> {26}; - 26 -> {24}; subgraph cluster_9 { color=red 27 [label="Enter function run" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 29 [label="Enter block"]; - 30 [label="Function call: R|/block|.R|FakeOverride|()"]; - 31 [label="Jump: ^run R|/block|.R|FakeOverride|()"]; - 32 [label="Stub" style="filled" fillcolor=gray]; - 33 [label="Exit block" style="filled" fillcolor=gray]; + 28 [label="Enter block"]; + 29 [label="Function call: R|/block|.R|FakeOverride|()"]; + 30 [label="Jump: ^run R|/block|.R|FakeOverride|()"]; + 31 [label="Stub" style="filled" fillcolor=gray]; + 32 [label="Exit block" style="filled" fillcolor=gray]; } - 28 [label="Exit function run" style="filled" fillcolor=red]; + 33 [label="Exit function run" style="filled" fillcolor=red]; } - 27 -> {29}; + 27 -> {28}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; - 31 -> {28}; + 30 -> {33}; + 30 -> {31} [style=dotted]; 31 -> {32} [style=dotted]; 32 -> {33} [style=dotted]; - 33 -> {28} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot index cc64bd76b13..a93a01801ac 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot @@ -5,106 +5,106 @@ digraph lambdaReturningObject_kt { subgraph cluster_0 { color=red - 1 [label="Enter class Out" style="filled" fillcolor=red]; - 0 [label="Exit class Out" style="filled" fillcolor=red]; + 0 [label="Enter class Out" style="filled" fillcolor=red]; + 1 [label="Exit class Out" style="filled" fillcolor=red]; } - 1 -> {0} [color=green]; + 0 -> {1} [color=green]; subgraph cluster_1 { color=red 2 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_2 { color=blue - 4 [label="Enter block"]; - 5 [label="Exit block"]; + 3 [label="Enter block"]; + 4 [label="Exit block"]; } - 3 [label="Exit function bar" style="filled" fillcolor=red]; + 5 [label="Exit function bar" style="filled" fillcolor=red]; } - 2 -> {4}; + 2 -> {3}; + 3 -> {4}; 4 -> {5}; - 5 -> {3}; subgraph cluster_3 { color=red - 7 [label="Enter class IrTypeArgument" style="filled" fillcolor=red]; - 6 [label="Exit class IrTypeArgument" style="filled" fillcolor=red]; + 6 [label="Enter class IrTypeArgument" style="filled" fillcolor=red]; + 7 [label="Exit class IrTypeArgument" style="filled" fillcolor=red]; } - 7 -> {6} [color=green]; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red 8 [label="Enter function " style="filled" fillcolor=red]; - 10 [label="Delegated constructor call: super()"]; - 9 [label="Exit function " style="filled" fillcolor=red]; + 9 [label="Delegated constructor call: super()"]; + 10 [label="Exit function " style="filled" fillcolor=red]; } - 8 -> {10}; - 10 -> {9}; + 8 -> {9}; + 9 -> {10}; subgraph cluster_5 { color=red - 12 [label="Enter class IrStarProjectionImpl" style="filled" fillcolor=red]; - 11 [label="Exit class IrStarProjectionImpl" style="filled" fillcolor=red]; + 11 [label="Enter class IrStarProjectionImpl" style="filled" fillcolor=red]; + 12 [label="Exit class IrStarProjectionImpl" style="filled" fillcolor=red]; } - 12 -> {11} [color=green]; + 11 -> {12} [color=green]; subgraph cluster_6 { color=red 13 [label="Enter function MyOut" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 15 [label="Enter block"]; - 16 [label="Function call: R|kotlin/TODO|()"]; - 17 [label="Stub" style="filled" fillcolor=gray]; - 18 [label="Jump: ^MyOut R|kotlin/TODO|()" style="filled" fillcolor=gray]; - 19 [label="Stub" style="filled" fillcolor=gray]; - 20 [label="Exit block" style="filled" fillcolor=gray]; + 14 [label="Enter block"]; + 15 [label="Function call: R|kotlin/TODO|()"]; + 16 [label="Stub" style="filled" fillcolor=gray]; + 17 [label="Jump: ^MyOut R|kotlin/TODO|()" style="filled" fillcolor=gray]; + 18 [label="Stub" style="filled" fillcolor=gray]; + 19 [label="Exit block" style="filled" fillcolor=gray]; } - 14 [label="Exit function MyOut" style="filled" fillcolor=red]; + 20 [label="Exit function MyOut" style="filled" fillcolor=red]; } - 13 -> {15}; - 15 -> {16}; - 16 -> {14}; + 13 -> {14}; + 14 -> {15}; + 15 -> {20}; + 15 -> {16} [style=dotted]; 16 -> {17} [style=dotted]; - 17 -> {18} [style=dotted]; - 18 -> {14 19} [style=dotted]; + 17 -> {20 18} [style=dotted]; + 18 -> {19} [style=dotted]; 19 -> {20} [style=dotted]; - 20 -> {14} [style=dotted]; subgraph cluster_8 { color=red 21 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 23 [label="Enter block"]; - 24 [label="Postponed enter to lambda"]; + 22 [label="Enter block"]; + 23 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue 29 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 31 [label="Enter block"]; - 32 [label="Access qualifier /IrStarProjectionImpl"]; - 33 [label="Exit block"]; + 30 [label="Enter block"]; + 31 [label="Access qualifier /IrStarProjectionImpl"]; + 32 [label="Exit block"]; } - 30 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 33 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 25 [label="Postponed exit from lambda"]; - 26 [label="Function call: R|/MyOut|(...)"]; - 27 [label="Function call: R|/bar|(...)"]; - 28 [label="Exit block"]; + 24 [label="Postponed exit from lambda"]; + 25 [label="Function call: R|/MyOut|(...)"]; + 26 [label="Function call: R|/bar|(...)"]; + 27 [label="Exit block"]; } - 22 [label="Exit function foo" style="filled" fillcolor=red]; + 28 [label="Exit function foo" style="filled" fillcolor=red]; } - 21 -> {23}; - 23 -> {24}; - 24 -> {25 29}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24 29}; + 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {22}; - 29 -> {31}; + 29 -> {30}; + 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {30}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot index 4007ae6eb6d..f5e63239749 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot @@ -8,279 +8,279 @@ digraph lambdas_kt { 0 [label="Enter function run" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Function call: R|/block|.R|FakeOverride|()"]; - 4 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Function call: R|/block|.R|FakeOverride|()"]; + 3 [label="Exit block"]; } - 1 [label="Exit function run" style="filled" fillcolor=red]; + 4 [label="Exit function run" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {1}; subgraph cluster_2 { color=red 5 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 7 [label="Enter block"]; + 6 [label="Enter block"]; subgraph cluster_4 { color=blue - 8 [label="Enter when"]; + 7 [label="Enter when"]; subgraph cluster_5 { color=blue - 10 [label="Enter when branch condition "]; - 11 [label="Access variable R|/x|"]; - 12 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 13 [label="Exit when branch condition"]; + 8 [label="Enter when branch condition "]; + 9 [label="Access variable R|/x|"]; + 10 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 11 [label="Exit when branch condition"]; } - 21 [label="Synthetic else branch"]; - 14 [label="Enter when branch result"]; + 12 [label="Synthetic else branch"]; + 13 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 15 [label="Enter block"]; - 16 [label="Postponed enter to lambda"]; + 14 [label="Enter block"]; + 15 [label="Postponed enter to lambda"]; subgraph cluster_7 { color=blue 23 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 25 [label="Enter block"]; - 26 [label="Access variable R|/x|"]; - 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 28 [label="Exit block"]; + 24 [label="Enter block"]; + 25 [label="Access variable R|/x|"]; + 26 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 27 [label="Exit block"]; } - 24 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 28 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 17 [label="Postponed exit from lambda"]; - 18 [label="Function call: R|/run|(...)"]; - 19 [label="Exit block"]; + 16 [label="Postponed exit from lambda"]; + 17 [label="Function call: R|/run|(...)"]; + 18 [label="Exit block"]; } - 20 [label="Exit when branch result"]; - 9 [label="Exit when"]; + 19 [label="Exit when branch result"]; + 20 [label="Exit when"]; } - 22 [label="Exit block"]; + 21 [label="Exit block"]; } - 6 [label="Exit function test_1" style="filled" fillcolor=red]; + 22 [label="Exit function test_1" style="filled" fillcolor=red]; } - 5 -> {7}; + 5 -> {6}; + 6 -> {7}; 7 -> {8}; - 8 -> {10}; - 9 -> {22}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; - 11 -> {12}; - 12 -> {13}; - 13 -> {14 21}; + 11 -> {13 12}; + 12 -> {20}; + 13 -> {14}; 14 -> {15}; - 15 -> {16}; - 16 -> {23}; - 16 -> {17} [color=red]; + 15 -> {23}; + 15 -> {16} [color=red]; + 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {9}; - 21 -> {9}; - 22 -> {6}; - 23 -> {24 25}; - 24 -> {17} [color=green]; - 24 -> {23} [color=green style=dashed]; + 20 -> {21}; + 21 -> {22}; + 23 -> {28 24}; + 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {24}; + 28 -> {16} [color=green]; + 28 -> {23} [color=green style=dashed]; subgraph cluster_9 { color=red 29 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 31 [label="Enter block"]; + 30 [label="Enter block"]; subgraph cluster_11 { color=blue - 32 [label="Enter when"]; + 31 [label="Enter when"]; subgraph cluster_12 { color=blue - 34 [label="Enter when branch condition "]; - 35 [label="Access variable R|/x|"]; - 36 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 37 [label="Exit when branch condition"]; + 32 [label="Enter when branch condition "]; + 33 [label="Access variable R|/x|"]; + 34 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 35 [label="Exit when branch condition"]; } - 45 [label="Synthetic else branch"]; - 38 [label="Enter when branch result"]; + 36 [label="Synthetic else branch"]; + 37 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 39 [label="Enter block"]; - 40 [label="Postponed enter to lambda"]; + 38 [label="Enter block"]; + 39 [label="Postponed enter to lambda"]; subgraph cluster_14 { color=blue 47 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 49 [label="Enter block"]; - 50 [label="Access variable R|/x|"]; - 51 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 52 [label="Exit block"]; + 48 [label="Enter block"]; + 49 [label="Access variable R|/x|"]; + 50 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 51 [label="Exit block"]; } - 48 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 52 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 41 [label="Postponed exit from lambda"]; - 42 [label="Variable declaration: lval lambda: R|() -> kotlin/Int|"]; - 43 [label="Exit block"]; + 40 [label="Postponed exit from lambda"]; + 41 [label="Variable declaration: lval lambda: R|() -> kotlin/Int|"]; + 42 [label="Exit block"]; } - 44 [label="Exit when branch result"]; - 33 [label="Exit when"]; + 43 [label="Exit when branch result"]; + 44 [label="Exit when"]; } - 46 [label="Exit block"]; + 45 [label="Exit block"]; } - 30 [label="Exit function test_2" style="filled" fillcolor=red]; + 46 [label="Exit function test_2" style="filled" fillcolor=red]; } - 29 -> {31}; + 29 -> {30}; + 30 -> {31}; 31 -> {32}; - 32 -> {34}; - 33 -> {46}; + 32 -> {33}; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; - 36 -> {37}; - 37 -> {38 45}; + 35 -> {37 36}; + 36 -> {44}; + 37 -> {38}; 38 -> {39}; - 39 -> {40}; - 40 -> {41 47}; + 39 -> {40 47}; + 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {33}; - 45 -> {33}; - 46 -> {30}; - 47 -> {49}; + 44 -> {45}; + 45 -> {46}; + 47 -> {48}; + 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {48}; subgraph cluster_16 { color=red 53 [label="Enter function getInt" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 55 [label="Enter block"]; - 56 [label="Function call: R|/block|.R|FakeOverride|()"]; - 57 [label="Const: Int(1)"]; - 58 [label="Jump: ^getInt Int(1)"]; - 59 [label="Stub" style="filled" fillcolor=gray]; - 60 [label="Exit block" style="filled" fillcolor=gray]; + 54 [label="Enter block"]; + 55 [label="Function call: R|/block|.R|FakeOverride|()"]; + 56 [label="Const: Int(1)"]; + 57 [label="Jump: ^getInt Int(1)"]; + 58 [label="Stub" style="filled" fillcolor=gray]; + 59 [label="Exit block" style="filled" fillcolor=gray]; } - 54 [label="Exit function getInt" style="filled" fillcolor=red]; + 60 [label="Exit function getInt" style="filled" fillcolor=red]; } - 53 -> {55}; + 53 -> {54}; + 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58}; - 58 -> {54}; + 57 -> {60}; + 57 -> {58} [style=dotted]; 58 -> {59} [style=dotted]; 59 -> {60} [style=dotted]; - 60 -> {54} [style=dotted]; subgraph cluster_18 { color=red 61 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 63 [label="Enter block"]; - 64 [label="Postponed enter to lambda"]; + 62 [label="Enter block"]; + 63 [label="Postponed enter to lambda"]; subgraph cluster_20 { color=blue 70 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 72 [label="Enter block"]; - 73 [label="Const: Int(1)"]; - 74 [label="Jump: ^test_3 Int(1)"]; - 75 [label="Stub" style="filled" fillcolor=gray]; - 76 [label="Exit block" style="filled" fillcolor=gray]; + 71 [label="Enter block"]; + 72 [label="Const: Int(1)"]; + 73 [label="Jump: ^test_3 Int(1)"]; + 74 [label="Stub" style="filled" fillcolor=gray]; + 75 [label="Exit block" style="filled" fillcolor=gray]; } - 71 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 76 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 65 [label="Postponed exit from lambda"]; - 66 [label="Function call: R|/getInt|(...)"]; - 67 [label="Jump: ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { + 64 [label="Postponed exit from lambda"]; + 65 [label="Function call: R|/getInt|(...)"]; + 66 [label="Jump: ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { ^test_3 Int(1) } )"]; - 68 [label="Stub" style="filled" fillcolor=gray]; - 69 [label="Exit block" style="filled" fillcolor=gray]; + 67 [label="Stub" style="filled" fillcolor=gray]; + 68 [label="Exit block" style="filled" fillcolor=gray]; } - 62 [label="Exit function test_3" style="filled" fillcolor=red]; + 69 [label="Exit function test_3" style="filled" fillcolor=red]; } - 61 -> {63}; - 63 -> {64}; - 64 -> {70}; - 64 -> {65} [color=red]; + 61 -> {62}; + 62 -> {63}; + 63 -> {70}; + 63 -> {64} [color=red]; + 64 -> {65}; 65 -> {66}; - 66 -> {67}; - 67 -> {62}; + 66 -> {69}; + 66 -> {67} [style=dotted]; 67 -> {68} [style=dotted]; 68 -> {69} [style=dotted]; - 69 -> {62} [style=dotted]; - 70 -> {71 72}; - 71 -> {65} [color=green]; - 71 -> {70} [color=green style=dashed]; + 70 -> {76 71}; + 71 -> {72}; 72 -> {73}; - 73 -> {74}; - 74 -> {62}; + 73 -> {69}; + 73 -> {74} [style=dotted]; 74 -> {75} [style=dotted]; 75 -> {76} [style=dotted]; - 76 -> {71} [style=dotted]; + 76 -> {64} [color=green]; + 76 -> {70} [color=green style=dashed]; subgraph cluster_22 { color=red 77 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 79 [label="Enter block"]; - 80 [label="Postponed enter to lambda"]; + 78 [label="Enter block"]; + 79 [label="Postponed enter to lambda"]; subgraph cluster_24 { color=blue 86 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 88 [label="Enter block"]; - 89 [label="Const: Int(1)"]; - 90 [label="Jump: ^test_4 Int(1)"]; - 91 [label="Stub" style="filled" fillcolor=gray]; - 92 [label="Exit block" style="filled" fillcolor=gray]; + 87 [label="Enter block"]; + 88 [label="Const: Int(1)"]; + 89 [label="Jump: ^test_4 Int(1)"]; + 90 [label="Stub" style="filled" fillcolor=gray]; + 91 [label="Exit block" style="filled" fillcolor=gray]; } - 87 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 92 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 81 [label="Postponed exit from lambda"]; - 82 [label="Function call: R|/getInt|(...)"]; - 83 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { + 80 [label="Postponed exit from lambda"]; + 81 [label="Function call: R|/getInt|(...)"]; + 82 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { ^test_4 Int(1) } )"]; - 84 [label="Stub" style="filled" fillcolor=gray]; - 85 [label="Exit block" style="filled" fillcolor=gray]; + 83 [label="Stub" style="filled" fillcolor=gray]; + 84 [label="Exit block" style="filled" fillcolor=gray]; } - 78 [label="Exit function test_4" style="filled" fillcolor=red]; + 85 [label="Exit function test_4" style="filled" fillcolor=red]; } - 77 -> {79}; - 79 -> {80}; - 80 -> {86}; - 80 -> {81} [color=red]; + 77 -> {78}; + 78 -> {79}; + 79 -> {86}; + 79 -> {80} [color=red]; + 80 -> {81}; 81 -> {82}; - 82 -> {83}; - 83 -> {78}; + 82 -> {85}; + 82 -> {83} [style=dotted]; 83 -> {84} [style=dotted]; 84 -> {85} [style=dotted]; - 85 -> {78} [style=dotted]; - 86 -> {87 88}; - 87 -> {81} [color=green]; - 87 -> {86} [color=green style=dashed]; + 86 -> {92 87}; + 87 -> {88}; 88 -> {89}; - 89 -> {90}; - 90 -> {78}; + 89 -> {85}; + 89 -> {90} [style=dotted]; 90 -> {91} [style=dotted]; 91 -> {92} [style=dotted]; - 92 -> {87} [style=dotted]; + 92 -> {80} [color=green]; + 92 -> {86} [color=green style=dashed]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot index 9b4872834f3..e410deaf012 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot @@ -8,158 +8,158 @@ digraph localClassesWithImplicit_kt { 0 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Function call: R|/block|.R|FakeOverride|()"]; - 4 [label="Jump: ^myRun R|/block|.R|FakeOverride|()"]; - 5 [label="Stub" style="filled" fillcolor=gray]; - 6 [label="Exit block" style="filled" fillcolor=gray]; + 1 [label="Enter block"]; + 2 [label="Function call: R|/block|.R|FakeOverride|()"]; + 3 [label="Jump: ^myRun R|/block|.R|FakeOverride|()"]; + 4 [label="Stub" style="filled" fillcolor=gray]; + 5 [label="Exit block" style="filled" fillcolor=gray]; } - 1 [label="Exit function myRun" style="filled" fillcolor=red]; + 6 [label="Exit function myRun" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {4}; - 4 -> {1}; + 3 -> {6}; + 3 -> {4} [style=dotted]; 4 -> {5} [style=dotted]; 5 -> {6} [style=dotted]; - 6 -> {1} [style=dotted]; subgraph cluster_2 { color=red 7 [label="Enter function test" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 30 [label="Enter class " style="filled" fillcolor=red]; - 29 [label="Exit class " style="filled" fillcolor=red]; + 29 [label="Enter class " style="filled" fillcolor=red]; + 30 [label="Exit class " style="filled" fillcolor=red]; } subgraph cluster_4 { color=blue - 28 [label="Enter class A" style="filled" fillcolor=red]; - 27 [label="Exit class A" style="filled" fillcolor=red]; + 27 [label="Enter class A" style="filled" fillcolor=red]; + 28 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_5 { color=blue - 9 [label="Enter block"]; + 8 [label="Enter block"]; subgraph cluster_6 { color=blue - 10 [label="Enter when"]; + 9 [label="Enter when"]; subgraph cluster_7 { color=blue - 12 [label="Enter when branch condition "]; - 13 [label="Access variable R|/a|"]; - 14 [label="Type operator: (R|/a| !is R|kotlin/String|)"]; - 15 [label="Exit when branch condition"]; + 10 [label="Enter when branch condition "]; + 11 [label="Access variable R|/a|"]; + 12 [label="Type operator: (R|/a| !is R|kotlin/String|)"]; + 13 [label="Exit when branch condition"]; } - 22 [label="Synthetic else branch"]; - 16 [label="Enter when branch result"]; + 14 [label="Synthetic else branch"]; + 15 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 17 [label="Enter block"]; - 18 [label="Jump: ^test Unit"]; - 19 [label="Stub" style="filled" fillcolor=gray]; - 20 [label="Exit block" style="filled" fillcolor=gray]; + 16 [label="Enter block"]; + 17 [label="Jump: ^test Unit"]; + 18 [label="Stub" style="filled" fillcolor=gray]; + 19 [label="Exit block" style="filled" fillcolor=gray]; } - 21 [label="Exit when branch result" style="filled" fillcolor=gray]; - 11 [label="Exit when"]; + 20 [label="Exit when branch result" style="filled" fillcolor=gray]; + 21 [label="Exit when"]; } - 23 [label="Exit local class test"]; - 24 [label="Exit anonymous object"]; - 25 [label="Variable declaration: lval x: R||"]; - 26 [label="Exit block"]; + 22 [label="Exit local class test"]; + 23 [label="Exit anonymous object"]; + 24 [label="Variable declaration: lval x: R||"]; + 25 [label="Exit block"]; } - 8 [label="Exit function test" style="filled" fillcolor=red]; + 26 [label="Exit function test" style="filled" fillcolor=red]; } - 7 -> {9}; + 7 -> {8}; + 8 -> {9}; 9 -> {10}; - 10 -> {12}; - 11 -> {23}; - 11 -> {31 34 69 87} [color=red]; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; - 14 -> {15}; - 15 -> {16 22}; + 13 -> {15 14}; + 14 -> {21}; + 15 -> {16}; 16 -> {17}; - 17 -> {18}; - 18 -> {8}; + 17 -> {26}; + 17 -> {18} [style=dotted]; 18 -> {19} [style=dotted]; 19 -> {20} [style=dotted]; 20 -> {21} [style=dotted]; - 21 -> {11} [style=dotted]; - 22 -> {11}; + 21 -> {22}; + 21 -> {31 34 69 87} [color=red]; + 22 -> {23}; + 22 -> {94 97 132 150} [color=red]; 23 -> {24}; - 23 -> {94 97 132 150} [color=red]; 24 -> {25}; 25 -> {26}; - 26 -> {8}; - 28 -> {27} [color=green]; - 30 -> {29} [color=green]; + 27 -> {28} [color=green]; + 29 -> {30} [color=green]; subgraph cluster_9 { color=red 31 [label="Enter function " style="filled" fillcolor=red]; - 33 [label="Delegated constructor call: super()"]; - 32 [label="Exit function " style="filled" fillcolor=red]; + 32 [label="Delegated constructor call: super()"]; + 33 [label="Exit function " style="filled" fillcolor=red]; } - 31 -> {33}; - 33 -> {32}; + 31 -> {32}; + 32 -> {33}; subgraph cluster_10 { color=red 34 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 36 [label="Enter block"]; - 37 [label="Postponed enter to lambda"]; + 35 [label="Enter block"]; + 36 [label="Postponed enter to lambda"]; subgraph cluster_12 { color=blue 43 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 45 [label="Enter block"]; - 46 [label="Access variable R|/a|"]; - 47 [label="Access variable R|kotlin/String.length|"]; + 44 [label="Enter block"]; + 45 [label="Access variable R|/a|"]; + 46 [label="Access variable R|kotlin/String.length|"]; subgraph cluster_14 { color=blue - 48 [label="Enter when"]; + 47 [label="Enter when"]; subgraph cluster_15 { color=blue - 50 [label="Enter when branch condition "]; - 51 [label="Access variable R|/b|"]; - 52 [label="Type operator: (R|/b| is R|kotlin/String|)"]; - 53 [label="Exit when branch condition"]; + 48 [label="Enter when branch condition "]; + 49 [label="Access variable R|/b|"]; + 50 [label="Type operator: (R|/b| is R|kotlin/String|)"]; + 51 [label="Exit when branch condition"]; } subgraph cluster_16 { color=blue - 61 [label="Enter when branch condition else"]; - 62 [label="Exit when branch condition"]; + 52 [label="Enter when branch condition else"]; + 53 [label="Exit when branch condition"]; } - 63 [label="Enter when branch result"]; + 54 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 64 [label="Enter block"]; - 65 [label="Const: Int(1)"]; - 66 [label="Exit block"]; + 55 [label="Enter block"]; + 56 [label="Const: Int(1)"]; + 57 [label="Exit block"]; } - 67 [label="Exit when branch result"]; - 54 [label="Enter when branch result"]; + 58 [label="Exit when branch result"]; + 59 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 55 [label="Enter block"]; - 56 [label="Access variable R|/b|"]; - 57 [label="Access variable R|kotlin/String.length|"]; - 58 [label="Function call: this@R|/A|.R|/A.bar|()"]; - 59 [label="Exit block"]; + 60 [label="Enter block"]; + 61 [label="Access variable R|/b|"]; + 62 [label="Access variable R|kotlin/String.length|"]; + 63 [label="Function call: this@R|/A|.R|/A.bar|()"]; + 64 [label="Exit block"]; } - 60 [label="Exit when branch result"]; - 49 [label="Exit when"]; + 65 [label="Exit when branch result"]; + 66 [label="Exit when"]; } - 68 [label="Exit block"]; + 67 [label="Exit block"]; } - 44 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 68 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 38 [label="Postponed exit from lambda"]; - 39 [label="Function call: R|/myRun|(...)"]; - 40 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 37 [label="Postponed exit from lambda"]; + 38 [label="Function call: R|/myRun|(...)"]; + 39 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -173,192 +173,192 @@ digraph localClassesWithImplicit_kt { } )"]; - 41 [label="Stub" style="filled" fillcolor=gray]; - 42 [label="Exit block" style="filled" fillcolor=gray]; + 40 [label="Stub" style="filled" fillcolor=gray]; + 41 [label="Exit block" style="filled" fillcolor=gray]; } - 35 [label="Exit function foo" style="filled" fillcolor=red]; + 42 [label="Exit function foo" style="filled" fillcolor=red]; } - 34 -> {36}; - 36 -> {37}; - 37 -> {43}; - 37 -> {38} [color=red]; + 34 -> {35}; + 35 -> {36}; + 36 -> {43}; + 36 -> {37} [color=red]; + 37 -> {38}; 38 -> {39}; - 39 -> {40}; - 40 -> {35}; + 39 -> {42}; + 39 -> {40} [style=dotted]; 40 -> {41} [style=dotted]; 41 -> {42} [style=dotted]; - 42 -> {35} [style=dotted]; - 43 -> {44 45}; - 44 -> {38} [color=green]; - 44 -> {43} [color=green style=dashed]; + 43 -> {68 44}; + 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {50}; - 49 -> {68}; + 48 -> {49}; + 49 -> {50}; 50 -> {51}; - 51 -> {52}; + 51 -> {59 52}; 52 -> {53}; - 53 -> {54 61}; + 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {59}; + 58 -> {66}; 59 -> {60}; - 60 -> {49}; + 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {49}; - 68 -> {44}; + 67 -> {68}; + 68 -> {37} [color=green]; + 68 -> {43} [color=green style=dashed]; subgraph cluster_19 { color=red 69 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_20 { color=blue - 71 [label="Enter block"]; - 72 [label="Postponed enter to lambda"]; + 70 [label="Enter block"]; + 71 [label="Postponed enter to lambda"]; subgraph cluster_21 { color=blue 78 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_22 { color=blue - 80 [label="Enter block"]; - 81 [label="Access variable R|/b|"]; - 82 [label="Access variable #"]; - 83 [label="Access variable R|/a|"]; - 84 [label="Access variable R|kotlin/String.length|"]; - 85 [label="Function call: this@R|/A|.R|/A.baz|()"]; - 86 [label="Exit block"]; + 79 [label="Enter block"]; + 80 [label="Access variable R|/b|"]; + 81 [label="Access variable #"]; + 82 [label="Access variable R|/a|"]; + 83 [label="Access variable R|kotlin/String.length|"]; + 84 [label="Function call: this@R|/A|.R|/A.baz|()"]; + 85 [label="Exit block"]; } - 79 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 86 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 73 [label="Postponed exit from lambda"]; - 74 [label="Function call: R|/myRun|(...)"]; - 75 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 72 [label="Postponed exit from lambda"]; + 73 [label="Function call: R|/myRun|(...)"]; + 74 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/b|.# R|/a|.R|kotlin/String.length| ^ this@R|/A|.R|/A.baz|() } )"]; - 76 [label="Stub" style="filled" fillcolor=gray]; - 77 [label="Exit block" style="filled" fillcolor=gray]; + 75 [label="Stub" style="filled" fillcolor=gray]; + 76 [label="Exit block" style="filled" fillcolor=gray]; } - 70 [label="Exit function bar" style="filled" fillcolor=red]; + 77 [label="Exit function bar" style="filled" fillcolor=red]; } - 69 -> {71}; - 71 -> {72}; - 72 -> {78}; - 72 -> {73} [color=red]; + 69 -> {70}; + 70 -> {71}; + 71 -> {78}; + 71 -> {72} [color=red]; + 72 -> {73}; 73 -> {74}; - 74 -> {75}; - 75 -> {70}; + 74 -> {77}; + 74 -> {75} [style=dotted]; 75 -> {76} [style=dotted]; 76 -> {77} [style=dotted]; - 77 -> {70} [style=dotted]; - 78 -> {79 80}; - 79 -> {73} [color=green]; - 79 -> {78} [color=green style=dashed]; + 78 -> {86 79}; + 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; - 86 -> {79}; + 86 -> {72} [color=green]; + 86 -> {78} [color=green style=dashed]; subgraph cluster_23 { color=red 87 [label="Enter function baz" style="filled" fillcolor=red]; subgraph cluster_24 { color=blue - 89 [label="Enter block"]; - 90 [label="Const: Int(1)"]; - 91 [label="Jump: ^baz Int(1)"]; - 92 [label="Stub" style="filled" fillcolor=gray]; - 93 [label="Exit block" style="filled" fillcolor=gray]; + 88 [label="Enter block"]; + 89 [label="Const: Int(1)"]; + 90 [label="Jump: ^baz Int(1)"]; + 91 [label="Stub" style="filled" fillcolor=gray]; + 92 [label="Exit block" style="filled" fillcolor=gray]; } - 88 [label="Exit function baz" style="filled" fillcolor=red]; + 93 [label="Exit function baz" style="filled" fillcolor=red]; } - 87 -> {89}; + 87 -> {88}; + 88 -> {89}; 89 -> {90}; - 90 -> {91}; - 91 -> {88}; + 90 -> {93}; + 90 -> {91} [style=dotted]; 91 -> {92} [style=dotted]; 92 -> {93} [style=dotted]; - 93 -> {88} [style=dotted]; subgraph cluster_25 { color=red 94 [label="Enter function " style="filled" fillcolor=red]; - 96 [label="Delegated constructor call: super()"]; - 95 [label="Exit function " style="filled" fillcolor=red]; + 95 [label="Delegated constructor call: super()"]; + 96 [label="Exit function " style="filled" fillcolor=red]; } - 94 -> {96}; - 96 -> {95}; + 94 -> {95}; + 95 -> {96}; subgraph cluster_26 { color=red 97 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_27 { color=blue - 99 [label="Enter block"]; - 100 [label="Postponed enter to lambda"]; + 98 [label="Enter block"]; + 99 [label="Postponed enter to lambda"]; subgraph cluster_28 { color=blue 106 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_29 { color=blue - 108 [label="Enter block"]; - 109 [label="Access variable R|/a|"]; - 110 [label="Access variable R|kotlin/String.length|"]; + 107 [label="Enter block"]; + 108 [label="Access variable R|/a|"]; + 109 [label="Access variable R|kotlin/String.length|"]; subgraph cluster_30 { color=blue - 111 [label="Enter when"]; + 110 [label="Enter when"]; subgraph cluster_31 { color=blue - 113 [label="Enter when branch condition "]; - 114 [label="Access variable R|/b|"]; - 115 [label="Type operator: (R|/b| is R|kotlin/String|)"]; - 116 [label="Exit when branch condition"]; + 111 [label="Enter when branch condition "]; + 112 [label="Access variable R|/b|"]; + 113 [label="Type operator: (R|/b| is R|kotlin/String|)"]; + 114 [label="Exit when branch condition"]; } subgraph cluster_32 { color=blue - 124 [label="Enter when branch condition else"]; - 125 [label="Exit when branch condition"]; + 115 [label="Enter when branch condition else"]; + 116 [label="Exit when branch condition"]; } - 126 [label="Enter when branch result"]; + 117 [label="Enter when branch result"]; subgraph cluster_33 { color=blue - 127 [label="Enter block"]; - 128 [label="Const: Int(1)"]; - 129 [label="Exit block"]; + 118 [label="Enter block"]; + 119 [label="Const: Int(1)"]; + 120 [label="Exit block"]; } - 130 [label="Exit when branch result"]; - 117 [label="Enter when branch result"]; + 121 [label="Exit when branch result"]; + 122 [label="Enter when branch result"]; subgraph cluster_34 { color=blue - 118 [label="Enter block"]; - 119 [label="Access variable R|/b|"]; - 120 [label="Access variable R|kotlin/String.length|"]; - 121 [label="Function call: this@R|/|.R|/.bar|()"]; - 122 [label="Exit block"]; + 123 [label="Enter block"]; + 124 [label="Access variable R|/b|"]; + 125 [label="Access variable R|kotlin/String.length|"]; + 126 [label="Function call: this@R|/|.R|/.bar|()"]; + 127 [label="Exit block"]; } - 123 [label="Exit when branch result"]; - 112 [label="Exit when"]; + 128 [label="Exit when branch result"]; + 129 [label="Exit when"]; } - 131 [label="Exit block"]; + 130 [label="Exit block"]; } - 107 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 131 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 101 [label="Postponed exit from lambda"]; - 102 [label="Function call: R|/myRun|(...)"]; - 103 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 100 [label="Postponed exit from lambda"]; + 101 [label="Function call: R|/myRun|(...)"]; + 102 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -372,124 +372,124 @@ digraph localClassesWithImplicit_kt { } )"]; - 104 [label="Stub" style="filled" fillcolor=gray]; - 105 [label="Exit block" style="filled" fillcolor=gray]; + 103 [label="Stub" style="filled" fillcolor=gray]; + 104 [label="Exit block" style="filled" fillcolor=gray]; } - 98 [label="Exit function foo" style="filled" fillcolor=red]; + 105 [label="Exit function foo" style="filled" fillcolor=red]; } - 97 -> {99}; - 99 -> {100}; - 100 -> {106}; - 100 -> {101} [color=red]; + 97 -> {98}; + 98 -> {99}; + 99 -> {106}; + 99 -> {100} [color=red]; + 100 -> {101}; 101 -> {102}; - 102 -> {103}; - 103 -> {98}; + 102 -> {105}; + 102 -> {103} [style=dotted]; 103 -> {104} [style=dotted]; 104 -> {105} [style=dotted]; - 105 -> {98} [style=dotted]; - 106 -> {107 108}; - 107 -> {101} [color=green]; - 107 -> {106} [color=green style=dashed]; + 106 -> {131 107}; + 107 -> {108}; 108 -> {109}; 109 -> {110}; 110 -> {111}; - 111 -> {113}; - 112 -> {131}; + 111 -> {112}; + 112 -> {113}; 113 -> {114}; - 114 -> {115}; + 114 -> {122 115}; 115 -> {116}; - 116 -> {117 124}; + 116 -> {117}; 117 -> {118}; 118 -> {119}; 119 -> {120}; 120 -> {121}; - 121 -> {122}; + 121 -> {129}; 122 -> {123}; - 123 -> {112}; + 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; 129 -> {130}; - 130 -> {112}; - 131 -> {107}; + 130 -> {131}; + 131 -> {100} [color=green]; + 131 -> {106} [color=green style=dashed]; subgraph cluster_35 { color=red 132 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_36 { color=blue - 134 [label="Enter block"]; - 135 [label="Postponed enter to lambda"]; + 133 [label="Enter block"]; + 134 [label="Postponed enter to lambda"]; subgraph cluster_37 { color=blue 141 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_38 { color=blue - 143 [label="Enter block"]; - 144 [label="Access variable R|/a|"]; - 145 [label="Access variable R|kotlin/String.length|"]; - 146 [label="Access variable R|/b|"]; - 147 [label="Access variable #"]; - 148 [label="Function call: this@R|/|.R|/.baz|()"]; - 149 [label="Exit block"]; + 142 [label="Enter block"]; + 143 [label="Access variable R|/a|"]; + 144 [label="Access variable R|kotlin/String.length|"]; + 145 [label="Access variable R|/b|"]; + 146 [label="Access variable #"]; + 147 [label="Function call: this@R|/|.R|/.baz|()"]; + 148 [label="Exit block"]; } - 142 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 149 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 136 [label="Postponed exit from lambda"]; - 137 [label="Function call: R|/myRun|(...)"]; - 138 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 135 [label="Postponed exit from lambda"]; + 136 [label="Function call: R|/myRun|(...)"]; + 137 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| R|/b|.# ^ this@R|/|.R|/.baz|() } )"]; - 139 [label="Stub" style="filled" fillcolor=gray]; - 140 [label="Exit block" style="filled" fillcolor=gray]; + 138 [label="Stub" style="filled" fillcolor=gray]; + 139 [label="Exit block" style="filled" fillcolor=gray]; } - 133 [label="Exit function bar" style="filled" fillcolor=red]; + 140 [label="Exit function bar" style="filled" fillcolor=red]; } - 132 -> {134}; - 134 -> {135}; - 135 -> {141}; - 135 -> {136} [color=red]; + 132 -> {133}; + 133 -> {134}; + 134 -> {141}; + 134 -> {135} [color=red]; + 135 -> {136}; 136 -> {137}; - 137 -> {138}; - 138 -> {133}; + 137 -> {140}; + 137 -> {138} [style=dotted]; 138 -> {139} [style=dotted]; 139 -> {140} [style=dotted]; - 140 -> {133} [style=dotted]; - 141 -> {142 143}; - 142 -> {136} [color=green]; - 142 -> {141} [color=green style=dashed]; + 141 -> {149 142}; + 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; 147 -> {148}; 148 -> {149}; - 149 -> {142}; + 149 -> {135} [color=green]; + 149 -> {141} [color=green style=dashed]; subgraph cluster_39 { color=red 150 [label="Enter function baz" style="filled" fillcolor=red]; subgraph cluster_40 { color=blue - 152 [label="Enter block"]; - 153 [label="Const: Int(1)"]; - 154 [label="Jump: ^baz Int(1)"]; - 155 [label="Stub" style="filled" fillcolor=gray]; - 156 [label="Exit block" style="filled" fillcolor=gray]; + 151 [label="Enter block"]; + 152 [label="Const: Int(1)"]; + 153 [label="Jump: ^baz Int(1)"]; + 154 [label="Stub" style="filled" fillcolor=gray]; + 155 [label="Exit block" style="filled" fillcolor=gray]; } - 151 [label="Exit function baz" style="filled" fillcolor=red]; + 156 [label="Exit function baz" style="filled" fillcolor=red]; } - 150 -> {152}; + 150 -> {151}; + 151 -> {152}; 152 -> {153}; - 153 -> {154}; - 154 -> {151}; + 153 -> {156}; + 153 -> {154} [style=dotted]; 154 -> {155} [style=dotted]; 155 -> {156} [style=dotted]; - 156 -> {151} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot index 1c938991406..64898d2e32b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot @@ -8,95 +8,96 @@ digraph loops_kt { 0 [label="Enter function testWhile" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Enter while loop"]; + 2 [label="Enter while loop"]; subgraph cluster_3 { color=blue - 5 [label="Enter loop condition"]; - 6 [label="Access variable R|/b|"]; - 7 [label="Exit loop condition"]; + 3 [label="Enter loop condition"]; + 4 [label="Access variable R|/b|"]; + 5 [label="Exit loop condition"]; } subgraph cluster_4 { color=blue - 8 [label="Enter loop block"]; + 6 [label="Enter loop block"]; subgraph cluster_5 { color=blue - 9 [label="Enter block"]; - 10 [label="Access variable R|/x|"]; - 11 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 12 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; - 13 [label="Exit block"]; + 7 [label="Enter block"]; + 8 [label="Access variable R|/x|"]; + 9 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 10 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; + 11 [label="Exit block"]; } - 14 [label="Exit loop block"]; + 12 [label="Exit loop block"]; } - 4 [label="Exit whileloop"]; + 13 [label="Exit whileloop"]; } - 15 [label="Access variable R|/x|"]; - 16 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 17 [label="Exit block"]; + 14 [label="Access variable R|/x|"]; + 15 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 16 [label="Exit block"]; } - 1 [label="Exit function testWhile" style="filled" fillcolor=red]; + 17 [label="Exit function testWhile" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {15}; - 5 -> {6}; + 3 -> {4}; + 4 -> {5}; + 5 -> {13 6}; 6 -> {7}; - 7 -> {4 8}; + 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {13}; + 12 -> {3} [color=green style=dashed]; 13 -> {14}; - 14 -> {5} [color=green style=dashed]; + 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {1}; subgraph cluster_6 { color=red 18 [label="Enter function testDoWhile" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 20 [label="Enter block"]; + 19 [label="Enter block"]; subgraph cluster_8 { color=blue - 21 [label="Enter do-while loop"]; + 20 [label="Enter do-while loop"]; subgraph cluster_9 { color=blue - 23 [label="Enter loop block"]; + 21 [label="Enter loop block"]; subgraph cluster_10 { color=blue - 24 [label="Enter block"]; - 25 [label="Access variable R|/x|"]; - 26 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 27 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; - 28 [label="Exit block"]; + 22 [label="Enter block"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 25 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; + 26 [label="Exit block"]; } - 29 [label="Exit loop block"]; + 27 [label="Exit loop block"]; } subgraph cluster_11 { color=blue - 30 [label="Enter loop condition"]; - 31 [label="Access variable R|/b|"]; - 32 [label="Exit loop condition"]; + 28 [label="Enter loop condition"]; + 29 [label="Access variable R|/b|"]; + 30 [label="Exit loop condition"]; } - 22 [label="Exit do-whileloop"]; + 31 [label="Exit do-whileloop"]; } - 33 [label="Access variable R|/x|"]; - 34 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 35 [label="Exit block"]; + 32 [label="Access variable R|/x|"]; + 33 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 34 [label="Exit block"]; } - 19 [label="Exit function testDoWhile" style="filled" fillcolor=red]; + 35 [label="Exit function testDoWhile" style="filled" fillcolor=red]; } - 18 -> {20}; + 18 -> {19}; + 19 -> {20}; 20 -> {21}; - 21 -> {23}; - 22 -> {33}; + 21 -> {22}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; @@ -105,71 +106,71 @@ digraph loops_kt { 28 -> {29}; 29 -> {30}; 30 -> {31}; + 30 -> {21} [color=green style=dashed]; 31 -> {32}; - 32 -> {22}; - 32 -> {23} [color=green style=dashed]; + 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {19}; subgraph cluster_12 { color=red 36 [label="Enter function testFor" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 38 [label="Enter block"]; - 39 [label="Const: Int(0)"]; - 40 [label="Const: Int(5)"]; - 41 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"]; - 42 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"]; - 43 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; + 37 [label="Enter block"]; + 38 [label="Const: Int(0)"]; + 39 [label="Const: Int(5)"]; + 40 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"]; + 41 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"]; + 42 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; subgraph cluster_14 { color=blue - 44 [label="Enter while loop"]; + 43 [label="Enter while loop"]; subgraph cluster_15 { color=blue - 46 [label="Enter loop condition"]; - 47 [label="Access variable R|/|"]; - 48 [label="Function call: R|/|.R|kotlin/collections/Iterator.hasNext|()"]; - 49 [label="Exit loop condition"]; + 44 [label="Enter loop condition"]; + 45 [label="Access variable R|/|"]; + 46 [label="Function call: R|/|.R|kotlin/collections/Iterator.hasNext|()"]; + 47 [label="Exit loop condition"]; } subgraph cluster_16 { color=blue - 50 [label="Enter loop block"]; + 48 [label="Enter loop block"]; subgraph cluster_17 { color=blue - 51 [label="Enter block"]; - 52 [label="Access variable R|/|"]; - 53 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()"]; - 54 [label="Variable declaration: lval i: R|kotlin/Int|"]; - 55 [label="Access variable R|/x|"]; - 56 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 57 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; - 58 [label="Exit block"]; + 49 [label="Enter block"]; + 50 [label="Access variable R|/|"]; + 51 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()"]; + 52 [label="Variable declaration: lval i: R|kotlin/Int|"]; + 53 [label="Access variable R|/x|"]; + 54 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 55 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; + 56 [label="Exit block"]; } - 59 [label="Exit loop block"]; + 57 [label="Exit loop block"]; } - 45 [label="Exit whileloop"]; + 58 [label="Exit whileloop"]; } - 60 [label="Access variable R|/x|"]; - 61 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 62 [label="Exit block"]; + 59 [label="Access variable R|/x|"]; + 60 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 61 [label="Exit block"]; } - 37 [label="Exit function testFor" style="filled" fillcolor=red]; + 62 [label="Exit function testFor" style="filled" fillcolor=red]; } - 36 -> {38}; + 36 -> {37}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {46}; - 45 -> {60}; + 44 -> {45}; + 45 -> {46}; 46 -> {47}; - 47 -> {48}; + 47 -> {58 48}; 48 -> {49}; - 49 -> {45 50}; + 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; @@ -177,369 +178,368 @@ digraph loops_kt { 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58}; + 57 -> {44} [color=green style=dashed]; 58 -> {59}; - 59 -> {46} [color=green style=dashed]; + 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {37}; subgraph cluster_18 { color=red 63 [label="Enter function testWhileTrue" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 65 [label="Enter block"]; + 64 [label="Enter block"]; subgraph cluster_20 { color=blue - 66 [label="Enter while loop"]; + 65 [label="Enter while loop"]; subgraph cluster_21 { color=blue - 68 [label="Enter loop condition"]; - 69 [label="Const: Boolean(true)"]; - 70 [label="Exit loop condition"]; + 66 [label="Enter loop condition"]; + 67 [label="Const: Boolean(true)"]; + 68 [label="Exit loop condition"]; } subgraph cluster_22 { color=blue - 71 [label="Enter loop block"]; + 69 [label="Enter loop block"]; subgraph cluster_23 { color=blue - 72 [label="Enter block"]; - 73 [label="Const: Int(1)"]; - 74 [label="Exit block"]; + 70 [label="Enter block"]; + 71 [label="Const: Int(1)"]; + 72 [label="Exit block"]; } - 75 [label="Exit loop block"]; + 73 [label="Exit loop block"]; } - 67 [label="Exit whileloop" style="filled" fillcolor=gray]; + 74 [label="Exit whileloop" style="filled" fillcolor=gray]; } - 76 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 77 [label="Exit block" style="filled" fillcolor=gray]; + 75 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 76 [label="Exit block" style="filled" fillcolor=gray]; } - 64 [label="Exit function testWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray]; + 77 [label="Exit function testWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray]; } - 63 -> {65}; + 63 -> {64}; + 64 -> {65}; 65 -> {66}; - 66 -> {68}; - 67 -> {76} [style=dotted]; + 66 -> {67}; + 67 -> {68}; 68 -> {69}; + 68 -> {74} [style=dotted]; 69 -> {70}; 70 -> {71}; - 70 -> {67} [style=dotted]; 71 -> {72}; 72 -> {73}; - 73 -> {74}; - 74 -> {75}; - 75 -> {68} [color=green style=dashed]; + 73 -> {66} [color=green style=dashed]; + 74 -> {75} [style=dotted]; + 75 -> {76} [style=dotted]; 76 -> {77} [style=dotted]; - 77 -> {64} [style=dotted]; subgraph cluster_24 { color=red 78 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 80 [label="Enter block"]; + 79 [label="Enter block"]; subgraph cluster_26 { color=blue - 81 [label="Enter while loop"]; + 80 [label="Enter while loop"]; subgraph cluster_27 { color=blue - 83 [label="Enter loop condition"]; - 84 [label="Const: Boolean(true)"]; - 85 [label="Exit loop condition"]; + 81 [label="Enter loop condition"]; + 82 [label="Const: Boolean(true)"]; + 83 [label="Exit loop condition"]; } subgraph cluster_28 { color=blue - 86 [label="Enter loop block"]; + 84 [label="Enter loop block"]; subgraph cluster_29 { color=blue - 87 [label="Enter block"]; + 85 [label="Enter block"]; subgraph cluster_30 { color=blue - 88 [label="Enter when"]; + 86 [label="Enter when"]; subgraph cluster_31 { color=blue - 90 [label="Enter when branch condition "]; - 91 [label="Access variable R|/b|"]; - 92 [label="Exit when branch condition"]; + 87 [label="Enter when branch condition "]; + 88 [label="Access variable R|/b|"]; + 89 [label="Exit when branch condition"]; } - 99 [label="Synthetic else branch"]; - 93 [label="Enter when branch result"]; + 90 [label="Synthetic else branch"]; + 91 [label="Enter when branch result"]; subgraph cluster_32 { color=blue - 94 [label="Enter block"]; - 95 [label="Jump: break@@@[Boolean(true)] "]; - 96 [label="Stub" style="filled" fillcolor=gray]; - 97 [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]; } - 98 [label="Exit when branch result" style="filled" fillcolor=gray]; - 89 [label="Exit when"]; + 96 [label="Exit when branch result" style="filled" fillcolor=gray]; + 97 [label="Exit when"]; } - 100 [label="Exit block"]; + 98 [label="Exit block"]; } - 101 [label="Exit loop block"]; + 99 [label="Exit loop block"]; } - 82 [label="Exit whileloop"]; + 100 [label="Exit whileloop"]; } - 102 [label="Const: Int(1)"]; - 103 [label="Exit block"]; + 101 [label="Const: Int(1)"]; + 102 [label="Exit block"]; } - 79 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red]; + 103 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red]; } - 78 -> {80}; + 78 -> {79}; + 79 -> {80}; 80 -> {81}; - 81 -> {83}; - 82 -> {102}; + 81 -> {82}; + 82 -> {83}; 83 -> {84}; + 83 -> {100} [style=dotted]; 84 -> {85}; 85 -> {86}; - 85 -> {82} [style=dotted]; 86 -> {87}; 87 -> {88}; - 88 -> {90}; - 89 -> {100}; - 90 -> {91}; + 88 -> {89}; + 89 -> {91 90}; + 90 -> {97}; 91 -> {92}; - 92 -> {93 99}; - 93 -> {94}; - 94 -> {95}; - 95 -> {82}; + 92 -> {93}; + 93 -> {100}; + 93 -> {94} [style=dotted]; + 94 -> {95} [style=dotted]; 95 -> {96} [style=dotted]; 96 -> {97} [style=dotted]; - 97 -> {98} [style=dotted]; - 98 -> {89} [style=dotted]; - 99 -> {89}; + 97 -> {98}; + 98 -> {99}; + 99 -> {81} [color=green style=dashed]; 100 -> {101}; - 101 -> {83} [color=green style=dashed]; + 101 -> {102}; 102 -> {103}; - 103 -> {79}; subgraph cluster_33 { color=red 104 [label="Enter function testWhileFalse" style="filled" fillcolor=red]; subgraph cluster_34 { color=blue - 106 [label="Enter block"]; + 105 [label="Enter block"]; subgraph cluster_35 { color=blue - 107 [label="Enter while loop"]; + 106 [label="Enter while loop"]; subgraph cluster_36 { color=blue - 109 [label="Enter loop condition"]; - 110 [label="Const: Boolean(false)"]; - 111 [label="Exit loop condition"]; + 107 [label="Enter loop condition"]; + 108 [label="Const: Boolean(false)"]; + 109 [label="Exit loop condition"]; } subgraph cluster_37 { color=blue - 112 [label="Enter loop block" style="filled" fillcolor=gray]; + 110 [label="Enter loop block" style="filled" fillcolor=gray]; subgraph cluster_38 { color=blue - 113 [label="Enter block" style="filled" fillcolor=gray]; - 114 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 115 [label="Exit block" style="filled" fillcolor=gray]; + 111 [label="Enter block" style="filled" fillcolor=gray]; + 112 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 113 [label="Exit block" style="filled" fillcolor=gray]; } - 116 [label="Exit loop block" style="filled" fillcolor=gray]; + 114 [label="Exit loop block" style="filled" fillcolor=gray]; } - 108 [label="Exit whileloop"]; + 115 [label="Exit whileloop"]; } - 117 [label="Const: Int(1)"]; - 118 [label="Exit block"]; + 116 [label="Const: Int(1)"]; + 117 [label="Exit block"]; } - 105 [label="Exit function testWhileFalse" style="filled" fillcolor=red]; + 118 [label="Exit function testWhileFalse" style="filled" fillcolor=red]; } - 104 -> {106}; + 104 -> {105}; + 105 -> {106}; 106 -> {107}; - 107 -> {109}; - 108 -> {117}; - 109 -> {110}; - 110 -> {111}; - 111 -> {108}; + 107 -> {108}; + 108 -> {109}; + 109 -> {115}; + 109 -> {110} [style=dotted]; + 110 -> {111} [style=dotted]; 111 -> {112} [style=dotted]; 112 -> {113} [style=dotted]; 113 -> {114} [style=dotted]; - 114 -> {115} [style=dotted]; - 115 -> {116} [style=dotted]; - 116 -> {109} [color=green style=dotted]; + 114 -> {107} [color=green style=dotted]; + 115 -> {116}; + 116 -> {117}; 117 -> {118}; - 118 -> {105}; subgraph cluster_39 { color=red 119 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red]; subgraph cluster_40 { color=blue - 121 [label="Enter block"]; + 120 [label="Enter block"]; subgraph cluster_41 { color=blue - 122 [label="Enter do-while loop"]; + 121 [label="Enter do-while loop"]; subgraph cluster_42 { color=blue - 124 [label="Enter loop block"]; + 122 [label="Enter loop block"]; subgraph cluster_43 { color=blue - 125 [label="Enter block"]; - 126 [label="Const: Int(1)"]; - 127 [label="Exit block"]; + 123 [label="Enter block"]; + 124 [label="Const: Int(1)"]; + 125 [label="Exit block"]; } - 128 [label="Exit loop block"]; + 126 [label="Exit loop block"]; } subgraph cluster_44 { color=blue - 129 [label="Enter loop condition"]; - 130 [label="Const: Boolean(true)"]; - 131 [label="Exit loop condition"]; + 127 [label="Enter loop condition"]; + 128 [label="Const: Boolean(true)"]; + 129 [label="Exit loop condition"]; } - 123 [label="Exit do-whileloop" style="filled" fillcolor=gray]; + 130 [label="Exit do-whileloop" style="filled" fillcolor=gray]; } - 132 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 133 [label="Exit block" style="filled" fillcolor=gray]; + 131 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 132 [label="Exit block" style="filled" fillcolor=gray]; } - 120 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray]; + 133 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray]; } - 119 -> {121}; + 119 -> {120}; + 120 -> {121}; 121 -> {122}; - 122 -> {124}; - 123 -> {132} [style=dotted]; + 122 -> {123}; + 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; - 129 -> {130}; - 130 -> {131}; - 131 -> {123} [style=dotted]; - 131 -> {124} [color=green style=dashed]; + 129 -> {130} [style=dotted]; + 129 -> {122} [color=green style=dashed]; + 130 -> {131} [style=dotted]; + 131 -> {132} [style=dotted]; 132 -> {133} [style=dotted]; - 133 -> {120} [style=dotted]; subgraph cluster_45 { color=red 134 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; subgraph cluster_46 { color=blue - 136 [label="Enter block"]; + 135 [label="Enter block"]; subgraph cluster_47 { color=blue - 137 [label="Enter do-while loop"]; + 136 [label="Enter do-while loop"]; subgraph cluster_48 { color=blue - 139 [label="Enter loop block"]; + 137 [label="Enter loop block"]; subgraph cluster_49 { color=blue - 140 [label="Enter block"]; + 138 [label="Enter block"]; subgraph cluster_50 { color=blue - 141 [label="Enter when"]; + 139 [label="Enter when"]; subgraph cluster_51 { color=blue - 143 [label="Enter when branch condition "]; - 144 [label="Access variable R|/b|"]; - 145 [label="Exit when branch condition"]; + 140 [label="Enter when branch condition "]; + 141 [label="Access variable R|/b|"]; + 142 [label="Exit when branch condition"]; } - 152 [label="Synthetic else branch"]; - 146 [label="Enter when branch result"]; + 143 [label="Synthetic else branch"]; + 144 [label="Enter when branch result"]; subgraph cluster_52 { color=blue - 147 [label="Enter block"]; - 148 [label="Jump: break@@@[Boolean(true)] "]; - 149 [label="Stub" style="filled" fillcolor=gray]; - 150 [label="Exit block" style="filled" fillcolor=gray]; + 145 [label="Enter block"]; + 146 [label="Jump: break@@@[Boolean(true)] "]; + 147 [label="Stub" style="filled" fillcolor=gray]; + 148 [label="Exit block" style="filled" fillcolor=gray]; } - 151 [label="Exit when branch result" style="filled" fillcolor=gray]; - 142 [label="Exit when"]; + 149 [label="Exit when branch result" style="filled" fillcolor=gray]; + 150 [label="Exit when"]; } - 153 [label="Exit block"]; + 151 [label="Exit block"]; } - 154 [label="Exit loop block"]; + 152 [label="Exit loop block"]; } subgraph cluster_53 { color=blue - 155 [label="Enter loop condition"]; - 156 [label="Const: Boolean(true)"]; - 157 [label="Exit loop condition"]; + 153 [label="Enter loop condition"]; + 154 [label="Const: Boolean(true)"]; + 155 [label="Exit loop condition"]; } - 138 [label="Exit do-whileloop"]; + 156 [label="Exit do-whileloop"]; } - 158 [label="Const: Int(1)"]; - 159 [label="Exit block"]; + 157 [label="Const: Int(1)"]; + 158 [label="Exit block"]; } - 135 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; + 159 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; } - 134 -> {136}; + 134 -> {135}; + 135 -> {136}; 136 -> {137}; - 137 -> {139}; - 138 -> {158}; + 137 -> {138}; + 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {143}; - 142 -> {153}; - 143 -> {144}; + 141 -> {142}; + 142 -> {144 143}; + 143 -> {150}; 144 -> {145}; - 145 -> {146 152}; - 146 -> {147}; - 147 -> {148}; - 148 -> {138}; + 145 -> {146}; + 146 -> {156}; + 146 -> {147} [style=dotted]; + 147 -> {148} [style=dotted]; 148 -> {149} [style=dotted]; 149 -> {150} [style=dotted]; - 150 -> {151} [style=dotted]; - 151 -> {142} [style=dotted]; - 152 -> {142}; + 150 -> {151}; + 151 -> {152}; + 152 -> {153}; 153 -> {154}; 154 -> {155}; - 155 -> {156}; + 155 -> {156} [style=dotted]; + 155 -> {137} [color=green style=dashed]; 156 -> {157}; - 157 -> {138} [style=dotted]; - 157 -> {139} [color=green style=dashed]; + 157 -> {158}; 158 -> {159}; - 159 -> {135}; subgraph cluster_54 { color=red 160 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red]; subgraph cluster_55 { color=blue - 162 [label="Enter block"]; + 161 [label="Enter block"]; subgraph cluster_56 { color=blue - 163 [label="Enter do-while loop"]; + 162 [label="Enter do-while loop"]; subgraph cluster_57 { color=blue - 165 [label="Enter loop block"]; + 163 [label="Enter loop block"]; subgraph cluster_58 { color=blue - 166 [label="Enter block"]; - 167 [label="Const: Int(1)"]; - 168 [label="Exit block"]; + 164 [label="Enter block"]; + 165 [label="Const: Int(1)"]; + 166 [label="Exit block"]; } - 169 [label="Exit loop block"]; + 167 [label="Exit loop block"]; } subgraph cluster_59 { color=blue - 170 [label="Enter loop condition"]; - 171 [label="Const: Boolean(false)"]; - 172 [label="Exit loop condition"]; + 168 [label="Enter loop condition"]; + 169 [label="Const: Boolean(false)"]; + 170 [label="Exit loop condition"]; } - 164 [label="Exit do-whileloop"]; + 171 [label="Exit do-whileloop"]; } - 173 [label="Const: Int(1)"]; - 174 [label="Exit block"]; + 172 [label="Const: Int(1)"]; + 173 [label="Exit block"]; } - 161 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red]; + 174 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red]; } - 160 -> {162}; + 160 -> {161}; + 161 -> {162}; 162 -> {163}; - 163 -> {165}; - 164 -> {173}; + 163 -> {164}; + 164 -> {165}; 165 -> {166}; 166 -> {167}; 167 -> {168}; 168 -> {169}; 169 -> {170}; 170 -> {171}; + 170 -> {163} [color=green style=dotted]; 171 -> {172}; - 172 -> {164}; - 172 -> {165} [color=green style=dotted]; + 172 -> {173}; 173 -> {174}; - 174 -> {161}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot index 32c673b832f..3fbad3a172f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot @@ -6,72 +6,72 @@ digraph postponedLambdaInConstructor_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red - 4 [label="Enter class A" style="filled" fillcolor=red]; - 3 [label="Exit class A" style="filled" fillcolor=red]; + 3 [label="Enter class A" style="filled" fillcolor=red]; + 4 [label="Exit class A" style="filled" fillcolor=red]; } - 4 -> {3} [color=green]; + 3 -> {4} [color=green]; subgraph cluster_2 { color=red 5 [label="Enter function " style="filled" fillcolor=red]; - 7 [label="Access variable R|/s|"]; - 8 [label="Postponed enter to lambda"]; + 6 [label="Access variable R|/s|"]; + 7 [label="Postponed enter to lambda"]; subgraph cluster_3 { color=blue 13 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 15 [label="Enter block"]; - 16 [label="Postponed enter to lambda"]; + 14 [label="Enter block"]; + 15 [label="Postponed enter to lambda"]; subgraph cluster_5 { color=blue 19 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/it|"]; - 23 [label="Exit block"]; + 20 [label="Enter block"]; + 21 [label="Access variable R|/it|"]; + 22 [label="Exit block"]; } - 20 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 23 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 17 [label="Postponed exit from lambda"]; - 18 [label="Exit block"]; + 16 [label="Postponed exit from lambda"]; + 17 [label="Exit block"]; } - 14 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 18 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 9 [label="Postponed exit from lambda"]; - 10 [label="Function call: R|/s|.R|kotlin/let| kotlin/String|>(...)"]; - 12 [label="Call arguments union" style="filled" fillcolor=yellow]; + 8 [label="Postponed exit from lambda"]; + 9 [label="Function call: R|/s|.R|kotlin/let| kotlin/String|>(...)"]; + 10 [label="Call arguments union" style="filled" fillcolor=yellow]; 11 [label="Delegated constructor call: super(...)"]; - 6 [label="Exit function " style="filled" fillcolor=red]; + 12 [label="Exit function " style="filled" fillcolor=red]; } - 5 -> {7}; - 7 -> {8}; - 8 -> {13}; - 8 -> {9} [color=red]; + 5 -> {6}; + 6 -> {7}; + 7 -> {13}; + 7 -> {8} [color=red]; + 8 -> {9}; 9 -> {10}; - 10 -> {12}; - 11 -> {6}; - 12 -> {11}; - 13 -> {15}; - 14 -> {9} [color=green]; - 14 -> {12} [color=red]; - 15 -> {16}; - 16 -> {17 19}; + 10 -> {11}; + 11 -> {12}; + 13 -> {14}; + 14 -> {15}; + 15 -> {16 19}; + 16 -> {17}; 17 -> {18}; - 18 -> {14}; - 19 -> {21}; + 18 -> {8} [color=green]; + 18 -> {10} [color=red]; + 19 -> {20}; + 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {20}; subgraph cluster_7 { color=red @@ -85,31 +85,31 @@ digraph postponedLambdaInConstructor_kt { 29 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 31 [label="Enter block"]; - 32 [label="Function call: this@R|/B|.R|/B.foo|()"]; - 33 [label="Exit block"]; + 30 [label="Enter block"]; + 31 [label="Function call: this@R|/B|.R|/B.foo|()"]; + 32 [label="Exit block"]; } - 30 [label="Exit function foo" style="filled" fillcolor=red]; + 33 [label="Exit function foo" style="filled" fillcolor=red]; } - 29 -> {31}; + 29 -> {30}; + 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {30}; subgraph cluster_10 { color=red - 35 [label="Enter class B" style="filled" fillcolor=red]; + 34 [label="Enter class B" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue 26 [label="Enter property" style="filled" fillcolor=red]; - 28 [label="Access variable R|/s|"]; - 27 [label="Exit property" style="filled" fillcolor=red]; + 27 [label="Access variable R|/s|"]; + 28 [label="Exit property" style="filled" fillcolor=red]; } - 34 [label="Exit class B" style="filled" fillcolor=red]; + 35 [label="Exit class B" style="filled" fillcolor=red]; } - 35 -> {26} [color=green]; - 26 -> {28}; - 27 -> {34} [color=green]; - 28 -> {27}; + 34 -> {26} [color=green]; + 26 -> {27}; + 27 -> {28}; + 28 -> {35} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot index 574108d704d..7beb72397e8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot @@ -8,55 +8,55 @@ digraph postponedLambdas_kt { 0 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Exit block"]; } - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {1}; subgraph cluster_2 { color=red 4 [label="Enter function test" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; - 7 [label="Access variable R|/a|"]; - 8 [label="Postponed enter to lambda"]; + 5 [label="Enter block"]; + 6 [label="Access variable R|/a|"]; + 7 [label="Postponed enter to lambda"]; subgraph cluster_4 { color=blue 13 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 15 [label="Enter block"]; - 16 [label="Const: String()"]; - 17 [label="Exit block"]; + 14 [label="Enter block"]; + 15 [label="Const: String()"]; + 16 [label="Exit block"]; } - 14 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 17 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 9 [label="Postponed exit from lambda"]; - 10 [label="Access variable R|/b|"]; - 11 [label="Function call: R|/foo|(...)"]; - 12 [label="Exit block"]; + 8 [label="Postponed exit from lambda"]; + 9 [label="Access variable R|/b|"]; + 10 [label="Function call: R|/foo|(...)"]; + 11 [label="Exit block"]; } - 5 [label="Exit function test" style="filled" fillcolor=red]; + 12 [label="Exit function test" style="filled" fillcolor=red]; } - 4 -> {6}; + 4 -> {5}; + 5 -> {6}; 6 -> {7}; - 7 -> {8}; - 8 -> {13}; - 8 -> {9} [color=red]; + 7 -> {13}; + 7 -> {8} [color=red]; + 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {5}; - 13 -> {14 15}; - 14 -> {9} [color=green]; - 14 -> {13} [color=green style=dashed]; + 13 -> {17 14}; + 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {14}; + 17 -> {8} [color=green]; + 17 -> {13} [color=green style=dashed]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot index e8993ca3947..600a69725dc 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot @@ -8,16 +8,16 @@ digraph propertiesAndInitBlocks_kt { 0 [label="Enter function run" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Function call: R|/block|.R|FakeOverride|()"]; - 4 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Function call: R|/block|.R|FakeOverride|()"]; + 3 [label="Exit block"]; } - 1 [label="Exit function run" style="filled" fillcolor=red]; + 4 [label="Exit function run" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {1}; subgraph cluster_2 { color=red @@ -29,218 +29,218 @@ digraph propertiesAndInitBlocks_kt { subgraph cluster_3 { color=red 7 [label="Enter property" style="filled" fillcolor=red]; - 9 [label="Const: Int(1)"]; - 8 [label="Exit property" style="filled" fillcolor=red]; + 8 [label="Const: Int(1)"]; + 9 [label="Exit property" style="filled" fillcolor=red]; } - 7 -> {9}; - 9 -> {8}; + 7 -> {8}; + 8 -> {9}; subgraph cluster_4 { color=red 10 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 12 [label="Enter block"]; - 13 [label="Const: Int(1)"]; - 14 [label="Jump: ^ Int(1)"]; - 15 [label="Stub" style="filled" fillcolor=gray]; - 16 [label="Exit block" style="filled" fillcolor=gray]; + 11 [label="Enter block"]; + 12 [label="Const: Int(1)"]; + 13 [label="Jump: ^ Int(1)"]; + 14 [label="Stub" style="filled" fillcolor=gray]; + 15 [label="Exit block" style="filled" fillcolor=gray]; } - 11 [label="Exit function getter" style="filled" fillcolor=red]; + 16 [label="Exit function getter" style="filled" fillcolor=red]; } - 10 -> {12}; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; - 14 -> {11}; + 13 -> {16}; + 13 -> {14} [style=dotted]; 14 -> {15} [style=dotted]; 15 -> {16} [style=dotted]; - 16 -> {11} [style=dotted]; subgraph cluster_6 { color=red 17 [label="Enter function setter" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 19 [label="Enter block"]; - 20 [label="Const: Int(1)"]; - 21 [label="Assignment: F|/x2|"]; - 22 [label="Exit block"]; + 18 [label="Enter block"]; + 19 [label="Const: Int(1)"]; + 20 [label="Assignment: F|/x2|"]; + 21 [label="Exit block"]; } - 18 [label="Exit function setter" style="filled" fillcolor=red]; + 22 [label="Exit function setter" style="filled" fillcolor=red]; } - 17 -> {19}; + 17 -> {18}; + 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {18}; subgraph cluster_8 { color=red 23 [label="Enter property" style="filled" fillcolor=red]; - 25 [label="Const: Int(1)"]; - 24 [label="Exit property" style="filled" fillcolor=red]; + 24 [label="Const: Int(1)"]; + 25 [label="Exit property" style="filled" fillcolor=red]; } - 23 -> {25}; - 25 -> {24}; + 23 -> {24}; + 24 -> {25}; subgraph cluster_9 { color=red 44 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 46 [label="Enter block"]; + 45 [label="Enter block"]; + 46 [label="Const: Int(1)"]; 47 [label="Const: Int(1)"]; - 48 [label="Const: Int(1)"]; - 49 [label="Function call: Int(1).R|kotlin/Int.plus|(...)"]; - 50 [label="Variable declaration: lval c: R|kotlin/Int|"]; - 51 [label="Function call: R|java/lang/Exception.Exception|()"]; - 52 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 53 [label="Stub" style="filled" fillcolor=gray]; - 54 [label="Exit block" style="filled" fillcolor=gray]; + 48 [label="Function call: Int(1).R|kotlin/Int.plus|(...)"]; + 49 [label="Variable declaration: lval c: R|kotlin/Int|"]; + 50 [label="Function call: R|java/lang/Exception.Exception|()"]; + 51 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; } - 45 [label="Exit function foo" style="filled" fillcolor=red]; + 54 [label="Exit function foo" style="filled" fillcolor=red]; } - 44 -> {46}; + 44 -> {45}; + 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52}; - 52 -> {45}; + 51 -> {54}; + 51 -> {52} [style=dotted]; 52 -> {53} [style=dotted]; 53 -> {54} [style=dotted]; - 54 -> {45} [style=dotted]; subgraph cluster_11 { color=red 55 [label="Enter function " style="filled" fillcolor=red]; - 57 [label="Delegated constructor call: super()"]; - 56 [label="Exit function " style="filled" fillcolor=red]; + 56 [label="Delegated constructor call: super()"]; + 57 [label="Exit function " style="filled" fillcolor=red]; } - 55 -> {57}; - 57 -> {56}; + 55 -> {56}; + 56 -> {57}; subgraph cluster_12 { color=red 58 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 64 [label="Enter class GetterLocalClass" style="filled" fillcolor=red]; + 63 [label="Enter class GetterLocalClass" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 60 [label="Enter block"]; - 61 [label="Exit local class "]; - 62 [label="Exit block"]; + 59 [label="Enter block"]; + 60 [label="Exit local class "]; + 61 [label="Exit block"]; } - subgraph cluster_15 { - color=blue - 65 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 67 [label="Enter block"]; - 68 [label="Function call: R|java/lang/Exception.Exception|()"]; - 69 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 70 [label="Stub" style="filled" fillcolor=gray]; - 71 [label="Exit block" style="filled" fillcolor=gray]; - } - 66 [label="Exit init block" style="filled" fillcolor=red]; - } - 63 [label="Exit class GetterLocalClass" style="filled" fillcolor=red]; + 62 [label="Exit function getter" style="filled" fillcolor=red]; } - 59 [label="Exit function getter" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 65 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 66 [label="Enter block"]; + 67 [label="Function call: R|java/lang/Exception.Exception|()"]; + 68 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 69 [label="Stub" style="filled" fillcolor=gray]; + 70 [label="Exit block" style="filled" fillcolor=gray]; + } + 71 [label="Exit init block" style="filled" fillcolor=red]; + } + 64 [label="Exit class GetterLocalClass" style="filled" fillcolor=red]; } - 58 -> {60}; + 58 -> {59}; + 59 -> {60}; + 59 -> {72 65} [color=red]; 60 -> {61}; - 60 -> {72 65} [color=red]; 61 -> {62}; - 62 -> {59}; - 64 -> {65} [color=green]; - 65 -> {67}; - 66 -> {63} [color=green]; + 63 -> {65} [color=green]; + 65 -> {66}; + 66 -> {67}; 67 -> {68}; - 68 -> {69}; - 69 -> {66}; + 68 -> {71}; + 68 -> {69} [style=dotted]; 69 -> {70} [style=dotted]; 70 -> {71} [style=dotted]; - 71 -> {66} [style=dotted]; + 71 -> {64} [color=green]; subgraph cluster_17 { color=red 72 [label="Enter function " style="filled" fillcolor=red]; - 74 [label="Delegated constructor call: super()"]; - 73 [label="Exit function " style="filled" fillcolor=red]; + 73 [label="Delegated constructor call: super()"]; + 74 [label="Exit function " style="filled" fillcolor=red]; } - 72 -> {74}; - 74 -> {73}; + 72 -> {73}; + 73 -> {74}; subgraph cluster_18 { color=red 75 [label="Enter property" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 35 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red]; - 77 [label="Postponed enter to lambda"]; + 34 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red]; + 76 [label="Postponed enter to lambda"]; subgraph cluster_20 { color=blue 26 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 28 [label="Enter block"]; - 29 [label="Exit local class "]; - 30 [label="Function call: R|java/lang/Exception.Exception|()"]; - 31 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 32 [label="Stub" style="filled" fillcolor=gray]; - 33 [label="Exit block" style="filled" fillcolor=gray]; + 27 [label="Enter block"]; + 28 [label="Exit local class "]; + 29 [label="Function call: R|java/lang/Exception.Exception|()"]; + 30 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 31 [label="Stub" style="filled" fillcolor=gray]; + 32 [label="Exit block" style="filled" fillcolor=gray]; } subgraph cluster_22 { color=blue 36 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 38 [label="Enter block"]; - 39 [label="Function call: R|java/lang/Exception.Exception|()"]; - 40 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 41 [label="Stub" style="filled" fillcolor=gray]; - 42 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 43 [label="Exit block" style="filled" fillcolor=gray]; + 37 [label="Enter block"]; + 38 [label="Function call: R|java/lang/Exception.Exception|()"]; + 39 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 40 [label="Stub" style="filled" fillcolor=gray]; + 41 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 42 [label="Exit block" style="filled" fillcolor=gray]; } - 37 [label="Exit init block" style="filled" fillcolor=red]; + 43 [label="Exit init block" style="filled" fillcolor=red]; } - 34 [label="Exit class InitializerLocalClass" style="filled" fillcolor=red]; + 35 [label="Exit class InitializerLocalClass" style="filled" fillcolor=red]; } - 27 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 33 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 78 [label="Postponed exit from lambda"]; - 79 [label="Function call: R|/run|(...)"]; - 76 [label="Exit property" style="filled" fillcolor=red]; + 77 [label="Postponed exit from lambda"]; + 78 [label="Function call: R|/run|(...)"]; + 79 [label="Exit property" style="filled" fillcolor=red]; } - 75 -> {77}; - 77 -> {26}; - 77 -> {78} [color=red]; + 75 -> {76}; + 76 -> {26}; + 76 -> {77} [color=red]; + 77 -> {78}; 78 -> {79}; - 79 -> {76}; - 26 -> {27 28}; - 27 -> {78} [color=green]; - 27 -> {26} [color=green style=dashed]; + 26 -> {33 27}; + 27 -> {28}; + 27 -> {44 55 36} [color=red]; 28 -> {29}; - 28 -> {44 55 36} [color=red]; 29 -> {30}; - 30 -> {31}; - 31 -> {27}; + 30 -> {33}; + 30 -> {31} [style=dotted]; 31 -> {32} [style=dotted]; 32 -> {33} [style=dotted]; - 33 -> {27} [style=dotted]; - 35 -> {36} [color=green]; - 36 -> {38}; - 37 -> {34} [color=green]; + 33 -> {77} [color=green]; + 33 -> {26} [color=green style=dashed]; + 34 -> {36} [color=green]; + 36 -> {37}; + 37 -> {38}; 38 -> {39}; - 39 -> {40}; - 40 -> {37}; + 39 -> {43}; + 39 -> {40} [style=dotted]; 40 -> {41} [style=dotted]; 41 -> {42} [style=dotted]; 42 -> {43} [style=dotted]; - 43 -> {37} [style=dotted]; + 43 -> {35} [color=green]; subgraph cluster_24 { color=red @@ -254,61 +254,61 @@ digraph propertiesAndInitBlocks_kt { 82 [label="Enter property" style="filled" fillcolor=red]; subgraph cluster_26 { color=blue - 84 [label="Try expression enter"]; + 83 [label="Try expression enter"]; subgraph cluster_27 { color=blue - 86 [label="Try main block enter"]; + 84 [label="Try main block enter"]; subgraph cluster_28 { color=blue - 89 [label="Enter block"]; - 90 [label="Const: Int(1)"]; - 91 [label="Exit block"]; + 85 [label="Enter block"]; + 86 [label="Const: Int(1)"]; + 87 [label="Exit block"]; } - 92 [label="Try main block exit"]; + 88 [label="Try main block exit"]; } subgraph cluster_29 { color=blue - 88 [label="Enter finally"]; + 89 [label="Enter finally"]; subgraph cluster_30 { color=blue - 97 [label="Enter block"]; - 98 [label="Const: Int(0)"]; - 99 [label="Exit block"]; + 90 [label="Enter block"]; + 91 [label="Const: Int(0)"]; + 92 [label="Exit block"]; } - 100 [label="Exit finally"]; + 93 [label="Exit finally"]; } subgraph cluster_31 { color=blue - 87 [label="Catch enter"]; + 94 [label="Catch enter"]; subgraph cluster_32 { color=blue - 93 [label="Enter block"]; - 94 [label="Const: Int(2)"]; - 95 [label="Exit block"]; + 95 [label="Enter block"]; + 96 [label="Const: Int(2)"]; + 97 [label="Exit block"]; } - 96 [label="Catch exit"]; + 98 [label="Catch exit"]; } - 85 [label="Try expression exit"]; + 99 [label="Try expression exit"]; } - 83 [label="Exit property" style="filled" fillcolor=red]; + 100 [label="Exit property" style="filled" fillcolor=red]; } - 82 -> {84}; - 84 -> {86}; - 85 -> {83}; - 86 -> {83 87 88 89}; - 87 -> {83 93}; - 88 -> {97}; + 82 -> {83}; + 83 -> {84}; + 84 -> {100 94 89 85}; + 85 -> {86}; + 86 -> {87}; + 87 -> {88}; + 88 -> {99}; 89 -> {90}; 90 -> {91}; 91 -> {92}; - 92 -> {85}; - 93 -> {94}; - 94 -> {95}; + 92 -> {93}; + 93 -> {99}; + 94 -> {100 95}; 95 -> {96}; - 96 -> {85}; + 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; - 100 -> {85}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot index 5264909ee5f..fd3afaec721 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot @@ -5,212 +5,212 @@ digraph returnValuesFromLambda_kt { subgraph cluster_0 { color=red - 1 [label="Enter class A" style="filled" fillcolor=red]; - 0 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter class A" style="filled" fillcolor=red]; + 1 [label="Exit class A" style="filled" fillcolor=red]; } - 1 -> {0} [color=green]; + 0 -> {1} [color=green]; subgraph cluster_1 { color=red 2 [label="Enter function " style="filled" fillcolor=red]; - 4 [label="Delegated constructor call: super()"]; - 3 [label="Exit function " style="filled" fillcolor=red]; + 3 [label="Delegated constructor call: super()"]; + 4 [label="Exit function " style="filled" fillcolor=red]; } - 2 -> {4}; - 4 -> {3}; + 2 -> {3}; + 3 -> {4}; subgraph cluster_2 { color=red - 6 [label="Enter class B" style="filled" fillcolor=red]; - 5 [label="Exit class B" style="filled" fillcolor=red]; + 5 [label="Enter class B" style="filled" fillcolor=red]; + 6 [label="Exit class B" style="filled" fillcolor=red]; } - 6 -> {5} [color=green]; + 5 -> {6} [color=green]; subgraph cluster_3 { color=red 7 [label="Enter function " style="filled" fillcolor=red]; - 9 [label="Delegated constructor call: super()"]; - 8 [label="Exit function " style="filled" fillcolor=red]; + 8 [label="Delegated constructor call: super()"]; + 9 [label="Exit function " style="filled" fillcolor=red]; } - 7 -> {9}; - 9 -> {8}; + 7 -> {8}; + 8 -> {9}; subgraph cluster_4 { color=red - 11 [label="Enter class C" style="filled" fillcolor=red]; - 10 [label="Exit class C" style="filled" fillcolor=red]; + 10 [label="Enter class C" style="filled" fillcolor=red]; + 11 [label="Exit class C" style="filled" fillcolor=red]; } - 11 -> {10} [color=green]; + 10 -> {11} [color=green]; subgraph cluster_5 { color=red 12 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 14 [label="Enter block"]; - 15 [label="Postponed enter to lambda"]; + 13 [label="Enter block"]; + 14 [label="Postponed enter to lambda"]; subgraph cluster_7 { color=blue 21 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 23 [label="Enter block"]; + 22 [label="Enter block"]; subgraph cluster_9 { color=blue - 24 [label="Enter when"]; + 23 [label="Enter when"]; subgraph cluster_10 { color=blue - 26 [label="Enter when branch condition "]; - 27 [label="Access variable R|/b|"]; - 28 [label="Exit when branch condition"]; + 24 [label="Enter when branch condition "]; + 25 [label="Access variable R|/b|"]; + 26 [label="Exit when branch condition"]; } - 36 [label="Synthetic else branch"]; - 29 [label="Enter when branch result"]; + 27 [label="Synthetic else branch"]; + 28 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 30 [label="Enter block"]; - 31 [label="Function call: R|/B.B|()"]; - 32 [label="Jump: ^@run R|/B.B|()"]; - 33 [label="Stub" style="filled" fillcolor=gray]; - 34 [label="Exit block" style="filled" fillcolor=gray]; + 29 [label="Enter block"]; + 30 [label="Function call: R|/B.B|()"]; + 31 [label="Jump: ^@run R|/B.B|()"]; + 32 [label="Stub" style="filled" fillcolor=gray]; + 33 [label="Exit block" style="filled" fillcolor=gray]; } - 35 [label="Exit when branch result" style="filled" fillcolor=gray]; - 25 [label="Exit when"]; + 34 [label="Exit when branch result" style="filled" fillcolor=gray]; + 35 [label="Exit when"]; } - 37 [label="Function call: R|/C.C|()"]; - 38 [label="Exit block"]; + 36 [label="Function call: R|/C.C|()"]; + 37 [label="Exit block"]; } - 22 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 38 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 18 [label="Call arguments union" style="filled" fillcolor=yellow]; + 15 [label="Call arguments union" style="filled" fillcolor=yellow]; 16 [label="Postponed exit from lambda"]; 17 [label="Function call: R|kotlin/run|(...)"]; - 19 [label="Variable declaration: lval x: R|A|"]; - 20 [label="Exit block"]; + 18 [label="Variable declaration: lval x: R|A|"]; + 19 [label="Exit block"]; } - 13 [label="Exit function test_1" style="filled" fillcolor=red]; + 20 [label="Exit function test_1" style="filled" fillcolor=red]; } - 12 -> {14}; - 14 -> {15}; - 15 -> {21}; - 15 -> {16} [color=red]; + 12 -> {13}; + 13 -> {14}; + 14 -> {21}; + 14 -> {16} [color=red]; + 15 -> {17} [color=red]; 16 -> {17} [color=green]; - 17 -> {19}; - 18 -> {17} [color=red]; + 17 -> {18}; + 18 -> {19}; 19 -> {20}; - 20 -> {13}; - 21 -> {23}; - 22 -> {16} [color=green]; - 22 -> {18} [color=red]; + 21 -> {22}; + 22 -> {23}; 23 -> {24}; - 24 -> {26}; - 25 -> {37}; - 26 -> {27}; - 27 -> {28}; - 28 -> {29 36}; + 24 -> {25}; + 25 -> {26}; + 26 -> {28 27}; + 27 -> {35}; + 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32}; - 32 -> {22}; + 31 -> {38}; + 31 -> {32} [style=dotted]; 32 -> {33} [style=dotted]; 33 -> {34} [style=dotted]; 34 -> {35} [style=dotted]; - 35 -> {25} [style=dotted]; - 36 -> {25}; + 35 -> {36}; + 36 -> {37}; 37 -> {38}; - 38 -> {22}; + 38 -> {16} [color=green]; + 38 -> {15} [color=red]; subgraph cluster_12 { color=red 39 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 41 [label="Enter block"]; - 42 [label="Postponed enter to lambda"]; + 40 [label="Enter block"]; + 41 [label="Postponed enter to lambda"]; subgraph cluster_14 { color=blue 48 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 50 [label="Enter block"]; - 51 [label="Function call: R|/C.C|()"]; - 52 [label="Jump: ^@run R|/C.C|()"]; - 53 [label="Stub" style="filled" fillcolor=gray]; - 54 [label="Exit block" style="filled" fillcolor=gray]; + 49 [label="Enter block"]; + 50 [label="Function call: R|/C.C|()"]; + 51 [label="Jump: ^@run R|/C.C|()"]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; } - 49 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 54 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 45 [label="Call arguments union" style="filled" fillcolor=yellow]; + 42 [label="Call arguments union" style="filled" fillcolor=yellow]; 43 [label="Postponed exit from lambda"]; 44 [label="Function call: R|kotlin/run|(...)"]; - 46 [label="Variable declaration: lval x: R|C|"]; - 47 [label="Exit block"]; + 45 [label="Variable declaration: lval x: R|C|"]; + 46 [label="Exit block"]; } - 40 [label="Exit function test_2" style="filled" fillcolor=red]; + 47 [label="Exit function test_2" style="filled" fillcolor=red]; } - 39 -> {41}; - 41 -> {42}; - 42 -> {48}; - 42 -> {43} [color=red]; + 39 -> {40}; + 40 -> {41}; + 41 -> {48}; + 41 -> {43} [color=red]; + 42 -> {44} [color=red]; 43 -> {44} [color=green]; - 44 -> {46}; - 45 -> {44} [color=red]; + 44 -> {45}; + 45 -> {46}; 46 -> {47}; - 47 -> {40}; - 48 -> {50}; - 49 -> {43} [color=green]; - 49 -> {45} [color=red]; + 48 -> {49}; + 49 -> {50}; 50 -> {51}; - 51 -> {52}; - 52 -> {49}; + 51 -> {54}; + 51 -> {52} [style=dotted]; 52 -> {53} [style=dotted]; 53 -> {54} [style=dotted]; - 54 -> {49} [style=dotted]; + 54 -> {43} [color=green]; + 54 -> {42} [color=red]; subgraph cluster_16 { color=red 55 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 57 [label="Enter block"]; - 58 [label="Postponed enter to lambda"]; + 56 [label="Enter block"]; + 57 [label="Postponed enter to lambda"]; subgraph cluster_18 { color=blue 65 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 67 [label="Enter block"]; - 68 [label="Jump: ^test_3 Unit"]; - 69 [label="Stub" style="filled" fillcolor=gray]; - 70 [label="Exit block" style="filled" fillcolor=gray]; + 66 [label="Enter block"]; + 67 [label="Jump: ^test_3 Unit"]; + 68 [label="Stub" style="filled" fillcolor=gray]; + 69 [label="Exit block" style="filled" fillcolor=gray]; } - 66 [label="Exit function anonymousFunction" style="filled" fillcolor=red style="filled" fillcolor=gray]; + 70 [label="Exit function anonymousFunction" style="filled" fillcolor=red style="filled" fillcolor=gray]; } - 61 [label="Call arguments union" style="filled" fillcolor=gray]; + 58 [label="Call arguments union" style="filled" fillcolor=gray]; 59 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; 60 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=gray]; - 62 [label="Stub" style="filled" fillcolor=gray]; - 63 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray]; - 64 [label="Exit block" style="filled" fillcolor=gray]; + 61 [label="Stub" style="filled" fillcolor=gray]; + 62 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray]; + 63 [label="Exit block" style="filled" fillcolor=gray]; } - 56 [label="Exit function test_3" style="filled" fillcolor=red]; + 64 [label="Exit function test_3" style="filled" fillcolor=red]; } - 55 -> {57}; - 57 -> {58}; - 58 -> {65}; - 58 -> {59} [color=red]; + 55 -> {56}; + 56 -> {57}; + 57 -> {65}; + 57 -> {59} [color=red]; + 58 -> {60} [style=dotted]; 59 -> {60} [style=dotted]; - 60 -> {56 62} [style=dotted]; - 61 -> {60} [style=dotted]; + 60 -> {64 61} [style=dotted]; + 61 -> {62} [style=dotted]; 62 -> {63} [style=dotted]; 63 -> {64} [style=dotted]; - 64 -> {56} [style=dotted]; - 65 -> {67}; - 66 -> {59 61} [style=dotted]; - 67 -> {68}; - 68 -> {56}; + 65 -> {66}; + 66 -> {67}; + 67 -> {64}; + 67 -> {68} [style=dotted]; 68 -> {69} [style=dotted]; 69 -> {70} [style=dotted]; - 70 -> {66} [style=dotted]; + 70 -> {59 58} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot index d07a712b48a..04989d11b3d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot @@ -19,10 +19,10 @@ digraph safeCalls_kt { subgraph cluster_2 { color=red - 5 [label="Enter class A" style="filled" fillcolor=red]; - 4 [label="Exit class A" style="filled" fillcolor=red]; + 4 [label="Enter class A" style="filled" fillcolor=red]; + 5 [label="Exit class A" style="filled" fillcolor=red]; } - 5 -> {4} [color=green]; + 4 -> {5} [color=green]; subgraph cluster_3 { color=red @@ -40,65 +40,65 @@ digraph safeCalls_kt { subgraph cluster_5 { color=red - 11 [label="Enter class B" style="filled" fillcolor=red]; - 10 [label="Exit class B" style="filled" fillcolor=red]; + 10 [label="Enter class B" style="filled" fillcolor=red]; + 11 [label="Exit class B" style="filled" fillcolor=red]; } - 11 -> {10} [color=green]; + 10 -> {11} [color=green]; subgraph cluster_6 { color=red 12 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 14 [label="Enter block"]; - 15 [label="Access variable R|/x|"]; - 16 [label="Enter safe call"]; - 18 [label="Function call: $subj$.R|/A.foo|()"]; + 13 [label="Enter block"]; + 14 [label="Access variable R|/x|"]; + 15 [label="Enter safe call"]; + 16 [label="Function call: $subj$.R|/A.foo|()"]; 17 [label="Exit safe call"]; - 19 [label="Enter safe call"]; - 21 [label="Function call: $subj$.R|/A.bar|()"]; + 18 [label="Enter safe call"]; + 19 [label="Function call: $subj$.R|/A.bar|()"]; 20 [label="Exit safe call"]; - 22 [label="Exit block"]; + 21 [label="Exit block"]; } - 13 [label="Exit function test_1" style="filled" fillcolor=red]; + 22 [label="Exit function test_1" style="filled" fillcolor=red]; } - 12 -> {14}; - 14 -> {15}; - 15 -> {16 17}; - 16 -> {18}; - 17 -> {19 20}; - 18 -> {17}; - 19 -> {21}; - 20 -> {22}; - 21 -> {20}; - 22 -> {13}; + 12 -> {13}; + 13 -> {14}; + 14 -> {15 17}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18 20}; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {22}; subgraph cluster_8 { color=red 23 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 25 [label="Enter block"]; - 26 [label="Access variable R|/x|"]; - 27 [label="Enter safe call"]; - 29 [label="Access variable R|/B.foo|"]; + 24 [label="Enter block"]; + 25 [label="Access variable R|/x|"]; + 26 [label="Enter safe call"]; + 27 [label="Access variable R|/B.foo|"]; 28 [label="Exit safe call"]; - 30 [label="Enter safe call"]; - 32 [label="Access variable R|/B.bar|"]; + 29 [label="Enter safe call"]; + 30 [label="Access variable R|/B.bar|"]; 31 [label="Exit safe call"]; - 33 [label="Exit block"]; + 32 [label="Exit block"]; } - 24 [label="Exit function test_2" style="filled" fillcolor=red]; + 33 [label="Exit function test_2" style="filled" fillcolor=red]; } - 23 -> {25}; - 25 -> {26}; - 26 -> {27 28}; - 27 -> {29}; - 28 -> {30 31}; - 29 -> {28}; - 30 -> {32}; - 31 -> {33}; - 32 -> {31}; - 33 -> {24}; + 23 -> {24}; + 24 -> {25}; + 25 -> {26 28}; + 26 -> {27}; + 27 -> {28}; + 28 -> {29 31}; + 29 -> {30}; + 30 -> {31}; + 31 -> {32}; + 32 -> {33}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot index 5fe6fdadaba..cbe4534a2e3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot @@ -8,33 +8,34 @@ digraph simple_kt { 0 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Exit block"]; } - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {1}; subgraph cluster_2 { color=red 4 [label="Enter function test" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; - 7 [label="Const: Int(1)"]; - 8 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 9 [label="Access variable R|/x|"]; - 10 [label="Const: Int(1)"]; - 11 [label="Function call: R|/x|.R|kotlin/Int.plus|(...)"]; - 12 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 13 [label="Function call: R|/foo|()"]; - 14 [label="Exit block"]; + 5 [label="Enter block"]; + 6 [label="Const: Int(1)"]; + 7 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 8 [label="Access variable R|/x|"]; + 9 [label="Const: Int(1)"]; + 10 [label="Function call: R|/x|.R|kotlin/Int.plus|(...)"]; + 11 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 12 [label="Function call: R|/foo|()"]; + 13 [label="Exit block"]; } - 5 [label="Exit function test" style="filled" fillcolor=red]; + 14 [label="Exit function test" style="filled" fillcolor=red]; } - 4 -> {6}; + 4 -> {5}; + 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; @@ -43,6 +44,5 @@ digraph simple_kt { 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {5}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot index c6b6c626463..b43fddaad3a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot @@ -8,315 +8,315 @@ digraph tryCatch_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Try expression enter"]; + 2 [label="Try expression enter"]; subgraph cluster_3 { color=blue - 5 [label="Try main block enter"]; + 3 [label="Try main block enter"]; subgraph cluster_4 { color=blue - 8 [label="Enter block"]; - 9 [label="Const: Int(1)"]; - 10 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 11 [label="Exit block"]; + 4 [label="Enter block"]; + 5 [label="Const: Int(1)"]; + 6 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 7 [label="Exit block"]; } - 12 [label="Try main block exit"]; + 8 [label="Try main block exit"]; } subgraph cluster_5 { color=blue - 7 [label="Catch enter"]; + 9 [label="Catch enter"]; subgraph cluster_6 { color=blue - 18 [label="Enter block"]; - 19 [label="Const: Int(3)"]; - 20 [label="Variable declaration: lval z: R|kotlin/Int|"]; - 21 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Const: Int(3)"]; + 12 [label="Variable declaration: lval z: R|kotlin/Int|"]; + 13 [label="Exit block"]; } - 22 [label="Catch exit"]; + 14 [label="Catch exit"]; } subgraph cluster_7 { color=blue - 6 [label="Catch enter"]; + 15 [label="Catch enter"]; subgraph cluster_8 { color=blue - 13 [label="Enter block"]; - 14 [label="Const: Int(2)"]; - 15 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 16 [label="Exit block"]; + 16 [label="Enter block"]; + 17 [label="Const: Int(2)"]; + 18 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 19 [label="Exit block"]; } - 17 [label="Catch exit"]; + 20 [label="Catch exit"]; } - 4 [label="Try expression exit"]; + 21 [label="Try expression exit"]; } - 23 [label="Exit block"]; + 22 [label="Exit block"]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 23 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {23}; - 5 -> {1 6 7 8}; - 6 -> {1 13}; - 7 -> {1 18}; - 8 -> {9}; - 9 -> {10}; + 3 -> {23 15 9 4}; + 4 -> {5}; + 5 -> {6}; + 6 -> {7}; + 7 -> {8}; + 8 -> {21}; + 9 -> {23 10}; 10 -> {11}; 11 -> {12}; - 12 -> {4}; + 12 -> {13}; 13 -> {14}; - 14 -> {15}; - 15 -> {16}; + 14 -> {21}; + 15 -> {23 16}; 16 -> {17}; - 17 -> {4}; + 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {4}; - 23 -> {1}; + 22 -> {23}; subgraph cluster_9 { color=red 24 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 26 [label="Enter block"]; + 25 [label="Enter block"]; subgraph cluster_11 { color=blue - 27 [label="Try expression enter"]; + 26 [label="Try expression enter"]; subgraph cluster_12 { color=blue - 29 [label="Try main block enter"]; + 27 [label="Try main block enter"]; subgraph cluster_13 { color=blue - 31 [label="Enter block"]; - 32 [label="Const: Int(1)"]; - 33 [label="Exit block"]; + 28 [label="Enter block"]; + 29 [label="Const: Int(1)"]; + 30 [label="Exit block"]; } - 34 [label="Try main block exit"]; + 31 [label="Try main block exit"]; } subgraph cluster_14 { color=blue - 30 [label="Catch enter"]; + 32 [label="Catch enter"]; subgraph cluster_15 { color=blue - 35 [label="Enter block"]; - 36 [label="Const: Int(2)"]; - 37 [label="Exit block"]; + 33 [label="Enter block"]; + 34 [label="Const: Int(2)"]; + 35 [label="Exit block"]; } - 38 [label="Catch exit"]; + 36 [label="Catch exit"]; } - 28 [label="Try expression exit"]; + 37 [label="Try expression exit"]; } - 39 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 40 [label="Exit block"]; + 38 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 39 [label="Exit block"]; } - 25 [label="Exit function test_2" style="filled" fillcolor=red]; + 40 [label="Exit function test_2" style="filled" fillcolor=red]; } - 24 -> {26}; + 24 -> {25}; + 25 -> {26}; 26 -> {27}; - 27 -> {29}; - 28 -> {39}; - 29 -> {25 30 31}; - 30 -> {25 35}; - 31 -> {32}; - 32 -> {33}; + 27 -> {40 32 28}; + 28 -> {29}; + 29 -> {30}; + 30 -> {31}; + 31 -> {37}; + 32 -> {40 33}; 33 -> {34}; - 34 -> {28}; + 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {28}; + 38 -> {39}; 39 -> {40}; - 40 -> {25}; subgraph cluster_16 { color=red 41 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 43 [label="Enter block"]; + 42 [label="Enter block"]; subgraph cluster_18 { color=blue - 44 [label="Enter while loop"]; + 43 [label="Enter while loop"]; subgraph cluster_19 { color=blue - 46 [label="Enter loop condition"]; - 47 [label="Const: Boolean(true)"]; - 48 [label="Exit loop condition"]; + 44 [label="Enter loop condition"]; + 45 [label="Const: Boolean(true)"]; + 46 [label="Exit loop condition"]; } subgraph cluster_20 { color=blue - 49 [label="Enter loop block"]; + 47 [label="Enter loop block"]; subgraph cluster_21 { color=blue - 50 [label="Enter block"]; + 48 [label="Enter block"]; subgraph cluster_22 { color=blue - 51 [label="Try expression enter"]; + 49 [label="Try expression enter"]; subgraph cluster_23 { color=blue - 53 [label="Try main block enter"]; + 50 [label="Try main block enter"]; subgraph cluster_24 { color=blue - 56 [label="Enter block"]; + 51 [label="Enter block"]; subgraph cluster_25 { color=blue - 57 [label="Enter when"]; + 52 [label="Enter when"]; subgraph cluster_26 { color=blue - 59 [label="Enter when branch condition "]; - 60 [label="Access variable R|/b|"]; - 61 [label="Exit when branch condition"]; + 53 [label="Enter when branch condition "]; + 54 [label="Access variable R|/b|"]; + 55 [label="Exit when branch condition"]; } - 68 [label="Synthetic else branch"]; - 62 [label="Enter when branch result"]; + 56 [label="Synthetic else branch"]; + 57 [label="Enter when branch result"]; subgraph cluster_27 { color=blue - 63 [label="Enter block"]; - 64 [label="Jump: ^test_3 Unit"]; - 65 [label="Stub" style="filled" fillcolor=gray]; - 66 [label="Exit block" style="filled" fillcolor=gray]; + 58 [label="Enter block"]; + 59 [label="Jump: ^test_3 Unit"]; + 60 [label="Stub" style="filled" fillcolor=gray]; + 61 [label="Exit block" style="filled" fillcolor=gray]; } - 67 [label="Exit when branch result" style="filled" fillcolor=gray]; - 58 [label="Exit when"]; + 62 [label="Exit when branch result" style="filled" fillcolor=gray]; + 63 [label="Exit when"]; } - 69 [label="Const: Int(1)"]; - 70 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 64 [label="Const: Int(1)"]; + 65 [label="Variable declaration: lval x: R|kotlin/Int|"]; subgraph cluster_28 { color=blue - 71 [label="Enter when"]; + 66 [label="Enter when"]; subgraph cluster_29 { color=blue - 73 [label="Enter when branch condition "]; - 74 [label="Access variable R|/b|"]; - 75 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 76 [label="Exit when branch condition"]; + 67 [label="Enter when branch condition "]; + 68 [label="Access variable R|/b|"]; + 69 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 70 [label="Exit when branch condition"]; } - 83 [label="Synthetic else branch"]; - 77 [label="Enter when branch result"]; + 71 [label="Synthetic else branch"]; + 72 [label="Enter when branch result"]; subgraph cluster_30 { color=blue - 78 [label="Enter block"]; - 79 [label="Jump: break@@@[Boolean(true)] "]; - 80 [label="Stub" style="filled" fillcolor=gray]; - 81 [label="Exit block" style="filled" fillcolor=gray]; + 73 [label="Enter block"]; + 74 [label="Jump: break@@@[Boolean(true)] "]; + 75 [label="Stub" style="filled" fillcolor=gray]; + 76 [label="Exit block" style="filled" fillcolor=gray]; } - 82 [label="Exit when branch result" style="filled" fillcolor=gray]; - 72 [label="Exit when"]; + 77 [label="Exit when branch result" style="filled" fillcolor=gray]; + 78 [label="Exit when"]; } - 84 [label="Exit block"]; + 79 [label="Exit block"]; } - 85 [label="Try main block exit"]; + 80 [label="Try main block exit"]; } subgraph cluster_31 { color=blue - 55 [label="Catch enter"]; + 81 [label="Catch enter"]; subgraph cluster_32 { color=blue - 91 [label="Enter block"]; - 92 [label="Jump: break@@@[Boolean(true)] "]; - 93 [label="Stub" style="filled" fillcolor=gray]; - 94 [label="Exit block" style="filled" fillcolor=gray]; + 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]; } - 95 [label="Catch exit" style="filled" fillcolor=gray]; + 86 [label="Catch exit" style="filled" fillcolor=gray]; } subgraph cluster_33 { color=blue - 54 [label="Catch enter"]; + 91 [label="Catch enter"]; subgraph cluster_34 { color=blue - 86 [label="Enter block"]; - 87 [label="Jump: continue@@@[Boolean(true)] "]; - 88 [label="Stub" style="filled" fillcolor=gray]; - 89 [label="Exit block" style="filled" fillcolor=gray]; + 92 [label="Enter block"]; + 93 [label="Jump: continue@@@[Boolean(true)] "]; + 94 [label="Stub" style="filled" fillcolor=gray]; + 95 [label="Exit block" style="filled" fillcolor=gray]; } - 90 [label="Catch exit" style="filled" fillcolor=gray]; + 96 [label="Catch exit" style="filled" fillcolor=gray]; } - 52 [label="Try expression exit"]; + 97 [label="Try expression exit"]; } - 96 [label="Const: Int(2)"]; - 97 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 98 [label="Exit block"]; + 98 [label="Const: Int(2)"]; + 99 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 100 [label="Exit block"]; } - 99 [label="Exit loop block"]; + 101 [label="Exit loop block"]; } - 45 [label="Exit whileloop"]; + 87 [label="Exit whileloop"]; } - 100 [label="Const: Int(3)"]; - 101 [label="Variable declaration: lval z: R|kotlin/Int|"]; - 102 [label="Exit block"]; + 88 [label="Const: Int(3)"]; + 89 [label="Variable declaration: lval z: R|kotlin/Int|"]; + 90 [label="Exit block"]; } - 42 [label="Exit function test_3" style="filled" fillcolor=red]; + 102 [label="Exit function test_3" style="filled" fillcolor=red]; } - 41 -> {43}; + 41 -> {42}; + 42 -> {43}; 43 -> {44}; - 44 -> {46}; - 45 -> {100}; + 44 -> {45}; + 45 -> {46}; 46 -> {47}; + 46 -> {87} [style=dotted]; 47 -> {48}; 48 -> {49}; - 48 -> {45} [style=dotted]; 49 -> {50}; - 50 -> {51}; - 51 -> {53}; - 52 -> {96}; - 53 -> {42 54 55 56}; - 54 -> {42 86}; - 55 -> {42 91}; - 56 -> {57}; - 57 -> {59}; - 58 -> {69}; - 59 -> {60}; - 60 -> {61}; - 61 -> {62 68}; - 62 -> {63}; + 50 -> {102 91 81 51}; + 51 -> {52}; + 52 -> {53}; + 53 -> {54}; + 54 -> {55}; + 55 -> {57 56}; + 56 -> {63}; + 57 -> {58}; + 58 -> {59}; + 59 -> {102}; + 59 -> {60} [style=dotted]; + 60 -> {61} [style=dotted]; + 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; 63 -> {64}; - 64 -> {42}; - 64 -> {65} [style=dotted]; - 65 -> {66} [style=dotted]; - 66 -> {67} [style=dotted]; - 67 -> {58} [style=dotted]; - 68 -> {58}; + 64 -> {65}; + 65 -> {66}; + 66 -> {67}; + 67 -> {68}; + 68 -> {69}; 69 -> {70}; - 70 -> {71}; - 71 -> {73}; - 72 -> {84}; + 70 -> {72 71}; + 71 -> {78}; + 72 -> {73}; 73 -> {74}; - 74 -> {75}; - 75 -> {76}; - 76 -> {77 83}; - 77 -> {78}; + 74 -> {87}; + 74 -> {75} [style=dotted]; + 75 -> {76} [style=dotted]; + 76 -> {77} [style=dotted]; + 77 -> {78} [style=dotted]; 78 -> {79}; - 79 -> {45}; - 79 -> {80} [style=dotted]; - 80 -> {81} [style=dotted]; - 81 -> {82} [style=dotted]; - 82 -> {72} [style=dotted]; - 83 -> {72}; - 84 -> {85}; - 85 -> {52}; - 86 -> {87}; - 87 -> {88} [style=dotted]; - 87 -> {44} [color=green style=dashed]; - 88 -> {89} [style=dotted]; - 89 -> {90} [style=dotted]; - 90 -> {52} [style=dotted]; - 91 -> {92}; - 92 -> {45}; - 92 -> {93} [style=dotted]; + 79 -> {80}; + 80 -> {97}; + 81 -> {102 82}; + 82 -> {83}; + 83 -> {87}; + 83 -> {84} [style=dotted]; + 84 -> {85} [style=dotted]; + 85 -> {86} [style=dotted]; + 86 -> {97} [style=dotted]; + 87 -> {88}; + 88 -> {89}; + 89 -> {90}; + 90 -> {102}; + 91 -> {102 92}; + 92 -> {93}; 93 -> {94} [style=dotted]; + 93 -> {43} [color=green style=dashed]; 94 -> {95} [style=dotted]; - 95 -> {52} [style=dotted]; - 96 -> {97}; + 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; 97 -> {98}; 98 -> {99}; - 99 -> {46} [color=green style=dashed]; + 99 -> {100}; 100 -> {101}; - 101 -> {102}; - 102 -> {42}; + 101 -> {44} [color=green style=dashed]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot index 773ef55e4db..b0a5d08e7b7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot @@ -8,209 +8,209 @@ digraph when_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Enter when"]; + 2 [label="Enter when"]; subgraph cluster_3 { color=blue - 5 [label="Enter when branch condition "]; - 6 [label="Access variable R|/x|"]; - 7 [label="Const: Int(1)"]; - 8 [label="Operator =="]; - 9 [label="Exit when branch condition"]; + 3 [label="Enter when branch condition "]; + 4 [label="Access variable R|/x|"]; + 5 [label="Const: Int(1)"]; + 6 [label="Operator =="]; + 7 [label="Exit when branch condition"]; } subgraph cluster_4 { + color=blue + 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|(...)"]; + 12 [label="Const: Int(0)"]; + 13 [label="Operator =="]; + 14 [label="Exit when branch condition"]; + } + subgraph cluster_5 { color=blue 15 [label="Enter when branch condition "]; - 16 [label="Access variable R|/x|"]; - 17 [label="Const: Int(2)"]; - 18 [label="Function call: R|/x|.R|kotlin/Int.rem|(...)"]; + 16 [label="Const: Int(1)"]; + 17 [label="Const: Int(1)"]; + 18 [label="Function call: Int(1).R|kotlin/Int.minus|(...)"]; 19 [label="Const: Int(0)"]; 20 [label="Operator =="]; 21 [label="Exit when branch condition"]; } - subgraph cluster_5 { - color=blue - 27 [label="Enter when branch condition "]; - 28 [label="Const: Int(1)"]; - 29 [label="Const: Int(1)"]; - 30 [label="Function call: Int(1).R|kotlin/Int.minus|(...)"]; - 31 [label="Const: Int(0)"]; - 32 [label="Operator =="]; - 33 [label="Exit when branch condition"]; - } subgraph cluster_6 { color=blue - 40 [label="Enter when branch condition else"]; - 41 [label="Exit when branch condition"]; + 22 [label="Enter when branch condition else"]; + 23 [label="Exit when branch condition"]; } - 42 [label="Enter when branch result"]; + 24 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 43 [label="Enter block"]; - 44 [label="Const: Int(5)"]; - 45 [label="Exit block"]; + 25 [label="Enter block"]; + 26 [label="Const: Int(5)"]; + 27 [label="Exit block"]; } - 46 [label="Exit when branch result"]; - 34 [label="Enter when branch result"]; + 28 [label="Exit when branch result"]; + 29 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 35 [label="Enter block"]; - 36 [label="Jump: ^test_1 Unit"]; - 37 [label="Stub" style="filled" fillcolor=gray]; - 38 [label="Exit block" style="filled" fillcolor=gray]; + 30 [label="Enter block"]; + 31 [label="Jump: ^test_1 Unit"]; + 32 [label="Stub" style="filled" fillcolor=gray]; + 33 [label="Exit block" style="filled" fillcolor=gray]; } - 39 [label="Exit when branch result" style="filled" fillcolor=gray]; - 22 [label="Enter when branch result"]; + 34 [label="Exit when branch result" style="filled" fillcolor=gray]; + 35 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 23 [label="Enter block"]; - 24 [label="Const: Int(20)"]; - 25 [label="Exit block"]; + 36 [label="Enter block"]; + 37 [label="Const: Int(20)"]; + 38 [label="Exit block"]; } - 26 [label="Exit when branch result"]; - 10 [label="Enter when branch result"]; + 39 [label="Exit when branch result"]; + 40 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 11 [label="Enter block"]; - 12 [label="Const: Int(10)"]; - 13 [label="Exit block"]; + 41 [label="Enter block"]; + 42 [label="Const: Int(10)"]; + 43 [label="Exit block"]; } - 14 [label="Exit when branch result"]; - 4 [label="Exit when"]; + 44 [label="Exit when branch result"]; + 45 [label="Exit when"]; } - 47 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 48 [label="Exit block"]; + 46 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 47 [label="Exit block"]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 48 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {47}; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8}; + 7 -> {40 8}; 8 -> {9}; - 9 -> {10 15}; + 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {4}; + 14 -> {35 15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22 27}; + 21 -> {29 22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {4}; + 26 -> {27}; 27 -> {28}; - 28 -> {29}; + 28 -> {45}; 29 -> {30}; 30 -> {31}; - 31 -> {32}; - 32 -> {33}; - 33 -> {34 40}; - 34 -> {35}; + 31 -> {48}; + 31 -> {32} [style=dotted]; + 32 -> {33} [style=dotted]; + 33 -> {34} [style=dotted]; + 34 -> {45} [style=dotted]; 35 -> {36}; - 36 -> {1}; - 36 -> {37} [style=dotted]; - 37 -> {38} [style=dotted]; - 38 -> {39} [style=dotted]; - 39 -> {4} [style=dotted]; + 36 -> {37}; + 37 -> {38}; + 38 -> {39}; + 39 -> {45}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {4}; + 46 -> {47}; 47 -> {48}; - 48 -> {1}; subgraph cluster_11 { color=red - 50 [label="Enter class A" style="filled" fillcolor=red]; - 49 [label="Exit class A" style="filled" fillcolor=red]; + 49 [label="Enter class A" style="filled" fillcolor=red]; + 50 [label="Exit class A" style="filled" fillcolor=red]; } - 50 -> {49} [color=green]; + 49 -> {50} [color=green]; subgraph cluster_12 { color=red - 52 [label="Enter class B" style="filled" fillcolor=red]; - 51 [label="Exit class B" style="filled" fillcolor=red]; + 51 [label="Enter class B" style="filled" fillcolor=red]; + 52 [label="Exit class B" style="filled" fillcolor=red]; } - 52 -> {51} [color=green]; + 51 -> {52} [color=green]; subgraph cluster_13 { color=red 53 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 55 [label="Enter block"]; + 54 [label="Enter block"]; subgraph cluster_15 { color=blue - 56 [label="Enter when"]; + 55 [label="Enter when"]; subgraph cluster_16 { color=blue - 58 [label="Enter when branch condition "]; + 56 [label="Enter when branch condition "]; subgraph cluster_17 { color=blue - 60 [label="Enter &&"]; - 61 [label="Access variable R|/x|"]; - 62 [label="Type operator: (R|/x| is R|A|)"]; - 63 [label="Exit left part of &&"]; - 64 [label="Enter right part of &&"]; - 65 [label="Access variable R|/x|"]; - 66 [label="Type operator: (R|/x| is R|B|)"]; - 59 [label="Exit &&"]; + 57 [label="Enter &&"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Type operator: (R|/x| is R|A|)"]; + 60 [label="Exit left part of &&"]; + 61 [label="Enter right part of &&"]; + 62 [label="Access variable R|/x|"]; + 63 [label="Type operator: (R|/x| is R|B|)"]; + 64 [label="Exit &&"]; } - 67 [label="Exit when branch condition"]; + 65 [label="Exit when branch condition"]; } - 74 [label="Synthetic else branch"]; - 68 [label="Enter when branch result"]; + 66 [label="Synthetic else branch"]; + 67 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 69 [label="Enter block"]; - 70 [label="Access variable R|/x|"]; - 71 [label="Type operator: (R|/x| is R|A|)"]; - 72 [label="Exit block"]; + 68 [label="Enter block"]; + 69 [label="Access variable R|/x|"]; + 70 [label="Type operator: (R|/x| is R|A|)"]; + 71 [label="Exit block"]; } - 73 [label="Exit when branch result"]; - 57 [label="Exit when"]; + 72 [label="Exit when branch result"]; + 73 [label="Exit when"]; } - 75 [label="Exit block"]; + 74 [label="Exit block"]; } - 54 [label="Exit function test_2" style="filled" fillcolor=red]; + 75 [label="Exit function test_2" style="filled" fillcolor=red]; } - 53 -> {55}; + 53 -> {54}; + 54 -> {55}; 55 -> {56}; - 56 -> {58}; - 57 -> {75}; - 58 -> {60}; - 59 -> {67}; - 60 -> {61}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; + 59 -> {60}; + 60 -> {64 61}; 61 -> {62}; 62 -> {63}; - 63 -> {59 64}; + 63 -> {64}; 64 -> {65}; - 65 -> {66}; - 66 -> {59}; - 67 -> {68 74}; + 65 -> {67 66}; + 66 -> {73}; + 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {57}; - 74 -> {57}; - 75 -> {54}; + 73 -> {74}; + 74 -> {75}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveWhenAndDNNType.dot b/compiler/fir/analysis-tests/testData/resolve/exhaustiveWhenAndDNNType.dot index 614727a84af..e07695c3687 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveWhenAndDNNType.dot +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveWhenAndDNNType.dot @@ -6,340 +6,340 @@ digraph exhaustiveWhenAndDNNType_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super|>()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super|>()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red 3 [label="Enter function values" style="filled" fillcolor=red]; subgraph cluster_2 { color=blue - 5 [label="Enter block"]; - 6 [label="Exit block"]; + 4 [label="Enter block"]; + 5 [label="Exit block"]; } - 4 [label="Exit function values" style="filled" fillcolor=red]; + 6 [label="Exit function values" style="filled" fillcolor=red]; } - 3 -> {5}; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; - 6 -> {4}; subgraph cluster_3 { color=red 7 [label="Enter function valueOf" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 9 [label="Enter block"]; - 10 [label="Exit block"]; + 8 [label="Enter block"]; + 9 [label="Exit block"]; } - 8 [label="Exit function valueOf" style="filled" fillcolor=red]; + 10 [label="Exit function valueOf" style="filled" fillcolor=red]; } - 7 -> {9}; + 7 -> {8}; + 8 -> {9}; 9 -> {10}; - 10 -> {8}; subgraph cluster_5 { color=red - 12 [label="Enter class SomeEnum" style="filled" fillcolor=red]; - 11 [label="Exit class SomeEnum" style="filled" fillcolor=red]; + 11 [label="Enter class SomeEnum" style="filled" fillcolor=red]; + 12 [label="Exit class SomeEnum" style="filled" fillcolor=red]; } - 12 -> {11} [color=green]; + 11 -> {12} [color=green]; subgraph cluster_6 { color=red 13 [label="Enter function " style="filled" fillcolor=red]; - 15 [label="Delegated constructor call: super()"]; - 14 [label="Exit function " style="filled" fillcolor=red]; + 14 [label="Delegated constructor call: super()"]; + 15 [label="Exit function " style="filled" fillcolor=red]; } - 13 -> {15}; - 15 -> {14}; + 13 -> {14}; + 14 -> {15}; subgraph cluster_7 { color=red - 17 [label="Enter class B" style="filled" fillcolor=red]; - 16 [label="Exit class B" style="filled" fillcolor=red]; + 16 [label="Enter class B" style="filled" fillcolor=red]; + 17 [label="Exit class B" style="filled" fillcolor=red]; } - 17 -> {16} [color=green]; + 16 -> {17} [color=green]; subgraph cluster_8 { color=red 18 [label="Enter function takeB" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 20 [label="Enter block"]; - 21 [label="Exit block"]; + 19 [label="Enter block"]; + 20 [label="Exit block"]; } - 19 [label="Exit function takeB" style="filled" fillcolor=red]; + 21 [label="Exit function takeB" style="filled" fillcolor=red]; } - 18 -> {20}; + 18 -> {19}; + 19 -> {20}; 20 -> {21}; - 21 -> {19}; subgraph cluster_10 { color=red 22 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 24 [label="Enter block"]; - 25 [label="Access qualifier /SomeEnum"]; - 26 [label="Access variable R|/SomeEnum.A1|"]; - 27 [label="Variable declaration: lval flag: R|SomeEnum|"]; + 23 [label="Enter block"]; + 24 [label="Access qualifier /SomeEnum"]; + 25 [label="Access variable R|/SomeEnum.A1|"]; + 26 [label="Variable declaration: lval flag: R|SomeEnum|"]; subgraph cluster_12 { color=blue - 28 [label="Enter when"]; - 30 [label="Access variable R|/flag|"]; - 31 [label="Check not null: R|/flag|!!"]; + 27 [label="Enter when"]; + 28 [label="Access variable R|/flag|"]; + 29 [label="Check not null: R|/flag|!!"]; subgraph cluster_13 { color=blue - 32 [label="Enter when branch condition "]; - 33 [label="Access qualifier /SomeEnum"]; - 34 [label="Access variable R|/SomeEnum.A1|"]; - 35 [label="Operator =="]; - 36 [label="Exit when branch condition"]; + 30 [label="Enter when branch condition "]; + 31 [label="Access qualifier /SomeEnum"]; + 32 [label="Access variable R|/SomeEnum.A1|"]; + 33 [label="Operator =="]; + 34 [label="Exit when branch condition"]; } subgraph cluster_14 { color=blue - 42 [label="Enter when branch condition "]; - 43 [label="Access qualifier /SomeEnum"]; - 44 [label="Access variable R|/SomeEnum.A2|"]; - 45 [label="Operator =="]; - 46 [label="Exit when branch condition"]; + 35 [label="Enter when branch condition "]; + 36 [label="Access qualifier /SomeEnum"]; + 37 [label="Access variable R|/SomeEnum.A2|"]; + 38 [label="Operator =="]; + 39 [label="Exit when branch condition"]; } - 47 [label="Enter when branch result"]; + 40 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 48 [label="Enter block"]; - 49 [label="Function call: R|/B.B|()"]; - 50 [label="Exit block"]; + 41 [label="Enter block"]; + 42 [label="Function call: R|/B.B|()"]; + 43 [label="Exit block"]; } - 51 [label="Exit when branch result"]; - 37 [label="Enter when branch result"]; + 44 [label="Exit when branch result"]; + 45 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 38 [label="Enter block"]; - 39 [label="Function call: R|/B.B|()"]; - 40 [label="Exit block"]; + 46 [label="Enter block"]; + 47 [label="Function call: R|/B.B|()"]; + 48 [label="Exit block"]; } - 41 [label="Exit when branch result"]; - 29 [label="Exit when"]; + 49 [label="Exit when branch result"]; + 50 [label="Exit when"]; } - 52 [label="Variable declaration: lval b: R|B|"]; - 53 [label="Access variable R|/b|"]; - 54 [label="Function call: R|/takeB|(...)"]; - 55 [label="Exit block"]; + 51 [label="Variable declaration: lval b: R|B|"]; + 52 [label="Access variable R|/b|"]; + 53 [label="Function call: R|/takeB|(...)"]; + 54 [label="Exit block"]; } - 23 [label="Exit function test_1" style="filled" fillcolor=red]; + 55 [label="Exit function test_1" style="filled" fillcolor=red]; } - 22 -> {24}; + 22 -> {23}; + 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {30}; - 29 -> {52}; + 28 -> {29}; + 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {35}; + 34 -> {45 35}; 35 -> {36}; - 36 -> {37 42}; + 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {29}; + 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45}; + 44 -> {50}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {29}; + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {23}; subgraph cluster_17 { color=red 56 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_18 { color=blue - 58 [label="Enter block"]; - 59 [label="Access qualifier /SomeEnum"]; - 60 [label="Access variable R|/SomeEnum.A1|"]; - 61 [label="Variable declaration: lval flag: R|SomeEnum|"]; + 57 [label="Enter block"]; + 58 [label="Access qualifier /SomeEnum"]; + 59 [label="Access variable R|/SomeEnum.A1|"]; + 60 [label="Variable declaration: lval flag: R|SomeEnum|"]; subgraph cluster_19 { color=blue - 62 [label="Enter when"]; - 64 [label="Access variable R|/flag|"]; - 65 [label="Check not null: R|/flag|!!"]; + 61 [label="Enter when"]; + 62 [label="Access variable R|/flag|"]; + 63 [label="Check not null: R|/flag|!!"]; subgraph cluster_20 { color=blue - 66 [label="Enter when branch condition "]; - 67 [label="Access qualifier /SomeEnum"]; - 68 [label="Access variable R|/SomeEnum.A1|"]; - 69 [label="Operator =="]; - 70 [label="Exit when branch condition"]; + 64 [label="Enter when branch condition "]; + 65 [label="Access qualifier /SomeEnum"]; + 66 [label="Access variable R|/SomeEnum.A1|"]; + 67 [label="Operator =="]; + 68 [label="Exit when branch condition"]; } subgraph cluster_21 { color=blue - 76 [label="Enter when branch condition "]; - 77 [label="Access qualifier /SomeEnum"]; - 78 [label="Access variable R|/SomeEnum.A2|"]; - 79 [label="Operator =="]; - 80 [label="Exit when branch condition"]; + 69 [label="Enter when branch condition "]; + 70 [label="Access qualifier /SomeEnum"]; + 71 [label="Access variable R|/SomeEnum.A2|"]; + 72 [label="Operator =="]; + 73 [label="Exit when branch condition"]; } - 81 [label="Enter when branch result"]; + 74 [label="Enter when branch result"]; subgraph cluster_22 { color=blue - 82 [label="Enter block"]; - 83 [label="Function call: R|/B.B|()"]; - 84 [label="Exit block"]; + 75 [label="Enter block"]; + 76 [label="Function call: R|/B.B|()"]; + 77 [label="Exit block"]; } - 85 [label="Exit when branch result"]; - 71 [label="Enter when branch result"]; + 78 [label="Exit when branch result"]; + 79 [label="Enter when branch result"]; subgraph cluster_23 { color=blue - 72 [label="Enter block"]; - 73 [label="Function call: R|/B.B|()"]; - 74 [label="Exit block"]; + 80 [label="Enter block"]; + 81 [label="Function call: R|/B.B|()"]; + 82 [label="Exit block"]; } - 75 [label="Exit when branch result"]; - 63 [label="Exit when"]; + 83 [label="Exit when branch result"]; + 84 [label="Exit when"]; } - 86 [label="Variable declaration: lval b: R|B|"]; - 87 [label="Access variable R|/b|"]; - 88 [label="Function call: R|/takeB|(...)"]; - 89 [label="Exit block"]; + 85 [label="Variable declaration: lval b: R|B|"]; + 86 [label="Access variable R|/b|"]; + 87 [label="Function call: R|/takeB|(...)"]; + 88 [label="Exit block"]; } - 57 [label="Exit function test_2" style="filled" fillcolor=red]; + 89 [label="Exit function test_2" style="filled" fillcolor=red]; } - 56 -> {58}; + 56 -> {57}; + 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {64}; - 63 -> {86}; + 62 -> {63}; + 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - 68 -> {69}; + 68 -> {79 69}; 69 -> {70}; - 70 -> {71 76}; + 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {63}; + 75 -> {76}; 76 -> {77}; 77 -> {78}; - 78 -> {79}; + 78 -> {84}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; - 85 -> {63}; + 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; - 89 -> {57}; subgraph cluster_24 { color=red 90 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 92 [label="Enter block"]; - 93 [label="Access qualifier /SomeEnum"]; - 94 [label="Access variable R|/SomeEnum.A1|"]; - 95 [label="Variable declaration: lval flag: R|SomeEnum|"]; + 91 [label="Enter block"]; + 92 [label="Access qualifier /SomeEnum"]; + 93 [label="Access variable R|/SomeEnum.A1|"]; + 94 [label="Variable declaration: lval flag: R|SomeEnum|"]; subgraph cluster_26 { color=blue - 96 [label="Enter when"]; - 98 [label="Access variable R|/flag|"]; + 95 [label="Enter when"]; + 96 [label="Access variable R|/flag|"]; subgraph cluster_27 { color=blue - 99 [label="Enter when branch condition "]; - 100 [label="Access qualifier /SomeEnum"]; - 101 [label="Access variable R|/SomeEnum.A1|"]; - 102 [label="Operator =="]; - 103 [label="Exit when branch condition"]; + 97 [label="Enter when branch condition "]; + 98 [label="Access qualifier /SomeEnum"]; + 99 [label="Access variable R|/SomeEnum.A1|"]; + 100 [label="Operator =="]; + 101 [label="Exit when branch condition"]; } subgraph cluster_28 { color=blue - 109 [label="Enter when branch condition "]; - 110 [label="Access qualifier /SomeEnum"]; - 111 [label="Access variable R|/SomeEnum.A2|"]; - 112 [label="Operator =="]; - 113 [label="Exit when branch condition"]; + 102 [label="Enter when branch condition "]; + 103 [label="Access qualifier /SomeEnum"]; + 104 [label="Access variable R|/SomeEnum.A2|"]; + 105 [label="Operator =="]; + 106 [label="Exit when branch condition"]; } - 114 [label="Enter when branch result"]; + 107 [label="Enter when branch result"]; subgraph cluster_29 { color=blue - 115 [label="Enter block"]; - 116 [label="Function call: R|/B.B|()"]; - 117 [label="Exit block"]; + 108 [label="Enter block"]; + 109 [label="Function call: R|/B.B|()"]; + 110 [label="Exit block"]; } - 118 [label="Exit when branch result"]; - 104 [label="Enter when branch result"]; + 111 [label="Exit when branch result"]; + 112 [label="Enter when branch result"]; subgraph cluster_30 { color=blue - 105 [label="Enter block"]; - 106 [label="Function call: R|/B.B|()"]; - 107 [label="Exit block"]; + 113 [label="Enter block"]; + 114 [label="Function call: R|/B.B|()"]; + 115 [label="Exit block"]; } - 108 [label="Exit when branch result"]; - 97 [label="Exit when"]; + 116 [label="Exit when branch result"]; + 117 [label="Exit when"]; } - 119 [label="Variable declaration: lval b: R|B|"]; - 120 [label="Access variable R|/b|"]; - 121 [label="Function call: R|/takeB|(...)"]; - 122 [label="Exit block"]; + 118 [label="Variable declaration: lval b: R|B|"]; + 119 [label="Access variable R|/b|"]; + 120 [label="Function call: R|/takeB|(...)"]; + 121 [label="Exit block"]; } - 91 [label="Exit function test_3" style="filled" fillcolor=red]; + 122 [label="Exit function test_3" style="filled" fillcolor=red]; } - 90 -> {92}; + 90 -> {91}; + 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {98}; - 97 -> {119}; + 96 -> {97}; + 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {102}; + 101 -> {112 102}; 102 -> {103}; - 103 -> {104 109}; + 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {97}; + 108 -> {109}; 109 -> {110}; 110 -> {111}; - 111 -> {112}; + 111 -> {117}; 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {97}; + 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; - 122 -> {91}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot b/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot index eeef8811a30..41efb8cc01f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot +++ b/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot @@ -6,11 +6,11 @@ digraph secondaryConstructorCfg_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red @@ -43,74 +43,74 @@ digraph secondaryConstructorCfg_kt { subgraph cluster_5 { color=red 18 [label="Enter function " style="filled" fillcolor=red]; - 20 [label="Access variable R|/p0|"]; - 21 [label="Delegated constructor call: this(...)"]; + 19 [label="Access variable R|/p0|"]; + 20 [label="Delegated constructor call: this(...)"]; subgraph cluster_6 { color=blue - 22 [label="Enter block"]; - 23 [label="Access variable R|/p1|"]; - 24 [label="Assignment: R|/B.p3|"]; - 25 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Access variable R|/p1|"]; + 23 [label="Assignment: R|/B.p3|"]; + 24 [label="Exit block"]; } - 19 [label="Exit function " style="filled" fillcolor=red]; + 25 [label="Exit function " style="filled" fillcolor=red]; } - 18 -> {20}; + 18 -> {19}; + 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {19}; subgraph cluster_7 { color=red - 36 [label="Enter class B" style="filled" fillcolor=red]; + 35 [label="Enter class B" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue 5 [label="Enter property" style="filled" fillcolor=red]; - 7 [label="Access variable R|/p0|"]; - 6 [label="Exit property" style="filled" fillcolor=red]; + 6 [label="Access variable R|/p0|"]; + 7 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_9 { color=blue 10 [label="Enter property" style="filled" fillcolor=red]; - 12 [label="Access variable R|/p0|"]; - 13 [label="Access variable R|kotlin/String.length|"]; - 11 [label="Exit property" style="filled" fillcolor=red]; + 11 [label="Access variable R|/p0|"]; + 12 [label="Access variable R|kotlin/String.length|"]; + 13 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_10 { color=blue 26 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 28 [label="Enter block"]; - 29 [label="Access variable R|/p0|"]; - 30 [label="Access variable R|kotlin/String.length|"]; - 31 [label="Assignment: R|/B.p1|"]; - 32 [label="Const: String()"]; - 33 [label="Assignment: R|/B.p3|"]; - 34 [label="Exit block"]; + 27 [label="Enter block"]; + 28 [label="Access variable R|/p0|"]; + 29 [label="Access variable R|kotlin/String.length|"]; + 30 [label="Assignment: R|/B.p1|"]; + 31 [label="Const: String()"]; + 32 [label="Assignment: R|/B.p3|"]; + 33 [label="Exit block"]; } - 27 [label="Exit init block" style="filled" fillcolor=red]; + 34 [label="Exit init block" style="filled" fillcolor=red]; } - 35 [label="Exit class B" style="filled" fillcolor=red]; + 36 [label="Exit class B" style="filled" fillcolor=red]; } - 36 -> {5} [color=green]; - 5 -> {7}; - 6 -> {10} [color=green]; - 7 -> {6}; - 10 -> {12}; - 11 -> {26} [color=green]; + 35 -> {5} [color=green]; + 5 -> {6}; + 6 -> {7}; + 7 -> {10} [color=green]; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; - 13 -> {11}; - 26 -> {28}; - 27 -> {35} [color=green]; + 13 -> {26} [color=green]; + 26 -> {27}; + 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {27}; + 34 -> {36} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot index fa4715502c7..02f4bdc21a4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot @@ -12,400 +12,400 @@ digraph bangbang_kt { subgraph cluster_1 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 2 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red 4 [label="Enter function test_0" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; - 7 [label="Access variable R|/a|"]; - 8 [label="Check not null: R|/a|!!"]; - 9 [label="Function call: R|/a|!!.R|/A.foo|()"]; - 10 [label="Access variable R|/a|"]; - 11 [label="Function call: R|/a|.R|/A.foo|()"]; - 12 [label="Exit block"]; + 5 [label="Enter block"]; + 6 [label="Access variable R|/a|"]; + 7 [label="Check not null: R|/a|!!"]; + 8 [label="Function call: R|/a|!!.R|/A.foo|()"]; + 9 [label="Access variable R|/a|"]; + 10 [label="Function call: R|/a|.R|/A.foo|()"]; + 11 [label="Exit block"]; } - 5 [label="Exit function test_0" style="filled" fillcolor=red]; + 12 [label="Exit function test_0" style="filled" fillcolor=red]; } - 4 -> {6}; + 4 -> {5}; + 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {5}; subgraph cluster_4 { color=red 13 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 15 [label="Enter block"]; + 14 [label="Enter block"]; subgraph cluster_6 { color=blue - 16 [label="Enter when"]; + 15 [label="Enter when"]; subgraph cluster_7 { color=blue - 18 [label="Enter when branch condition "]; - 19 [label="Access variable R|/a|"]; - 20 [label="Check not null: R|/a|!!"]; - 21 [label="Function call: R|/a|!!.R|/A.foo|()"]; - 22 [label="Exit when branch condition"]; + 16 [label="Enter when branch condition "]; + 17 [label="Access variable R|/a|"]; + 18 [label="Check not null: R|/a|!!"]; + 19 [label="Function call: R|/a|!!.R|/A.foo|()"]; + 20 [label="Exit when branch condition"]; } - 29 [label="Synthetic else branch"]; - 23 [label="Enter when branch result"]; + 21 [label="Synthetic else branch"]; + 22 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 24 [label="Enter block"]; - 25 [label="Access variable R|/a|"]; - 26 [label="Function call: R|/a|.R|/A.foo|()"]; - 27 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Access variable R|/a|"]; + 25 [label="Function call: R|/a|.R|/A.foo|()"]; + 26 [label="Exit block"]; } - 28 [label="Exit when branch result"]; - 17 [label="Exit when"]; + 27 [label="Exit when branch result"]; + 28 [label="Exit when"]; } - 30 [label="Access variable R|/a|"]; - 31 [label="Function call: R|/a|.R|/A.foo|()"]; - 32 [label="Exit block"]; + 29 [label="Access variable R|/a|"]; + 30 [label="Function call: R|/a|.R|/A.foo|()"]; + 31 [label="Exit block"]; } - 14 [label="Exit function test_1" style="filled" fillcolor=red]; + 32 [label="Exit function test_1" style="filled" fillcolor=red]; } - 13 -> {15}; + 13 -> {14}; + 14 -> {15}; 15 -> {16}; - 16 -> {18}; - 17 -> {30}; + 16 -> {17}; + 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21}; - 21 -> {22}; - 22 -> {23 29}; + 20 -> {22 21}; + 21 -> {28}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {17}; - 29 -> {17}; + 28 -> {29}; + 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {14}; subgraph cluster_9 { color=red 33 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 35 [label="Enter block"]; + 34 [label="Enter block"]; subgraph cluster_11 { color=blue - 36 [label="Enter when"]; + 35 [label="Enter when"]; subgraph cluster_12 { color=blue - 38 [label="Enter when branch condition "]; + 36 [label="Enter when branch condition "]; subgraph cluster_13 { color=blue - 40 [label="Enter &&"]; - 41 [label="Access variable R|/a|"]; - 42 [label="Check not null: R|/a|!!"]; - 43 [label="Function call: R|/a|!!.R|/A.foo|()"]; - 44 [label="Exit left part of &&"]; - 45 [label="Enter right part of &&"]; - 46 [label="Access variable R|/b|"]; - 39 [label="Exit &&"]; + 37 [label="Enter &&"]; + 38 [label="Access variable R|/a|"]; + 39 [label="Check not null: R|/a|!!"]; + 40 [label="Function call: R|/a|!!.R|/A.foo|()"]; + 41 [label="Exit left part of &&"]; + 42 [label="Enter right part of &&"]; + 43 [label="Access variable R|/b|"]; + 44 [label="Exit &&"]; } - 47 [label="Exit when branch condition"]; + 45 [label="Exit when branch condition"]; } - 54 [label="Synthetic else branch"]; - 48 [label="Enter when branch result"]; + 46 [label="Synthetic else branch"]; + 47 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 49 [label="Enter block"]; - 50 [label="Access variable R|/a|"]; - 51 [label="Function call: R|/a|.R|/A.foo|()"]; - 52 [label="Exit block"]; + 48 [label="Enter block"]; + 49 [label="Access variable R|/a|"]; + 50 [label="Function call: R|/a|.R|/A.foo|()"]; + 51 [label="Exit block"]; } - 53 [label="Exit when branch result"]; - 37 [label="Exit when"]; + 52 [label="Exit when branch result"]; + 53 [label="Exit when"]; } - 55 [label="Access variable R|/a|"]; - 56 [label="Function call: R|/a|.R|/A.foo|()"]; - 57 [label="Exit block"]; + 54 [label="Access variable R|/a|"]; + 55 [label="Function call: R|/a|.R|/A.foo|()"]; + 56 [label="Exit block"]; } - 34 [label="Exit function test_2" style="filled" fillcolor=red]; + 57 [label="Exit function test_2" style="filled" fillcolor=red]; } - 33 -> {35}; + 33 -> {34}; + 34 -> {35}; 35 -> {36}; - 36 -> {38}; - 37 -> {55}; - 38 -> {40}; - 39 -> {47}; + 36 -> {37}; + 37 -> {38}; + 38 -> {39}; + 39 -> {40}; 40 -> {41}; - 41 -> {42}; + 41 -> {44 42}; 42 -> {43}; 43 -> {44}; - 44 -> {39 45}; - 45 -> {46}; - 46 -> {39}; - 47 -> {48 54}; + 44 -> {45}; + 45 -> {47 46}; + 46 -> {53}; + 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; - 53 -> {37}; - 54 -> {37}; + 53 -> {54}; + 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {34}; subgraph cluster_15 { color=red 58 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_16 { color=blue - 60 [label="Enter block"]; + 59 [label="Enter block"]; subgraph cluster_17 { color=blue - 61 [label="Enter when"]; + 60 [label="Enter when"]; subgraph cluster_18 { color=blue - 63 [label="Enter when branch condition "]; + 61 [label="Enter when branch condition "]; subgraph cluster_19 { color=blue - 65 [label="Enter &&"]; - 66 [label="Access variable R|/b|"]; - 67 [label="Exit left part of &&"]; - 68 [label="Enter right part of &&"]; - 69 [label="Access variable R|/a|"]; - 70 [label="Check not null: R|/a|!!"]; - 71 [label="Function call: R|/a|!!.R|/A.foo|()"]; - 64 [label="Exit &&"]; + 62 [label="Enter &&"]; + 63 [label="Access variable R|/b|"]; + 64 [label="Exit left part of &&"]; + 65 [label="Enter right part of &&"]; + 66 [label="Access variable R|/a|"]; + 67 [label="Check not null: R|/a|!!"]; + 68 [label="Function call: R|/a|!!.R|/A.foo|()"]; + 69 [label="Exit &&"]; } - 72 [label="Exit when branch condition"]; + 70 [label="Exit when branch condition"]; } - 79 [label="Synthetic else branch"]; - 73 [label="Enter when branch result"]; + 71 [label="Synthetic else branch"]; + 72 [label="Enter when branch result"]; subgraph cluster_20 { color=blue - 74 [label="Enter block"]; - 75 [label="Access variable R|/a|"]; - 76 [label="Function call: R|/a|.R|/A.foo|()"]; - 77 [label="Exit block"]; + 73 [label="Enter block"]; + 74 [label="Access variable R|/a|"]; + 75 [label="Function call: R|/a|.R|/A.foo|()"]; + 76 [label="Exit block"]; } - 78 [label="Exit when branch result"]; - 62 [label="Exit when"]; + 77 [label="Exit when branch result"]; + 78 [label="Exit when"]; } - 80 [label="Access variable R|/a|"]; - 81 [label="Function call: R|/a|.#()"]; - 82 [label="Exit block"]; + 79 [label="Access variable R|/a|"]; + 80 [label="Function call: R|/a|.#()"]; + 81 [label="Exit block"]; } - 59 [label="Exit function test_3" style="filled" fillcolor=red]; + 82 [label="Exit function test_3" style="filled" fillcolor=red]; } - 58 -> {60}; + 58 -> {59}; + 59 -> {60}; 60 -> {61}; - 61 -> {63}; - 62 -> {80}; - 63 -> {65}; - 64 -> {72}; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; + 64 -> {69 65}; 65 -> {66}; 66 -> {67}; - 67 -> {64 68}; + 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; - 71 -> {64}; - 72 -> {73 79}; + 70 -> {72 71}; + 71 -> {78}; + 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; - 78 -> {62}; - 79 -> {62}; + 78 -> {79}; + 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {59}; subgraph cluster_21 { color=red 83 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_22 { color=blue - 85 [label="Enter block"]; + 84 [label="Enter block"]; subgraph cluster_23 { color=blue - 86 [label="Enter when"]; + 85 [label="Enter when"]; subgraph cluster_24 { color=blue - 88 [label="Enter when branch condition "]; + 86 [label="Enter when branch condition "]; subgraph cluster_25 { color=blue - 90 [label="Enter ||"]; - 91 [label="Access variable R|/a|"]; - 92 [label="Check not null: R|/a|!!"]; - 93 [label="Function call: R|/a|!!.R|/A.foo|()"]; - 94 [label="Exit left part of ||"]; - 95 [label="Enter right part of ||"]; - 96 [label="Access variable R|/b|"]; - 89 [label="Exit ||"]; + 87 [label="Enter ||"]; + 88 [label="Access variable R|/a|"]; + 89 [label="Check not null: R|/a|!!"]; + 90 [label="Function call: R|/a|!!.R|/A.foo|()"]; + 91 [label="Exit left part of ||"]; + 92 [label="Enter right part of ||"]; + 93 [label="Access variable R|/b|"]; + 94 [label="Exit ||"]; } - 97 [label="Exit when branch condition"]; + 95 [label="Exit when branch condition"]; } - 104 [label="Synthetic else branch"]; - 98 [label="Enter when branch result"]; + 96 [label="Synthetic else branch"]; + 97 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 99 [label="Enter block"]; - 100 [label="Access variable R|/a|"]; - 101 [label="Function call: R|/a|.R|/A.foo|()"]; - 102 [label="Exit block"]; + 98 [label="Enter block"]; + 99 [label="Access variable R|/a|"]; + 100 [label="Function call: R|/a|.R|/A.foo|()"]; + 101 [label="Exit block"]; } - 103 [label="Exit when branch result"]; - 87 [label="Exit when"]; + 102 [label="Exit when branch result"]; + 103 [label="Exit when"]; } - 105 [label="Access variable R|/a|"]; - 106 [label="Function call: R|/a|.R|/A.foo|()"]; - 107 [label="Exit block"]; + 104 [label="Access variable R|/a|"]; + 105 [label="Function call: R|/a|.R|/A.foo|()"]; + 106 [label="Exit block"]; } - 84 [label="Exit function test_4" style="filled" fillcolor=red]; + 107 [label="Exit function test_4" style="filled" fillcolor=red]; } - 83 -> {85}; + 83 -> {84}; + 84 -> {85}; 85 -> {86}; - 86 -> {88}; - 87 -> {105}; - 88 -> {90}; - 89 -> {97}; + 86 -> {87}; + 87 -> {88}; + 88 -> {89}; + 89 -> {90}; 90 -> {91}; - 91 -> {92}; + 91 -> {94 92}; 92 -> {93}; 93 -> {94}; - 94 -> {89 95}; - 95 -> {96}; - 96 -> {89}; - 97 -> {98 104}; + 94 -> {95}; + 95 -> {97 96}; + 96 -> {103}; + 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; 101 -> {102}; 102 -> {103}; - 103 -> {87}; - 104 -> {87}; + 103 -> {104}; + 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {84}; subgraph cluster_27 { color=red 108 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_28 { color=blue - 110 [label="Enter block"]; + 109 [label="Enter block"]; subgraph cluster_29 { color=blue - 111 [label="Enter when"]; + 110 [label="Enter when"]; subgraph cluster_30 { color=blue - 113 [label="Enter when branch condition "]; + 111 [label="Enter when branch condition "]; subgraph cluster_31 { color=blue - 115 [label="Enter ||"]; - 116 [label="Access variable R|/b|"]; - 117 [label="Exit left part of ||"]; - 118 [label="Enter right part of ||"]; - 119 [label="Access variable R|/a|"]; - 120 [label="Check not null: R|/a|!!"]; - 121 [label="Function call: R|/a|!!.R|/A.foo|()"]; - 114 [label="Exit ||"]; + 112 [label="Enter ||"]; + 113 [label="Access variable R|/b|"]; + 114 [label="Exit left part of ||"]; + 115 [label="Enter right part of ||"]; + 116 [label="Access variable R|/a|"]; + 117 [label="Check not null: R|/a|!!"]; + 118 [label="Function call: R|/a|!!.R|/A.foo|()"]; + 119 [label="Exit ||"]; } - 122 [label="Exit when branch condition"]; + 120 [label="Exit when branch condition"]; } - 129 [label="Synthetic else branch"]; - 123 [label="Enter when branch result"]; + 121 [label="Synthetic else branch"]; + 122 [label="Enter when branch result"]; subgraph cluster_32 { color=blue - 124 [label="Enter block"]; - 125 [label="Access variable R|/a|"]; - 126 [label="Function call: R|/a|.#()"]; - 127 [label="Exit block"]; + 123 [label="Enter block"]; + 124 [label="Access variable R|/a|"]; + 125 [label="Function call: R|/a|.#()"]; + 126 [label="Exit block"]; } - 128 [label="Exit when branch result"]; - 112 [label="Exit when"]; + 127 [label="Exit when branch result"]; + 128 [label="Exit when"]; } - 130 [label="Access variable R|/a|"]; - 131 [label="Function call: R|/a|.#()"]; - 132 [label="Exit block"]; + 129 [label="Access variable R|/a|"]; + 130 [label="Function call: R|/a|.#()"]; + 131 [label="Exit block"]; } - 109 [label="Exit function test_5" style="filled" fillcolor=red]; + 132 [label="Exit function test_5" style="filled" fillcolor=red]; } - 108 -> {110}; + 108 -> {109}; + 109 -> {110}; 110 -> {111}; - 111 -> {113}; - 112 -> {130}; - 113 -> {115}; - 114 -> {122}; + 111 -> {112}; + 112 -> {113}; + 113 -> {114}; + 114 -> {119 115}; 115 -> {116}; 116 -> {117}; - 117 -> {114 118}; + 117 -> {118}; 118 -> {119}; 119 -> {120}; - 120 -> {121}; - 121 -> {114}; - 122 -> {123 129}; + 120 -> {122 121}; + 121 -> {128}; + 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; - 128 -> {112}; - 129 -> {112}; + 128 -> {129}; + 129 -> {130}; 130 -> {131}; 131 -> {132}; - 132 -> {109}; subgraph cluster_33 { color=red 133 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_34 { color=blue - 135 [label="Enter block"]; - 136 [label="Access variable R|/x|"]; - 137 [label="Check not null: R|/x|!!"]; - 138 [label="Function call: R|/x|!!.R|/A.foo|()"]; - 139 [label="Exit block"]; + 134 [label="Enter block"]; + 135 [label="Access variable R|/x|"]; + 136 [label="Check not null: R|/x|!!"]; + 137 [label="Function call: R|/x|!!.R|/A.foo|()"]; + 138 [label="Exit block"]; } - 134 [label="Exit function test_6" style="filled" fillcolor=red]; + 139 [label="Exit function test_6" style="filled" fillcolor=red]; } - 133 -> {135}; + 133 -> {134}; + 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; 138 -> {139}; - 139 -> {134}; subgraph cluster_35 { color=red 140 [label="Enter function test_7" style="filled" fillcolor=red]; subgraph cluster_36 { color=blue - 142 [label="Enter block"]; - 143 [label="Access variable R|/x|"]; - 144 [label="Check not null: R|/x|!!"]; - 145 [label="Function call: R|/x|!!.R|/A.foo|()"]; - 146 [label="Exit block"]; + 141 [label="Enter block"]; + 142 [label="Access variable R|/x|"]; + 143 [label="Check not null: R|/x|!!"]; + 144 [label="Function call: R|/x|!!.R|/A.foo|()"]; + 145 [label="Exit block"]; } - 141 [label="Exit function test_7" style="filled" fillcolor=red]; + 146 [label="Exit function test_7" style="filled" fillcolor=red]; } - 140 -> {142}; + 140 -> {141}; + 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; - 146 -> {141}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot index 858e6906493..d47c6243474 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot @@ -19,10 +19,10 @@ digraph booleanOperators_kt { subgraph cluster_2 { color=red - 5 [label="Enter class A" style="filled" fillcolor=red]; - 4 [label="Exit class A" style="filled" fillcolor=red]; + 4 [label="Enter class A" style="filled" fillcolor=red]; + 5 [label="Exit class A" style="filled" fillcolor=red]; } - 5 -> {4} [color=green]; + 4 -> {5} [color=green]; subgraph cluster_3 { color=red @@ -33,10 +33,10 @@ digraph booleanOperators_kt { subgraph cluster_4 { color=red - 9 [label="Enter class B" style="filled" fillcolor=red]; - 8 [label="Exit class B" style="filled" fillcolor=red]; + 8 [label="Enter class B" style="filled" fillcolor=red]; + 9 [label="Exit class B" style="filled" fillcolor=red]; } - 9 -> {8} [color=green]; + 8 -> {9} [color=green]; subgraph cluster_5 { color=red @@ -47,70 +47,71 @@ digraph booleanOperators_kt { subgraph cluster_6 { color=red - 13 [label="Enter class C" style="filled" fillcolor=red]; - 12 [label="Exit class C" style="filled" fillcolor=red]; + 12 [label="Enter class C" style="filled" fillcolor=red]; + 13 [label="Exit class C" style="filled" fillcolor=red]; } - 13 -> {12} [color=green]; + 12 -> {13} [color=green]; subgraph cluster_7 { color=red 14 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 16 [label="Enter block"]; + 15 [label="Enter block"]; subgraph cluster_9 { color=blue - 17 [label="Enter when"]; + 16 [label="Enter when"]; subgraph cluster_10 { color=blue - 19 [label="Enter when branch condition "]; + 17 [label="Enter when branch condition "]; subgraph cluster_11 { color=blue - 21 [label="Enter &&"]; - 22 [label="Access variable R|/x|"]; - 23 [label="Type operator: (R|/x| is R|B|)"]; - 24 [label="Exit left part of &&"]; - 25 [label="Enter right part of &&"]; - 26 [label="Access variable R|/x|"]; - 27 [label="Type operator: (R|/x| is R|C|)"]; - 20 [label="Exit &&"]; + 18 [label="Enter &&"]; + 19 [label="Access variable R|/x|"]; + 20 [label="Type operator: (R|/x| is R|B|)"]; + 21 [label="Exit left part of &&"]; + 22 [label="Enter right part of &&"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Type operator: (R|/x| is R|C|)"]; + 25 [label="Exit &&"]; } - 28 [label="Exit when branch condition"]; + 26 [label="Exit when branch condition"]; } - 39 [label="Synthetic else branch"]; - 29 [label="Enter when branch result"]; + 27 [label="Synthetic else branch"]; + 28 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 30 [label="Enter block"]; - 31 [label="Access variable R|/x|"]; - 32 [label="Function call: R|/x|.R|/A.foo|()"]; - 33 [label="Access variable R|/x|"]; - 34 [label="Function call: R|/x|.R|/B.bar|()"]; - 35 [label="Access variable R|/x|"]; - 36 [label="Function call: R|/x|.R|/C.baz|()"]; - 37 [label="Exit block"]; + 29 [label="Enter block"]; + 30 [label="Access variable R|/x|"]; + 31 [label="Function call: R|/x|.R|/A.foo|()"]; + 32 [label="Access variable R|/x|"]; + 33 [label="Function call: R|/x|.R|/B.bar|()"]; + 34 [label="Access variable R|/x|"]; + 35 [label="Function call: R|/x|.R|/C.baz|()"]; + 36 [label="Exit block"]; } - 38 [label="Exit when branch result"]; - 18 [label="Exit when"]; + 37 [label="Exit when branch result"]; + 38 [label="Exit when"]; } - 40 [label="Exit block"]; + 39 [label="Exit block"]; } - 15 [label="Exit function test_1" style="filled" fillcolor=red]; + 40 [label="Exit function test_1" style="filled" fillcolor=red]; } - 14 -> {16}; + 14 -> {15}; + 15 -> {16}; 16 -> {17}; - 17 -> {19}; - 18 -> {40}; - 19 -> {21}; - 20 -> {28}; - 21 -> {22}; + 17 -> {18}; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {25 22}; 22 -> {23}; 23 -> {24}; - 24 -> {20 25}; + 24 -> {25}; 25 -> {26}; - 26 -> {27}; - 27 -> {20}; - 28 -> {29 39}; + 26 -> {28 27}; + 27 -> {38}; + 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; @@ -120,69 +121,69 @@ digraph booleanOperators_kt { 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {18}; - 39 -> {18}; - 40 -> {15}; + 38 -> {39}; + 39 -> {40}; subgraph cluster_13 { color=red 41 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 43 [label="Enter block"]; + 42 [label="Enter block"]; subgraph cluster_15 { color=blue - 44 [label="Enter when"]; + 43 [label="Enter when"]; subgraph cluster_16 { color=blue - 46 [label="Enter when branch condition "]; + 44 [label="Enter when branch condition "]; subgraph cluster_17 { color=blue - 48 [label="Enter ||"]; - 49 [label="Access variable R|/x|"]; - 50 [label="Type operator: (R|/x| is R|B|)"]; - 51 [label="Exit left part of ||"]; - 52 [label="Enter right part of ||"]; - 53 [label="Access variable R|/x|"]; - 54 [label="Type operator: (R|/x| is R|C|)"]; - 47 [label="Exit ||"]; + 45 [label="Enter ||"]; + 46 [label="Access variable R|/x|"]; + 47 [label="Type operator: (R|/x| is R|B|)"]; + 48 [label="Exit left part of ||"]; + 49 [label="Enter right part of ||"]; + 50 [label="Access variable R|/x|"]; + 51 [label="Type operator: (R|/x| is R|C|)"]; + 52 [label="Exit ||"]; } - 55 [label="Exit when branch condition"]; + 53 [label="Exit when branch condition"]; } - 66 [label="Synthetic else branch"]; - 56 [label="Enter when branch result"]; + 54 [label="Synthetic else branch"]; + 55 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 57 [label="Enter block"]; - 58 [label="Access variable R|/x|"]; - 59 [label="Function call: R|/x|.R|/A.foo|()"]; - 60 [label="Access variable R|/x|"]; - 61 [label="Function call: R|/x|.#()"]; - 62 [label="Access variable R|/x|"]; - 63 [label="Function call: R|/x|.#()"]; - 64 [label="Exit block"]; + 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="Function call: R|/x|.#()"]; + 61 [label="Access variable R|/x|"]; + 62 [label="Function call: R|/x|.#()"]; + 63 [label="Exit block"]; } - 65 [label="Exit when branch result"]; - 45 [label="Exit when"]; + 64 [label="Exit when branch result"]; + 65 [label="Exit when"]; } - 67 [label="Exit block"]; + 66 [label="Exit block"]; } - 42 [label="Exit function test_2" style="filled" fillcolor=red]; + 67 [label="Exit function test_2" style="filled" fillcolor=red]; } - 41 -> {43}; + 41 -> {42}; + 42 -> {43}; 43 -> {44}; - 44 -> {46}; - 45 -> {67}; - 46 -> {48}; - 47 -> {55}; - 48 -> {49}; + 44 -> {45}; + 45 -> {46}; + 46 -> {47}; + 47 -> {48}; + 48 -> {52 49}; 49 -> {50}; 50 -> {51}; - 51 -> {47 52}; + 51 -> {52}; 52 -> {53}; - 53 -> {54}; - 54 -> {47}; - 55 -> {56 66}; + 53 -> {55 54}; + 54 -> {65}; + 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; @@ -192,746 +193,745 @@ digraph booleanOperators_kt { 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {45}; - 66 -> {45}; - 67 -> {42}; + 65 -> {66}; + 66 -> {67}; subgraph cluster_19 { color=red 68 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_20 { color=blue - 70 [label="Enter block"]; + 69 [label="Enter block"]; subgraph cluster_21 { color=blue - 71 [label="Enter when"]; + 70 [label="Enter when"]; subgraph cluster_22 { color=blue - 73 [label="Enter when branch condition "]; - 74 [label="Access variable R|/x|"]; - 75 [label="Type operator: (R|/x| !is R|A|)"]; - 76 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()"]; - 77 [label="Exit when branch condition"]; + 71 [label="Enter when branch condition "]; + 72 [label="Access variable R|/x|"]; + 73 [label="Type operator: (R|/x| !is R|A|)"]; + 74 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()"]; + 75 [label="Exit when branch condition"]; } - 84 [label="Synthetic else branch"]; - 78 [label="Enter when branch result"]; + 76 [label="Synthetic else branch"]; + 77 [label="Enter when branch result"]; subgraph cluster_23 { color=blue - 79 [label="Enter block"]; - 80 [label="Access variable R|/x|"]; - 81 [label="Function call: R|/x|.R|/A.foo|()"]; - 82 [label="Exit block"]; + 78 [label="Enter block"]; + 79 [label="Access variable R|/x|"]; + 80 [label="Function call: R|/x|.R|/A.foo|()"]; + 81 [label="Exit block"]; } - 83 [label="Exit when branch result"]; - 72 [label="Exit when"]; + 82 [label="Exit when branch result"]; + 83 [label="Exit when"]; } - 85 [label="Exit block"]; + 84 [label="Exit block"]; } - 69 [label="Exit function test_3" style="filled" fillcolor=red]; + 85 [label="Exit function test_3" style="filled" fillcolor=red]; } - 68 -> {70}; + 68 -> {69}; + 69 -> {70}; 70 -> {71}; - 71 -> {73}; - 72 -> {85}; + 71 -> {72}; + 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76}; - 76 -> {77}; - 77 -> {78 84}; + 75 -> {77 76}; + 76 -> {83}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {72}; - 84 -> {72}; - 85 -> {69}; + 83 -> {84}; + 84 -> {85}; subgraph cluster_24 { color=red 86 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 88 [label="Enter block"]; + 87 [label="Enter block"]; subgraph cluster_26 { color=blue - 89 [label="Enter when"]; + 88 [label="Enter when"]; subgraph cluster_27 { color=blue - 91 [label="Enter when branch condition "]; + 89 [label="Enter when branch condition "]; subgraph cluster_28 { color=blue - 93 [label="Enter ||"]; - 94 [label="Access variable R|/x|"]; - 95 [label="Type operator: (R|/x| !is R|kotlin/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 =="]; - 92 [label="Exit ||"]; + 90 [label="Enter ||"]; + 91 [label="Access variable R|/x|"]; + 92 [label="Type operator: (R|/x| !is R|kotlin/String|)"]; + 93 [label="Exit left part of ||"]; + 94 [label="Enter right part of ||"]; + 95 [label="Access variable R|/x|"]; + 96 [label="Access variable R|kotlin/String.length|"]; + 97 [label="Const: Int(0)"]; + 98 [label="Operator =="]; + 99 [label="Exit ||"]; } - 102 [label="Exit when branch condition"]; + 100 [label="Exit when branch condition"]; } - 109 [label="Synthetic else branch"]; - 103 [label="Enter when branch result"]; + 101 [label="Synthetic else branch"]; + 102 [label="Enter when branch result"]; subgraph cluster_29 { color=blue - 104 [label="Enter block"]; - 105 [label="Access variable R|/x|"]; - 106 [label="Access variable #"]; - 107 [label="Exit block"]; + 103 [label="Enter block"]; + 104 [label="Access variable R|/x|"]; + 105 [label="Access variable #"]; + 106 [label="Exit block"]; } - 108 [label="Exit when branch result"]; - 90 [label="Exit when"]; + 107 [label="Exit when branch result"]; + 108 [label="Exit when"]; } - 110 [label="Access variable R|/x|"]; - 111 [label="Access variable #"]; - 112 [label="Exit block"]; + 109 [label="Access variable R|/x|"]; + 110 [label="Access variable #"]; + 111 [label="Exit block"]; } - 87 [label="Exit function test_4" style="filled" fillcolor=red]; + 112 [label="Exit function test_4" style="filled" fillcolor=red]; } - 86 -> {88}; + 86 -> {87}; + 87 -> {88}; 88 -> {89}; - 89 -> {91}; - 90 -> {110}; - 91 -> {93}; - 92 -> {102}; - 93 -> {94}; + 89 -> {90}; + 90 -> {91}; + 91 -> {92}; + 92 -> {93}; + 93 -> {99 94}; 94 -> {95}; 95 -> {96}; - 96 -> {92 97}; + 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; - 100 -> {101}; - 101 -> {92}; - 102 -> {103 109}; + 100 -> {102 101}; + 101 -> {108}; + 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {90}; - 109 -> {90}; + 108 -> {109}; + 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {87}; subgraph cluster_30 { color=red 113 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_31 { color=blue - 115 [label="Enter block"]; + 114 [label="Enter block"]; subgraph cluster_32 { color=blue - 116 [label="Enter when"]; + 115 [label="Enter when"]; subgraph cluster_33 { color=blue - 118 [label="Enter when branch condition "]; + 116 [label="Enter when branch condition "]; subgraph cluster_34 { color=blue - 120 [label="Enter &&"]; - 121 [label="Access variable R|/x|"]; - 122 [label="Type operator: (R|/x| is R|A|)"]; - 123 [label="Exit left part of &&"]; - 124 [label="Enter right part of &&"]; - 125 [label="Access variable R|/x|"]; - 126 [label="Function call: R|/x|.R|/A.bool|()"]; - 119 [label="Exit &&"]; + 117 [label="Enter &&"]; + 118 [label="Access variable R|/x|"]; + 119 [label="Type operator: (R|/x| is R|A|)"]; + 120 [label="Exit left part of &&"]; + 121 [label="Enter right part of &&"]; + 122 [label="Access variable R|/x|"]; + 123 [label="Function call: R|/x|.R|/A.bool|()"]; + 124 [label="Exit &&"]; } - 127 [label="Exit when branch condition"]; + 125 [label="Exit when branch condition"]; } - 134 [label="Synthetic else branch"]; - 128 [label="Enter when branch result"]; + 126 [label="Synthetic else branch"]; + 127 [label="Enter when branch result"]; subgraph cluster_35 { color=blue - 129 [label="Enter block"]; - 130 [label="Access variable R|/x|"]; - 131 [label="Function call: R|/x|.R|/A.foo|()"]; - 132 [label="Exit block"]; + 128 [label="Enter block"]; + 129 [label="Access variable R|/x|"]; + 130 [label="Function call: R|/x|.R|/A.foo|()"]; + 131 [label="Exit block"]; } - 133 [label="Exit when branch result"]; - 117 [label="Exit when"]; + 132 [label="Exit when branch result"]; + 133 [label="Exit when"]; } - 135 [label="Exit block"]; + 134 [label="Exit block"]; } - 114 [label="Exit function test_5" style="filled" fillcolor=red]; + 135 [label="Exit function test_5" style="filled" fillcolor=red]; } - 113 -> {115}; + 113 -> {114}; + 114 -> {115}; 115 -> {116}; - 116 -> {118}; - 117 -> {135}; - 118 -> {120}; - 119 -> {127}; - 120 -> {121}; + 116 -> {117}; + 117 -> {118}; + 118 -> {119}; + 119 -> {120}; + 120 -> {124 121}; 121 -> {122}; 122 -> {123}; - 123 -> {119 124}; + 123 -> {124}; 124 -> {125}; - 125 -> {126}; - 126 -> {119}; - 127 -> {128 134}; + 125 -> {127 126}; + 126 -> {133}; + 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {117}; - 134 -> {117}; - 135 -> {114}; + 133 -> {134}; + 134 -> {135}; subgraph cluster_36 { color=red 136 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_37 { color=blue - 138 [label="Enter block"]; + 137 [label="Enter block"]; subgraph cluster_38 { color=blue - 139 [label="Enter when"]; + 138 [label="Enter when"]; subgraph cluster_39 { color=blue - 141 [label="Enter when branch condition "]; - 142 [label="Access variable R|/x|"]; - 143 [label="Type operator: (R|/x| !is R|A|)"]; - 144 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()"]; - 145 [label="Exit when branch condition"]; + 139 [label="Enter when branch condition "]; + 140 [label="Access variable R|/x|"]; + 141 [label="Type operator: (R|/x| !is R|A|)"]; + 142 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()"]; + 143 [label="Exit when branch condition"]; } - 152 [label="Synthetic else branch"]; - 146 [label="Enter when branch result"]; + 144 [label="Synthetic else branch"]; + 145 [label="Enter when branch result"]; subgraph cluster_40 { color=blue - 147 [label="Enter block"]; - 148 [label="Access variable R|/x|"]; - 149 [label="Function call: R|/x|.R|/A.foo|()"]; - 150 [label="Exit block"]; + 146 [label="Enter block"]; + 147 [label="Access variable R|/x|"]; + 148 [label="Function call: R|/x|.R|/A.foo|()"]; + 149 [label="Exit block"]; } - 151 [label="Exit when branch result"]; - 140 [label="Exit when"]; + 150 [label="Exit when branch result"]; + 151 [label="Exit when"]; } - 153 [label="Exit block"]; + 152 [label="Exit block"]; } - 137 [label="Exit function test_6" style="filled" fillcolor=red]; + 153 [label="Exit function test_6" style="filled" fillcolor=red]; } - 136 -> {138}; + 136 -> {137}; + 137 -> {138}; 138 -> {139}; - 139 -> {141}; - 140 -> {153}; + 139 -> {140}; + 140 -> {141}; 141 -> {142}; 142 -> {143}; - 143 -> {144}; - 144 -> {145}; - 145 -> {146 152}; + 143 -> {145 144}; + 144 -> {151}; + 145 -> {146}; 146 -> {147}; 147 -> {148}; 148 -> {149}; 149 -> {150}; 150 -> {151}; - 151 -> {140}; - 152 -> {140}; - 153 -> {137}; + 151 -> {152}; + 152 -> {153}; subgraph cluster_41 { color=red 154 [label="Enter function test_7" style="filled" fillcolor=red]; subgraph cluster_42 { color=blue - 156 [label="Enter block"]; + 155 [label="Enter block"]; subgraph cluster_43 { color=blue - 157 [label="Enter when"]; + 156 [label="Enter when"]; subgraph cluster_44 { color=blue - 159 [label="Enter when branch condition "]; + 157 [label="Enter when branch condition "]; subgraph cluster_45 { color=blue - 161 [label="Enter ||"]; - 162 [label="Access variable R|/x|"]; - 163 [label="Type operator: (R|/x| is R|A|)"]; - 164 [label="Exit left part of ||"]; - 165 [label="Enter right part of ||"]; - 166 [label="Const: Boolean(false)"]; - 160 [label="Exit ||"]; + 158 [label="Enter ||"]; + 159 [label="Access variable R|/x|"]; + 160 [label="Type operator: (R|/x| is R|A|)"]; + 161 [label="Exit left part of ||"]; + 162 [label="Enter right part of ||"]; + 163 [label="Const: Boolean(false)"]; + 164 [label="Exit ||"]; } - 167 [label="Exit when branch condition"]; + 165 [label="Exit when branch condition"]; } - 174 [label="Synthetic else branch"]; - 168 [label="Enter when branch result"]; + 166 [label="Synthetic else branch"]; + 167 [label="Enter when branch result"]; subgraph cluster_46 { color=blue - 169 [label="Enter block"]; - 170 [label="Access variable R|/x|"]; - 171 [label="Function call: R|/x|.#()"]; - 172 [label="Exit block"]; + 168 [label="Enter block"]; + 169 [label="Access variable R|/x|"]; + 170 [label="Function call: R|/x|.#()"]; + 171 [label="Exit block"]; } - 173 [label="Exit when branch result"]; - 158 [label="Exit when"]; + 172 [label="Exit when branch result"]; + 173 [label="Exit when"]; } - 175 [label="Exit block"]; + 174 [label="Exit block"]; } - 155 [label="Exit function test_7" style="filled" fillcolor=red]; + 175 [label="Exit function test_7" style="filled" fillcolor=red]; } - 154 -> {156}; + 154 -> {155}; + 155 -> {156}; 156 -> {157}; - 157 -> {159}; - 158 -> {175}; - 159 -> {161}; - 160 -> {167}; - 161 -> {162}; + 157 -> {158}; + 158 -> {159}; + 159 -> {160}; + 160 -> {161}; + 161 -> {164 162}; 162 -> {163}; 163 -> {164}; - 164 -> {160 165}; - 165 -> {166}; - 166 -> {160}; - 167 -> {168 174}; + 164 -> {165}; + 165 -> {167 166}; + 166 -> {173}; + 167 -> {168}; 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; 172 -> {173}; - 173 -> {158}; - 174 -> {158}; - 175 -> {155}; + 173 -> {174}; + 174 -> {175}; subgraph cluster_47 { color=red 176 [label="Enter function test_8" style="filled" fillcolor=red]; subgraph cluster_48 { color=blue - 178 [label="Enter block"]; + 177 [label="Enter block"]; subgraph cluster_49 { color=blue - 179 [label="Enter when"]; + 178 [label="Enter when"]; subgraph cluster_50 { color=blue - 181 [label="Enter when branch condition "]; + 179 [label="Enter when branch condition "]; subgraph cluster_51 { color=blue - 183 [label="Enter ||"]; - 184 [label="Const: Boolean(false)"]; - 185 [label="Exit left part of ||"]; - 186 [label="Enter right part of ||"]; - 187 [label="Access variable R|/x|"]; - 188 [label="Type operator: (R|/x| is R|A|)"]; - 182 [label="Exit ||"]; + 180 [label="Enter ||"]; + 181 [label="Const: Boolean(false)"]; + 182 [label="Exit left part of ||"]; + 183 [label="Enter right part of ||"]; + 184 [label="Access variable R|/x|"]; + 185 [label="Type operator: (R|/x| is R|A|)"]; + 186 [label="Exit ||"]; } - 189 [label="Exit when branch condition"]; + 187 [label="Exit when branch condition"]; } - 196 [label="Synthetic else branch"]; - 190 [label="Enter when branch result"]; + 188 [label="Synthetic else branch"]; + 189 [label="Enter when branch result"]; subgraph cluster_52 { color=blue - 191 [label="Enter block"]; - 192 [label="Access variable R|/x|"]; - 193 [label="Function call: R|/x|.#()"]; - 194 [label="Exit block"]; + 190 [label="Enter block"]; + 191 [label="Access variable R|/x|"]; + 192 [label="Function call: R|/x|.#()"]; + 193 [label="Exit block"]; } - 195 [label="Exit when branch result"]; - 180 [label="Exit when"]; + 194 [label="Exit when branch result"]; + 195 [label="Exit when"]; } - 197 [label="Exit block"]; + 196 [label="Exit block"]; } - 177 [label="Exit function test_8" style="filled" fillcolor=red]; + 197 [label="Exit function test_8" style="filled" fillcolor=red]; } - 176 -> {178}; + 176 -> {177}; + 177 -> {178}; 178 -> {179}; - 179 -> {181}; - 180 -> {197}; - 181 -> {183}; - 182 -> {189}; + 179 -> {180}; + 180 -> {181}; + 181 -> {182}; + 182 -> {183}; + 182 -> {186} [style=dotted]; 183 -> {184}; 184 -> {185}; 185 -> {186}; - 185 -> {182} [style=dotted]; 186 -> {187}; - 187 -> {188}; - 188 -> {182}; - 189 -> {190 196}; + 187 -> {189 188}; + 188 -> {195}; + 189 -> {190}; 190 -> {191}; 191 -> {192}; 192 -> {193}; 193 -> {194}; 194 -> {195}; - 195 -> {180}; - 196 -> {180}; - 197 -> {177}; + 195 -> {196}; + 196 -> {197}; subgraph cluster_53 { color=red 198 [label="Enter function test_9" style="filled" fillcolor=red]; subgraph cluster_54 { color=blue - 200 [label="Enter block"]; + 199 [label="Enter block"]; subgraph cluster_55 { color=blue - 201 [label="Enter when"]; + 200 [label="Enter when"]; subgraph cluster_56 { color=blue - 203 [label="Enter when branch condition "]; + 201 [label="Enter when branch condition "]; subgraph cluster_57 { color=blue - 205 [label="Enter ||"]; - 206 [label="Access variable R|/x|"]; - 207 [label="Type operator: (R|/x| is R|A|)"]; - 208 [label="Exit left part of ||"]; - 209 [label="Enter right part of ||"]; - 210 [label="Const: Boolean(true)"]; - 204 [label="Exit ||"]; + 202 [label="Enter ||"]; + 203 [label="Access variable R|/x|"]; + 204 [label="Type operator: (R|/x| is R|A|)"]; + 205 [label="Exit left part of ||"]; + 206 [label="Enter right part of ||"]; + 207 [label="Const: Boolean(true)"]; + 208 [label="Exit ||"]; } - 211 [label="Exit when branch condition"]; + 209 [label="Exit when branch condition"]; } - 218 [label="Synthetic else branch"]; - 212 [label="Enter when branch result"]; + 210 [label="Synthetic else branch"]; + 211 [label="Enter when branch result"]; subgraph cluster_58 { color=blue - 213 [label="Enter block"]; - 214 [label="Access variable R|/x|"]; - 215 [label="Function call: R|/x|.#()"]; - 216 [label="Exit block"]; + 212 [label="Enter block"]; + 213 [label="Access variable R|/x|"]; + 214 [label="Function call: R|/x|.#()"]; + 215 [label="Exit block"]; } - 217 [label="Exit when branch result"]; - 202 [label="Exit when"]; + 216 [label="Exit when branch result"]; + 217 [label="Exit when"]; } - 219 [label="Exit block"]; + 218 [label="Exit block"]; } - 199 [label="Exit function test_9" style="filled" fillcolor=red]; + 219 [label="Exit function test_9" style="filled" fillcolor=red]; } - 198 -> {200}; + 198 -> {199}; + 199 -> {200}; 200 -> {201}; - 201 -> {203}; - 202 -> {219}; - 203 -> {205}; - 204 -> {211}; - 205 -> {206}; + 201 -> {202}; + 202 -> {203}; + 203 -> {204}; + 204 -> {205}; + 205 -> {208 206}; 206 -> {207}; 207 -> {208}; - 208 -> {204 209}; - 209 -> {210}; - 210 -> {204}; - 211 -> {212 218}; + 208 -> {209}; + 209 -> {211 210}; + 210 -> {217}; + 211 -> {212}; 212 -> {213}; 213 -> {214}; 214 -> {215}; 215 -> {216}; 216 -> {217}; - 217 -> {202}; - 218 -> {202}; - 219 -> {199}; + 217 -> {218}; + 218 -> {219}; subgraph cluster_59 { color=red 220 [label="Enter function test_10" style="filled" fillcolor=red]; subgraph cluster_60 { color=blue - 222 [label="Enter block"]; + 221 [label="Enter block"]; subgraph cluster_61 { color=blue - 223 [label="Enter when"]; + 222 [label="Enter when"]; subgraph cluster_62 { color=blue - 225 [label="Enter when branch condition "]; + 223 [label="Enter when branch condition "]; subgraph cluster_63 { color=blue - 227 [label="Enter ||"]; - 228 [label="Const: Boolean(true)"]; - 229 [label="Exit left part of ||"]; - 230 [label="Enter right part of ||" style="filled" fillcolor=gray]; - 231 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 232 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; - 226 [label="Exit ||"]; + 224 [label="Enter ||"]; + 225 [label="Const: Boolean(true)"]; + 226 [label="Exit left part of ||"]; + 227 [label="Enter right part of ||" style="filled" fillcolor=gray]; + 228 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 229 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; + 230 [label="Exit ||"]; } - 233 [label="Exit when branch condition"]; + 231 [label="Exit when branch condition"]; } - 240 [label="Synthetic else branch"]; - 234 [label="Enter when branch result"]; + 232 [label="Synthetic else branch"]; + 233 [label="Enter when branch result"]; subgraph cluster_64 { color=blue - 235 [label="Enter block"]; - 236 [label="Access variable R|/x|"]; - 237 [label="Function call: R|/x|.#()"]; - 238 [label="Exit block"]; + 234 [label="Enter block"]; + 235 [label="Access variable R|/x|"]; + 236 [label="Function call: R|/x|.#()"]; + 237 [label="Exit block"]; } - 239 [label="Exit when branch result"]; - 224 [label="Exit when"]; + 238 [label="Exit when branch result"]; + 239 [label="Exit when"]; } - 241 [label="Exit block"]; + 240 [label="Exit block"]; } - 221 [label="Exit function test_10" style="filled" fillcolor=red]; + 241 [label="Exit function test_10" style="filled" fillcolor=red]; } - 220 -> {222}; + 220 -> {221}; + 221 -> {222}; 222 -> {223}; - 223 -> {225}; - 224 -> {241}; - 225 -> {227}; - 226 -> {233}; - 227 -> {228}; - 228 -> {229}; - 229 -> {226}; + 223 -> {224}; + 224 -> {225}; + 225 -> {226}; + 226 -> {230}; + 226 -> {227} [style=dotted]; + 227 -> {228} [style=dotted]; + 228 -> {229} [style=dotted]; 229 -> {230} [style=dotted]; - 230 -> {231} [style=dotted]; - 231 -> {232} [style=dotted]; - 232 -> {226} [style=dotted]; - 233 -> {234 240}; + 230 -> {231}; + 231 -> {233 232}; + 232 -> {239}; + 233 -> {234}; 234 -> {235}; 235 -> {236}; 236 -> {237}; 237 -> {238}; 238 -> {239}; - 239 -> {224}; - 240 -> {224}; - 241 -> {221}; + 239 -> {240}; + 240 -> {241}; subgraph cluster_65 { color=red 242 [label="Enter function test_11" style="filled" fillcolor=red]; subgraph cluster_66 { color=blue - 244 [label="Enter block"]; + 243 [label="Enter block"]; subgraph cluster_67 { color=blue - 245 [label="Enter when"]; + 244 [label="Enter when"]; subgraph cluster_68 { color=blue - 247 [label="Enter when branch condition "]; + 245 [label="Enter when branch condition "]; subgraph cluster_69 { color=blue - 249 [label="Enter &&"]; - 250 [label="Const: Boolean(false)"]; - 251 [label="Exit left part of &&"]; - 252 [label="Enter right part of &&" style="filled" fillcolor=gray]; - 253 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 254 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; - 248 [label="Exit &&"]; + 246 [label="Enter &&"]; + 247 [label="Const: Boolean(false)"]; + 248 [label="Exit left part of &&"]; + 249 [label="Enter right part of &&" style="filled" fillcolor=gray]; + 250 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 251 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; + 252 [label="Exit &&"]; } - 255 [label="Exit when branch condition"]; + 253 [label="Exit when branch condition"]; } - 262 [label="Synthetic else branch"]; - 256 [label="Enter when branch result"]; + 254 [label="Synthetic else branch"]; + 255 [label="Enter when branch result"]; subgraph cluster_70 { color=blue - 257 [label="Enter block"]; - 258 [label="Access variable R|/x|"]; - 259 [label="Function call: R|/x|.#()"]; - 260 [label="Exit block"]; + 256 [label="Enter block"]; + 257 [label="Access variable R|/x|"]; + 258 [label="Function call: R|/x|.#()"]; + 259 [label="Exit block"]; } - 261 [label="Exit when branch result"]; - 246 [label="Exit when"]; + 260 [label="Exit when branch result"]; + 261 [label="Exit when"]; } - 263 [label="Exit block"]; + 262 [label="Exit block"]; } - 243 [label="Exit function test_11" style="filled" fillcolor=red]; + 263 [label="Exit function test_11" style="filled" fillcolor=red]; } - 242 -> {244}; + 242 -> {243}; + 243 -> {244}; 244 -> {245}; - 245 -> {247}; - 246 -> {263}; - 247 -> {249}; - 248 -> {255}; - 249 -> {250}; - 250 -> {251}; - 251 -> {248}; + 245 -> {246}; + 246 -> {247}; + 247 -> {248}; + 248 -> {252}; + 248 -> {249} [style=dotted]; + 249 -> {250} [style=dotted]; + 250 -> {251} [style=dotted]; 251 -> {252} [style=dotted]; - 252 -> {253} [style=dotted]; - 253 -> {254} [style=dotted]; - 254 -> {248} [style=dotted]; - 255 -> {256 262}; + 252 -> {253}; + 253 -> {255 254}; + 254 -> {261}; + 255 -> {256}; 256 -> {257}; 257 -> {258}; 258 -> {259}; 259 -> {260}; 260 -> {261}; - 261 -> {246}; - 262 -> {246}; - 263 -> {243}; + 261 -> {262}; + 262 -> {263}; subgraph cluster_71 { color=red 264 [label="Enter function test_12" style="filled" fillcolor=red]; subgraph cluster_72 { color=blue - 266 [label="Enter block"]; + 265 [label="Enter block"]; subgraph cluster_73 { color=blue - 267 [label="Enter when"]; + 266 [label="Enter when"]; subgraph cluster_74 { color=blue - 269 [label="Enter when branch condition "]; + 267 [label="Enter when branch condition "]; subgraph cluster_75 { color=blue - 271 [label="Enter &&"]; - 272 [label="Access variable R|/x|"]; - 273 [label="Type operator: (R|/x| is R|A|)"]; - 274 [label="Exit left part of &&"]; - 275 [label="Enter right part of &&"]; - 276 [label="Const: Boolean(false)"]; - 270 [label="Exit &&"]; + 268 [label="Enter &&"]; + 269 [label="Access variable R|/x|"]; + 270 [label="Type operator: (R|/x| is R|A|)"]; + 271 [label="Exit left part of &&"]; + 272 [label="Enter right part of &&"]; + 273 [label="Const: Boolean(false)"]; + 274 [label="Exit &&"]; } - 277 [label="Exit when branch condition"]; + 275 [label="Exit when branch condition"]; } - 284 [label="Synthetic else branch"]; - 278 [label="Enter when branch result"]; + 276 [label="Synthetic else branch"]; + 277 [label="Enter when branch result"]; subgraph cluster_76 { color=blue - 279 [label="Enter block"]; - 280 [label="Access variable R|/x|"]; - 281 [label="Function call: R|/x|.R|/A.foo|()"]; - 282 [label="Exit block"]; + 278 [label="Enter block"]; + 279 [label="Access variable R|/x|"]; + 280 [label="Function call: R|/x|.R|/A.foo|()"]; + 281 [label="Exit block"]; } - 283 [label="Exit when branch result"]; - 268 [label="Exit when"]; + 282 [label="Exit when branch result"]; + 283 [label="Exit when"]; } - 285 [label="Exit block"]; + 284 [label="Exit block"]; } - 265 [label="Exit function test_12" style="filled" fillcolor=red]; + 285 [label="Exit function test_12" style="filled" fillcolor=red]; } - 264 -> {266}; + 264 -> {265}; + 265 -> {266}; 266 -> {267}; - 267 -> {269}; - 268 -> {285}; - 269 -> {271}; - 270 -> {277}; - 271 -> {272}; + 267 -> {268}; + 268 -> {269}; + 269 -> {270}; + 270 -> {271}; + 271 -> {274 272}; 272 -> {273}; 273 -> {274}; - 274 -> {270 275}; - 275 -> {276}; - 276 -> {270}; - 277 -> {278 284}; + 274 -> {275}; + 275 -> {277 276}; + 276 -> {283}; + 277 -> {278}; 278 -> {279}; 279 -> {280}; 280 -> {281}; 281 -> {282}; 282 -> {283}; - 283 -> {268}; - 284 -> {268}; - 285 -> {265}; + 283 -> {284}; + 284 -> {285}; subgraph cluster_77 { color=red 286 [label="Enter function test_13" style="filled" fillcolor=red]; subgraph cluster_78 { color=blue - 288 [label="Enter block"]; + 287 [label="Enter block"]; subgraph cluster_79 { color=blue - 289 [label="Enter when"]; + 288 [label="Enter when"]; subgraph cluster_80 { color=blue - 291 [label="Enter when branch condition "]; + 289 [label="Enter when branch condition "]; subgraph cluster_81 { color=blue - 293 [label="Enter &&"]; - 294 [label="Const: Boolean(true)"]; - 295 [label="Exit left part of &&"]; - 296 [label="Enter right part of &&"]; - 297 [label="Access variable R|/x|"]; - 298 [label="Type operator: (R|/x| is R|A|)"]; - 292 [label="Exit &&"]; + 290 [label="Enter &&"]; + 291 [label="Const: Boolean(true)"]; + 292 [label="Exit left part of &&"]; + 293 [label="Enter right part of &&"]; + 294 [label="Access variable R|/x|"]; + 295 [label="Type operator: (R|/x| is R|A|)"]; + 296 [label="Exit &&"]; } - 299 [label="Exit when branch condition"]; + 297 [label="Exit when branch condition"]; } - 306 [label="Synthetic else branch"]; - 300 [label="Enter when branch result"]; + 298 [label="Synthetic else branch"]; + 299 [label="Enter when branch result"]; subgraph cluster_82 { color=blue - 301 [label="Enter block"]; - 302 [label="Access variable R|/x|"]; - 303 [label="Function call: R|/x|.R|/A.foo|()"]; - 304 [label="Exit block"]; + 300 [label="Enter block"]; + 301 [label="Access variable R|/x|"]; + 302 [label="Function call: R|/x|.R|/A.foo|()"]; + 303 [label="Exit block"]; } - 305 [label="Exit when branch result"]; - 290 [label="Exit when"]; + 304 [label="Exit when branch result"]; + 305 [label="Exit when"]; } - 307 [label="Exit block"]; + 306 [label="Exit block"]; } - 287 [label="Exit function test_13" style="filled" fillcolor=red]; + 307 [label="Exit function test_13" style="filled" fillcolor=red]; } - 286 -> {288}; + 286 -> {287}; + 287 -> {288}; 288 -> {289}; - 289 -> {291}; - 290 -> {307}; - 291 -> {293}; - 292 -> {299}; + 289 -> {290}; + 290 -> {291}; + 291 -> {292}; + 292 -> {293}; + 292 -> {296} [style=dotted]; 293 -> {294}; 294 -> {295}; 295 -> {296}; - 295 -> {292} [style=dotted]; 296 -> {297}; - 297 -> {298}; - 298 -> {292}; - 299 -> {300 306}; + 297 -> {299 298}; + 298 -> {305}; + 299 -> {300}; 300 -> {301}; 301 -> {302}; 302 -> {303}; 303 -> {304}; 304 -> {305}; - 305 -> {290}; - 306 -> {290}; - 307 -> {287}; + 305 -> {306}; + 306 -> {307}; subgraph cluster_83 { color=red 308 [label="Enter function test_14" style="filled" fillcolor=red]; subgraph cluster_84 { color=blue - 310 [label="Enter block"]; + 309 [label="Enter block"]; subgraph cluster_85 { color=blue - 311 [label="Enter when"]; + 310 [label="Enter when"]; subgraph cluster_86 { color=blue - 313 [label="Enter when branch condition "]; + 311 [label="Enter when branch condition "]; subgraph cluster_87 { color=blue - 315 [label="Enter &&"]; - 316 [label="Access variable R|/x|"]; - 317 [label="Type operator: (R|/x| is R|A|)"]; - 318 [label="Exit left part of &&"]; - 319 [label="Enter right part of &&"]; - 320 [label="Const: Boolean(false)"]; - 314 [label="Exit &&"]; + 312 [label="Enter &&"]; + 313 [label="Access variable R|/x|"]; + 314 [label="Type operator: (R|/x| is R|A|)"]; + 315 [label="Exit left part of &&"]; + 316 [label="Enter right part of &&"]; + 317 [label="Const: Boolean(false)"]; + 318 [label="Exit &&"]; } - 321 [label="Exit when branch condition"]; + 319 [label="Exit when branch condition"]; } - 328 [label="Synthetic else branch"]; - 322 [label="Enter when branch result"]; + 320 [label="Synthetic else branch"]; + 321 [label="Enter when branch result"]; subgraph cluster_88 { color=blue - 323 [label="Enter block"]; - 324 [label="Access variable R|/x|"]; - 325 [label="Function call: R|/x|.R|/A.foo|()"]; - 326 [label="Exit block"]; + 322 [label="Enter block"]; + 323 [label="Access variable R|/x|"]; + 324 [label="Function call: R|/x|.R|/A.foo|()"]; + 325 [label="Exit block"]; } - 327 [label="Exit when branch result"]; - 312 [label="Exit when"]; + 326 [label="Exit when branch result"]; + 327 [label="Exit when"]; } - 329 [label="Exit block"]; + 328 [label="Exit block"]; } - 309 [label="Exit function test_14" style="filled" fillcolor=red]; + 329 [label="Exit function test_14" style="filled" fillcolor=red]; } - 308 -> {310}; + 308 -> {309}; + 309 -> {310}; 310 -> {311}; - 311 -> {313}; - 312 -> {329}; - 313 -> {315}; - 314 -> {321}; - 315 -> {316}; + 311 -> {312}; + 312 -> {313}; + 313 -> {314}; + 314 -> {315}; + 315 -> {318 316}; 316 -> {317}; 317 -> {318}; - 318 -> {314 319}; - 319 -> {320}; - 320 -> {314}; - 321 -> {322 328}; + 318 -> {319}; + 319 -> {321 320}; + 320 -> {327}; + 321 -> {322}; 322 -> {323}; 323 -> {324}; 324 -> {325}; 325 -> {326}; 326 -> {327}; - 327 -> {312}; - 328 -> {312}; - 329 -> {309}; + 327 -> {328}; + 328 -> {329}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot index 46c70dc6f1e..64279d206c8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot @@ -19,76 +19,77 @@ digraph equalsToBoolean_kt { subgraph cluster_2 { color=red - 5 [label="Enter class A" style="filled" fillcolor=red]; - 4 [label="Exit class A" style="filled" fillcolor=red]; + 4 [label="Enter class A" style="filled" fillcolor=red]; + 5 [label="Exit class A" style="filled" fillcolor=red]; } - 5 -> {4} [color=green]; + 4 -> {5} [color=green]; subgraph cluster_3 { color=red 6 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 8 [label="Enter block"]; + 7 [label="Enter block"]; subgraph cluster_5 { color=blue - 9 [label="Enter when"]; + 8 [label="Enter when"]; subgraph cluster_6 { color=blue - 11 [label="Enter when branch condition "]; - 12 [label="Access variable R|/b|"]; + 9 [label="Enter when branch condition "]; + 10 [label="Access variable R|/b|"]; + 11 [label="Const: Boolean(true)"]; + 12 [label="Operator =="]; 13 [label="Const: Boolean(true)"]; 14 [label="Operator =="]; - 15 [label="Const: Boolean(true)"]; - 16 [label="Operator =="]; - 17 [label="Exit when branch condition"]; + 15 [label="Exit when branch condition"]; } subgraph cluster_7 { color=blue - 24 [label="Enter when branch condition else"]; - 25 [label="Exit when branch condition"]; + 16 [label="Enter when branch condition else"]; + 17 [label="Exit when branch condition"]; } - 26 [label="Enter when branch result"]; - subgraph cluster_8 { - color=blue - 27 [label="Enter block"]; - 28 [label="Access variable R|/b|"]; - 29 [label="Function call: R|/b|.#()"]; - 30 [label="Exit block"]; - } - 31 [label="Exit when branch result"]; 18 [label="Enter when branch result"]; - subgraph cluster_9 { + subgraph cluster_8 { color=blue 19 [label="Enter block"]; 20 [label="Access variable R|/b|"]; - 21 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 21 [label="Function call: R|/b|.#()"]; 22 [label="Exit block"]; } 23 [label="Exit when branch result"]; - 10 [label="Exit when"]; + 24 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 25 [label="Enter block"]; + 26 [label="Access variable R|/b|"]; + 27 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 28 [label="Exit block"]; + } + 29 [label="Exit when branch result"]; + 30 [label="Exit when"]; } - 32 [label="Exit block"]; + 31 [label="Exit block"]; } - 7 [label="Exit function test_1" style="filled" fillcolor=red]; + 32 [label="Exit function test_1" style="filled" fillcolor=red]; } - 6 -> {8}; + 6 -> {7}; + 7 -> {8}; 8 -> {9}; - 9 -> {11}; - 10 -> {32}; + 9 -> {10}; + 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16}; + 15 -> {24 16}; 16 -> {17}; - 17 -> {18 24}; + 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {10}; + 23 -> {30}; 24 -> {25}; 25 -> {26}; 26 -> {27}; @@ -96,74 +97,74 @@ digraph equalsToBoolean_kt { 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {10}; - 32 -> {7}; + 31 -> {32}; subgraph cluster_10 { color=red 33 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 35 [label="Enter block"]; + 34 [label="Enter block"]; subgraph cluster_12 { color=blue - 36 [label="Enter when"]; + 35 [label="Enter when"]; subgraph cluster_13 { color=blue - 38 [label="Enter when branch condition "]; - 39 [label="Access variable R|/b|"]; + 36 [label="Enter when branch condition "]; + 37 [label="Access variable R|/b|"]; + 38 [label="Const: Boolean(true)"]; + 39 [label="Operator =="]; 40 [label="Const: Boolean(true)"]; - 41 [label="Operator =="]; - 42 [label="Const: Boolean(true)"]; - 43 [label="Operator !="]; - 44 [label="Exit when branch condition"]; + 41 [label="Operator !="]; + 42 [label="Exit when branch condition"]; } subgraph cluster_14 { color=blue - 51 [label="Enter when branch condition else"]; - 52 [label="Exit when branch condition"]; + 43 [label="Enter when branch condition else"]; + 44 [label="Exit when branch condition"]; } - 53 [label="Enter when branch result"]; - subgraph cluster_15 { - color=blue - 54 [label="Enter block"]; - 55 [label="Access variable R|/b|"]; - 56 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 57 [label="Exit block"]; - } - 58 [label="Exit when branch result"]; 45 [label="Enter when branch result"]; - subgraph cluster_16 { + subgraph cluster_15 { color=blue 46 [label="Enter block"]; 47 [label="Access variable R|/b|"]; - 48 [label="Function call: R|/b|.#()"]; + 48 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; 49 [label="Exit block"]; } 50 [label="Exit when branch result"]; - 37 [label="Exit when"]; + 51 [label="Enter when branch result"]; + subgraph cluster_16 { + color=blue + 52 [label="Enter block"]; + 53 [label="Access variable R|/b|"]; + 54 [label="Function call: R|/b|.#()"]; + 55 [label="Exit block"]; + } + 56 [label="Exit when branch result"]; + 57 [label="Exit when"]; } - 59 [label="Exit block"]; + 58 [label="Exit block"]; } - 34 [label="Exit function test_2" style="filled" fillcolor=red]; + 59 [label="Exit function test_2" style="filled" fillcolor=red]; } - 33 -> {35}; + 33 -> {34}; + 34 -> {35}; 35 -> {36}; - 36 -> {38}; - 37 -> {59}; + 36 -> {37}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43}; + 42 -> {51 43}; 43 -> {44}; - 44 -> {45 51}; + 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {37}; + 50 -> {57}; 51 -> {52}; 52 -> {53}; 53 -> {54}; @@ -171,74 +172,74 @@ digraph equalsToBoolean_kt { 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {37}; - 59 -> {34}; + 58 -> {59}; subgraph cluster_17 { color=red 60 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_18 { color=blue - 62 [label="Enter block"]; + 61 [label="Enter block"]; subgraph cluster_19 { color=blue - 63 [label="Enter when"]; + 62 [label="Enter when"]; subgraph cluster_20 { color=blue - 65 [label="Enter when branch condition "]; - 66 [label="Access variable R|/b|"]; - 67 [label="Const: Boolean(true)"]; + 63 [label="Enter when branch condition "]; + 64 [label="Access variable R|/b|"]; + 65 [label="Const: Boolean(true)"]; + 66 [label="Operator =="]; + 67 [label="Const: Boolean(false)"]; 68 [label="Operator =="]; - 69 [label="Const: Boolean(false)"]; - 70 [label="Operator =="]; - 71 [label="Exit when branch condition"]; + 69 [label="Exit when branch condition"]; } subgraph cluster_21 { color=blue - 78 [label="Enter when branch condition else"]; - 79 [label="Exit when branch condition"]; + 70 [label="Enter when branch condition else"]; + 71 [label="Exit when branch condition"]; } - 80 [label="Enter when branch result"]; - subgraph cluster_22 { - color=blue - 81 [label="Enter block"]; - 82 [label="Access variable R|/b|"]; - 83 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 84 [label="Exit block"]; - } - 85 [label="Exit when branch result"]; 72 [label="Enter when branch result"]; - subgraph cluster_23 { + subgraph cluster_22 { color=blue 73 [label="Enter block"]; 74 [label="Access variable R|/b|"]; - 75 [label="Function call: R|/b|.#()"]; + 75 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; 76 [label="Exit block"]; } 77 [label="Exit when branch result"]; - 64 [label="Exit when"]; + 78 [label="Enter when branch result"]; + subgraph cluster_23 { + color=blue + 79 [label="Enter block"]; + 80 [label="Access variable R|/b|"]; + 81 [label="Function call: R|/b|.#()"]; + 82 [label="Exit block"]; + } + 83 [label="Exit when branch result"]; + 84 [label="Exit when"]; } - 86 [label="Exit block"]; + 85 [label="Exit block"]; } - 61 [label="Exit function test_3" style="filled" fillcolor=red]; + 86 [label="Exit function test_3" style="filled" fillcolor=red]; } - 60 -> {62}; + 60 -> {61}; + 61 -> {62}; 62 -> {63}; - 63 -> {65}; - 64 -> {86}; + 63 -> {64}; + 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {70}; + 69 -> {78 70}; 70 -> {71}; - 71 -> {72 78}; + 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {64}; + 77 -> {84}; 78 -> {79}; 79 -> {80}; 80 -> {81}; @@ -246,74 +247,74 @@ digraph equalsToBoolean_kt { 82 -> {83}; 83 -> {84}; 84 -> {85}; - 85 -> {64}; - 86 -> {61}; + 85 -> {86}; subgraph cluster_24 { color=red 87 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 89 [label="Enter block"]; + 88 [label="Enter block"]; subgraph cluster_26 { color=blue - 90 [label="Enter when"]; + 89 [label="Enter when"]; subgraph cluster_27 { color=blue - 92 [label="Enter when branch condition "]; - 93 [label="Access variable R|/b|"]; - 94 [label="Const: Boolean(true)"]; - 95 [label="Operator =="]; - 96 [label="Const: Boolean(false)"]; - 97 [label="Operator !="]; - 98 [label="Exit when branch condition"]; + 90 [label="Enter when branch condition "]; + 91 [label="Access variable R|/b|"]; + 92 [label="Const: Boolean(true)"]; + 93 [label="Operator =="]; + 94 [label="Const: Boolean(false)"]; + 95 [label="Operator !="]; + 96 [label="Exit when branch condition"]; } subgraph cluster_28 { color=blue - 105 [label="Enter when branch condition else"]; - 106 [label="Exit when branch condition"]; + 97 [label="Enter when branch condition else"]; + 98 [label="Exit when branch condition"]; } - 107 [label="Enter when branch result"]; - subgraph cluster_29 { - color=blue - 108 [label="Enter block"]; - 109 [label="Access variable R|/b|"]; - 110 [label="Function call: R|/b|.#()"]; - 111 [label="Exit block"]; - } - 112 [label="Exit when branch result"]; 99 [label="Enter when branch result"]; - subgraph cluster_30 { + subgraph cluster_29 { color=blue 100 [label="Enter block"]; 101 [label="Access variable R|/b|"]; - 102 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 102 [label="Function call: R|/b|.#()"]; 103 [label="Exit block"]; } 104 [label="Exit when branch result"]; - 91 [label="Exit when"]; + 105 [label="Enter when branch result"]; + subgraph cluster_30 { + color=blue + 106 [label="Enter block"]; + 107 [label="Access variable R|/b|"]; + 108 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 109 [label="Exit block"]; + } + 110 [label="Exit when branch result"]; + 111 [label="Exit when"]; } - 113 [label="Exit block"]; + 112 [label="Exit block"]; } - 88 [label="Exit function test_4" style="filled" fillcolor=red]; + 113 [label="Exit function test_4" style="filled" fillcolor=red]; } - 87 -> {89}; + 87 -> {88}; + 88 -> {89}; 89 -> {90}; - 90 -> {92}; - 91 -> {113}; + 90 -> {91}; + 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {97}; + 96 -> {105 97}; 97 -> {98}; - 98 -> {99 105}; + 98 -> {99}; 99 -> {100}; 100 -> {101}; 101 -> {102}; 102 -> {103}; 103 -> {104}; - 104 -> {91}; + 104 -> {111}; 105 -> {106}; 106 -> {107}; 107 -> {108}; @@ -321,74 +322,74 @@ digraph equalsToBoolean_kt { 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {91}; - 113 -> {88}; + 112 -> {113}; subgraph cluster_31 { color=red 114 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_32 { color=blue - 116 [label="Enter block"]; + 115 [label="Enter block"]; subgraph cluster_33 { color=blue - 117 [label="Enter when"]; + 116 [label="Enter when"]; subgraph cluster_34 { color=blue - 119 [label="Enter when branch condition "]; - 120 [label="Access variable R|/b|"]; + 117 [label="Enter when branch condition "]; + 118 [label="Access variable R|/b|"]; + 119 [label="Const: Boolean(true)"]; + 120 [label="Operator !="]; 121 [label="Const: Boolean(true)"]; - 122 [label="Operator !="]; - 123 [label="Const: Boolean(true)"]; - 124 [label="Operator =="]; - 125 [label="Exit when branch condition"]; + 122 [label="Operator =="]; + 123 [label="Exit when branch condition"]; } subgraph cluster_35 { color=blue - 132 [label="Enter when branch condition else"]; - 133 [label="Exit when branch condition"]; + 124 [label="Enter when branch condition else"]; + 125 [label="Exit when branch condition"]; } - 134 [label="Enter when branch result"]; - subgraph cluster_36 { - color=blue - 135 [label="Enter block"]; - 136 [label="Access variable R|/b|"]; - 137 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 138 [label="Exit block"]; - } - 139 [label="Exit when branch result"]; 126 [label="Enter when branch result"]; - subgraph cluster_37 { + subgraph cluster_36 { color=blue 127 [label="Enter block"]; 128 [label="Access variable R|/b|"]; - 129 [label="Function call: R|/b|.#()"]; + 129 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; 130 [label="Exit block"]; } 131 [label="Exit when branch result"]; - 118 [label="Exit when"]; + 132 [label="Enter when branch result"]; + subgraph cluster_37 { + color=blue + 133 [label="Enter block"]; + 134 [label="Access variable R|/b|"]; + 135 [label="Function call: R|/b|.#()"]; + 136 [label="Exit block"]; + } + 137 [label="Exit when branch result"]; + 138 [label="Exit when"]; } - 140 [label="Exit block"]; + 139 [label="Exit block"]; } - 115 [label="Exit function test_5" style="filled" fillcolor=red]; + 140 [label="Exit function test_5" style="filled" fillcolor=red]; } - 114 -> {116}; + 114 -> {115}; + 115 -> {116}; 116 -> {117}; - 117 -> {119}; - 118 -> {140}; + 117 -> {118}; + 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124}; + 123 -> {132 124}; 124 -> {125}; - 125 -> {126 132}; + 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; - 131 -> {118}; + 131 -> {138}; 132 -> {133}; 133 -> {134}; 134 -> {135}; @@ -396,74 +397,74 @@ digraph equalsToBoolean_kt { 136 -> {137}; 137 -> {138}; 138 -> {139}; - 139 -> {118}; - 140 -> {115}; + 139 -> {140}; subgraph cluster_38 { color=red 141 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_39 { color=blue - 143 [label="Enter block"]; + 142 [label="Enter block"]; subgraph cluster_40 { color=blue - 144 [label="Enter when"]; + 143 [label="Enter when"]; subgraph cluster_41 { color=blue - 146 [label="Enter when branch condition "]; - 147 [label="Access variable R|/b|"]; + 144 [label="Enter when branch condition "]; + 145 [label="Access variable R|/b|"]; + 146 [label="Const: Boolean(true)"]; + 147 [label="Operator !="]; 148 [label="Const: Boolean(true)"]; 149 [label="Operator !="]; - 150 [label="Const: Boolean(true)"]; - 151 [label="Operator !="]; - 152 [label="Exit when branch condition"]; + 150 [label="Exit when branch condition"]; } subgraph cluster_42 { color=blue - 159 [label="Enter when branch condition else"]; - 160 [label="Exit when branch condition"]; + 151 [label="Enter when branch condition else"]; + 152 [label="Exit when branch condition"]; } - 161 [label="Enter when branch result"]; - subgraph cluster_43 { - color=blue - 162 [label="Enter block"]; - 163 [label="Access variable R|/b|"]; - 164 [label="Function call: R|/b|.#()"]; - 165 [label="Exit block"]; - } - 166 [label="Exit when branch result"]; 153 [label="Enter when branch result"]; - subgraph cluster_44 { + subgraph cluster_43 { color=blue 154 [label="Enter block"]; 155 [label="Access variable R|/b|"]; - 156 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 156 [label="Function call: R|/b|.#()"]; 157 [label="Exit block"]; } 158 [label="Exit when branch result"]; - 145 [label="Exit when"]; + 159 [label="Enter when branch result"]; + subgraph cluster_44 { + color=blue + 160 [label="Enter block"]; + 161 [label="Access variable R|/b|"]; + 162 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 163 [label="Exit block"]; + } + 164 [label="Exit when branch result"]; + 165 [label="Exit when"]; } - 167 [label="Exit block"]; + 166 [label="Exit block"]; } - 142 [label="Exit function test_6" style="filled" fillcolor=red]; + 167 [label="Exit function test_6" style="filled" fillcolor=red]; } - 141 -> {143}; + 141 -> {142}; + 142 -> {143}; 143 -> {144}; - 144 -> {146}; - 145 -> {167}; + 144 -> {145}; + 145 -> {146}; 146 -> {147}; 147 -> {148}; 148 -> {149}; 149 -> {150}; - 150 -> {151}; + 150 -> {159 151}; 151 -> {152}; - 152 -> {153 159}; + 152 -> {153}; 153 -> {154}; 154 -> {155}; 155 -> {156}; 156 -> {157}; 157 -> {158}; - 158 -> {145}; + 158 -> {165}; 159 -> {160}; 160 -> {161}; 161 -> {162}; @@ -471,74 +472,74 @@ digraph equalsToBoolean_kt { 163 -> {164}; 164 -> {165}; 165 -> {166}; - 166 -> {145}; - 167 -> {142}; + 166 -> {167}; subgraph cluster_45 { color=red 168 [label="Enter function test_7" style="filled" fillcolor=red]; subgraph cluster_46 { color=blue - 170 [label="Enter block"]; + 169 [label="Enter block"]; subgraph cluster_47 { color=blue - 171 [label="Enter when"]; + 170 [label="Enter when"]; subgraph cluster_48 { color=blue - 173 [label="Enter when branch condition "]; - 174 [label="Access variable R|/b|"]; - 175 [label="Const: Boolean(true)"]; - 176 [label="Operator !="]; - 177 [label="Const: Boolean(false)"]; - 178 [label="Operator =="]; - 179 [label="Exit when branch condition"]; + 171 [label="Enter when branch condition "]; + 172 [label="Access variable R|/b|"]; + 173 [label="Const: Boolean(true)"]; + 174 [label="Operator !="]; + 175 [label="Const: Boolean(false)"]; + 176 [label="Operator =="]; + 177 [label="Exit when branch condition"]; } subgraph cluster_49 { color=blue - 186 [label="Enter when branch condition else"]; - 187 [label="Exit when branch condition"]; + 178 [label="Enter when branch condition else"]; + 179 [label="Exit when branch condition"]; } - 188 [label="Enter when branch result"]; - subgraph cluster_50 { - 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"]; 180 [label="Enter when branch result"]; - subgraph cluster_51 { + subgraph cluster_50 { color=blue 181 [label="Enter block"]; 182 [label="Access variable R|/b|"]; - 183 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 183 [label="Function call: R|/b|.#()"]; 184 [label="Exit block"]; } 185 [label="Exit when branch result"]; - 172 [label="Exit when"]; + 186 [label="Enter when branch result"]; + subgraph cluster_51 { + color=blue + 187 [label="Enter block"]; + 188 [label="Access variable R|/b|"]; + 189 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 190 [label="Exit block"]; + } + 191 [label="Exit when branch result"]; + 192 [label="Exit when"]; } - 194 [label="Exit block"]; + 193 [label="Exit block"]; } - 169 [label="Exit function test_7" style="filled" fillcolor=red]; + 194 [label="Exit function test_7" style="filled" fillcolor=red]; } - 168 -> {170}; + 168 -> {169}; + 169 -> {170}; 170 -> {171}; - 171 -> {173}; - 172 -> {194}; + 171 -> {172}; + 172 -> {173}; 173 -> {174}; 174 -> {175}; 175 -> {176}; 176 -> {177}; - 177 -> {178}; + 177 -> {186 178}; 178 -> {179}; - 179 -> {180 186}; + 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; 183 -> {184}; 184 -> {185}; - 185 -> {172}; + 185 -> {192}; 186 -> {187}; 187 -> {188}; 188 -> {189}; @@ -546,74 +547,74 @@ digraph equalsToBoolean_kt { 190 -> {191}; 191 -> {192}; 192 -> {193}; - 193 -> {172}; - 194 -> {169}; + 193 -> {194}; subgraph cluster_52 { color=red 195 [label="Enter function test_8" style="filled" fillcolor=red]; subgraph cluster_53 { color=blue - 197 [label="Enter block"]; + 196 [label="Enter block"]; subgraph cluster_54 { color=blue - 198 [label="Enter when"]; + 197 [label="Enter when"]; subgraph cluster_55 { color=blue - 200 [label="Enter when branch condition "]; - 201 [label="Access variable R|/b|"]; - 202 [label="Const: Boolean(true)"]; + 198 [label="Enter when branch condition "]; + 199 [label="Access variable R|/b|"]; + 200 [label="Const: Boolean(true)"]; + 201 [label="Operator !="]; + 202 [label="Const: Boolean(false)"]; 203 [label="Operator !="]; - 204 [label="Const: Boolean(false)"]; - 205 [label="Operator !="]; - 206 [label="Exit when branch condition"]; + 204 [label="Exit when branch condition"]; } subgraph cluster_56 { color=blue - 213 [label="Enter when branch condition else"]; - 214 [label="Exit when branch condition"]; + 205 [label="Enter when branch condition else"]; + 206 [label="Exit when branch condition"]; } - 215 [label="Enter when branch result"]; - subgraph cluster_57 { - 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"]; 207 [label="Enter when branch result"]; - subgraph cluster_58 { + subgraph cluster_57 { color=blue 208 [label="Enter block"]; 209 [label="Access variable R|/b|"]; - 210 [label="Function call: R|/b|.#()"]; + 210 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; 211 [label="Exit block"]; } 212 [label="Exit when branch result"]; - 199 [label="Exit when"]; + 213 [label="Enter when branch result"]; + subgraph cluster_58 { + color=blue + 214 [label="Enter block"]; + 215 [label="Access variable R|/b|"]; + 216 [label="Function call: R|/b|.#()"]; + 217 [label="Exit block"]; + } + 218 [label="Exit when branch result"]; + 219 [label="Exit when"]; } - 221 [label="Exit block"]; + 220 [label="Exit block"]; } - 196 [label="Exit function test_8" style="filled" fillcolor=red]; + 221 [label="Exit function test_8" style="filled" fillcolor=red]; } - 195 -> {197}; + 195 -> {196}; + 196 -> {197}; 197 -> {198}; - 198 -> {200}; - 199 -> {221}; + 198 -> {199}; + 199 -> {200}; 200 -> {201}; 201 -> {202}; 202 -> {203}; 203 -> {204}; - 204 -> {205}; + 204 -> {213 205}; 205 -> {206}; - 206 -> {207 213}; + 206 -> {207}; 207 -> {208}; 208 -> {209}; 209 -> {210}; 210 -> {211}; 211 -> {212}; - 212 -> {199}; + 212 -> {219}; 213 -> {214}; 214 -> {215}; 215 -> {216}; @@ -621,7 +622,6 @@ digraph equalsToBoolean_kt { 217 -> {218}; 218 -> {219}; 219 -> {220}; - 220 -> {199}; - 221 -> {196}; + 220 -> {221}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot index 404caa229ea..4419b441f1d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot @@ -12,469 +12,469 @@ digraph jumpFromRhsOfOperator_kt { subgraph cluster_1 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 2 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red 4 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; + 5 [label="Enter block"]; subgraph cluster_4 { color=blue - 8 [label="Enter ||"]; - 9 [label="Access variable R|/a|"]; - 10 [label="Const: Null(null)"]; - 11 [label="Operator !="]; - 12 [label="Exit left part of ||"]; - 13 [label="Enter right part of ||"]; - 14 [label="Function call: R|java/lang/Exception.Exception|()"]; - 15 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 16 [label="Stub" style="filled" fillcolor=gray]; - 7 [label="Exit ||"]; + 6 [label="Enter ||"]; + 7 [label="Access variable R|/a|"]; + 8 [label="Const: Null(null)"]; + 9 [label="Operator !="]; + 10 [label="Exit left part of ||"]; + 11 [label="Enter right part of ||"]; + 12 [label="Function call: R|java/lang/Exception.Exception|()"]; + 13 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 14 [label="Stub" style="filled" fillcolor=gray]; + 15 [label="Exit ||"]; } - 17 [label="Access variable R|/a|"]; - 18 [label="Function call: R|/a|.R|/A.foo|()"]; - 19 [label="Exit block"]; + 16 [label="Access variable R|/a|"]; + 17 [label="Function call: R|/a|.R|/A.foo|()"]; + 18 [label="Exit block"]; } - 5 [label="Exit function test_1" style="filled" fillcolor=red]; + 19 [label="Exit function test_1" style="filled" fillcolor=red]; } - 4 -> {6}; - 6 -> {8}; - 7 -> {17}; + 4 -> {5}; + 5 -> {6}; + 6 -> {7}; + 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {11}; + 10 -> {15 11}; 11 -> {12}; - 12 -> {7 13}; - 13 -> {14}; - 14 -> {15}; - 15 -> {5}; - 15 -> {16} [style=dotted]; - 16 -> {7} [style=dotted]; + 12 -> {13}; + 13 -> {19}; + 13 -> {14} [style=dotted]; + 14 -> {15} [style=dotted]; + 15 -> {16}; + 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {5}; subgraph cluster_5 { color=red 20 [label="Enter function teat_2" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 22 [label="Enter block"]; + 21 [label="Enter block"]; subgraph cluster_7 { color=blue - 24 [label="Enter &&"]; - 25 [label="Access variable R|/a|"]; - 26 [label="Const: Null(null)"]; - 27 [label="Operator =="]; - 28 [label="Exit left part of &&"]; - 29 [label="Enter right part of &&"]; - 30 [label="Function call: R|java/lang/Exception.Exception|()"]; - 31 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 32 [label="Stub" style="filled" fillcolor=gray]; - 23 [label="Exit &&"]; + 22 [label="Enter &&"]; + 23 [label="Access variable R|/a|"]; + 24 [label="Const: Null(null)"]; + 25 [label="Operator =="]; + 26 [label="Exit left part of &&"]; + 27 [label="Enter right part of &&"]; + 28 [label="Function call: R|java/lang/Exception.Exception|()"]; + 29 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 30 [label="Stub" style="filled" fillcolor=gray]; + 31 [label="Exit &&"]; } - 33 [label="Access variable R|/a|"]; - 34 [label="Function call: R|/a|.R|/A.foo|()"]; - 35 [label="Exit block"]; + 32 [label="Access variable R|/a|"]; + 33 [label="Function call: R|/a|.R|/A.foo|()"]; + 34 [label="Exit block"]; } - 21 [label="Exit function teat_2" style="filled" fillcolor=red]; + 35 [label="Exit function teat_2" style="filled" fillcolor=red]; } - 20 -> {22}; - 22 -> {24}; - 23 -> {33}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {27}; + 26 -> {31 27}; 27 -> {28}; - 28 -> {23 29}; - 29 -> {30}; - 30 -> {31}; - 31 -> {21}; - 31 -> {32} [style=dotted]; - 32 -> {23} [style=dotted]; + 28 -> {29}; + 29 -> {35}; + 29 -> {30} [style=dotted]; + 30 -> {31} [style=dotted]; + 31 -> {32}; + 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {21}; subgraph cluster_8 { color=red 36 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 38 [label="Enter block"]; + 37 [label="Enter block"]; subgraph cluster_10 { color=blue - 39 [label="Enter when"]; + 38 [label="Enter when"]; subgraph cluster_11 { color=blue - 41 [label="Enter when branch condition "]; + 39 [label="Enter when branch condition "]; subgraph cluster_12 { color=blue - 43 [label="Enter ||"]; - 44 [label="Access variable R|/a|"]; - 45 [label="Const: Null(null)"]; - 46 [label="Operator !="]; - 47 [label="Exit left part of ||"]; - 48 [label="Enter right part of ||"]; - 49 [label="Function call: R|java/lang/Exception.Exception|()"]; - 50 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 51 [label="Stub" style="filled" fillcolor=gray]; - 42 [label="Exit ||"]; + 40 [label="Enter ||"]; + 41 [label="Access variable R|/a|"]; + 42 [label="Const: Null(null)"]; + 43 [label="Operator !="]; + 44 [label="Exit left part of ||"]; + 45 [label="Enter right part of ||"]; + 46 [label="Function call: R|java/lang/Exception.Exception|()"]; + 47 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 48 [label="Stub" style="filled" fillcolor=gray]; + 49 [label="Exit ||"]; } - 52 [label="Exit when branch condition"]; + 50 [label="Exit when branch condition"]; } - 59 [label="Synthetic else branch"]; - 53 [label="Enter when branch result"]; + 51 [label="Synthetic else branch"]; + 52 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 54 [label="Enter block"]; - 55 [label="Access variable R|/a|"]; - 56 [label="Function call: R|/a|.R|/A.foo|()"]; - 57 [label="Exit block"]; + 53 [label="Enter block"]; + 54 [label="Access variable R|/a|"]; + 55 [label="Function call: R|/a|.R|/A.foo|()"]; + 56 [label="Exit block"]; } - 58 [label="Exit when branch result"]; - 40 [label="Exit when"]; + 57 [label="Exit when branch result"]; + 58 [label="Exit when"]; } - 60 [label="Access variable R|/a|"]; - 61 [label="Function call: R|/a|.R|/A.foo|()"]; - 62 [label="Exit block"]; + 59 [label="Access variable R|/a|"]; + 60 [label="Function call: R|/a|.R|/A.foo|()"]; + 61 [label="Exit block"]; } - 37 [label="Exit function test_3" style="filled" fillcolor=red]; + 62 [label="Exit function test_3" style="filled" fillcolor=red]; } - 36 -> {38}; + 36 -> {37}; + 37 -> {38}; 38 -> {39}; - 39 -> {41}; - 40 -> {60}; - 41 -> {43}; - 42 -> {52}; + 39 -> {40}; + 40 -> {41}; + 41 -> {42}; + 42 -> {43}; 43 -> {44}; - 44 -> {45}; + 44 -> {49 45}; 45 -> {46}; 46 -> {47}; - 47 -> {42 48}; - 48 -> {49}; + 47 -> {62}; + 47 -> {48} [style=dotted]; + 48 -> {49} [style=dotted]; 49 -> {50}; - 50 -> {37}; - 50 -> {51} [style=dotted]; - 51 -> {42} [style=dotted]; - 52 -> {53 59}; + 50 -> {52 51}; + 51 -> {58}; + 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {40}; - 59 -> {40}; + 58 -> {59}; + 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {37}; subgraph cluster_14 { color=red 63 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 65 [label="Enter block"]; + 64 [label="Enter block"]; subgraph cluster_16 { color=blue - 66 [label="Enter when"]; + 65 [label="Enter when"]; subgraph cluster_17 { color=blue - 68 [label="Enter when branch condition "]; + 66 [label="Enter when branch condition "]; subgraph cluster_18 { color=blue - 70 [label="Enter &&"]; - 71 [label="Access variable R|/a|"]; - 72 [label="Const: Null(null)"]; - 73 [label="Operator =="]; - 74 [label="Exit left part of &&"]; - 75 [label="Enter right part of &&"]; - 76 [label="Function call: R|java/lang/Exception.Exception|()"]; - 77 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 78 [label="Stub" style="filled" fillcolor=gray]; - 69 [label="Exit &&"]; + 67 [label="Enter &&"]; + 68 [label="Access variable R|/a|"]; + 69 [label="Const: Null(null)"]; + 70 [label="Operator =="]; + 71 [label="Exit left part of &&"]; + 72 [label="Enter right part of &&"]; + 73 [label="Function call: R|java/lang/Exception.Exception|()"]; + 74 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 75 [label="Stub" style="filled" fillcolor=gray]; + 76 [label="Exit &&"]; } - 79 [label="Exit when branch condition"]; + 77 [label="Exit when branch condition"]; } - 86 [label="Synthetic else branch"]; - 80 [label="Enter when branch result"]; + 78 [label="Synthetic else branch"]; + 79 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 81 [label="Enter block"]; - 82 [label="Access variable R|/a|"]; - 83 [label="Function call: R|/a|.R|/A.foo|()"]; - 84 [label="Exit block"]; + 80 [label="Enter block"]; + 81 [label="Access variable R|/a|"]; + 82 [label="Function call: R|/a|.R|/A.foo|()"]; + 83 [label="Exit block"]; } - 85 [label="Exit when branch result"]; - 67 [label="Exit when"]; + 84 [label="Exit when branch result"]; + 85 [label="Exit when"]; } - 87 [label="Access variable R|/a|"]; - 88 [label="Function call: R|/a|.R|/A.foo|()"]; - 89 [label="Exit block"]; + 86 [label="Access variable R|/a|"]; + 87 [label="Function call: R|/a|.R|/A.foo|()"]; + 88 [label="Exit block"]; } - 64 [label="Exit function test_4" style="filled" fillcolor=red]; + 89 [label="Exit function test_4" style="filled" fillcolor=red]; } - 63 -> {65}; + 63 -> {64}; + 64 -> {65}; 65 -> {66}; - 66 -> {68}; - 67 -> {87}; - 68 -> {70}; - 69 -> {79}; + 66 -> {67}; + 67 -> {68}; + 68 -> {69}; + 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {76 72}; 72 -> {73}; 73 -> {74}; - 74 -> {69 75}; - 75 -> {76}; + 74 -> {89}; + 74 -> {75} [style=dotted]; + 75 -> {76} [style=dotted]; 76 -> {77}; - 77 -> {64}; - 77 -> {78} [style=dotted]; - 78 -> {69} [style=dotted]; - 79 -> {80 86}; + 77 -> {79 78}; + 78 -> {85}; + 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; - 85 -> {67}; - 86 -> {67}; + 85 -> {86}; + 86 -> {87}; 87 -> {88}; 88 -> {89}; - 89 -> {64}; subgraph cluster_20 { color=red 90 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 92 [label="Enter block"]; + 91 [label="Enter block"]; subgraph cluster_22 { color=blue - 94 [label="Enter ||"]; - 95 [label="Access variable R|/a|"]; - 96 [label="Const: Null(null)"]; - 97 [label="Operator =="]; - 98 [label="Exit left part of ||"]; - 99 [label="Enter right part of ||"]; - 100 [label="Function call: R|java/lang/Exception.Exception|()"]; - 101 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 102 [label="Stub" style="filled" fillcolor=gray]; - 93 [label="Exit ||"]; + 92 [label="Enter ||"]; + 93 [label="Access variable R|/a|"]; + 94 [label="Const: Null(null)"]; + 95 [label="Operator =="]; + 96 [label="Exit left part of ||"]; + 97 [label="Enter right part of ||"]; + 98 [label="Function call: R|java/lang/Exception.Exception|()"]; + 99 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 100 [label="Stub" style="filled" fillcolor=gray]; + 101 [label="Exit ||"]; } - 103 [label="Access variable R|/a|"]; - 104 [label="Function call: R|/a|.#()"]; - 105 [label="Exit block"]; + 102 [label="Access variable R|/a|"]; + 103 [label="Function call: R|/a|.#()"]; + 104 [label="Exit block"]; } - 91 [label="Exit function test_5" style="filled" fillcolor=red]; + 105 [label="Exit function test_5" style="filled" fillcolor=red]; } - 90 -> {92}; - 92 -> {94}; - 93 -> {103}; + 90 -> {91}; + 91 -> {92}; + 92 -> {93}; + 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {97}; + 96 -> {101 97}; 97 -> {98}; - 98 -> {93 99}; - 99 -> {100}; - 100 -> {101}; - 101 -> {91}; - 101 -> {102} [style=dotted]; - 102 -> {93} [style=dotted]; + 98 -> {99}; + 99 -> {105}; + 99 -> {100} [style=dotted]; + 100 -> {101} [style=dotted]; + 101 -> {102}; + 102 -> {103}; 103 -> {104}; 104 -> {105}; - 105 -> {91}; subgraph cluster_23 { color=red 106 [label="Enter function teat_6" style="filled" fillcolor=red]; subgraph cluster_24 { color=blue - 108 [label="Enter block"]; + 107 [label="Enter block"]; subgraph cluster_25 { color=blue - 110 [label="Enter &&"]; - 111 [label="Access variable R|/a|"]; - 112 [label="Const: Null(null)"]; - 113 [label="Operator !="]; - 114 [label="Exit left part of &&"]; - 115 [label="Enter right part of &&"]; - 116 [label="Function call: R|java/lang/Exception.Exception|()"]; - 117 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 118 [label="Stub" style="filled" fillcolor=gray]; - 109 [label="Exit &&"]; + 108 [label="Enter &&"]; + 109 [label="Access variable R|/a|"]; + 110 [label="Const: Null(null)"]; + 111 [label="Operator !="]; + 112 [label="Exit left part of &&"]; + 113 [label="Enter right part of &&"]; + 114 [label="Function call: R|java/lang/Exception.Exception|()"]; + 115 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 116 [label="Stub" style="filled" fillcolor=gray]; + 117 [label="Exit &&"]; } - 119 [label="Access variable R|/a|"]; - 120 [label="Function call: R|/a|.#()"]; - 121 [label="Exit block"]; + 118 [label="Access variable R|/a|"]; + 119 [label="Function call: R|/a|.#()"]; + 120 [label="Exit block"]; } - 107 [label="Exit function teat_6" style="filled" fillcolor=red]; + 121 [label="Exit function teat_6" style="filled" fillcolor=red]; } - 106 -> {108}; - 108 -> {110}; - 109 -> {119}; + 106 -> {107}; + 107 -> {108}; + 108 -> {109}; + 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; + 112 -> {117 113}; 113 -> {114}; - 114 -> {109 115}; - 115 -> {116}; - 116 -> {117}; - 117 -> {107}; - 117 -> {118} [style=dotted]; - 118 -> {109} [style=dotted]; + 114 -> {115}; + 115 -> {121}; + 115 -> {116} [style=dotted]; + 116 -> {117} [style=dotted]; + 117 -> {118}; + 118 -> {119}; 119 -> {120}; 120 -> {121}; - 121 -> {107}; subgraph cluster_26 { color=red 122 [label="Enter function test_7" style="filled" fillcolor=red]; subgraph cluster_27 { color=blue - 124 [label="Enter block"]; + 123 [label="Enter block"]; subgraph cluster_28 { color=blue - 125 [label="Enter when"]; + 124 [label="Enter when"]; subgraph cluster_29 { color=blue - 127 [label="Enter when branch condition "]; + 125 [label="Enter when branch condition "]; subgraph cluster_30 { color=blue - 129 [label="Enter ||"]; - 130 [label="Access variable R|/a|"]; - 131 [label="Const: Null(null)"]; - 132 [label="Operator =="]; - 133 [label="Exit left part of ||"]; - 134 [label="Enter right part of ||"]; - 135 [label="Function call: R|java/lang/Exception.Exception|()"]; - 136 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 137 [label="Stub" style="filled" fillcolor=gray]; - 128 [label="Exit ||"]; + 126 [label="Enter ||"]; + 127 [label="Access variable R|/a|"]; + 128 [label="Const: Null(null)"]; + 129 [label="Operator =="]; + 130 [label="Exit left part of ||"]; + 131 [label="Enter right part of ||"]; + 132 [label="Function call: R|java/lang/Exception.Exception|()"]; + 133 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 134 [label="Stub" style="filled" fillcolor=gray]; + 135 [label="Exit ||"]; } - 138 [label="Exit when branch condition"]; + 136 [label="Exit when branch condition"]; } - 145 [label="Synthetic else branch"]; - 139 [label="Enter when branch result"]; + 137 [label="Synthetic else branch"]; + 138 [label="Enter when branch result"]; subgraph cluster_31 { color=blue - 140 [label="Enter block"]; - 141 [label="Access variable R|/a|"]; - 142 [label="Function call: R|/a|.#()"]; - 143 [label="Exit block"]; + 139 [label="Enter block"]; + 140 [label="Access variable R|/a|"]; + 141 [label="Function call: R|/a|.#()"]; + 142 [label="Exit block"]; } - 144 [label="Exit when branch result"]; - 126 [label="Exit when"]; + 143 [label="Exit when branch result"]; + 144 [label="Exit when"]; } - 146 [label="Access variable R|/a|"]; - 147 [label="Function call: R|/a|.#()"]; - 148 [label="Exit block"]; + 145 [label="Access variable R|/a|"]; + 146 [label="Function call: R|/a|.#()"]; + 147 [label="Exit block"]; } - 123 [label="Exit function test_7" style="filled" fillcolor=red]; + 148 [label="Exit function test_7" style="filled" fillcolor=red]; } - 122 -> {124}; + 122 -> {123}; + 123 -> {124}; 124 -> {125}; - 125 -> {127}; - 126 -> {146}; - 127 -> {129}; - 128 -> {138}; + 125 -> {126}; + 126 -> {127}; + 127 -> {128}; + 128 -> {129}; 129 -> {130}; - 130 -> {131}; + 130 -> {135 131}; 131 -> {132}; 132 -> {133}; - 133 -> {128 134}; - 134 -> {135}; + 133 -> {148}; + 133 -> {134} [style=dotted]; + 134 -> {135} [style=dotted]; 135 -> {136}; - 136 -> {123}; - 136 -> {137} [style=dotted]; - 137 -> {128} [style=dotted]; - 138 -> {139 145}; + 136 -> {138 137}; + 137 -> {144}; + 138 -> {139}; 139 -> {140}; 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; - 144 -> {126}; - 145 -> {126}; + 144 -> {145}; + 145 -> {146}; 146 -> {147}; 147 -> {148}; - 148 -> {123}; subgraph cluster_32 { color=red 149 [label="Enter function test_8" style="filled" fillcolor=red]; subgraph cluster_33 { color=blue - 151 [label="Enter block"]; + 150 [label="Enter block"]; subgraph cluster_34 { color=blue - 152 [label="Enter when"]; + 151 [label="Enter when"]; subgraph cluster_35 { color=blue - 154 [label="Enter when branch condition "]; + 152 [label="Enter when branch condition "]; subgraph cluster_36 { color=blue - 156 [label="Enter &&"]; - 157 [label="Access variable R|/a|"]; - 158 [label="Const: Null(null)"]; - 159 [label="Operator !="]; - 160 [label="Exit left part of &&"]; - 161 [label="Enter right part of &&"]; - 162 [label="Function call: R|java/lang/Exception.Exception|()"]; - 163 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 164 [label="Stub" style="filled" fillcolor=gray]; - 155 [label="Exit &&"]; + 153 [label="Enter &&"]; + 154 [label="Access variable R|/a|"]; + 155 [label="Const: Null(null)"]; + 156 [label="Operator !="]; + 157 [label="Exit left part of &&"]; + 158 [label="Enter right part of &&"]; + 159 [label="Function call: R|java/lang/Exception.Exception|()"]; + 160 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 161 [label="Stub" style="filled" fillcolor=gray]; + 162 [label="Exit &&"]; } - 165 [label="Exit when branch condition"]; + 163 [label="Exit when branch condition"]; } - 172 [label="Synthetic else branch"]; - 166 [label="Enter when branch result"]; + 164 [label="Synthetic else branch"]; + 165 [label="Enter when branch result"]; subgraph cluster_37 { color=blue - 167 [label="Enter block"]; - 168 [label="Access variable R|/a|"]; - 169 [label="Function call: R|/a|.#()"]; - 170 [label="Exit block"]; + 166 [label="Enter block"]; + 167 [label="Access variable R|/a|"]; + 168 [label="Function call: R|/a|.#()"]; + 169 [label="Exit block"]; } - 171 [label="Exit when branch result"]; - 153 [label="Exit when"]; + 170 [label="Exit when branch result"]; + 171 [label="Exit when"]; } - 173 [label="Access variable R|/a|"]; - 174 [label="Function call: R|/a|.#()"]; - 175 [label="Exit block"]; + 172 [label="Access variable R|/a|"]; + 173 [label="Function call: R|/a|.#()"]; + 174 [label="Exit block"]; } - 150 [label="Exit function test_8" style="filled" fillcolor=red]; + 175 [label="Exit function test_8" style="filled" fillcolor=red]; } - 149 -> {151}; + 149 -> {150}; + 150 -> {151}; 151 -> {152}; - 152 -> {154}; - 153 -> {173}; - 154 -> {156}; - 155 -> {165}; + 152 -> {153}; + 153 -> {154}; + 154 -> {155}; + 155 -> {156}; 156 -> {157}; - 157 -> {158}; + 157 -> {162 158}; 158 -> {159}; 159 -> {160}; - 160 -> {155 161}; - 161 -> {162}; + 160 -> {175}; + 160 -> {161} [style=dotted]; + 161 -> {162} [style=dotted]; 162 -> {163}; - 163 -> {150}; - 163 -> {164} [style=dotted]; - 164 -> {155} [style=dotted]; - 165 -> {166 172}; + 163 -> {165 164}; + 164 -> {171}; + 165 -> {166}; 166 -> {167}; 167 -> {168}; 168 -> {169}; 169 -> {170}; 170 -> {171}; - 171 -> {153}; - 172 -> {153}; + 171 -> {172}; + 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {150}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot index 2ca2cde352e..b03a55ede1c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot @@ -12,10 +12,10 @@ digraph boundSmartcasts_kt { subgraph cluster_1 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 2 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red @@ -26,57 +26,58 @@ digraph boundSmartcasts_kt { subgraph cluster_3 { color=red - 7 [label="Enter class B" style="filled" fillcolor=red]; - 6 [label="Exit class B" style="filled" fillcolor=red]; + 6 [label="Enter class B" style="filled" fillcolor=red]; + 7 [label="Exit class B" style="filled" fillcolor=red]; } - 7 -> {6} [color=green]; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red 8 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Access variable R|/x|"]; - 12 [label="Variable declaration: lval y: R|kotlin/Any|"]; + 9 [label="Enter block"]; + 10 [label="Access variable R|/x|"]; + 11 [label="Variable declaration: lval y: R|kotlin/Any|"]; subgraph cluster_6 { color=blue - 13 [label="Enter when"]; + 12 [label="Enter when"]; subgraph cluster_7 { color=blue - 15 [label="Enter when branch condition "]; - 16 [label="Access variable R|/x|"]; - 17 [label="Type operator: (R|/x| is R|A|)"]; - 18 [label="Exit when branch condition"]; + 13 [label="Enter when branch condition "]; + 14 [label="Access variable R|/x|"]; + 15 [label="Type operator: (R|/x| is R|A|)"]; + 16 [label="Exit when branch condition"]; } - 27 [label="Synthetic else branch"]; - 19 [label="Enter when branch result"]; + 17 [label="Synthetic else branch"]; + 18 [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|/A.foo|()"]; - 23 [label="Access variable R|/y|"]; - 24 [label="Function call: R|/y|.R|/A.foo|()"]; - 25 [label="Exit block"]; + 19 [label="Enter block"]; + 20 [label="Access variable R|/x|"]; + 21 [label="Function call: R|/x|.R|/A.foo|()"]; + 22 [label="Access variable R|/y|"]; + 23 [label="Function call: R|/y|.R|/A.foo|()"]; + 24 [label="Exit block"]; } - 26 [label="Exit when branch result"]; - 14 [label="Exit when"]; + 25 [label="Exit when branch result"]; + 26 [label="Exit when"]; } - 28 [label="Exit block"]; + 27 [label="Exit block"]; } - 9 [label="Exit function test_1" style="filled" fillcolor=red]; + 28 [label="Exit function test_1" style="filled" fillcolor=red]; } - 8 -> {10}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {15}; - 14 -> {28}; + 13 -> {14}; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; - 17 -> {18}; - 18 -> {19 27}; + 16 -> {18 17}; + 17 -> {26}; + 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; @@ -84,56 +85,56 @@ digraph boundSmartcasts_kt { 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {14}; - 27 -> {14}; - 28 -> {9}; + 26 -> {27}; + 27 -> {28}; subgraph cluster_9 { color=red 29 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 31 [label="Enter block"]; - 32 [label="Access variable R|/x|"]; - 33 [label="Variable declaration: lval y: R|kotlin/Any|"]; + 30 [label="Enter block"]; + 31 [label="Access variable R|/x|"]; + 32 [label="Variable declaration: lval y: R|kotlin/Any|"]; subgraph cluster_11 { color=blue - 34 [label="Enter when"]; + 33 [label="Enter when"]; subgraph cluster_12 { color=blue - 36 [label="Enter when branch condition "]; - 37 [label="Access variable R|/y|"]; - 38 [label="Type operator: (R|/y| is R|A|)"]; - 39 [label="Exit when branch condition"]; + 34 [label="Enter when branch condition "]; + 35 [label="Access variable R|/y|"]; + 36 [label="Type operator: (R|/y| is R|A|)"]; + 37 [label="Exit when branch condition"]; } - 48 [label="Synthetic else branch"]; - 40 [label="Enter when branch result"]; + 38 [label="Synthetic else branch"]; + 39 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 41 [label="Enter block"]; - 42 [label="Access variable R|/x|"]; - 43 [label="Function call: R|/x|.R|/A.foo|()"]; - 44 [label="Access variable R|/y|"]; - 45 [label="Function call: R|/y|.R|/A.foo|()"]; - 46 [label="Exit block"]; + 40 [label="Enter block"]; + 41 [label="Access variable R|/x|"]; + 42 [label="Function call: R|/x|.R|/A.foo|()"]; + 43 [label="Access variable R|/y|"]; + 44 [label="Function call: R|/y|.R|/A.foo|()"]; + 45 [label="Exit block"]; } - 47 [label="Exit when branch result"]; - 35 [label="Exit when"]; + 46 [label="Exit when branch result"]; + 47 [label="Exit when"]; } - 49 [label="Exit block"]; + 48 [label="Exit block"]; } - 30 [label="Exit function test_2" style="filled" fillcolor=red]; + 49 [label="Exit function test_2" style="filled" fillcolor=red]; } - 29 -> {31}; + 29 -> {30}; + 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {36}; - 35 -> {49}; + 34 -> {35}; + 35 -> {36}; 36 -> {37}; - 37 -> {38}; - 38 -> {39}; - 39 -> {40 48}; + 37 -> {39 38}; + 38 -> {47}; + 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; @@ -141,95 +142,95 @@ digraph boundSmartcasts_kt { 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {35}; - 48 -> {35}; - 49 -> {30}; + 47 -> {48}; + 48 -> {49}; subgraph cluster_14 { color=red 50 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/x|"]; - 54 [label="Variable declaration: lvar z: R|kotlin/Any|"]; + 51 [label="Enter block"]; + 52 [label="Access variable R|/x|"]; + 53 [label="Variable declaration: lvar z: R|kotlin/Any|"]; subgraph cluster_16 { color=blue - 55 [label="Enter when"]; + 54 [label="Enter when"]; subgraph cluster_17 { color=blue - 57 [label="Enter when branch condition "]; - 58 [label="Access variable R|/x|"]; - 59 [label="Type operator: (R|/x| is R|A|)"]; - 60 [label="Exit when branch condition"]; + 55 [label="Enter when branch condition "]; + 56 [label="Access variable R|/x|"]; + 57 [label="Type operator: (R|/x| is R|A|)"]; + 58 [label="Exit when branch condition"]; } - 67 [label="Synthetic else branch"]; - 61 [label="Enter when branch result"]; + 59 [label="Synthetic else branch"]; + 60 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 62 [label="Enter block"]; - 63 [label="Access variable R|/z|"]; - 64 [label="Function call: R|/z|.R|/A.foo|()"]; - 65 [label="Exit block"]; + 61 [label="Enter block"]; + 62 [label="Access variable R|/z|"]; + 63 [label="Function call: R|/z|.R|/A.foo|()"]; + 64 [label="Exit block"]; } - 66 [label="Exit when branch result"]; - 56 [label="Exit when"]; + 65 [label="Exit when branch result"]; + 66 [label="Exit when"]; } - 68 [label="Access variable R|/y|"]; - 69 [label="Assignment: R|/z|"]; + 67 [label="Access variable R|/y|"]; + 68 [label="Assignment: R|/z|"]; subgraph cluster_19 { color=blue - 70 [label="Enter when"]; + 69 [label="Enter when"]; subgraph cluster_20 { color=blue - 72 [label="Enter when branch condition "]; - 73 [label="Access variable R|/y|"]; - 74 [label="Type operator: (R|/y| is R|B|)"]; - 75 [label="Exit when branch condition"]; + 70 [label="Enter when branch condition "]; + 71 [label="Access variable R|/y|"]; + 72 [label="Type operator: (R|/y| is R|B|)"]; + 73 [label="Exit when branch condition"]; } - 84 [label="Synthetic else branch"]; - 76 [label="Enter when branch result"]; + 74 [label="Synthetic else branch"]; + 75 [label="Enter when branch result"]; subgraph cluster_21 { color=blue - 77 [label="Enter block"]; - 78 [label="Access variable R|/z|"]; - 79 [label="Function call: R|/z|.#()"]; - 80 [label="Access variable R|/z|"]; - 81 [label="Function call: R|/z|.R|/B.bar|()"]; - 82 [label="Exit block"]; + 76 [label="Enter block"]; + 77 [label="Access variable R|/z|"]; + 78 [label="Function call: R|/z|.#()"]; + 79 [label="Access variable R|/z|"]; + 80 [label="Function call: R|/z|.R|/B.bar|()"]; + 81 [label="Exit block"]; } - 83 [label="Exit when branch result"]; - 71 [label="Exit when"]; + 82 [label="Exit when branch result"]; + 83 [label="Exit when"]; } - 85 [label="Exit block"]; + 84 [label="Exit block"]; } - 51 [label="Exit function test_3" style="filled" fillcolor=red]; + 85 [label="Exit function test_3" style="filled" fillcolor=red]; } - 50 -> {52}; + 50 -> {51}; + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {57}; - 56 -> {68}; + 55 -> {56}; + 56 -> {57}; 57 -> {58}; - 58 -> {59}; - 59 -> {60}; - 60 -> {61 67}; + 58 -> {60 59}; + 59 -> {66}; + 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {56}; - 67 -> {56}; + 66 -> {67}; + 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {72}; - 71 -> {85}; + 70 -> {71}; + 71 -> {72}; 72 -> {73}; - 73 -> {74}; - 74 -> {75}; - 75 -> {76 84}; + 73 -> {75 74}; + 74 -> {83}; + 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; @@ -237,55 +238,55 @@ digraph boundSmartcasts_kt { 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {71}; - 84 -> {71}; - 85 -> {51}; + 83 -> {84}; + 84 -> {85}; subgraph cluster_22 { color=red 86 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 88 [label="Enter block"]; - 89 [label="Const: Int(1)"]; - 90 [label="Variable declaration: lvar x: R|kotlin/Any|"]; - 91 [label="Access variable R|/x|"]; - 92 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 93 [label="Access variable R|/x|"]; - 94 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 95 [label="Access variable R|/y|"]; - 96 [label="Assignment: R|/x|"]; - 97 [label="Access variable R|/x|"]; - 98 [label="Function call: R|/x|.#()"]; + 87 [label="Enter block"]; + 88 [label="Const: Int(1)"]; + 89 [label="Variable declaration: lvar x: R|kotlin/Any|"]; + 90 [label="Access variable R|/x|"]; + 91 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 92 [label="Access variable R|/x|"]; + 93 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 94 [label="Access variable R|/y|"]; + 95 [label="Assignment: R|/x|"]; + 96 [label="Access variable R|/x|"]; + 97 [label="Function call: R|/x|.#()"]; subgraph cluster_24 { color=blue - 99 [label="Enter when"]; + 98 [label="Enter when"]; subgraph cluster_25 { color=blue - 101 [label="Enter when branch condition "]; - 102 [label="Access variable R|/y|"]; - 103 [label="Type operator: (R|/y| is R|A|)"]; - 104 [label="Exit when branch condition"]; + 99 [label="Enter when branch condition "]; + 100 [label="Access variable R|/y|"]; + 101 [label="Type operator: (R|/y| is R|A|)"]; + 102 [label="Exit when branch condition"]; } - 113 [label="Synthetic else branch"]; - 105 [label="Enter when branch result"]; + 103 [label="Synthetic else branch"]; + 104 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 106 [label="Enter block"]; - 107 [label="Access variable R|/x|"]; - 108 [label="Function call: R|/x|.R|/A.foo|()"]; - 109 [label="Access variable R|/y|"]; - 110 [label="Function call: R|/y|.R|/A.foo|()"]; - 111 [label="Exit block"]; + 105 [label="Enter block"]; + 106 [label="Access variable R|/x|"]; + 107 [label="Function call: R|/x|.R|/A.foo|()"]; + 108 [label="Access variable R|/y|"]; + 109 [label="Function call: R|/y|.R|/A.foo|()"]; + 110 [label="Exit block"]; } - 112 [label="Exit when branch result"]; - 100 [label="Exit when"]; + 111 [label="Exit when branch result"]; + 112 [label="Exit when"]; } - 114 [label="Exit block"]; + 113 [label="Exit block"]; } - 87 [label="Exit function test_4" style="filled" fillcolor=red]; + 114 [label="Exit function test_4" style="filled" fillcolor=red]; } - 86 -> {88}; + 86 -> {87}; + 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; @@ -297,12 +298,12 @@ digraph boundSmartcasts_kt { 96 -> {97}; 97 -> {98}; 98 -> {99}; - 99 -> {101}; - 100 -> {114}; + 99 -> {100}; + 100 -> {101}; 101 -> {102}; - 102 -> {103}; - 103 -> {104}; - 104 -> {105 113}; + 102 -> {104 103}; + 103 -> {112}; + 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; @@ -310,18 +311,17 @@ digraph boundSmartcasts_kt { 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {100}; - 113 -> {100}; - 114 -> {87}; + 112 -> {113}; + 113 -> {114}; subgraph cluster_27 { color=red 115 [label="Enter function " style="filled" fillcolor=red]; - 117 [label="Delegated constructor call: super()"]; - 116 [label="Exit function " style="filled" fillcolor=red]; + 116 [label="Delegated constructor call: super()"]; + 117 [label="Exit function " style="filled" fillcolor=red]; } - 115 -> {117}; - 117 -> {116}; + 115 -> {116}; + 116 -> {117}; subgraph cluster_28 { color=red @@ -332,116 +332,117 @@ digraph boundSmartcasts_kt { subgraph cluster_29 { color=red - 124 [label="Enter class D" style="filled" fillcolor=red]; + 123 [label="Enter class D" style="filled" fillcolor=red]; subgraph cluster_30 { color=blue 120 [label="Enter property" style="filled" fillcolor=red]; - 122 [label="Access variable R|/any|"]; - 121 [label="Exit property" style="filled" fillcolor=red]; + 121 [label="Access variable R|/any|"]; + 122 [label="Exit property" style="filled" fillcolor=red]; } - 123 [label="Exit class D" style="filled" fillcolor=red]; + 124 [label="Exit class D" style="filled" fillcolor=red]; } - 124 -> {120} [color=green]; - 120 -> {122}; - 121 -> {123} [color=green]; - 122 -> {121}; + 123 -> {120} [color=green]; + 120 -> {121}; + 121 -> {122}; + 122 -> {124} [color=green]; subgraph cluster_31 { color=red 125 [label="Enter function baz" style="filled" fillcolor=red]; subgraph cluster_32 { color=blue - 127 [label="Enter block"]; - 128 [label="Exit block"]; + 126 [label="Enter block"]; + 127 [label="Exit block"]; } - 126 [label="Exit function baz" style="filled" fillcolor=red]; + 128 [label="Exit function baz" style="filled" fillcolor=red]; } - 125 -> {127}; + 125 -> {126}; + 126 -> {127}; 127 -> {128}; - 128 -> {126}; subgraph cluster_33 { color=red 129 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_34 { color=blue - 131 [label="Enter block"]; + 130 [label="Enter block"]; subgraph cluster_35 { color=blue - 132 [label="Enter when"]; - 134 [label="Access variable R|/d|"]; - 135 [label="Access variable R|/D.any|"]; - 136 [label="Variable declaration: lval : R|kotlin/Any?|"]; + 131 [label="Enter when"]; + 132 [label="Access variable R|/d|"]; + 133 [label="Access variable R|/D.any|"]; + 134 [label="Variable declaration: lval : R|kotlin/Any?|"]; subgraph cluster_36 { color=blue - 137 [label="Enter when branch condition "]; - 138 [label="Const: Null(null)"]; - 139 [label="Operator =="]; - 140 [label="Exit when branch condition"]; + 135 [label="Enter when branch condition "]; + 136 [label="Const: Null(null)"]; + 137 [label="Operator =="]; + 138 [label="Exit when branch condition"]; } subgraph cluster_37 { color=blue - 147 [label="Enter when branch condition else"]; - 148 [label="Exit when branch condition"]; + 139 [label="Enter when branch condition else"]; + 140 [label="Exit when branch condition"]; } - 149 [label="Enter when branch result"]; + 141 [label="Enter when branch result"]; subgraph cluster_38 { color=blue - 150 [label="Enter block"]; - 151 [label="Access variable R|/|"]; - 152 [label="Exit block"]; + 142 [label="Enter block"]; + 143 [label="Access variable R|/|"]; + 144 [label="Exit block"]; } - 153 [label="Exit when branch result"]; - 141 [label="Enter when branch result"]; + 145 [label="Exit when branch result"]; + 146 [label="Enter when branch result"]; subgraph cluster_39 { color=blue - 142 [label="Enter block"]; - 143 [label="Jump: ^test_5 Unit"]; - 144 [label="Stub" style="filled" fillcolor=gray]; - 145 [label="Exit block" style="filled" fillcolor=gray]; + 147 [label="Enter block"]; + 148 [label="Jump: ^test_5 Unit"]; + 149 [label="Stub" style="filled" fillcolor=gray]; + 150 [label="Exit block" style="filled" fillcolor=gray]; } - 146 [label="Exit when branch result" style="filled" fillcolor=gray]; - 133 [label="Exit when"]; + 151 [label="Exit when branch result" style="filled" fillcolor=gray]; + 152 [label="Exit when"]; } - 154 [label="Variable declaration: lval a: R|kotlin/Any|"]; - 155 [label="Access variable R|/a|"]; - 156 [label="Function call: R|/a|.R|/baz|()"]; - 157 [label="Access variable R|/d|"]; - 158 [label="Access variable R|/D.any|"]; - 159 [label="Function call: R|/d|.R|/D.any|.R|/baz|()"]; - 160 [label="Access variable R|/a|"]; - 161 [label="Type operator: (R|/a| as R|A|)"]; - 162 [label="Access variable R|/a|"]; - 163 [label="Function call: R|/a|.R|/A.foo|()"]; - 164 [label="Exit block"]; + 153 [label="Variable declaration: lval a: R|kotlin/Any|"]; + 154 [label="Access variable R|/a|"]; + 155 [label="Function call: R|/a|.R|/baz|()"]; + 156 [label="Access variable R|/d|"]; + 157 [label="Access variable R|/D.any|"]; + 158 [label="Function call: R|/d|.R|/D.any|.R|/baz|()"]; + 159 [label="Access variable R|/a|"]; + 160 [label="Type operator: (R|/a| as R|A|)"]; + 161 [label="Access variable R|/a|"]; + 162 [label="Function call: R|/a|.R|/A.foo|()"]; + 163 [label="Exit block"]; } - 130 [label="Exit function test_5" style="filled" fillcolor=red]; + 164 [label="Exit function test_5" style="filled" fillcolor=red]; } - 129 -> {131}; + 129 -> {130}; + 130 -> {131}; 131 -> {132}; - 132 -> {134}; - 133 -> {154}; + 132 -> {133}; + 133 -> {134}; 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; - 138 -> {139}; + 138 -> {146 139}; 139 -> {140}; - 140 -> {141 147}; + 140 -> {141}; 141 -> {142}; 142 -> {143}; - 143 -> {130}; - 143 -> {144} [style=dotted]; - 144 -> {145} [style=dotted]; - 145 -> {146} [style=dotted]; - 146 -> {133} [style=dotted]; + 143 -> {144}; + 144 -> {145}; + 145 -> {152}; + 146 -> {147}; 147 -> {148}; - 148 -> {149}; - 149 -> {150}; - 150 -> {151}; - 151 -> {152}; + 148 -> {164}; + 148 -> {149} [style=dotted]; + 149 -> {150} [style=dotted]; + 150 -> {151} [style=dotted]; + 151 -> {152} [style=dotted]; 152 -> {153}; - 153 -> {133}; + 153 -> {154}; 154 -> {155}; 155 -> {156}; 156 -> {157}; @@ -452,32 +453,32 @@ digraph boundSmartcasts_kt { 161 -> {162}; 162 -> {163}; 163 -> {164}; - 164 -> {130}; subgraph cluster_40 { color=red 165 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_41 { color=blue - 167 [label="Enter block"]; - 168 [label="Access variable R|/d1|"]; - 169 [label="Access variable R|/D.any|"]; - 170 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 171 [label="Access variable R|/a|"]; - 172 [label="Type operator: (R|/a| as R|A|)"]; - 173 [label="Access variable R|/a|"]; - 174 [label="Function call: R|/a|.R|/A.foo|()"]; - 175 [label="Access variable R|/d1|"]; - 176 [label="Access variable R|/D.any|"]; - 177 [label="Function call: R|/d1|.R|/D.any|.R|/A.foo|()"]; - 178 [label="Access variable R|/d1|"]; - 179 [label="Access variable R|/D.any|"]; - 180 [label="Function call: R|/d1|.R|/D.any|.R|/baz|()"]; - 181 [label="Exit block"]; + 166 [label="Enter block"]; + 167 [label="Access variable R|/d1|"]; + 168 [label="Access variable R|/D.any|"]; + 169 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + 170 [label="Access variable R|/a|"]; + 171 [label="Type operator: (R|/a| as R|A|)"]; + 172 [label="Access variable R|/a|"]; + 173 [label="Function call: R|/a|.R|/A.foo|()"]; + 174 [label="Access variable R|/d1|"]; + 175 [label="Access variable R|/D.any|"]; + 176 [label="Function call: R|/d1|.R|/D.any|.R|/A.foo|()"]; + 177 [label="Access variable R|/d1|"]; + 178 [label="Access variable R|/D.any|"]; + 179 [label="Function call: R|/d1|.R|/D.any|.R|/baz|()"]; + 180 [label="Exit block"]; } - 166 [label="Exit function test_6" style="filled" fillcolor=red]; + 181 [label="Exit function test_6" style="filled" fillcolor=red]; } - 165 -> {167}; + 165 -> {166}; + 166 -> {167}; 167 -> {168}; 168 -> {169}; 169 -> {170}; @@ -492,47 +493,47 @@ digraph boundSmartcasts_kt { 178 -> {179}; 179 -> {180}; 180 -> {181}; - 181 -> {166}; subgraph cluster_42 { color=red 182 [label="Enter function test_7" style="filled" fillcolor=red]; subgraph cluster_43 { color=blue - 184 [label="Enter block"]; - 185 [label="Access variable R|/d1|"]; - 186 [label="Enter safe call"]; - 188 [label="Access variable R|/D.any|"]; + 183 [label="Enter block"]; + 184 [label="Access variable R|/d1|"]; + 185 [label="Enter safe call"]; + 186 [label="Access variable R|/D.any|"]; 187 [label="Exit safe call"]; - 189 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 190 [label="Access variable R|/d2|"]; - 191 [label="Enter safe call"]; - 193 [label="Access variable R|/D.any|"]; + 188 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + 189 [label="Access variable R|/d2|"]; + 190 [label="Enter safe call"]; + 191 [label="Access variable R|/D.any|"]; 192 [label="Exit safe call"]; - 194 [label="Variable declaration: lval b: R|kotlin/Any?|"]; - 195 [label="Access variable R|/a|"]; - 196 [label="Type operator: (R|/a| as R|A|)"]; - 197 [label="Access variable R|/a|"]; - 198 [label="Function call: R|/a|.R|/A.foo|()"]; - 199 [label="Access variable R|/b|"]; - 200 [label="Type operator: (R|/b| as R|B|)"]; - 201 [label="Access variable R|/b|"]; - 202 [label="Function call: R|/b|.R|/B.bar|()"]; - 203 [label="Exit block"]; + 193 [label="Variable declaration: lval b: R|kotlin/Any?|"]; + 194 [label="Access variable R|/a|"]; + 195 [label="Type operator: (R|/a| as R|A|)"]; + 196 [label="Access variable R|/a|"]; + 197 [label="Function call: R|/a|.R|/A.foo|()"]; + 198 [label="Access variable R|/b|"]; + 199 [label="Type operator: (R|/b| as R|B|)"]; + 200 [label="Access variable R|/b|"]; + 201 [label="Function call: R|/b|.R|/B.bar|()"]; + 202 [label="Exit block"]; } - 183 [label="Exit function test_7" style="filled" fillcolor=red]; + 203 [label="Exit function test_7" style="filled" fillcolor=red]; } - 182 -> {184}; - 184 -> {185}; - 185 -> {186 187}; - 186 -> {188}; - 187 -> {189}; - 188 -> {187}; - 189 -> {190}; - 190 -> {191 192}; - 191 -> {193}; - 192 -> {194}; - 193 -> {192}; + 182 -> {183}; + 183 -> {184}; + 184 -> {185 187}; + 185 -> {186}; + 186 -> {187}; + 187 -> {188}; + 188 -> {189}; + 189 -> {190 192}; + 190 -> {191}; + 191 -> {192}; + 192 -> {193}; + 193 -> {194}; 194 -> {195}; 195 -> {196}; 196 -> {197}; @@ -542,6 +543,5 @@ digraph boundSmartcasts_kt { 200 -> {201}; 201 -> {202}; 202 -> {203}; - 203 -> {183}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot index 9ca2300dd7e..8dc25b68e0e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot @@ -6,11 +6,11 @@ digraph boundSmartcastsInBranches_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red @@ -21,189 +21,190 @@ digraph boundSmartcastsInBranches_kt { subgraph cluster_2 { color=red - 9 [label="Enter class A" style="filled" fillcolor=red]; + 8 [label="Enter class A" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue 5 [label="Enter property" style="filled" fillcolor=red]; - 7 [label="Const: String()"]; - 6 [label="Exit property" style="filled" fillcolor=red]; + 6 [label="Const: String()"]; + 7 [label="Exit property" style="filled" fillcolor=red]; } - 8 [label="Exit class A" style="filled" fillcolor=red]; + 9 [label="Exit class A" style="filled" fillcolor=red]; } - 9 -> {5} [color=green]; - 5 -> {7}; - 6 -> {8} [color=green]; - 7 -> {6}; + 8 -> {5} [color=green]; + 5 -> {6}; + 6 -> {7}; + 7 -> {9} [color=green]; subgraph cluster_4 { color=red 10 [label="Enter function test_0" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 12 [label="Enter block"]; - 13 [label="Const: Null(null)"]; - 14 [label="Variable declaration: lvar goodA: R|A?|"]; - 15 [label="Access variable R|/list|"]; - 16 [label="Function call: R|/list|.R|FakeOverride|>|()"]; - 17 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; + 11 [label="Enter block"]; + 12 [label="Const: Null(null)"]; + 13 [label="Variable declaration: lvar goodA: R|A?|"]; + 14 [label="Access variable R|/list|"]; + 15 [label="Function call: R|/list|.R|FakeOverride|>|()"]; + 16 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; subgraph cluster_6 { color=blue - 18 [label="Enter while loop"]; + 17 [label="Enter while loop"]; subgraph cluster_7 { color=blue - 20 [label="Enter loop condition"]; - 21 [label="Access variable R|/|"]; - 22 [label="Function call: R|/|.R|kotlin/collections/Iterator.hasNext|()"]; - 23 [label="Exit loop condition"]; + 18 [label="Enter loop condition"]; + 19 [label="Access variable R|/|"]; + 20 [label="Function call: R|/|.R|kotlin/collections/Iterator.hasNext|()"]; + 21 [label="Exit loop condition"]; } subgraph cluster_8 { color=blue - 24 [label="Enter loop block"]; + 22 [label="Enter loop block"]; subgraph cluster_9 { color=blue - 25 [label="Enter block"]; - 26 [label="Access variable R|/|"]; - 27 [label="Function call: R|/|.R|FakeOverride|()"]; - 28 [label="Variable declaration: lval a: R|A|"]; + 23 [label="Enter block"]; + 24 [label="Access variable R|/|"]; + 25 [label="Function call: R|/|.R|FakeOverride|()"]; + 26 [label="Variable declaration: lval a: R|A|"]; subgraph cluster_10 { color=blue - 29 [label="Enter when"]; + 27 [label="Enter when"]; subgraph cluster_11 { color=blue - 31 [label="Enter when branch condition "]; - 32 [label="Access variable R|/goodA|"]; - 33 [label="Const: Null(null)"]; - 34 [label="Operator =="]; - 35 [label="Exit when branch condition"]; + 28 [label="Enter when branch condition "]; + 29 [label="Access variable R|/goodA|"]; + 30 [label="Const: Null(null)"]; + 31 [label="Operator =="]; + 32 [label="Exit when branch condition"]; } - 44 [label="Synthetic else branch"]; - 36 [label="Enter when branch result"]; + 33 [label="Synthetic else branch"]; + 34 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 37 [label="Enter block"]; - 38 [label="Access variable R|/a|"]; - 39 [label="Assignment: R|/goodA|"]; - 40 [label="Jump: continue@@@[R|/|.R|kotlin/collections/Iterator.hasNext|()] "]; - 41 [label="Stub" style="filled" fillcolor=gray]; - 42 [label="Exit block" style="filled" fillcolor=gray]; + 35 [label="Enter block"]; + 36 [label="Access variable R|/a|"]; + 37 [label="Assignment: R|/goodA|"]; + 38 [label="Jump: continue@@@[R|/|.R|kotlin/collections/Iterator.hasNext|()] "]; + 39 [label="Stub" style="filled" fillcolor=gray]; + 40 [label="Exit block" style="filled" fillcolor=gray]; } - 43 [label="Exit when branch result" style="filled" fillcolor=gray]; - 30 [label="Exit when"]; + 41 [label="Exit when branch result" style="filled" fillcolor=gray]; + 42 [label="Exit when"]; } - 45 [label="Access variable R|/goodA|"]; - 46 [label="Access variable R|/A.s|"]; - 47 [label="Exit block"]; + 43 [label="Access variable R|/goodA|"]; + 44 [label="Access variable R|/A.s|"]; + 45 [label="Exit block"]; } - 48 [label="Exit loop block"]; + 46 [label="Exit loop block"]; } - 19 [label="Exit whileloop"]; + 47 [label="Exit whileloop"]; } - 49 [label="Exit block"]; + 48 [label="Exit block"]; } - 11 [label="Exit function test_0" style="filled" fillcolor=red]; + 49 [label="Exit function test_0" style="filled" fillcolor=red]; } - 10 -> {12}; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {20}; - 19 -> {49}; + 18 -> {19}; + 19 -> {20}; 20 -> {21}; - 21 -> {22}; + 21 -> {47 22}; 22 -> {23}; - 23 -> {19 24}; + 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {31}; - 30 -> {45}; + 29 -> {30}; + 30 -> {31}; 31 -> {32}; - 32 -> {33}; - 33 -> {34}; + 32 -> {34 33}; + 33 -> {42}; 34 -> {35}; - 35 -> {36 44}; + 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {39}; - 39 -> {40}; + 38 -> {39} [style=dotted]; + 38 -> {17} [color=green style=dashed]; + 39 -> {40} [style=dotted]; 40 -> {41} [style=dotted]; - 40 -> {18} [color=green style=dashed]; 41 -> {42} [style=dotted]; - 42 -> {43} [style=dotted]; - 43 -> {30} [style=dotted]; - 44 -> {30}; + 42 -> {43}; + 43 -> {44}; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + 46 -> {18} [color=green style=dashed]; 47 -> {48}; - 48 -> {20} [color=green style=dashed]; - 49 -> {11}; + 48 -> {49}; subgraph cluster_13 { color=red 50 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 52 [label="Enter block"]; - 53 [label="Variable declaration: lval x: R|kotlin/Any|"]; + 51 [label="Enter block"]; + 52 [label="Variable declaration: lval x: R|kotlin/Any|"]; subgraph cluster_15 { color=blue - 54 [label="Enter when"]; + 53 [label="Enter when"]; subgraph cluster_16 { color=blue - 56 [label="Enter when branch condition "]; - 57 [label="Access variable R|/b|"]; - 58 [label="Exit when branch condition"]; + 54 [label="Enter when branch condition "]; + 55 [label="Access variable R|/b|"]; + 56 [label="Exit when branch condition"]; } subgraph cluster_17 { color=blue - 65 [label="Enter when branch condition else"]; - 66 [label="Exit when branch condition"]; + 57 [label="Enter when branch condition else"]; + 58 [label="Exit when branch condition"]; } - 67 [label="Enter when branch result"]; + 59 [label="Enter when branch result"]; subgraph cluster_18 { - color=blue - 68 [label="Enter block"]; - 69 [label="Access variable R|/a|"]; - 70 [label="Assignment: R|/x|"]; - 71 [label="Exit block"]; - } - 72 [label="Exit when branch result"]; - 59 [label="Enter when branch result"]; - subgraph cluster_19 { color=blue 60 [label="Enter block"]; - 61 [label="Function call: R|/A.A|()"]; + 61 [label="Access variable R|/a|"]; 62 [label="Assignment: R|/x|"]; 63 [label="Exit block"]; } 64 [label="Exit when branch result"]; - 55 [label="Exit when"]; + 65 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 66 [label="Enter block"]; + 67 [label="Function call: R|/A.A|()"]; + 68 [label="Assignment: R|/x|"]; + 69 [label="Exit block"]; + } + 70 [label="Exit when branch result"]; + 71 [label="Exit when"]; } - 73 [label="Access variable R|/x|"]; - 74 [label="Access variable R|/A.s|"]; - 75 [label="Exit block"]; + 72 [label="Access variable R|/x|"]; + 73 [label="Access variable R|/A.s|"]; + 74 [label="Exit block"]; } - 51 [label="Exit function test_1" style="filled" fillcolor=red]; + 75 [label="Exit function test_1" style="filled" fillcolor=red]; } - 50 -> {52}; + 50 -> {51}; + 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {56}; - 55 -> {73}; - 56 -> {57}; + 54 -> {55}; + 55 -> {56}; + 56 -> {65 57}; 57 -> {58}; - 58 -> {59 65}; + 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {55}; + 64 -> {71}; 65 -> {66}; 66 -> {67}; 67 -> {68}; @@ -211,76 +212,76 @@ digraph boundSmartcastsInBranches_kt { 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {55}; + 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {51}; subgraph cluster_20 { color=red 76 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 78 [label="Enter block"]; - 79 [label="Variable declaration: lval x: R|kotlin/Any|"]; + 77 [label="Enter block"]; + 78 [label="Variable declaration: lval x: R|kotlin/Any|"]; subgraph cluster_22 { color=blue - 80 [label="Enter when"]; + 79 [label="Enter when"]; subgraph cluster_23 { color=blue - 82 [label="Enter when branch condition "]; - 83 [label="Access variable R|/b|"]; - 84 [label="Exit when branch condition"]; + 80 [label="Enter when branch condition "]; + 81 [label="Access variable R|/b|"]; + 82 [label="Exit when branch condition"]; } subgraph cluster_24 { color=blue - 91 [label="Enter when branch condition else"]; - 92 [label="Exit when branch condition"]; + 83 [label="Enter when branch condition else"]; + 84 [label="Exit when branch condition"]; } - 93 [label="Enter when branch result"]; + 85 [label="Enter when branch result"]; subgraph cluster_25 { color=blue - 94 [label="Enter block"]; - 95 [label="Access variable R|/a|"]; - 96 [label="Assignment: R|/x|"]; - 97 [label="Access variable R|/a|"]; - 98 [label="Type operator: (R|/a| as R|A|)"]; - 99 [label="Exit block"]; + 86 [label="Enter block"]; + 87 [label="Access variable R|/a|"]; + 88 [label="Assignment: R|/x|"]; + 89 [label="Access variable R|/a|"]; + 90 [label="Type operator: (R|/a| as R|A|)"]; + 91 [label="Exit block"]; } - 100 [label="Exit when branch result"]; - 85 [label="Enter when branch result"]; + 92 [label="Exit when branch result"]; + 93 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 86 [label="Enter block"]; - 87 [label="Function call: R|/A.A|()"]; - 88 [label="Assignment: R|/x|"]; - 89 [label="Exit block"]; + 94 [label="Enter block"]; + 95 [label="Function call: R|/A.A|()"]; + 96 [label="Assignment: R|/x|"]; + 97 [label="Exit block"]; } - 90 [label="Exit when branch result"]; - 81 [label="Exit when"]; + 98 [label="Exit when branch result"]; + 99 [label="Exit when"]; } - 101 [label="Access variable R|/x|"]; - 102 [label="Access variable R|/A.s|"]; - 103 [label="Exit block"]; + 100 [label="Access variable R|/x|"]; + 101 [label="Access variable R|/A.s|"]; + 102 [label="Exit block"]; } - 77 [label="Exit function test_2" style="filled" fillcolor=red]; + 103 [label="Exit function test_2" style="filled" fillcolor=red]; } - 76 -> {78}; + 76 -> {77}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {82}; - 81 -> {101}; - 82 -> {83}; + 80 -> {81}; + 81 -> {82}; + 82 -> {93 83}; 83 -> {84}; - 84 -> {85 91}; + 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; - 90 -> {81}; + 90 -> {91}; 91 -> {92}; - 92 -> {93}; + 92 -> {99}; 93 -> {94}; 94 -> {95}; 95 -> {96}; @@ -288,76 +289,76 @@ digraph boundSmartcastsInBranches_kt { 97 -> {98}; 98 -> {99}; 99 -> {100}; - 100 -> {81}; + 100 -> {101}; 101 -> {102}; 102 -> {103}; - 103 -> {77}; subgraph cluster_27 { color=red 104 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_28 { color=blue - 106 [label="Enter block"]; - 107 [label="Variable declaration: lval x: R|kotlin/Any|"]; + 105 [label="Enter block"]; + 106 [label="Variable declaration: lval x: R|kotlin/Any|"]; subgraph cluster_29 { color=blue - 108 [label="Enter when"]; + 107 [label="Enter when"]; subgraph cluster_30 { color=blue - 110 [label="Enter when branch condition "]; - 111 [label="Access variable R|/b|"]; - 112 [label="Exit when branch condition"]; + 108 [label="Enter when branch condition "]; + 109 [label="Access variable R|/b|"]; + 110 [label="Exit when branch condition"]; } subgraph cluster_31 { color=blue - 119 [label="Enter when branch condition else"]; - 120 [label="Exit when branch condition"]; + 111 [label="Enter when branch condition else"]; + 112 [label="Exit when branch condition"]; } - 121 [label="Enter when branch result"]; + 113 [label="Enter when branch result"]; subgraph cluster_32 { color=blue - 122 [label="Enter block"]; - 123 [label="Access variable R|/a|"]; - 124 [label="Type operator: (R|/a| as R|A|)"]; - 125 [label="Access variable R|/a|"]; - 126 [label="Assignment: R|/x|"]; - 127 [label="Exit block"]; + 114 [label="Enter block"]; + 115 [label="Access variable R|/a|"]; + 116 [label="Type operator: (R|/a| as R|A|)"]; + 117 [label="Access variable R|/a|"]; + 118 [label="Assignment: R|/x|"]; + 119 [label="Exit block"]; } - 128 [label="Exit when branch result"]; - 113 [label="Enter when branch result"]; + 120 [label="Exit when branch result"]; + 121 [label="Enter when branch result"]; subgraph cluster_33 { color=blue - 114 [label="Enter block"]; - 115 [label="Function call: R|/A.A|()"]; - 116 [label="Assignment: R|/x|"]; - 117 [label="Exit block"]; + 122 [label="Enter block"]; + 123 [label="Function call: R|/A.A|()"]; + 124 [label="Assignment: R|/x|"]; + 125 [label="Exit block"]; } - 118 [label="Exit when branch result"]; - 109 [label="Exit when"]; + 126 [label="Exit when branch result"]; + 127 [label="Exit when"]; } - 129 [label="Access variable R|/x|"]; - 130 [label="Access variable R|/A.s|"]; - 131 [label="Exit block"]; + 128 [label="Access variable R|/x|"]; + 129 [label="Access variable R|/A.s|"]; + 130 [label="Exit block"]; } - 105 [label="Exit function test_3" style="filled" fillcolor=red]; + 131 [label="Exit function test_3" style="filled" fillcolor=red]; } - 104 -> {106}; + 104 -> {105}; + 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {110}; - 109 -> {129}; - 110 -> {111}; + 108 -> {109}; + 109 -> {110}; + 110 -> {121 111}; 111 -> {112}; - 112 -> {113 119}; + 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {109}; + 118 -> {119}; 119 -> {120}; - 120 -> {121}; + 120 -> {127}; 121 -> {122}; 122 -> {123}; 123 -> {124}; @@ -365,43 +366,33 @@ digraph boundSmartcastsInBranches_kt { 125 -> {126}; 126 -> {127}; 127 -> {128}; - 128 -> {109}; + 128 -> {129}; 129 -> {130}; 130 -> {131}; - 131 -> {105}; subgraph cluster_34 { color=red 132 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_35 { color=blue - 134 [label="Enter block"]; - 135 [label="Variable declaration: lval x: R|kotlin/Any|"]; + 133 [label="Enter block"]; + 134 [label="Variable declaration: lval x: R|kotlin/Any|"]; subgraph cluster_36 { color=blue - 136 [label="Enter when"]; + 135 [label="Enter when"]; subgraph cluster_37 { color=blue - 138 [label="Enter when branch condition "]; - 139 [label="Access variable R|/b|"]; - 140 [label="Exit when branch condition"]; + 136 [label="Enter when branch condition "]; + 137 [label="Access variable R|/b|"]; + 138 [label="Exit when branch condition"]; } subgraph cluster_38 { color=blue - 147 [label="Enter when branch condition else"]; - 148 [label="Exit when branch condition"]; + 139 [label="Enter when branch condition else"]; + 140 [label="Exit when branch condition"]; } - 149 [label="Enter when branch result"]; - subgraph cluster_39 { - color=blue - 150 [label="Enter block"]; - 151 [label="Access variable R|/a|"]; - 152 [label="Assignment: R|/x|"]; - 153 [label="Exit block"]; - } - 154 [label="Exit when branch result"]; 141 [label="Enter when branch result"]; - subgraph cluster_40 { + subgraph cluster_39 { color=blue 142 [label="Enter block"]; 143 [label="Access variable R|/a|"]; @@ -409,32 +400,42 @@ digraph boundSmartcastsInBranches_kt { 145 [label="Exit block"]; } 146 [label="Exit when branch result"]; - 137 [label="Exit when"]; + 147 [label="Enter when branch result"]; + subgraph cluster_40 { + color=blue + 148 [label="Enter block"]; + 149 [label="Access variable R|/a|"]; + 150 [label="Assignment: R|/x|"]; + 151 [label="Exit block"]; + } + 152 [label="Exit when branch result"]; + 153 [label="Exit when"]; } - 155 [label="Access variable R|/x|"]; - 156 [label="Type operator: (R|/x| as R|A|)"]; - 157 [label="Access variable R|/x|"]; - 158 [label="Access variable R|/A.s|"]; - 159 [label="Access variable R|/a|"]; - 160 [label="Access variable R|/A.s|"]; - 161 [label="Exit block"]; + 154 [label="Access variable R|/x|"]; + 155 [label="Type operator: (R|/x| as R|A|)"]; + 156 [label="Access variable R|/x|"]; + 157 [label="Access variable R|/A.s|"]; + 158 [label="Access variable R|/a|"]; + 159 [label="Access variable R|/A.s|"]; + 160 [label="Exit block"]; } - 133 [label="Exit function test_4" style="filled" fillcolor=red]; + 161 [label="Exit function test_4" style="filled" fillcolor=red]; } - 132 -> {134}; + 132 -> {133}; + 133 -> {134}; 134 -> {135}; 135 -> {136}; - 136 -> {138}; - 137 -> {155}; - 138 -> {139}; + 136 -> {137}; + 137 -> {138}; + 138 -> {147 139}; 139 -> {140}; - 140 -> {141 147}; + 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; - 146 -> {137}; + 146 -> {153}; 147 -> {148}; 148 -> {149}; 149 -> {150}; @@ -442,47 +443,37 @@ digraph boundSmartcastsInBranches_kt { 151 -> {152}; 152 -> {153}; 153 -> {154}; - 154 -> {137}; + 154 -> {155}; 155 -> {156}; 156 -> {157}; 157 -> {158}; 158 -> {159}; 159 -> {160}; 160 -> {161}; - 161 -> {133}; subgraph cluster_41 { color=red 162 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_42 { color=blue - 164 [label="Enter block"]; - 165 [label="Variable declaration: lval x: R|kotlin/Any|"]; + 163 [label="Enter block"]; + 164 [label="Variable declaration: lval x: R|kotlin/Any|"]; subgraph cluster_43 { color=blue - 166 [label="Enter when"]; + 165 [label="Enter when"]; subgraph cluster_44 { color=blue - 168 [label="Enter when branch condition "]; - 169 [label="Access variable R|/b|"]; - 170 [label="Exit when branch condition"]; + 166 [label="Enter when branch condition "]; + 167 [label="Access variable R|/b|"]; + 168 [label="Exit when branch condition"]; } subgraph cluster_45 { color=blue - 177 [label="Enter when branch condition else"]; - 178 [label="Exit when branch condition"]; + 169 [label="Enter when branch condition else"]; + 170 [label="Exit when branch condition"]; } - 179 [label="Enter when branch result"]; - subgraph cluster_46 { - color=blue - 180 [label="Enter block"]; - 181 [label="Access variable R|/a|"]; - 182 [label="Assignment: R|/x|"]; - 183 [label="Exit block"]; - } - 184 [label="Exit when branch result"]; 171 [label="Enter when branch result"]; - subgraph cluster_47 { + subgraph cluster_46 { color=blue 172 [label="Enter block"]; 173 [label="Access variable R|/a|"]; @@ -490,32 +481,42 @@ digraph boundSmartcastsInBranches_kt { 175 [label="Exit block"]; } 176 [label="Exit when branch result"]; - 167 [label="Exit when"]; + 177 [label="Enter when branch result"]; + subgraph cluster_47 { + color=blue + 178 [label="Enter block"]; + 179 [label="Access variable R|/a|"]; + 180 [label="Assignment: R|/x|"]; + 181 [label="Exit block"]; + } + 182 [label="Exit when branch result"]; + 183 [label="Exit when"]; } - 185 [label="Access variable R|/a|"]; - 186 [label="Type operator: (R|/a| as R|A|)"]; - 187 [label="Access variable R|/x|"]; - 188 [label="Access variable R|/A.s|"]; - 189 [label="Access variable R|/a|"]; - 190 [label="Access variable R|/A.s|"]; - 191 [label="Exit block"]; + 184 [label="Access variable R|/a|"]; + 185 [label="Type operator: (R|/a| as R|A|)"]; + 186 [label="Access variable R|/x|"]; + 187 [label="Access variable R|/A.s|"]; + 188 [label="Access variable R|/a|"]; + 189 [label="Access variable R|/A.s|"]; + 190 [label="Exit block"]; } - 163 [label="Exit function test_5" style="filled" fillcolor=red]; + 191 [label="Exit function test_5" style="filled" fillcolor=red]; } - 162 -> {164}; + 162 -> {163}; + 163 -> {164}; 164 -> {165}; 165 -> {166}; - 166 -> {168}; - 167 -> {185}; - 168 -> {169}; + 166 -> {167}; + 167 -> {168}; + 168 -> {177 169}; 169 -> {170}; - 170 -> {171 177}; + 170 -> {171}; 171 -> {172}; 172 -> {173}; 173 -> {174}; 174 -> {175}; 175 -> {176}; - 176 -> {167}; + 176 -> {183}; 177 -> {178}; 178 -> {179}; 179 -> {180}; @@ -523,220 +524,220 @@ digraph boundSmartcastsInBranches_kt { 181 -> {182}; 182 -> {183}; 183 -> {184}; - 184 -> {167}; + 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; 189 -> {190}; 190 -> {191}; - 191 -> {163}; subgraph cluster_48 { color=red 192 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_49 { color=blue - 194 [label="Enter block"]; - 195 [label="Variable declaration: lval x: R|kotlin/Any|"]; - 196 [label="Access variable R|/a|"]; - 197 [label="Assignment: R|/x|"]; - 198 [label="Access variable R|/x|"]; - 199 [label="Access variable R|/A.s|"]; - 200 [label="Exit block"]; + 193 [label="Enter block"]; + 194 [label="Variable declaration: lval x: R|kotlin/Any|"]; + 195 [label="Access variable R|/a|"]; + 196 [label="Assignment: R|/x|"]; + 197 [label="Access variable R|/x|"]; + 198 [label="Access variable R|/A.s|"]; + 199 [label="Exit block"]; } - 193 [label="Exit function test_6" style="filled" fillcolor=red]; + 200 [label="Exit function test_6" style="filled" fillcolor=red]; } - 192 -> {194}; + 192 -> {193}; + 193 -> {194}; 194 -> {195}; 195 -> {196}; 196 -> {197}; 197 -> {198}; 198 -> {199}; 199 -> {200}; - 200 -> {193}; subgraph cluster_50 { color=red 201 [label="Enter function test_7" style="filled" fillcolor=red]; subgraph cluster_51 { color=blue - 203 [label="Enter block"]; - 204 [label="Const: Null(null)"]; - 205 [label="Variable declaration: lval z: R|kotlin/String?|"]; - 206 [label="Access variable R|/z|"]; - 207 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 208 [label="Access variable R|/y|"]; - 209 [label="Variable declaration: lval x: R|kotlin/String?|"]; + 202 [label="Enter block"]; + 203 [label="Const: Null(null)"]; + 204 [label="Variable declaration: lval z: R|kotlin/String?|"]; + 205 [label="Access variable R|/z|"]; + 206 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + 207 [label="Access variable R|/y|"]; + 208 [label="Variable declaration: lval x: R|kotlin/String?|"]; subgraph cluster_52 { color=blue - 210 [label="Enter when"]; + 209 [label="Enter when"]; subgraph cluster_53 { color=blue - 212 [label="Enter when branch condition "]; - 213 [label="Access variable R|/x|"]; - 214 [label="Const: Null(null)"]; - 215 [label="Operator !="]; - 216 [label="Exit when branch condition"]; + 210 [label="Enter when branch condition "]; + 211 [label="Access variable R|/x|"]; + 212 [label="Const: Null(null)"]; + 213 [label="Operator !="]; + 214 [label="Exit when branch condition"]; } - 227 [label="Synthetic else branch"]; - 217 [label="Enter when branch result"]; + 215 [label="Synthetic else branch"]; + 216 [label="Enter when branch result"]; subgraph cluster_54 { color=blue - 218 [label="Enter block"]; - 219 [label="Access variable R|/x|"]; - 220 [label="Access variable R|kotlin/String.length|"]; - 221 [label="Access variable R|/y|"]; - 222 [label="Access variable R|kotlin/String.length|"]; - 223 [label="Access variable R|/z|"]; - 224 [label="Access variable R|kotlin/String.length|"]; - 225 [label="Exit block"]; + 217 [label="Enter block"]; + 218 [label="Access variable R|/x|"]; + 219 [label="Access variable R|kotlin/String.length|"]; + 220 [label="Access variable R|/y|"]; + 221 [label="Access variable R|kotlin/String.length|"]; + 222 [label="Access variable R|/z|"]; + 223 [label="Access variable R|kotlin/String.length|"]; + 224 [label="Exit block"]; } - 226 [label="Exit when branch result"]; - 211 [label="Exit when"]; + 225 [label="Exit when branch result"]; + 226 [label="Exit when"]; } subgraph cluster_55 { color=blue - 228 [label="Enter when"]; + 227 [label="Enter when"]; subgraph cluster_56 { color=blue - 230 [label="Enter when branch condition "]; - 231 [label="Access variable R|/y|"]; - 232 [label="Const: Null(null)"]; - 233 [label="Operator !="]; - 234 [label="Exit when branch condition"]; + 228 [label="Enter when branch condition "]; + 229 [label="Access variable R|/y|"]; + 230 [label="Const: Null(null)"]; + 231 [label="Operator !="]; + 232 [label="Exit when branch condition"]; } - 245 [label="Synthetic else branch"]; - 235 [label="Enter when branch result"]; + 233 [label="Synthetic else branch"]; + 234 [label="Enter when branch result"]; subgraph cluster_57 { color=blue - 236 [label="Enter block"]; - 237 [label="Access variable R|/x|"]; - 238 [label="Access variable R|kotlin/String.length|"]; - 239 [label="Access variable R|/y|"]; - 240 [label="Access variable R|kotlin/String.length|"]; - 241 [label="Access variable R|/z|"]; - 242 [label="Access variable R|kotlin/String.length|"]; - 243 [label="Exit block"]; + 235 [label="Enter block"]; + 236 [label="Access variable R|/x|"]; + 237 [label="Access variable R|kotlin/String.length|"]; + 238 [label="Access variable R|/y|"]; + 239 [label="Access variable R|kotlin/String.length|"]; + 240 [label="Access variable R|/z|"]; + 241 [label="Access variable R|kotlin/String.length|"]; + 242 [label="Exit block"]; } - 244 [label="Exit when branch result"]; - 229 [label="Exit when"]; + 243 [label="Exit when branch result"]; + 244 [label="Exit when"]; } subgraph cluster_58 { color=blue - 246 [label="Enter when"]; + 245 [label="Enter when"]; subgraph cluster_59 { color=blue - 248 [label="Enter when branch condition "]; - 249 [label="Access variable R|/z|"]; - 250 [label="Const: Null(null)"]; - 251 [label="Operator !="]; - 252 [label="Exit when branch condition"]; + 246 [label="Enter when branch condition "]; + 247 [label="Access variable R|/z|"]; + 248 [label="Const: Null(null)"]; + 249 [label="Operator !="]; + 250 [label="Exit when branch condition"]; } - 263 [label="Synthetic else branch"]; - 253 [label="Enter when branch result"]; + 251 [label="Synthetic else branch"]; + 252 [label="Enter when branch result"]; subgraph cluster_60 { color=blue - 254 [label="Enter block"]; - 255 [label="Access variable R|/x|"]; - 256 [label="Access variable R|kotlin/String.length|"]; - 257 [label="Access variable R|/y|"]; - 258 [label="Access variable R|kotlin/String.length|"]; - 259 [label="Access variable R|/z|"]; - 260 [label="Access variable R|kotlin/String.length|"]; - 261 [label="Exit block"]; + 253 [label="Enter block"]; + 254 [label="Access variable R|/x|"]; + 255 [label="Access variable R|kotlin/String.length|"]; + 256 [label="Access variable R|/y|"]; + 257 [label="Access variable R|kotlin/String.length|"]; + 258 [label="Access variable R|/z|"]; + 259 [label="Access variable R|kotlin/String.length|"]; + 260 [label="Exit block"]; } - 262 [label="Exit when branch result"]; - 247 [label="Exit when"]; + 261 [label="Exit when branch result"]; + 262 [label="Exit when"]; } - 264 [label="Const: Null(null)"]; - 265 [label="Assignment: R|/y|"]; + 263 [label="Const: Null(null)"]; + 264 [label="Assignment: R|/y|"]; subgraph cluster_61 { color=blue - 266 [label="Enter when"]; + 265 [label="Enter when"]; subgraph cluster_62 { color=blue - 268 [label="Enter when branch condition "]; - 269 [label="Access variable R|/x|"]; - 270 [label="Const: Null(null)"]; - 271 [label="Operator !="]; - 272 [label="Exit when branch condition"]; + 266 [label="Enter when branch condition "]; + 267 [label="Access variable R|/x|"]; + 268 [label="Const: Null(null)"]; + 269 [label="Operator !="]; + 270 [label="Exit when branch condition"]; } - 283 [label="Synthetic else branch"]; - 273 [label="Enter when branch result"]; + 271 [label="Synthetic else branch"]; + 272 [label="Enter when branch result"]; subgraph cluster_63 { color=blue - 274 [label="Enter block"]; - 275 [label="Access variable R|/x|"]; - 276 [label="Access variable R|kotlin/String.length|"]; - 277 [label="Access variable R|/y|"]; - 278 [label="Access variable #"]; - 279 [label="Access variable R|/z|"]; - 280 [label="Access variable R|kotlin/String.length|"]; - 281 [label="Exit block"]; + 273 [label="Enter block"]; + 274 [label="Access variable R|/x|"]; + 275 [label="Access variable R|kotlin/String.length|"]; + 276 [label="Access variable R|/y|"]; + 277 [label="Access variable #"]; + 278 [label="Access variable R|/z|"]; + 279 [label="Access variable R|kotlin/String.length|"]; + 280 [label="Exit block"]; } - 282 [label="Exit when branch result"]; - 267 [label="Exit when"]; + 281 [label="Exit when branch result"]; + 282 [label="Exit when"]; } subgraph cluster_64 { color=blue - 284 [label="Enter when"]; + 283 [label="Enter when"]; subgraph cluster_65 { color=blue - 286 [label="Enter when branch condition "]; - 287 [label="Access variable R|/y|"]; - 288 [label="Const: Null(null)"]; - 289 [label="Operator !="]; - 290 [label="Exit when branch condition"]; + 284 [label="Enter when branch condition "]; + 285 [label="Access variable R|/y|"]; + 286 [label="Const: Null(null)"]; + 287 [label="Operator !="]; + 288 [label="Exit when branch condition"]; } - 301 [label="Synthetic else branch"]; - 291 [label="Enter when branch result"]; + 289 [label="Synthetic else branch"]; + 290 [label="Enter when branch result"]; subgraph cluster_66 { color=blue - 292 [label="Enter block"]; - 293 [label="Access variable R|/x|"]; - 294 [label="Access variable #"]; - 295 [label="Access variable R|/y|"]; - 296 [label="Access variable R|kotlin/String.length|"]; - 297 [label="Access variable R|/z|"]; - 298 [label="Access variable #"]; - 299 [label="Exit block"]; + 291 [label="Enter block"]; + 292 [label="Access variable R|/x|"]; + 293 [label="Access variable #"]; + 294 [label="Access variable R|/y|"]; + 295 [label="Access variable R|kotlin/String.length|"]; + 296 [label="Access variable R|/z|"]; + 297 [label="Access variable #"]; + 298 [label="Exit block"]; } - 300 [label="Exit when branch result"]; - 285 [label="Exit when"]; + 299 [label="Exit when branch result"]; + 300 [label="Exit when"]; } subgraph cluster_67 { color=blue - 302 [label="Enter when"]; + 301 [label="Enter when"]; subgraph cluster_68 { color=blue - 304 [label="Enter when branch condition "]; - 305 [label="Access variable R|/z|"]; - 306 [label="Const: Null(null)"]; - 307 [label="Operator !="]; - 308 [label="Exit when branch condition"]; + 302 [label="Enter when branch condition "]; + 303 [label="Access variable R|/z|"]; + 304 [label="Const: Null(null)"]; + 305 [label="Operator !="]; + 306 [label="Exit when branch condition"]; } - 319 [label="Synthetic else branch"]; - 309 [label="Enter when branch result"]; + 307 [label="Synthetic else branch"]; + 308 [label="Enter when branch result"]; subgraph cluster_69 { color=blue - 310 [label="Enter block"]; - 311 [label="Access variable R|/x|"]; - 312 [label="Access variable R|kotlin/String.length|"]; - 313 [label="Access variable R|/y|"]; - 314 [label="Access variable #"]; - 315 [label="Access variable R|/z|"]; - 316 [label="Access variable R|kotlin/String.length|"]; - 317 [label="Exit block"]; + 309 [label="Enter block"]; + 310 [label="Access variable R|/x|"]; + 311 [label="Access variable R|kotlin/String.length|"]; + 312 [label="Access variable R|/y|"]; + 313 [label="Access variable #"]; + 314 [label="Access variable R|/z|"]; + 315 [label="Access variable R|kotlin/String.length|"]; + 316 [label="Exit block"]; } - 318 [label="Exit when branch result"]; - 303 [label="Exit when"]; + 317 [label="Exit when branch result"]; + 318 [label="Exit when"]; } - 320 [label="Exit block"]; + 319 [label="Exit block"]; } - 202 [label="Exit function test_7" style="filled" fillcolor=red]; + 320 [label="Exit function test_7" style="filled" fillcolor=red]; } - 201 -> {203}; + 201 -> {202}; + 202 -> {203}; 203 -> {204}; 204 -> {205}; 205 -> {206}; @@ -744,13 +745,13 @@ digraph boundSmartcastsInBranches_kt { 207 -> {208}; 208 -> {209}; 209 -> {210}; - 210 -> {212}; - 211 -> {228}; + 210 -> {211}; + 211 -> {212}; 212 -> {213}; 213 -> {214}; - 214 -> {215}; - 215 -> {216}; - 216 -> {217 227}; + 214 -> {216 215}; + 215 -> {226}; + 216 -> {217}; 217 -> {218}; 218 -> {219}; 219 -> {220}; @@ -760,15 +761,15 @@ digraph boundSmartcastsInBranches_kt { 223 -> {224}; 224 -> {225}; 225 -> {226}; - 226 -> {211}; - 227 -> {211}; - 228 -> {230}; - 229 -> {246}; + 226 -> {227}; + 227 -> {228}; + 228 -> {229}; + 229 -> {230}; 230 -> {231}; 231 -> {232}; - 232 -> {233}; - 233 -> {234}; - 234 -> {235 245}; + 232 -> {234 233}; + 233 -> {244}; + 234 -> {235}; 235 -> {236}; 236 -> {237}; 237 -> {238}; @@ -778,15 +779,15 @@ digraph boundSmartcastsInBranches_kt { 241 -> {242}; 242 -> {243}; 243 -> {244}; - 244 -> {229}; - 245 -> {229}; - 246 -> {248}; - 247 -> {264}; + 244 -> {245}; + 245 -> {246}; + 246 -> {247}; + 247 -> {248}; 248 -> {249}; 249 -> {250}; - 250 -> {251}; - 251 -> {252}; - 252 -> {253 263}; + 250 -> {252 251}; + 251 -> {262}; + 252 -> {253}; 253 -> {254}; 254 -> {255}; 255 -> {256}; @@ -796,17 +797,17 @@ digraph boundSmartcastsInBranches_kt { 259 -> {260}; 260 -> {261}; 261 -> {262}; - 262 -> {247}; - 263 -> {247}; + 262 -> {263}; + 263 -> {264}; 264 -> {265}; 265 -> {266}; - 266 -> {268}; - 267 -> {284}; + 266 -> {267}; + 267 -> {268}; 268 -> {269}; 269 -> {270}; - 270 -> {271}; - 271 -> {272}; - 272 -> {273 283}; + 270 -> {272 271}; + 271 -> {282}; + 272 -> {273}; 273 -> {274}; 274 -> {275}; 275 -> {276}; @@ -816,15 +817,15 @@ digraph boundSmartcastsInBranches_kt { 279 -> {280}; 280 -> {281}; 281 -> {282}; - 282 -> {267}; - 283 -> {267}; - 284 -> {286}; - 285 -> {302}; + 282 -> {283}; + 283 -> {284}; + 284 -> {285}; + 285 -> {286}; 286 -> {287}; 287 -> {288}; - 288 -> {289}; - 289 -> {290}; - 290 -> {291 301}; + 288 -> {290 289}; + 289 -> {300}; + 290 -> {291}; 291 -> {292}; 292 -> {293}; 293 -> {294}; @@ -834,15 +835,15 @@ digraph boundSmartcastsInBranches_kt { 297 -> {298}; 298 -> {299}; 299 -> {300}; - 300 -> {285}; - 301 -> {285}; - 302 -> {304}; - 303 -> {320}; + 300 -> {301}; + 301 -> {302}; + 302 -> {303}; + 303 -> {304}; 304 -> {305}; 305 -> {306}; - 306 -> {307}; - 307 -> {308}; - 308 -> {309 319}; + 306 -> {308 307}; + 307 -> {318}; + 308 -> {309}; 309 -> {310}; 310 -> {311}; 311 -> {312}; @@ -852,8 +853,7 @@ digraph boundSmartcastsInBranches_kt { 315 -> {316}; 316 -> {317}; 317 -> {318}; - 318 -> {303}; - 319 -> {303}; - 320 -> {202}; + 318 -> {319}; + 319 -> {320}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot index 4925d1ed579..454abb27023 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot @@ -6,27 +6,27 @@ digraph functionCallBound_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red - 4 [label="Enter class Base" style="filled" fillcolor=red]; - 3 [label="Exit class Base" style="filled" fillcolor=red]; + 3 [label="Enter class Base" style="filled" fillcolor=red]; + 4 [label="Exit class Base" style="filled" fillcolor=red]; } - 4 -> {3} [color=green]; + 3 -> {4} [color=green]; subgraph cluster_2 { color=red 5 [label="Enter function " style="filled" fillcolor=red]; - 7 [label="Delegated constructor call: super()"]; - 6 [label="Exit function " style="filled" fillcolor=red]; + 6 [label="Delegated constructor call: super()"]; + 7 [label="Exit function " style="filled" fillcolor=red]; } - 5 -> {7}; - 7 -> {6}; + 5 -> {6}; + 6 -> {7}; subgraph cluster_3 { color=red @@ -37,87 +37,87 @@ digraph functionCallBound_kt { subgraph cluster_4 { color=red - 14 [label="Enter class Sub" style="filled" fillcolor=red]; + 13 [label="Enter class Sub" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue 10 [label="Enter property" style="filled" fillcolor=red]; - 12 [label="Access variable R|/data|"]; - 11 [label="Exit property" style="filled" fillcolor=red]; + 11 [label="Access variable R|/data|"]; + 12 [label="Exit property" style="filled" fillcolor=red]; } - 13 [label="Exit class Sub" style="filled" fillcolor=red]; + 14 [label="Exit class Sub" style="filled" fillcolor=red]; } - 14 -> {10} [color=green]; - 10 -> {12}; - 11 -> {13} [color=green]; - 12 -> {11}; + 13 -> {10} [color=green]; + 10 -> {11}; + 11 -> {12}; + 12 -> {14} [color=green]; subgraph cluster_6 { color=red 15 [label="Enter function isOk" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 17 [label="Enter block"]; - 18 [label="Const: Boolean(true)"]; - 19 [label="Jump: ^isOk Boolean(true)"]; - 20 [label="Stub" style="filled" fillcolor=gray]; - 21 [label="Exit block" style="filled" fillcolor=gray]; + 16 [label="Enter block"]; + 17 [label="Const: Boolean(true)"]; + 18 [label="Jump: ^isOk Boolean(true)"]; + 19 [label="Stub" style="filled" fillcolor=gray]; + 20 [label="Exit block" style="filled" fillcolor=gray]; } - 16 [label="Exit function isOk" style="filled" fillcolor=red]; + 21 [label="Exit function isOk" style="filled" fillcolor=red]; } - 15 -> {17}; + 15 -> {16}; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; - 19 -> {16}; + 18 -> {21}; + 18 -> {19} [style=dotted]; 19 -> {20} [style=dotted]; 20 -> {21} [style=dotted]; - 21 -> {16} [style=dotted]; subgraph cluster_8 { color=red 22 [label="Enter function check" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 24 [label="Enter block"]; + 23 [label="Enter block"]; subgraph cluster_10 { color=blue - 25 [label="Enter when"]; + 24 [label="Enter when"]; subgraph cluster_11 { color=blue - 27 [label="Enter when branch condition "]; - 28 [label="Access variable R|/base|"]; - 29 [label="Type operator: (R|/base| as? R|Sub|)"]; - 30 [label="Enter safe call"]; - 32 [label="Function call: $subj$.R|/isOk|()"]; - 31 [label="Exit safe call"]; - 33 [label="Const: Boolean(true)"]; - 34 [label="Operator =="]; - 35 [label="Exit when branch condition"]; + 25 [label="Enter when branch condition "]; + 26 [label="Access variable R|/base|"]; + 27 [label="Type operator: (R|/base| as? R|Sub|)"]; + 28 [label="Enter safe call"]; + 29 [label="Function call: $subj$.R|/isOk|()"]; + 30 [label="Exit safe call"]; + 31 [label="Const: Boolean(true)"]; + 32 [label="Operator =="]; + 33 [label="Exit when branch condition"]; } subgraph cluster_12 { color=blue - 42 [label="Enter when branch condition else"]; - 43 [label="Exit when branch condition"]; + 34 [label="Enter when branch condition else"]; + 35 [label="Exit when branch condition"]; } - 44 [label="Enter when branch result"]; - subgraph cluster_13 { - color=blue - 45 [label="Enter block"]; - 46 [label="Access variable R|/base|"]; - 47 [label="Exit block"]; - } - 48 [label="Exit when branch result"]; 36 [label="Enter when branch result"]; - subgraph cluster_14 { + subgraph cluster_13 { color=blue 37 [label="Enter block"]; 38 [label="Access variable R|/base|"]; - 39 [label="Access variable R|/Sub.data|"]; - 40 [label="Exit block"]; + 39 [label="Exit block"]; } - 41 [label="Exit when branch result"]; - 26 [label="Exit when"]; + 40 [label="Exit when branch result"]; + 41 [label="Enter when branch result"]; + subgraph cluster_14 { + color=blue + 42 [label="Enter block"]; + 43 [label="Access variable R|/base|"]; + 44 [label="Access variable R|/Sub.data|"]; + 45 [label="Exit block"]; + } + 46 [label="Exit when branch result"]; + 47 [label="Exit when"]; } - 49 [label="Jump: ^check when () { + 48 [label="Jump: ^check when () { ==((R|/base| as? R|Sub|)?.{ $subj$.R|/isOk|() }, Boolean(true)) -> { R|/base|.R|/Sub.data| } @@ -126,40 +126,40 @@ digraph functionCallBound_kt { } } "]; - 50 [label="Stub" style="filled" fillcolor=gray]; - 51 [label="Exit block" style="filled" fillcolor=gray]; + 49 [label="Stub" style="filled" fillcolor=gray]; + 50 [label="Exit block" style="filled" fillcolor=gray]; } - 23 [label="Exit function check" style="filled" fillcolor=red]; + 51 [label="Exit function check" style="filled" fillcolor=red]; } - 22 -> {24}; + 22 -> {23}; + 23 -> {24}; 24 -> {25}; - 25 -> {27}; - 26 -> {49}; - 27 -> {28}; + 25 -> {26}; + 26 -> {27}; + 27 -> {28 30}; 28 -> {29}; - 29 -> {30 31}; - 30 -> {32}; - 31 -> {33}; - 32 -> {31}; - 33 -> {34}; + 29 -> {30}; + 30 -> {31}; + 31 -> {32}; + 32 -> {33}; + 33 -> {41 34}; 34 -> {35}; - 35 -> {36 42}; + 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {41}; - 41 -> {26}; + 40 -> {47}; + 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {26}; - 49 -> {23}; + 48 -> {51}; + 48 -> {49} [style=dotted]; 49 -> {50} [style=dotted]; 50 -> {51} [style=dotted]; - 51 -> {23} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot index a00a80cd71b..d3c46711b2e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot @@ -8,354 +8,355 @@ digraph casts_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Access variable R|/x|"]; - 4 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 5 [label="Access variable R|/x|"]; - 6 [label="Access variable R|kotlin/String.length|"]; - 7 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Access variable R|/x|"]; + 3 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 4 [label="Access variable R|/x|"]; + 5 [label="Access variable R|kotlin/String.length|"]; + 6 [label="Exit block"]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 7 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {1}; subgraph cluster_2 { color=red 8 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 10 [label="Enter block"]; + 9 [label="Enter block"]; subgraph cluster_4 { color=blue - 11 [label="Enter when"]; + 10 [label="Enter when"]; subgraph cluster_5 { color=blue - 13 [label="Enter when branch condition "]; - 14 [label="Access variable R|/x|"]; - 15 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; - 16 [label="Exit when branch condition"]; + 11 [label="Enter when branch condition "]; + 12 [label="Access variable R|/x|"]; + 13 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 14 [label="Exit when branch condition"]; } - 23 [label="Synthetic else branch"]; - 17 [label="Enter when branch result"]; + 15 [label="Synthetic else branch"]; + 16 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 18 [label="Enter block"]; - 19 [label="Access variable R|/x|"]; - 20 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; - 21 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Access variable R|/x|"]; + 19 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; + 20 [label="Exit block"]; } - 22 [label="Exit when branch result"]; - 12 [label="Exit when"]; + 21 [label="Exit when branch result"]; + 22 [label="Exit when"]; } - 24 [label="Access variable R|/x|"]; - 25 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; - 26 [label="Exit block"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; + 25 [label="Exit block"]; } - 9 [label="Exit function test_2" style="filled" fillcolor=red]; + 26 [label="Exit function test_2" style="filled" fillcolor=red]; } - 8 -> {10}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; - 11 -> {13}; - 12 -> {24}; + 11 -> {12}; + 12 -> {13}; 13 -> {14}; - 14 -> {15}; - 15 -> {16}; - 16 -> {17 23}; + 14 -> {16 15}; + 15 -> {22}; + 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {12}; - 23 -> {12}; + 22 -> {23}; + 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {9}; subgraph cluster_7 { color=red 27 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 29 [label="Enter block"]; + 28 [label="Enter block"]; subgraph cluster_9 { color=blue - 30 [label="Enter when"]; + 29 [label="Enter when"]; subgraph cluster_10 { color=blue - 32 [label="Enter when branch condition "]; + 30 [label="Enter when branch condition "]; subgraph cluster_11 { 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: (R|/x| as R|kotlin/Boolean|)"]; - 33 [label="Exit &&"]; + 31 [label="Enter &&"]; + 32 [label="Access variable R|/b|"]; + 33 [label="Exit left part of &&"]; + 34 [label="Enter right part of &&"]; + 35 [label="Access variable R|/x|"]; + 36 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 37 [label="Exit &&"]; } - 40 [label="Exit when branch condition"]; + 38 [label="Exit when branch condition"]; } - 47 [label="Synthetic else branch"]; - 41 [label="Enter when branch result"]; + 39 [label="Synthetic else branch"]; + 40 [label="Enter when branch result"]; subgraph cluster_12 { 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"]; + 41 [label="Enter block"]; + 42 [label="Access variable R|/x|"]; + 43 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; + 44 [label="Exit block"]; } - 46 [label="Exit when branch result"]; - 31 [label="Exit when"]; + 45 [label="Exit when branch result"]; + 46 [label="Exit when"]; } - 48 [label="Access variable R|/x|"]; - 49 [label="Function call: R|/x|.#()"]; + 47 [label="Access variable R|/x|"]; + 48 [label="Function call: R|/x|.#()"]; subgraph cluster_13 { color=blue - 50 [label="Enter when"]; + 49 [label="Enter when"]; subgraph cluster_14 { color=blue - 52 [label="Enter when branch condition "]; + 50 [label="Enter when branch condition "]; subgraph cluster_15 { color=blue - 54 [label="Enter &&"]; - 55 [label="Access variable R|/b|"]; - 56 [label="Exit left part of &&"]; - 57 [label="Enter right part of &&"]; - 58 [label="Access variable R|/x|"]; - 59 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; - 60 [label="Const: Boolean(true)"]; - 61 [label="Operator =="]; - 53 [label="Exit &&"]; + 51 [label="Enter &&"]; + 52 [label="Access variable R|/b|"]; + 53 [label="Exit left part of &&"]; + 54 [label="Enter right part of &&"]; + 55 [label="Access variable R|/x|"]; + 56 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 57 [label="Const: Boolean(true)"]; + 58 [label="Operator =="]; + 59 [label="Exit &&"]; } - 62 [label="Exit when branch condition"]; + 60 [label="Exit when branch condition"]; } - 69 [label="Synthetic else branch"]; - 63 [label="Enter when branch result"]; + 61 [label="Synthetic else branch"]; + 62 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 64 [label="Enter block"]; - 65 [label="Access variable R|/x|"]; - 66 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; - 67 [label="Exit block"]; + 63 [label="Enter block"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Function call: R|/x|.R|kotlin/Boolean.not|()"]; + 66 [label="Exit block"]; } - 68 [label="Exit when branch result"]; - 51 [label="Exit when"]; + 67 [label="Exit when branch result"]; + 68 [label="Exit when"]; } - 70 [label="Access variable R|/x|"]; - 71 [label="Function call: R|/x|.#()"]; + 69 [label="Access variable R|/x|"]; + 70 [label="Function call: R|/x|.#()"]; subgraph cluster_17 { color=blue - 72 [label="Enter when"]; + 71 [label="Enter when"]; subgraph cluster_18 { color=blue - 74 [label="Enter when branch condition "]; + 72 [label="Enter when branch condition "]; subgraph cluster_19 { color=blue - 76 [label="Enter ||"]; - 77 [label="Access variable R|/b|"]; - 78 [label="Exit left part of ||"]; - 79 [label="Enter right part of ||"]; - 80 [label="Access variable R|/x|"]; - 81 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; - 75 [label="Exit ||"]; + 73 [label="Enter ||"]; + 74 [label="Access variable R|/b|"]; + 75 [label="Exit left part of ||"]; + 76 [label="Enter right part of ||"]; + 77 [label="Access variable R|/x|"]; + 78 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 79 [label="Exit ||"]; } - 82 [label="Exit when branch condition"]; + 80 [label="Exit when branch condition"]; } - 89 [label="Synthetic else branch"]; - 83 [label="Enter when branch result"]; + 81 [label="Synthetic else branch"]; + 82 [label="Enter when branch result"]; subgraph cluster_20 { color=blue - 84 [label="Enter block"]; - 85 [label="Access variable R|/x|"]; - 86 [label="Function call: R|/x|.#()"]; - 87 [label="Exit block"]; + 83 [label="Enter block"]; + 84 [label="Access variable R|/x|"]; + 85 [label="Function call: R|/x|.#()"]; + 86 [label="Exit block"]; } - 88 [label="Exit when branch result"]; - 73 [label="Exit when"]; + 87 [label="Exit when branch result"]; + 88 [label="Exit when"]; } - 90 [label="Access variable R|/x|"]; - 91 [label="Function call: R|/x|.#()"]; - 92 [label="Exit block"]; + 89 [label="Access variable R|/x|"]; + 90 [label="Function call: R|/x|.#()"]; + 91 [label="Exit block"]; } - 28 [label="Exit function test_3" style="filled" fillcolor=red]; + 92 [label="Exit function test_3" style="filled" fillcolor=red]; } - 27 -> {29}; + 27 -> {28}; + 28 -> {29}; 29 -> {30}; - 30 -> {32}; - 31 -> {48}; - 32 -> {34}; - 33 -> {40}; + 30 -> {31}; + 31 -> {32}; + 32 -> {33}; + 33 -> {37 34}; 34 -> {35}; 35 -> {36}; - 36 -> {33 37}; + 36 -> {37}; 37 -> {38}; - 38 -> {39}; - 39 -> {33}; - 40 -> {41 47}; + 38 -> {40 39}; + 39 -> {46}; + 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {31}; - 47 -> {31}; + 46 -> {47}; + 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {52}; - 51 -> {70}; - 52 -> {54}; - 53 -> {62}; + 50 -> {51}; + 51 -> {52}; + 52 -> {53}; + 53 -> {59 54}; 54 -> {55}; 55 -> {56}; - 56 -> {53 57}; + 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {61}; - 61 -> {53}; - 62 -> {63 69}; + 60 -> {62 61}; + 61 -> {68}; + 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - 68 -> {51}; - 69 -> {51}; + 68 -> {69}; + 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {74}; - 73 -> {90}; - 74 -> {76}; - 75 -> {82}; + 72 -> {73}; + 73 -> {74}; + 74 -> {75}; + 75 -> {79 76}; 76 -> {77}; 77 -> {78}; - 78 -> {75 79}; + 78 -> {79}; 79 -> {80}; - 80 -> {81}; - 81 -> {75}; - 82 -> {83 89}; + 80 -> {82 81}; + 81 -> {88}; + 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {73}; - 89 -> {73}; + 88 -> {89}; + 89 -> {90}; 90 -> {91}; 91 -> {92}; - 92 -> {28}; subgraph cluster_21 { color=red 93 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_22 { color=blue - 95 [label="Enter block"]; + 94 [label="Enter block"]; subgraph cluster_23 { color=blue - 96 [label="Enter when"]; + 95 [label="Enter when"]; subgraph cluster_24 { color=blue - 98 [label="Enter when branch condition "]; - 99 [label="Access variable R|/b|"]; - 100 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; - 101 [label="Const: Null(null)"]; - 102 [label="Operator !="]; - 103 [label="Exit when branch condition"]; + 96 [label="Enter when branch condition "]; + 97 [label="Access variable R|/b|"]; + 98 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; + 99 [label="Const: Null(null)"]; + 100 [label="Operator !="]; + 101 [label="Exit when branch condition"]; } subgraph cluster_25 { color=blue - 110 [label="Enter when branch condition else"]; - 111 [label="Exit when branch condition"]; + 102 [label="Enter when branch condition else"]; + 103 [label="Exit when branch condition"]; } - 112 [label="Enter when branch result"]; - subgraph cluster_26 { - color=blue - 113 [label="Enter block"]; - 114 [label="Access variable R|/b|"]; - 115 [label="Function call: R|/b|.#()"]; - 116 [label="Exit block"]; - } - 117 [label="Exit when branch result"]; 104 [label="Enter when branch result"]; - subgraph cluster_27 { + subgraph cluster_26 { color=blue 105 [label="Enter block"]; 106 [label="Access variable R|/b|"]; - 107 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 107 [label="Function call: R|/b|.#()"]; 108 [label="Exit block"]; } 109 [label="Exit when branch result"]; - 97 [label="Exit when"]; + 110 [label="Enter when branch result"]; + subgraph cluster_27 { + color=blue + 111 [label="Enter block"]; + 112 [label="Access variable R|/b|"]; + 113 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 114 [label="Exit block"]; + } + 115 [label="Exit when branch result"]; + 116 [label="Exit when"]; } - 118 [label="Access variable R|/b|"]; - 119 [label="Function call: R|/b|.#()"]; + 117 [label="Access variable R|/b|"]; + 118 [label="Function call: R|/b|.#()"]; subgraph cluster_28 { color=blue - 120 [label="Enter when"]; + 119 [label="Enter when"]; subgraph cluster_29 { color=blue - 122 [label="Enter when branch condition "]; - 123 [label="Access variable R|/b|"]; - 124 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; - 125 [label="Const: Null(null)"]; - 126 [label="Operator =="]; - 127 [label="Exit when branch condition"]; + 120 [label="Enter when branch condition "]; + 121 [label="Access variable R|/b|"]; + 122 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; + 123 [label="Const: Null(null)"]; + 124 [label="Operator =="]; + 125 [label="Exit when branch condition"]; } subgraph cluster_30 { color=blue - 134 [label="Enter when branch condition else"]; - 135 [label="Exit when branch condition"]; + 126 [label="Enter when branch condition else"]; + 127 [label="Exit when branch condition"]; } - 136 [label="Enter when branch result"]; - subgraph cluster_31 { - color=blue - 137 [label="Enter block"]; - 138 [label="Access variable R|/b|"]; - 139 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 140 [label="Exit block"]; - } - 141 [label="Exit when branch result"]; 128 [label="Enter when branch result"]; - subgraph cluster_32 { + subgraph cluster_31 { color=blue 129 [label="Enter block"]; 130 [label="Access variable R|/b|"]; - 131 [label="Function call: R|/b|.#()"]; + 131 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; 132 [label="Exit block"]; } 133 [label="Exit when branch result"]; - 121 [label="Exit when"]; + 134 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 135 [label="Enter block"]; + 136 [label="Access variable R|/b|"]; + 137 [label="Function call: R|/b|.#()"]; + 138 [label="Exit block"]; + } + 139 [label="Exit when branch result"]; + 140 [label="Exit when"]; } - 142 [label="Access variable R|/b|"]; - 143 [label="Function call: R|/b|.#()"]; - 144 [label="Exit block"]; + 141 [label="Access variable R|/b|"]; + 142 [label="Function call: R|/b|.#()"]; + 143 [label="Exit block"]; } - 94 [label="Exit function test_4" style="filled" fillcolor=red]; + 144 [label="Exit function test_4" style="filled" fillcolor=red]; } - 93 -> {95}; + 93 -> {94}; + 94 -> {95}; 95 -> {96}; - 96 -> {98}; - 97 -> {118}; + 96 -> {97}; + 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {102}; + 101 -> {110 102}; 102 -> {103}; - 103 -> {104 110}; + 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {97}; + 109 -> {116}; 110 -> {111}; 111 -> {112}; 112 -> {113}; @@ -363,23 +364,23 @@ digraph casts_kt { 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {97}; + 117 -> {118}; 118 -> {119}; 119 -> {120}; - 120 -> {122}; - 121 -> {142}; + 120 -> {121}; + 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; - 125 -> {126}; + 125 -> {134 126}; 126 -> {127}; - 127 -> {128 134}; + 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {121}; + 133 -> {140}; 134 -> {135}; 135 -> {136}; 136 -> {137}; @@ -387,9 +388,8 @@ digraph casts_kt { 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {121}; + 141 -> {142}; 142 -> {143}; 143 -> {144}; - 144 -> {94}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot index aba1d2ff3e6..e9507d162c2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot @@ -19,208 +19,208 @@ digraph elvis_kt { subgraph cluster_2 { color=red - 5 [label="Enter class A" style="filled" fillcolor=red]; - 4 [label="Exit class A" style="filled" fillcolor=red]; + 4 [label="Enter class A" style="filled" fillcolor=red]; + 5 [label="Exit class A" style="filled" fillcolor=red]; } - 5 -> {4} [color=green]; + 4 -> {5} [color=green]; subgraph cluster_3 { color=red 6 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 8 [label="Enter block"]; + 7 [label="Enter block"]; subgraph cluster_5 { color=blue - 9 [label="Enter when"]; + 8 [label="Enter when"]; subgraph cluster_6 { color=blue - 11 [label="Enter when branch condition "]; + 9 [label="Enter when branch condition "]; subgraph cluster_7 { color=blue - 12 [label="Enter when"]; - 14 [label="Access variable R|/x|"]; - 15 [label="Enter safe call"]; - 17 [label="Access variable R|/A.b|"]; - 16 [label="Exit safe call"]; - 18 [label="Variable declaration: lval : R|kotlin/Boolean?|"]; + 10 [label="Enter when"]; + 11 [label="Access variable R|/x|"]; + 12 [label="Enter safe call"]; + 13 [label="Access variable R|/A.b|"]; + 14 [label="Exit safe call"]; + 15 [label="Variable declaration: lval : R|kotlin/Boolean?|"]; subgraph cluster_8 { color=blue - 19 [label="Enter when branch condition "]; - 20 [label="Const: Null(null)"]; - 21 [label="Operator =="]; - 22 [label="Exit when branch condition"]; + 16 [label="Enter when branch condition "]; + 17 [label="Const: Null(null)"]; + 18 [label="Operator =="]; + 19 [label="Exit when branch condition"]; } subgraph cluster_9 { color=blue - 29 [label="Enter when branch condition else"]; - 30 [label="Exit when branch condition"]; + 20 [label="Enter when branch condition else"]; + 21 [label="Exit when branch condition"]; } - 31 [label="Enter when branch result"]; + 22 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 32 [label="Enter block"]; - 33 [label="Access variable R|/|"]; - 34 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Access variable R|/|"]; + 25 [label="Exit block"]; } - 35 [label="Exit when branch result"]; - 23 [label="Enter when branch result"]; + 26 [label="Exit when branch result"]; + 27 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 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]; + 28 [label="Enter block"]; + 29 [label="Jump: ^test_1 Unit"]; + 30 [label="Stub" style="filled" fillcolor=gray]; + 31 [label="Exit block" style="filled" fillcolor=gray]; } - 28 [label="Exit when branch result" style="filled" fillcolor=gray]; - 13 [label="Exit when"]; + 32 [label="Exit when branch result" style="filled" fillcolor=gray]; + 33 [label="Exit when"]; } - 36 [label="Exit when branch condition"]; + 34 [label="Exit when branch condition"]; } - 43 [label="Synthetic else branch"]; - 37 [label="Enter when branch result"]; + 35 [label="Synthetic else branch"]; + 36 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 38 [label="Enter block"]; - 39 [label="Access variable R|/x|"]; - 40 [label="Function call: R|/x|.R|/A.foo|()"]; - 41 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Access variable R|/x|"]; + 39 [label="Function call: R|/x|.R|/A.foo|()"]; + 40 [label="Exit block"]; } - 42 [label="Exit when branch result"]; - 10 [label="Exit when"]; + 41 [label="Exit when branch result"]; + 42 [label="Exit when"]; } - 44 [label="Exit block"]; + 43 [label="Exit block"]; } - 7 [label="Exit function test_1" style="filled" fillcolor=red]; + 44 [label="Exit function test_1" style="filled" fillcolor=red]; } - 6 -> {8}; + 6 -> {7}; + 7 -> {8}; 8 -> {9}; - 9 -> {11}; - 10 -> {44}; - 11 -> {12}; - 12 -> {14}; - 13 -> {36}; - 14 -> {15 16}; - 15 -> {17}; - 16 -> {18}; - 17 -> {16}; + 9 -> {10}; + 10 -> {11}; + 11 -> {12 14}; + 12 -> {13}; + 13 -> {14}; + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; + 19 -> {27 20}; 20 -> {21}; 21 -> {22}; - 22 -> {23 29}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {7}; - 25 -> {26} [style=dotted]; - 26 -> {27} [style=dotted]; - 27 -> {28} [style=dotted]; - 28 -> {13} [style=dotted]; - 29 -> {30}; - 30 -> {31}; - 31 -> {32}; - 32 -> {33}; + 25 -> {26}; + 26 -> {33}; + 27 -> {28}; + 28 -> {29}; + 29 -> {44}; + 29 -> {30} [style=dotted]; + 30 -> {31} [style=dotted]; + 31 -> {32} [style=dotted]; + 32 -> {33} [style=dotted]; 33 -> {34}; - 34 -> {35}; - 35 -> {13}; - 36 -> {37 43}; + 34 -> {36 35}; + 35 -> {42}; + 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {10}; - 43 -> {10}; - 44 -> {7}; + 42 -> {43}; + 43 -> {44}; subgraph cluster_13 { color=red 45 [label="Enter function test2" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 47 [label="Enter block"]; + 46 [label="Enter block"]; subgraph cluster_15 { color=blue - 48 [label="Enter when"]; + 47 [label="Enter when"]; subgraph cluster_16 { color=blue - 50 [label="Enter when branch condition "]; - 51 [label="Access variable R|/b|"]; - 52 [label="Type operator: (R|/b| !is R|kotlin/String|)"]; - 53 [label="Exit when branch condition"]; + 48 [label="Enter when branch condition "]; + 49 [label="Access variable R|/b|"]; + 50 [label="Type operator: (R|/b| !is R|kotlin/String|)"]; + 51 [label="Exit when branch condition"]; } - 61 [label="Synthetic else branch"]; - 54 [label="Enter when branch result"]; + 52 [label="Synthetic else branch"]; + 53 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 55 [label="Enter block"]; - 56 [label="Const: String()"]; - 57 [label="Jump: ^test2 String()"]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; + 54 [label="Enter block"]; + 55 [label="Const: String()"]; + 56 [label="Jump: ^test2 String()"]; + 57 [label="Stub" style="filled" fillcolor=gray]; + 58 [label="Exit block" style="filled" fillcolor=gray]; } - 60 [label="Exit when branch result" style="filled" fillcolor=gray]; - 49 [label="Exit when"]; + 59 [label="Exit when branch result" style="filled" fillcolor=gray]; + 60 [label="Exit when"]; } subgraph cluster_18 { color=blue - 62 [label="Enter when"]; + 61 [label="Enter when"]; subgraph cluster_19 { color=blue - 64 [label="Enter when branch condition "]; - 65 [label="Access variable R|/a|"]; - 66 [label="Type operator: (R|/a| !is R|kotlin/String?|)"]; - 67 [label="Exit when branch condition"]; + 62 [label="Enter when branch condition "]; + 63 [label="Access variable R|/a|"]; + 64 [label="Type operator: (R|/a| !is R|kotlin/String?|)"]; + 65 [label="Exit when branch condition"]; } - 75 [label="Synthetic else branch"]; - 68 [label="Enter when branch result"]; + 66 [label="Synthetic else branch"]; + 67 [label="Enter when branch result"]; subgraph cluster_20 { color=blue - 69 [label="Enter block"]; - 70 [label="Const: String()"]; - 71 [label="Jump: ^test2 String()"]; - 72 [label="Stub" style="filled" fillcolor=gray]; - 73 [label="Exit block" style="filled" fillcolor=gray]; + 68 [label="Enter block"]; + 69 [label="Const: String()"]; + 70 [label="Jump: ^test2 String()"]; + 71 [label="Stub" style="filled" fillcolor=gray]; + 72 [label="Exit block" style="filled" fillcolor=gray]; } - 74 [label="Exit when branch result" style="filled" fillcolor=gray]; - 63 [label="Exit when"]; + 73 [label="Exit when branch result" style="filled" fillcolor=gray]; + 74 [label="Exit when"]; } subgraph cluster_21 { color=blue - 76 [label="Enter when"]; - 78 [label="Access variable R|/a|"]; - 79 [label="Variable declaration: lval : R|kotlin/String?|"]; + 75 [label="Enter when"]; + 76 [label="Access variable R|/a|"]; + 77 [label="Variable declaration: lval : R|kotlin/String?|"]; subgraph cluster_22 { color=blue - 80 [label="Enter when branch condition "]; - 81 [label="Const: Null(null)"]; - 82 [label="Operator =="]; - 83 [label="Exit when branch condition"]; + 78 [label="Enter when branch condition "]; + 79 [label="Const: Null(null)"]; + 80 [label="Operator =="]; + 81 [label="Exit when branch condition"]; } subgraph cluster_23 { color=blue - 89 [label="Enter when branch condition else"]; - 90 [label="Exit when branch condition"]; + 82 [label="Enter when branch condition else"]; + 83 [label="Exit when branch condition"]; } - 91 [label="Enter when branch result"]; + 84 [label="Enter when branch result"]; subgraph cluster_24 { - color=blue - 92 [label="Enter block"]; - 93 [label="Access variable R|/|"]; - 94 [label="Exit block"]; - } - 95 [label="Exit when branch result"]; - 84 [label="Enter when branch result"]; - subgraph cluster_25 { color=blue 85 [label="Enter block"]; - 86 [label="Access variable R|/b|"]; + 86 [label="Access variable R|/|"]; 87 [label="Exit block"]; } 88 [label="Exit when branch result"]; - 77 [label="Exit when"]; + 89 [label="Enter when branch result"]; + subgraph cluster_25 { + color=blue + 90 [label="Enter block"]; + 91 [label="Access variable R|/b|"]; + 92 [label="Exit block"]; + } + 93 [label="Exit when branch result"]; + 94 [label="Exit when"]; } - 96 [label="Jump: ^test2 when (lval : R|kotlin/String?| = R|/a|) { + 95 [label="Jump: ^test2 when (lval : R|kotlin/String?| = R|/a|) { ==($subj$, Null(null)) -> { R|/b| } @@ -229,66 +229,66 @@ digraph elvis_kt { } } "]; - 97 [label="Stub" style="filled" fillcolor=gray]; - 98 [label="Exit block" style="filled" fillcolor=gray]; + 96 [label="Stub" style="filled" fillcolor=gray]; + 97 [label="Exit block" style="filled" fillcolor=gray]; } - 46 [label="Exit function test2" style="filled" fillcolor=red]; + 98 [label="Exit function test2" style="filled" fillcolor=red]; } - 45 -> {47}; + 45 -> {46}; + 46 -> {47}; 47 -> {48}; - 48 -> {50}; - 49 -> {62}; + 48 -> {49}; + 49 -> {50}; 50 -> {51}; - 51 -> {52}; - 52 -> {53}; - 53 -> {54 61}; + 51 -> {53 52}; + 52 -> {60}; + 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57}; - 57 -> {46}; + 56 -> {98}; + 56 -> {57} [style=dotted]; 57 -> {58} [style=dotted]; 58 -> {59} [style=dotted]; 59 -> {60} [style=dotted]; - 60 -> {49} [style=dotted]; - 61 -> {49}; - 62 -> {64}; - 63 -> {76}; + 60 -> {61}; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; 64 -> {65}; - 65 -> {66}; - 66 -> {67}; - 67 -> {68 75}; + 65 -> {67 66}; + 66 -> {74}; + 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; - 71 -> {46}; + 70 -> {98}; + 70 -> {71} [style=dotted]; 71 -> {72} [style=dotted]; 72 -> {73} [style=dotted]; 73 -> {74} [style=dotted]; - 74 -> {63} [style=dotted]; - 75 -> {63}; - 76 -> {78}; - 77 -> {96}; + 74 -> {75}; + 75 -> {76}; + 76 -> {77}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; - 81 -> {82}; + 81 -> {89 82}; 82 -> {83}; - 83 -> {84 89}; + 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {77}; + 88 -> {94}; 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; - 95 -> {77}; - 96 -> {46}; + 95 -> {98}; + 95 -> {96} [style=dotted]; 96 -> {97} [style=dotted]; 97 -> {98} [style=dotted]; - 98 -> {46} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot index f103dd1e09f..fe13d7098d5 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot @@ -8,143 +8,143 @@ digraph returns_kt { 0 [label="Enter function test_0" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Enter when"]; + 2 [label="Enter when"]; subgraph cluster_3 { color=blue - 5 [label="Enter when branch condition "]; - 6 [label="Access variable R|/x|"]; - 7 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 8 [label="Exit when branch condition"]; + 3 [label="Enter when branch condition "]; + 4 [label="Access variable R|/x|"]; + 5 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 6 [label="Exit when branch condition"]; } subgraph cluster_4 { color=blue - 15 [label="Enter when branch condition else"]; - 16 [label="Exit when branch condition"]; + 7 [label="Enter when branch condition else"]; + 8 [label="Exit when branch condition"]; } - 17 [label="Enter when branch result"]; + 9 [label="Enter when branch result"]; subgraph cluster_5 { color=blue - 18 [label="Enter block"]; - 19 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Exit block"]; } - 20 [label="Exit when branch result"]; - 9 [label="Enter when branch result"]; + 12 [label="Exit when branch result"]; + 13 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 10 [label="Enter block"]; - 11 [label="Access variable R|/x|"]; - 12 [label="Access variable R|kotlin/String.length|"]; - 13 [label="Exit block"]; + 14 [label="Enter block"]; + 15 [label="Access variable R|/x|"]; + 16 [label="Access variable R|kotlin/String.length|"]; + 17 [label="Exit block"]; } - 14 [label="Exit when branch result"]; - 4 [label="Exit when"]; + 18 [label="Exit when branch result"]; + 19 [label="Exit when"]; } - 21 [label="Access variable R|/x|"]; - 22 [label="Access variable #"]; - 23 [label="Exit block"]; + 20 [label="Access variable R|/x|"]; + 21 [label="Access variable #"]; + 22 [label="Exit block"]; } - 1 [label="Exit function test_0" style="filled" fillcolor=red]; + 23 [label="Exit function test_0" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {21}; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; - 6 -> {7}; + 6 -> {13 7}; 7 -> {8}; - 8 -> {9 15}; + 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {13}; + 12 -> {19}; 13 -> {14}; - 14 -> {4}; + 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {4}; + 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {1}; subgraph cluster_7 { color=red 24 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 26 [label="Enter block"]; + 25 [label="Enter block"]; subgraph cluster_9 { color=blue - 27 [label="Enter when"]; + 26 [label="Enter when"]; subgraph cluster_10 { color=blue - 29 [label="Enter when branch condition "]; - 30 [label="Access variable R|/x|"]; - 31 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 32 [label="Exit when branch condition"]; + 27 [label="Enter when branch condition "]; + 28 [label="Access variable R|/x|"]; + 29 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 30 [label="Exit when branch condition"]; } subgraph cluster_11 { color=blue - 39 [label="Enter when branch condition else"]; - 40 [label="Exit when branch condition"]; + 31 [label="Enter when branch condition else"]; + 32 [label="Exit when branch condition"]; } - 41 [label="Enter when branch result"]; + 33 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 42 [label="Enter block"]; - 43 [label="Jump: ^test_1 Unit"]; - 44 [label="Stub" style="filled" fillcolor=gray]; - 45 [label="Exit block" style="filled" fillcolor=gray]; + 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]; } - 46 [label="Exit when branch result" style="filled" fillcolor=gray]; - 33 [label="Enter when branch result"]; + 38 [label="Exit when branch result" style="filled" fillcolor=gray]; + 39 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 34 [label="Enter block"]; - 35 [label="Access variable R|/x|"]; - 36 [label="Access variable R|kotlin/String.length|"]; - 37 [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"]; } - 38 [label="Exit when branch result"]; - 28 [label="Exit when"]; + 44 [label="Exit when branch result"]; + 45 [label="Exit when"]; } - 47 [label="Access variable R|/x|"]; - 48 [label="Access variable R|kotlin/String.length|"]; - 49 [label="Exit block"]; + 46 [label="Access variable R|/x|"]; + 47 [label="Access variable R|kotlin/String.length|"]; + 48 [label="Exit block"]; } - 25 [label="Exit function test_1" style="filled" fillcolor=red]; + 49 [label="Exit function test_1" style="filled" fillcolor=red]; } - 24 -> {26}; + 24 -> {25}; + 25 -> {26}; 26 -> {27}; - 27 -> {29}; - 28 -> {47}; + 27 -> {28}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {39 31}; 31 -> {32}; - 32 -> {33 39}; + 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36}; - 36 -> {37}; - 37 -> {38}; - 38 -> {28}; + 35 -> {49}; + 35 -> {36} [style=dotted]; + 36 -> {37} [style=dotted]; + 37 -> {38} [style=dotted]; + 38 -> {45} [style=dotted]; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {25}; - 43 -> {44} [style=dotted]; - 44 -> {45} [style=dotted]; - 45 -> {46} [style=dotted]; - 46 -> {28} [style=dotted]; + 43 -> {44}; + 44 -> {45}; + 45 -> {46}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {25}; subgraph cluster_14 { color=red @@ -155,10 +155,10 @@ digraph returns_kt { subgraph cluster_15 { color=red - 53 [label="Enter class A" style="filled" fillcolor=red]; - 52 [label="Exit class A" style="filled" fillcolor=red]; + 52 [label="Enter class A" style="filled" fillcolor=red]; + 53 [label="Exit class A" style="filled" fillcolor=red]; } - 53 -> {52} [color=green]; + 52 -> {53} [color=green]; subgraph cluster_16 { color=red @@ -169,10 +169,10 @@ digraph returns_kt { subgraph cluster_17 { color=red - 57 [label="Enter class B" style="filled" fillcolor=red]; - 56 [label="Exit class B" style="filled" fillcolor=red]; + 56 [label="Enter class B" style="filled" fillcolor=red]; + 57 [label="Exit class B" style="filled" fillcolor=red]; } - 57 -> {56} [color=green]; + 56 -> {57} [color=green]; subgraph cluster_18 { color=red @@ -183,48 +183,48 @@ digraph returns_kt { subgraph cluster_19 { color=red - 61 [label="Enter class C" style="filled" fillcolor=red]; - 60 [label="Exit class C" style="filled" fillcolor=red]; + 60 [label="Enter class C" style="filled" fillcolor=red]; + 61 [label="Exit class C" style="filled" fillcolor=red]; } - 61 -> {60} [color=green]; + 60 -> {61} [color=green]; subgraph cluster_20 { color=red 62 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 64 [label="Enter block"]; + 63 [label="Enter block"]; subgraph cluster_22 { color=blue - 65 [label="Enter when"]; + 64 [label="Enter when"]; subgraph cluster_23 { color=blue - 67 [label="Enter when branch condition "]; - 68 [label="Access variable R|/x|"]; - 69 [label="Type operator: (R|/x| is R|B|)"]; - 70 [label="Exit when branch condition"]; + 65 [label="Enter when branch condition "]; + 66 [label="Access variable R|/x|"]; + 67 [label="Type operator: (R|/x| is R|B|)"]; + 68 [label="Exit when branch condition"]; } subgraph cluster_24 { color=blue - 77 [label="Enter when branch condition "]; - 78 [label="Access variable R|/x|"]; - 79 [label="Type operator: (R|/x| is R|C|)"]; - 80 [label="Exit when branch condition"]; + 69 [label="Enter when branch condition "]; + 70 [label="Access variable R|/x|"]; + 71 [label="Type operator: (R|/x| is R|C|)"]; + 72 [label="Exit when branch condition"]; } subgraph cluster_25 { color=blue - 87 [label="Enter when branch condition else"]; - 88 [label="Exit when branch condition"]; + 73 [label="Enter when branch condition else"]; + 74 [label="Exit when branch condition"]; } - 89 [label="Enter when branch result"]; + 75 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 90 [label="Enter block"]; - 91 [label="Jump: ^test_2 Unit"]; - 92 [label="Stub" style="filled" fillcolor=gray]; - 93 [label="Exit block" style="filled" fillcolor=gray]; + 76 [label="Enter block"]; + 77 [label="Jump: ^test_2 Unit"]; + 78 [label="Stub" style="filled" fillcolor=gray]; + 79 [label="Exit block" style="filled" fillcolor=gray]; } - 94 [label="Exit when branch result" style="filled" fillcolor=gray]; + 80 [label="Exit when branch result" style="filled" fillcolor=gray]; 81 [label="Enter when branch result"]; subgraph cluster_27 { color=blue @@ -234,304 +234,304 @@ digraph returns_kt { 85 [label="Exit block"]; } 86 [label="Exit when branch result"]; - 71 [label="Enter when branch result"]; + 87 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 72 [label="Enter block"]; - 73 [label="Access variable R|/x|"]; - 74 [label="Function call: R|/x|.R|/B.bar|()"]; - 75 [label="Exit block"]; + 88 [label="Enter block"]; + 89 [label="Access variable R|/x|"]; + 90 [label="Function call: R|/x|.R|/B.bar|()"]; + 91 [label="Exit block"]; } - 76 [label="Exit when branch result"]; - 66 [label="Exit when"]; + 92 [label="Exit when branch result"]; + 93 [label="Exit when"]; } - 95 [label="Access variable R|/x|"]; - 96 [label="Function call: R|/x|.R|/A.foo|()"]; - 97 [label="Access variable R|/x|"]; - 98 [label="Function call: R|/x|.#()"]; - 99 [label="Access variable R|/x|"]; - 100 [label="Function call: R|/x|.#()"]; - 101 [label="Exit block"]; + 94 [label="Access variable R|/x|"]; + 95 [label="Function call: R|/x|.R|/A.foo|()"]; + 96 [label="Access variable R|/x|"]; + 97 [label="Function call: R|/x|.#()"]; + 98 [label="Access variable R|/x|"]; + 99 [label="Function call: R|/x|.#()"]; + 100 [label="Exit block"]; } - 63 [label="Exit function test_2" style="filled" fillcolor=red]; + 101 [label="Exit function test_2" style="filled" fillcolor=red]; } - 62 -> {64}; + 62 -> {63}; + 63 -> {64}; 64 -> {65}; - 65 -> {67}; - 66 -> {95}; + 65 -> {66}; + 66 -> {67}; 67 -> {68}; - 68 -> {69}; + 68 -> {87 69}; 69 -> {70}; - 70 -> {71 77}; + 70 -> {71}; 71 -> {72}; - 72 -> {73}; + 72 -> {81 73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {66}; - 77 -> {78}; - 78 -> {79}; - 79 -> {80}; - 80 -> {81 87}; + 76 -> {77}; + 77 -> {101}; + 77 -> {78} [style=dotted]; + 78 -> {79} [style=dotted]; + 79 -> {80} [style=dotted]; + 80 -> {93} [style=dotted]; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; - 86 -> {66}; + 86 -> {93}; 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; - 91 -> {63}; - 91 -> {92} [style=dotted]; - 92 -> {93} [style=dotted]; - 93 -> {94} [style=dotted]; - 94 -> {66} [style=dotted]; + 91 -> {92}; + 92 -> {93}; + 93 -> {94}; + 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {63}; subgraph cluster_29 { color=red 102 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_30 { color=blue - 104 [label="Enter block"]; + 103 [label="Enter block"]; subgraph cluster_31 { color=blue - 105 [label="Enter when"]; + 104 [label="Enter when"]; subgraph cluster_32 { color=blue - 107 [label="Enter when branch condition "]; - 108 [label="Access variable R|/x|"]; - 109 [label="Type operator: (R|/x| is R|B|)"]; - 110 [label="Exit when branch condition"]; + 105 [label="Enter when branch condition "]; + 106 [label="Access variable R|/x|"]; + 107 [label="Type operator: (R|/x| is R|B|)"]; + 108 [label="Exit when branch condition"]; } subgraph cluster_33 { color=blue - 117 [label="Enter when branch condition "]; - 118 [label="Access variable R|/x|"]; - 119 [label="Type operator: (R|/x| is R|C|)"]; - 120 [label="Exit when branch condition"]; + 109 [label="Enter when branch condition "]; + 110 [label="Access variable R|/x|"]; + 111 [label="Type operator: (R|/x| is R|C|)"]; + 112 [label="Exit when branch condition"]; } - 127 [label="Synthetic else branch"]; - 121 [label="Enter when branch result"]; + 113 [label="Synthetic else branch"]; + 114 [label="Enter when branch result"]; subgraph cluster_34 { color=blue - 122 [label="Enter block"]; - 123 [label="Access variable R|/x|"]; - 124 [label="Function call: R|/x|.R|/C.baz|()"]; - 125 [label="Exit block"]; + 115 [label="Enter block"]; + 116 [label="Access variable R|/x|"]; + 117 [label="Function call: R|/x|.R|/C.baz|()"]; + 118 [label="Exit block"]; } - 126 [label="Exit when branch result"]; - 111 [label="Enter when branch result"]; + 119 [label="Exit when branch result"]; + 120 [label="Enter when branch result"]; subgraph cluster_35 { color=blue - 112 [label="Enter block"]; - 113 [label="Access variable R|/x|"]; - 114 [label="Function call: R|/x|.R|/B.bar|()"]; - 115 [label="Exit block"]; + 121 [label="Enter block"]; + 122 [label="Access variable R|/x|"]; + 123 [label="Function call: R|/x|.R|/B.bar|()"]; + 124 [label="Exit block"]; } - 116 [label="Exit when branch result"]; - 106 [label="Exit when"]; + 125 [label="Exit when branch result"]; + 126 [label="Exit when"]; } - 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="Access variable R|/x|"]; - 133 [label="Function call: R|/x|.#()"]; - 134 [label="Exit block"]; + 127 [label="Access variable R|/x|"]; + 128 [label="Function call: R|/x|.#()"]; + 129 [label="Access variable R|/x|"]; + 130 [label="Function call: R|/x|.#()"]; + 131 [label="Access variable R|/x|"]; + 132 [label="Function call: R|/x|.#()"]; + 133 [label="Exit block"]; } - 103 [label="Exit function test_3" style="filled" fillcolor=red]; + 134 [label="Exit function test_3" style="filled" fillcolor=red]; } - 102 -> {104}; + 102 -> {103}; + 103 -> {104}; 104 -> {105}; - 105 -> {107}; - 106 -> {128}; + 105 -> {106}; + 106 -> {107}; 107 -> {108}; - 108 -> {109}; + 108 -> {120 109}; 109 -> {110}; - 110 -> {111 117}; + 110 -> {111}; 111 -> {112}; - 112 -> {113}; - 113 -> {114}; + 112 -> {114 113}; + 113 -> {126}; 114 -> {115}; 115 -> {116}; - 116 -> {106}; + 116 -> {117}; 117 -> {118}; 118 -> {119}; - 119 -> {120}; - 120 -> {121 127}; + 119 -> {126}; + 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; - 126 -> {106}; - 127 -> {106}; + 126 -> {127}; + 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; 133 -> {134}; - 134 -> {103}; subgraph cluster_36 { color=red 135 [label="Enter function runHigherOrder" style="filled" fillcolor=red]; subgraph cluster_37 { color=blue - 137 [label="Enter block"]; - 138 [label="Function call: R|/f|.R|FakeOverride|()"]; - 139 [label="Jump: ^runHigherOrder R|/f|.R|FakeOverride|()"]; - 140 [label="Stub" style="filled" fillcolor=gray]; - 141 [label="Exit block" style="filled" fillcolor=gray]; + 136 [label="Enter block"]; + 137 [label="Function call: R|/f|.R|FakeOverride|()"]; + 138 [label="Jump: ^runHigherOrder R|/f|.R|FakeOverride|()"]; + 139 [label="Stub" style="filled" fillcolor=gray]; + 140 [label="Exit block" style="filled" fillcolor=gray]; } - 136 [label="Exit function runHigherOrder" style="filled" fillcolor=red]; + 141 [label="Exit function runHigherOrder" style="filled" fillcolor=red]; } - 135 -> {137}; + 135 -> {136}; + 136 -> {137}; 137 -> {138}; - 138 -> {139}; - 139 -> {136}; + 138 -> {141}; + 138 -> {139} [style=dotted]; 139 -> {140} [style=dotted]; 140 -> {141} [style=dotted]; - 141 -> {136} [style=dotted]; subgraph cluster_38 { color=red 142 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_39 { color=blue - 144 [label="Enter block"]; - 145 [label="Access variable R|kotlin/String.length|"]; - 146 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"]; - 147 [label="Stub" style="filled" fillcolor=gray]; - 148 [label="Exit block" style="filled" fillcolor=gray]; + 143 [label="Enter block"]; + 144 [label="Access variable R|kotlin/String.length|"]; + 145 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"]; + 146 [label="Stub" style="filled" fillcolor=gray]; + 147 [label="Exit block" style="filled" fillcolor=gray]; } - 143 [label="Exit function getter" style="filled" fillcolor=red]; + 148 [label="Exit function getter" style="filled" fillcolor=red]; } - 142 -> {144}; + 142 -> {143}; + 143 -> {144}; 144 -> {145}; - 145 -> {146}; - 146 -> {143}; + 145 -> {148}; + 145 -> {146} [style=dotted]; 146 -> {147} [style=dotted]; 147 -> {148} [style=dotted]; - 148 -> {143} [style=dotted]; subgraph cluster_40 { color=red 149 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_41 { color=blue - 151 [label="Enter block"]; - 152 [label="Access variable R|/a|"]; - 153 [label="Type operator: (R|/a| as? R|kotlin/String|)"]; - 154 [label="Variable declaration: lval s: R|kotlin/String?|"]; + 150 [label="Enter block"]; + 151 [label="Access variable R|/a|"]; + 152 [label="Type operator: (R|/a| as? R|kotlin/String|)"]; + 153 [label="Variable declaration: lval s: R|kotlin/String?|"]; subgraph cluster_42 { color=blue - 155 [label="Enter when"]; - 157 [label="Access variable R|/s|"]; - 158 [label="Enter safe call"]; - 160 [label="Access variable R|/ext|"]; - 159 [label="Exit safe call"]; - 161 [label="Variable declaration: lval : R|kotlin/Int?|"]; + 154 [label="Enter when"]; + 155 [label="Access variable R|/s|"]; + 156 [label="Enter safe call"]; + 157 [label="Access variable R|/ext|"]; + 158 [label="Exit safe call"]; + 159 [label="Variable declaration: lval : R|kotlin/Int?|"]; subgraph cluster_43 { color=blue - 162 [label="Enter when branch condition "]; - 163 [label="Const: Null(null)"]; - 164 [label="Operator =="]; - 165 [label="Exit when branch condition"]; + 160 [label="Enter when branch condition "]; + 161 [label="Const: Null(null)"]; + 162 [label="Operator =="]; + 163 [label="Exit when branch condition"]; } subgraph cluster_44 { color=blue - 172 [label="Enter when branch condition else"]; - 173 [label="Exit when branch condition"]; + 164 [label="Enter when branch condition else"]; + 165 [label="Exit when branch condition"]; } - 174 [label="Enter when branch result"]; + 166 [label="Enter when branch result"]; subgraph cluster_45 { color=blue - 175 [label="Enter block"]; - 176 [label="Access variable R|/|"]; - 177 [label="Exit block"]; + 167 [label="Enter block"]; + 168 [label="Access variable R|/|"]; + 169 [label="Exit block"]; } - 178 [label="Exit when branch result"]; - 166 [label="Enter when branch result"]; + 170 [label="Exit when branch result"]; + 171 [label="Enter when branch result"]; subgraph cluster_46 { color=blue - 167 [label="Enter block"]; - 168 [label="Jump: ^test_4 Unit"]; - 169 [label="Stub" style="filled" fillcolor=gray]; - 170 [label="Exit block" style="filled" fillcolor=gray]; + 172 [label="Enter block"]; + 173 [label="Jump: ^test_4 Unit"]; + 174 [label="Stub" style="filled" fillcolor=gray]; + 175 [label="Exit block" style="filled" fillcolor=gray]; } - 171 [label="Exit when branch result" style="filled" fillcolor=gray]; - 156 [label="Exit when"]; + 176 [label="Exit when branch result" style="filled" fillcolor=gray]; + 177 [label="Exit when"]; } - 179 [label="Variable declaration: lval length: R|kotlin/Int|"]; - 180 [label="Postponed enter to lambda"]; + 178 [label="Variable declaration: lval length: R|kotlin/Int|"]; + 179 [label="Postponed enter to lambda"]; subgraph cluster_47 { color=blue 184 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_48 { color=blue - 186 [label="Enter block"]; - 187 [label="Access variable R|/s|"]; - 188 [label="Access variable R|kotlin/String.length|"]; - 189 [label="Exit block"]; + 185 [label="Enter block"]; + 186 [label="Access variable R|/s|"]; + 187 [label="Access variable R|kotlin/String.length|"]; + 188 [label="Exit block"]; } - 185 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 189 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 181 [label="Postponed exit from lambda"]; - 182 [label="Function call: R|/runHigherOrder|(...)"]; - 183 [label="Exit block"]; + 180 [label="Postponed exit from lambda"]; + 181 [label="Function call: R|/runHigherOrder|(...)"]; + 182 [label="Exit block"]; } - 150 [label="Exit function test_4" style="filled" fillcolor=red]; + 183 [label="Exit function test_4" style="filled" fillcolor=red]; } - 149 -> {151}; + 149 -> {150}; + 150 -> {151}; 151 -> {152}; 152 -> {153}; 153 -> {154}; 154 -> {155}; - 155 -> {157}; - 156 -> {179}; - 157 -> {158 159}; - 158 -> {160}; - 159 -> {161}; - 160 -> {159}; + 155 -> {156 158}; + 156 -> {157}; + 157 -> {158}; + 158 -> {159}; + 159 -> {160}; + 160 -> {161}; 161 -> {162}; 162 -> {163}; - 163 -> {164}; + 163 -> {171 164}; 164 -> {165}; - 165 -> {166 172}; + 165 -> {166}; 166 -> {167}; 167 -> {168}; - 168 -> {150}; - 168 -> {169} [style=dotted]; - 169 -> {170} [style=dotted]; - 170 -> {171} [style=dotted]; - 171 -> {156} [style=dotted]; + 168 -> {169}; + 169 -> {170}; + 170 -> {177}; + 171 -> {172}; 172 -> {173}; - 173 -> {174}; - 174 -> {175}; - 175 -> {176}; - 176 -> {177}; + 173 -> {183}; + 173 -> {174} [style=dotted]; + 174 -> {175} [style=dotted]; + 175 -> {176} [style=dotted]; + 176 -> {177} [style=dotted]; 177 -> {178}; - 178 -> {156}; - 179 -> {180}; - 180 -> {181 184}; + 178 -> {179}; + 179 -> {180 184}; + 180 -> {181}; 181 -> {182}; 182 -> {183}; - 183 -> {150}; - 184 -> {186}; + 184 -> {185}; + 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; - 189 -> {185}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot index d2f4d4c129c..d8b0cdd4a13 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot @@ -8,200 +8,200 @@ digraph simpleIf_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Enter when"]; + 2 [label="Enter when"]; subgraph cluster_3 { color=blue - 5 [label="Enter when branch condition "]; - 6 [label="Access variable R|/x|"]; - 7 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 8 [label="Exit when branch condition"]; + 3 [label="Enter when branch condition "]; + 4 [label="Access variable R|/x|"]; + 5 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 6 [label="Exit when branch condition"]; } - 15 [label="Synthetic else branch"]; - 9 [label="Enter when branch result"]; + 7 [label="Synthetic else branch"]; + 8 [label="Enter when branch result"]; subgraph cluster_4 { color=blue - 10 [label="Enter block"]; - 11 [label="Access variable R|/x|"]; - 12 [label="Access variable R|kotlin/String.length|"]; - 13 [label="Exit block"]; + 9 [label="Enter block"]; + 10 [label="Access variable R|/x|"]; + 11 [label="Access variable R|kotlin/String.length|"]; + 12 [label="Exit block"]; } - 14 [label="Exit when branch result"]; - 4 [label="Exit when"]; + 13 [label="Exit when branch result"]; + 14 [label="Exit when"]; } - 16 [label="Access variable R|/x|"]; - 17 [label="Access variable #"]; - 18 [label="Exit block"]; + 15 [label="Access variable R|/x|"]; + 16 [label="Access variable #"]; + 17 [label="Exit block"]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 18 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {16}; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; - 6 -> {7}; - 7 -> {8}; - 8 -> {9 15}; + 6 -> {8 7}; + 7 -> {14}; + 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {4}; - 15 -> {4}; + 14 -> {15}; + 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {1}; subgraph cluster_5 { color=red 19 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/x|"]; - 23 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 24 [label="Variable declaration: lval b: R|kotlin/Boolean|"]; + 20 [label="Enter block"]; + 21 [label="Access variable R|/x|"]; + 22 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 23 [label="Variable declaration: lval b: R|kotlin/Boolean|"]; subgraph cluster_7 { color=blue - 25 [label="Enter when"]; + 24 [label="Enter when"]; subgraph cluster_8 { color=blue - 27 [label="Enter when branch condition "]; - 28 [label="Access variable R|/b|"]; - 29 [label="Exit when branch condition"]; + 25 [label="Enter when branch condition "]; + 26 [label="Access variable R|/b|"]; + 27 [label="Exit when branch condition"]; } - 36 [label="Synthetic else branch"]; - 30 [label="Enter when branch result"]; + 28 [label="Synthetic else branch"]; + 29 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 31 [label="Enter block"]; - 32 [label="Access variable R|/x|"]; - 33 [label="Access variable R|kotlin/String.length|"]; - 34 [label="Exit block"]; + 30 [label="Enter block"]; + 31 [label="Access variable R|/x|"]; + 32 [label="Access variable R|kotlin/String.length|"]; + 33 [label="Exit block"]; } - 35 [label="Exit when branch result"]; - 26 [label="Exit when"]; + 34 [label="Exit when branch result"]; + 35 [label="Exit when"]; } - 37 [label="Access variable R|/x|"]; - 38 [label="Access variable #"]; - 39 [label="Exit block"]; + 36 [label="Access variable R|/x|"]; + 37 [label="Access variable #"]; + 38 [label="Exit block"]; } - 20 [label="Exit function test_2" style="filled" fillcolor=red]; + 39 [label="Exit function test_2" style="filled" fillcolor=red]; } - 19 -> {21}; + 19 -> {20}; + 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {27}; - 26 -> {37}; - 27 -> {28}; - 28 -> {29}; - 29 -> {30 36}; + 25 -> {26}; + 26 -> {27}; + 27 -> {29 28}; + 28 -> {35}; + 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {26}; - 36 -> {26}; + 35 -> {36}; + 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {20}; subgraph cluster_10 { color=red 40 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 42 [label="Enter block"]; + 41 [label="Enter block"]; subgraph cluster_12 { color=blue - 43 [label="Enter when"]; + 42 [label="Enter when"]; subgraph cluster_13 { color=blue - 45 [label="Enter when branch condition "]; - 46 [label="Access variable R|/x|"]; - 47 [label="Type operator: (R|/x| !is R|kotlin/String|)"]; - 48 [label="Exit when branch condition"]; + 43 [label="Enter when branch condition "]; + 44 [label="Access variable R|/x|"]; + 45 [label="Type operator: (R|/x| !is R|kotlin/String|)"]; + 46 [label="Exit when branch condition"]; } subgraph cluster_14 { color=blue - 53 [label="Enter when branch condition "]; - 54 [label="Access variable R|/x|"]; - 55 [label="Type operator: (R|/x| !is R|kotlin/Int|)"]; - 56 [label="Exit when branch condition"]; + 47 [label="Enter when branch condition "]; + 48 [label="Access variable R|/x|"]; + 49 [label="Type operator: (R|/x| !is R|kotlin/Int|)"]; + 50 [label="Exit when branch condition"]; } subgraph cluster_15 { color=blue - 61 [label="Enter when branch condition else"]; - 62 [label="Exit when branch condition"]; + 51 [label="Enter when branch condition else"]; + 52 [label="Exit when branch condition"]; } - 63 [label="Enter when branch result"]; + 53 [label="Enter when branch result"]; subgraph cluster_16 { 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"]; - 57 [label="Enter when branch result"]; - subgraph cluster_17 { - color=blue - 58 [label="Enter block"]; + 54 [label="Enter block"]; + 55 [label="Access variable R|/x|"]; + 56 [label="Access variable R|kotlin/String.length|"]; + 57 [label="Access variable R|/x|"]; + 58 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; 59 [label="Exit block"]; } 60 [label="Exit when branch result"]; - 49 [label="Enter when branch result"]; + 61 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 62 [label="Enter block"]; + 63 [label="Exit block"]; + } + 64 [label="Exit when branch result"]; + 65 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 50 [label="Enter block"]; - 51 [label="Exit block"]; + 66 [label="Enter block"]; + 67 [label="Exit block"]; } - 52 [label="Exit when branch result"]; - 44 [label="Exit when"]; + 68 [label="Exit when branch result"]; + 69 [label="Exit when"]; } - 71 [label="Exit block"]; + 70 [label="Exit block"]; } - 41 [label="Exit function test_3" style="filled" fillcolor=red]; + 71 [label="Exit function test_3" style="filled" fillcolor=red]; } - 40 -> {42}; + 40 -> {41}; + 41 -> {42}; 42 -> {43}; - 43 -> {45}; - 44 -> {71}; + 43 -> {44}; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + 46 -> {65 47}; 47 -> {48}; - 48 -> {49 53}; + 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {61 51}; 51 -> {52}; - 52 -> {44}; + 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57 61}; + 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {44}; + 60 -> {69}; 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {65}; + 64 -> {69}; 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {44}; - 71 -> {41}; + 70 -> {71}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot index 668f58cc69a..08b3f7525de 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot @@ -12,137 +12,137 @@ digraph smartcastFromArgument_kt { subgraph cluster_1 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 2 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red 4 [label="Enter function takeA" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; - 7 [label="Const: Boolean(true)"]; - 8 [label="Jump: ^takeA Boolean(true)"]; - 9 [label="Stub" style="filled" fillcolor=gray]; - 10 [label="Exit block" style="filled" fillcolor=gray]; + 5 [label="Enter block"]; + 6 [label="Const: Boolean(true)"]; + 7 [label="Jump: ^takeA Boolean(true)"]; + 8 [label="Stub" style="filled" fillcolor=gray]; + 9 [label="Exit block" style="filled" fillcolor=gray]; } - 5 [label="Exit function takeA" style="filled" fillcolor=red]; + 10 [label="Exit function takeA" style="filled" fillcolor=red]; } - 4 -> {6}; + 4 -> {5}; + 5 -> {6}; 6 -> {7}; - 7 -> {8}; - 8 -> {5}; + 7 -> {10}; + 7 -> {8} [style=dotted]; 8 -> {9} [style=dotted]; 9 -> {10} [style=dotted]; - 10 -> {5} [style=dotted]; subgraph cluster_4 { color=red 11 [label="Enter function test" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 13 [label="Enter block"]; + 12 [label="Enter block"]; subgraph cluster_6 { color=blue - 14 [label="Enter when"]; + 13 [label="Enter when"]; subgraph cluster_7 { color=blue - 16 [label="Enter when branch condition "]; + 14 [label="Enter when branch condition "]; subgraph cluster_8 { color=blue - 17 [label="Enter when"]; - 19 [label="Access variable R|/a|"]; - 20 [label="Type operator: (R|/a| as? R|A|)"]; - 21 [label="Variable declaration: lval : R|A?|"]; + 15 [label="Enter when"]; + 16 [label="Access variable R|/a|"]; + 17 [label="Type operator: (R|/a| as? R|A|)"]; + 18 [label="Variable declaration: lval : R|A?|"]; subgraph cluster_9 { color=blue - 22 [label="Enter when branch condition "]; - 23 [label="Const: Null(null)"]; - 24 [label="Operator =="]; - 25 [label="Exit when branch condition"]; + 19 [label="Enter when branch condition "]; + 20 [label="Const: Null(null)"]; + 21 [label="Operator =="]; + 22 [label="Exit when branch condition"]; } subgraph cluster_10 { color=blue - 32 [label="Enter when branch condition else"]; - 33 [label="Exit when branch condition"]; + 23 [label="Enter when branch condition else"]; + 24 [label="Exit when branch condition"]; } - 34 [label="Enter when branch result"]; + 25 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 35 [label="Enter block"]; - 36 [label="Access variable R|/|"]; - 37 [label="Exit block"]; + 26 [label="Enter block"]; + 27 [label="Access variable R|/|"]; + 28 [label="Exit block"]; } - 38 [label="Exit when branch result"]; - 26 [label="Enter when branch result"]; + 29 [label="Exit when branch result"]; + 30 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 27 [label="Enter block"]; - 28 [label="Jump: ^test Unit"]; - 29 [label="Stub" style="filled" fillcolor=gray]; - 30 [label="Exit block" style="filled" fillcolor=gray]; + 31 [label="Enter block"]; + 32 [label="Jump: ^test Unit"]; + 33 [label="Stub" style="filled" fillcolor=gray]; + 34 [label="Exit block" style="filled" fillcolor=gray]; } - 31 [label="Exit when branch result" style="filled" fillcolor=gray]; - 18 [label="Exit when"]; + 35 [label="Exit when branch result" style="filled" fillcolor=gray]; + 36 [label="Exit when"]; } - 39 [label="Function call: R|/takeA|(...)"]; - 40 [label="Exit when branch condition"]; + 37 [label="Function call: R|/takeA|(...)"]; + 38 [label="Exit when branch condition"]; } - 47 [label="Synthetic else branch"]; - 41 [label="Enter when branch result"]; + 39 [label="Synthetic else branch"]; + 40 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 42 [label="Enter block"]; - 43 [label="Access variable R|/a|"]; - 44 [label="Function call: R|/a|.R|/A.foo|()"]; - 45 [label="Exit block"]; + 41 [label="Enter block"]; + 42 [label="Access variable R|/a|"]; + 43 [label="Function call: R|/a|.R|/A.foo|()"]; + 44 [label="Exit block"]; } - 46 [label="Exit when branch result"]; - 15 [label="Exit when"]; + 45 [label="Exit when branch result"]; + 46 [label="Exit when"]; } - 48 [label="Exit block"]; + 47 [label="Exit block"]; } - 12 [label="Exit function test" style="filled" fillcolor=red]; + 48 [label="Exit function test" style="filled" fillcolor=red]; } - 11 -> {13}; + 11 -> {12}; + 12 -> {13}; 13 -> {14}; - 14 -> {16}; - 15 -> {48}; + 14 -> {15}; + 15 -> {16}; 16 -> {17}; - 17 -> {19}; - 18 -> {39}; + 17 -> {18}; + 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {23}; + 22 -> {30 23}; 23 -> {24}; 24 -> {25}; - 25 -> {26 32}; + 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {12}; - 28 -> {29} [style=dotted]; - 29 -> {30} [style=dotted]; - 30 -> {31} [style=dotted]; - 31 -> {18} [style=dotted]; - 32 -> {33}; - 33 -> {34}; - 34 -> {35}; - 35 -> {36}; + 28 -> {29}; + 29 -> {36}; + 30 -> {31}; + 31 -> {32}; + 32 -> {48}; + 32 -> {33} [style=dotted]; + 33 -> {34} [style=dotted]; + 34 -> {35} [style=dotted]; + 35 -> {36} [style=dotted]; 36 -> {37}; 37 -> {38}; - 38 -> {18}; - 39 -> {40}; - 40 -> {41 47}; + 38 -> {40 39}; + 39 -> {46}; + 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {15}; - 47 -> {15}; - 48 -> {12}; + 46 -> {47}; + 47 -> {48}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot index 009d4e48d18..57ac9ba236d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot @@ -12,10 +12,10 @@ digraph when_kt { subgraph cluster_1 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 2 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red @@ -26,179 +26,180 @@ digraph when_kt { subgraph cluster_3 { color=red - 7 [label="Enter class B" style="filled" fillcolor=red]; - 6 [label="Exit class B" style="filled" fillcolor=red]; + 6 [label="Enter class B" style="filled" fillcolor=red]; + 7 [label="Exit class B" style="filled" fillcolor=red]; } - 7 -> {6} [color=green]; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red 8 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; + 9 [label="Enter block"]; subgraph cluster_6 { color=blue - 11 [label="Enter when"]; + 10 [label="Enter when"]; subgraph cluster_7 { color=blue - 13 [label="Enter when branch condition "]; - 14 [label="Access variable R|/x|"]; - 15 [label="Type operator: (R|/x| is R|A|)"]; - 16 [label="Exit when branch condition"]; + 11 [label="Enter when branch condition "]; + 12 [label="Access variable R|/x|"]; + 13 [label="Type operator: (R|/x| is R|A|)"]; + 14 [label="Exit when branch condition"]; } subgraph cluster_8 { color=blue - 23 [label="Enter when branch condition "]; - 24 [label="Access variable R|/x|"]; - 25 [label="Type operator: (R|/x| is R|B|)"]; - 26 [label="Exit when branch condition"]; + 15 [label="Enter when branch condition "]; + 16 [label="Access variable R|/x|"]; + 17 [label="Type operator: (R|/x| is R|B|)"]; + 18 [label="Exit when branch condition"]; } - 33 [label="Synthetic else branch"]; - 27 [label="Enter when branch result"]; + 19 [label="Synthetic else branch"]; + 20 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 28 [label="Enter block"]; - 29 [label="Access variable R|/x|"]; - 30 [label="Function call: R|/x|.R|/B.bar|()"]; - 31 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Access variable R|/x|"]; + 23 [label="Function call: R|/x|.R|/B.bar|()"]; + 24 [label="Exit block"]; } - 32 [label="Exit when branch result"]; - 17 [label="Enter when branch result"]; + 25 [label="Exit when branch result"]; + 26 [label="Enter when branch result"]; subgraph cluster_10 { 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"]; + 27 [label="Enter block"]; + 28 [label="Access variable R|/x|"]; + 29 [label="Function call: R|/x|.R|/A.foo|()"]; + 30 [label="Exit block"]; } - 22 [label="Exit when branch result"]; - 12 [label="Exit when"]; + 31 [label="Exit when branch result"]; + 32 [label="Exit when"]; } subgraph cluster_11 { color=blue - 34 [label="Enter when"]; + 33 [label="Enter when"]; subgraph cluster_12 { color=blue - 36 [label="Enter when branch condition "]; - 37 [label="Access variable R|/x|"]; - 38 [label="Type operator: (R|/x| !is R|A|)"]; - 39 [label="Exit when branch condition"]; + 34 [label="Enter when branch condition "]; + 35 [label="Access variable R|/x|"]; + 36 [label="Type operator: (R|/x| !is R|A|)"]; + 37 [label="Exit when branch condition"]; } subgraph cluster_13 { color=blue - 44 [label="Enter when branch condition "]; - 45 [label="Access variable R|/x|"]; - 46 [label="Type operator: (R|/x| !is R|B|)"]; - 47 [label="Exit when branch condition"]; + 38 [label="Enter when branch condition "]; + 39 [label="Access variable R|/x|"]; + 40 [label="Type operator: (R|/x| !is R|B|)"]; + 41 [label="Exit when branch condition"]; } subgraph cluster_14 { color=blue - 54 [label="Enter when branch condition "]; - 55 [label="Access variable R|/x|"]; - 56 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 57 [label="Exit when branch condition"]; + 42 [label="Enter when branch condition "]; + 43 [label="Access variable R|/x|"]; + 44 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 45 [label="Exit when branch condition"]; } subgraph cluster_15 { color=blue - 68 [label="Enter when branch condition else"]; - 69 [label="Exit when branch condition"]; + 46 [label="Enter when branch condition else"]; + 47 [label="Exit when branch condition"]; } - 70 [label="Enter when branch result"]; - subgraph cluster_16 { - color=blue - 71 [label="Enter block"]; - 72 [label="Access variable R|/x|"]; - 73 [label="Function call: R|/x|.R|/A.foo|()"]; - 74 [label="Access variable R|/x|"]; - 75 [label="Function call: R|/x|.R|/B.bar|()"]; - 76 [label="Exit block"]; - } - 77 [label="Exit when branch result"]; - 58 [label="Enter when branch result"]; - subgraph cluster_17 { - color=blue - 59 [label="Enter block"]; - 60 [label="Access variable R|/x|"]; - 61 [label="Function call: R|/x|.R|/A.foo|()"]; - 62 [label="Access variable R|/x|"]; - 63 [label="Function call: R|/x|.R|/B.bar|()"]; - 64 [label="Access variable R|/x|"]; - 65 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 66 [label="Exit block"]; - } - 67 [label="Exit when branch result"]; 48 [label="Enter when branch result"]; - subgraph cluster_18 { + subgraph cluster_16 { color=blue 49 [label="Enter block"]; 50 [label="Access variable R|/x|"]; 51 [label="Function call: R|/x|.R|/A.foo|()"]; - 52 [label="Exit block"]; + 52 [label="Access variable R|/x|"]; + 53 [label="Function call: R|/x|.R|/B.bar|()"]; + 54 [label="Exit block"]; } - 53 [label="Exit when branch result"]; - 40 [label="Enter when branch result"]; + 55 [label="Exit when branch result"]; + 56 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 57 [label="Enter block"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Function call: R|/x|.R|/A.foo|()"]; + 60 [label="Access variable R|/x|"]; + 61 [label="Function call: R|/x|.R|/B.bar|()"]; + 62 [label="Access variable R|/x|"]; + 63 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 64 [label="Exit block"]; + } + 65 [label="Exit when branch result"]; + 66 [label="Enter when branch result"]; + subgraph cluster_18 { + color=blue + 67 [label="Enter block"]; + 68 [label="Access variable R|/x|"]; + 69 [label="Function call: R|/x|.R|/A.foo|()"]; + 70 [label="Exit block"]; + } + 71 [label="Exit when branch result"]; + 72 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 41 [label="Enter block"]; - 42 [label="Exit block"]; + 73 [label="Enter block"]; + 74 [label="Exit block"]; } - 43 [label="Exit when branch result"]; - 35 [label="Exit when"]; + 75 [label="Exit when branch result"]; + 76 [label="Exit when"]; } - 78 [label="Exit block"]; + 77 [label="Exit block"]; } - 9 [label="Exit function test_1" style="filled" fillcolor=red]; + 78 [label="Exit function test_1" style="filled" fillcolor=red]; } - 8 -> {10}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; - 11 -> {13}; - 12 -> {34}; + 11 -> {12}; + 12 -> {13}; 13 -> {14}; - 14 -> {15}; + 14 -> {26 15}; 15 -> {16}; - 16 -> {17 23}; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; - 19 -> {20}; + 18 -> {20 19}; + 19 -> {32}; 20 -> {21}; 21 -> {22}; - 22 -> {12}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {26}; - 26 -> {27 33}; + 25 -> {32}; + 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {12}; - 33 -> {12}; - 34 -> {36}; - 35 -> {78}; + 32 -> {33}; + 33 -> {34}; + 34 -> {35}; + 35 -> {36}; 36 -> {37}; - 37 -> {38}; + 37 -> {72 38}; 38 -> {39}; - 39 -> {40 44}; + 39 -> {40}; 40 -> {41}; - 41 -> {42}; + 41 -> {66 42}; 42 -> {43}; - 43 -> {35}; + 43 -> {44}; 44 -> {45}; - 45 -> {46}; + 45 -> {56 46}; 46 -> {47}; - 47 -> {48 54}; + 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; - 53 -> {35}; + 53 -> {54}; 54 -> {55}; - 55 -> {56}; + 55 -> {76}; 56 -> {57}; - 57 -> {58 68}; + 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; @@ -206,183 +207,183 @@ digraph when_kt { 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {66}; + 65 -> {76}; 66 -> {67}; - 67 -> {35}; + 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {76}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {35}; - 78 -> {9}; + 77 -> {78}; subgraph cluster_20 { color=red 79 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 81 [label="Enter block"]; + 80 [label="Enter block"]; subgraph cluster_22 { color=blue - 82 [label="Enter when"]; - 84 [label="Access variable R|/x|"]; + 81 [label="Enter when"]; + 82 [label="Access variable R|/x|"]; subgraph cluster_23 { color=blue - 85 [label="Enter when branch condition "]; - 86 [label="Type operator: ($subj$ is R|A|)"]; - 87 [label="Exit when branch condition"]; + 83 [label="Enter when branch condition "]; + 84 [label="Type operator: ($subj$ is R|A|)"]; + 85 [label="Exit when branch condition"]; } subgraph cluster_24 { color=blue - 94 [label="Enter when branch condition "]; - 95 [label="Type operator: ($subj$ is R|B|)"]; - 96 [label="Exit when branch condition"]; + 86 [label="Enter when branch condition "]; + 87 [label="Type operator: ($subj$ is R|B|)"]; + 88 [label="Exit when branch condition"]; } - 103 [label="Synthetic else branch"]; - 97 [label="Enter when branch result"]; + 89 [label="Synthetic else branch"]; + 90 [label="Enter when branch result"]; subgraph cluster_25 { color=blue - 98 [label="Enter block"]; - 99 [label="Access variable R|/x|"]; - 100 [label="Function call: R|/x|.R|/B.bar|()"]; - 101 [label="Exit block"]; + 91 [label="Enter block"]; + 92 [label="Access variable R|/x|"]; + 93 [label="Function call: R|/x|.R|/B.bar|()"]; + 94 [label="Exit block"]; } - 102 [label="Exit when branch result"]; - 88 [label="Enter when branch result"]; + 95 [label="Exit when branch result"]; + 96 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 89 [label="Enter block"]; - 90 [label="Access variable R|/x|"]; - 91 [label="Function call: R|/x|.R|/A.foo|()"]; - 92 [label="Exit block"]; + 97 [label="Enter block"]; + 98 [label="Access variable R|/x|"]; + 99 [label="Function call: R|/x|.R|/A.foo|()"]; + 100 [label="Exit block"]; } - 93 [label="Exit when branch result"]; - 83 [label="Exit when"]; + 101 [label="Exit when branch result"]; + 102 [label="Exit when"]; } subgraph cluster_27 { color=blue - 104 [label="Enter when"]; - 106 [label="Access variable R|/x|"]; + 103 [label="Enter when"]; + 104 [label="Access variable R|/x|"]; subgraph cluster_28 { color=blue - 107 [label="Enter when branch condition "]; - 108 [label="Type operator: ($subj$ !is R|A|)"]; - 109 [label="Exit when branch condition"]; + 105 [label="Enter when branch condition "]; + 106 [label="Type operator: ($subj$ !is R|A|)"]; + 107 [label="Exit when branch condition"]; } subgraph cluster_29 { color=blue - 114 [label="Enter when branch condition "]; - 115 [label="Type operator: ($subj$ !is R|B|)"]; - 116 [label="Exit when branch condition"]; + 108 [label="Enter when branch condition "]; + 109 [label="Type operator: ($subj$ !is R|B|)"]; + 110 [label="Exit when branch condition"]; } subgraph cluster_30 { color=blue - 123 [label="Enter when branch condition "]; - 124 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; - 125 [label="Exit when branch condition"]; + 111 [label="Enter when branch condition "]; + 112 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; + 113 [label="Exit when branch condition"]; } subgraph cluster_31 { color=blue - 136 [label="Enter when branch condition else"]; - 137 [label="Exit when branch condition"]; + 114 [label="Enter when branch condition else"]; + 115 [label="Exit when branch condition"]; } - 138 [label="Enter when branch result"]; + 116 [label="Enter when branch result"]; subgraph cluster_32 { color=blue - 139 [label="Enter block"]; - 140 [label="Access variable R|/x|"]; - 141 [label="Function call: R|/x|.R|/A.foo|()"]; - 142 [label="Access variable R|/x|"]; - 143 [label="Function call: R|/x|.R|/B.bar|()"]; - 144 [label="Exit block"]; + 117 [label="Enter block"]; + 118 [label="Access variable R|/x|"]; + 119 [label="Function call: R|/x|.R|/A.foo|()"]; + 120 [label="Access variable R|/x|"]; + 121 [label="Function call: R|/x|.R|/B.bar|()"]; + 122 [label="Exit block"]; } - 145 [label="Exit when branch result"]; - 126 [label="Enter when branch result"]; + 123 [label="Exit when branch result"]; + 124 [label="Enter when branch result"]; subgraph cluster_33 { color=blue - 127 [label="Enter block"]; + 125 [label="Enter block"]; + 126 [label="Access variable R|/x|"]; + 127 [label="Function call: R|/x|.R|/A.foo|()"]; 128 [label="Access variable R|/x|"]; - 129 [label="Function call: R|/x|.R|/A.foo|()"]; + 129 [label="Function call: R|/x|.R|/B.bar|()"]; 130 [label="Access variable R|/x|"]; - 131 [label="Function call: R|/x|.R|/B.bar|()"]; - 132 [label="Access variable R|/x|"]; - 133 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 134 [label="Exit block"]; + 131 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 132 [label="Exit block"]; } - 135 [label="Exit when branch result"]; - 117 [label="Enter when branch result"]; + 133 [label="Exit when branch result"]; + 134 [label="Enter when branch result"]; subgraph cluster_34 { color=blue - 118 [label="Enter block"]; - 119 [label="Access variable R|/x|"]; - 120 [label="Function call: R|/x|.R|/A.foo|()"]; - 121 [label="Exit block"]; + 135 [label="Enter block"]; + 136 [label="Access variable R|/x|"]; + 137 [label="Function call: R|/x|.R|/A.foo|()"]; + 138 [label="Exit block"]; } - 122 [label="Exit when branch result"]; - 110 [label="Enter when branch result"]; + 139 [label="Exit when branch result"]; + 140 [label="Enter when branch result"]; subgraph cluster_35 { color=blue - 111 [label="Enter block"]; - 112 [label="Exit block"]; + 141 [label="Enter block"]; + 142 [label="Exit block"]; } - 113 [label="Exit when branch result"]; - 105 [label="Exit when"]; + 143 [label="Exit when branch result"]; + 144 [label="Exit when"]; } - 146 [label="Exit block"]; + 145 [label="Exit block"]; } - 80 [label="Exit function test_2" style="filled" fillcolor=red]; + 146 [label="Exit function test_2" style="filled" fillcolor=red]; } - 79 -> {81}; + 79 -> {80}; + 80 -> {81}; 81 -> {82}; - 82 -> {84}; - 83 -> {104}; + 82 -> {83}; + 83 -> {84}; 84 -> {85}; - 85 -> {86}; + 85 -> {96 86}; 86 -> {87}; - 87 -> {88 94}; - 88 -> {89}; - 89 -> {90}; + 87 -> {88}; + 88 -> {90 89}; + 89 -> {102}; 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {83}; + 93 -> {94}; 94 -> {95}; - 95 -> {96}; - 96 -> {97 103}; + 95 -> {102}; + 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; 101 -> {102}; - 102 -> {83}; - 103 -> {83}; - 104 -> {106}; - 105 -> {146}; + 102 -> {103}; + 103 -> {104}; + 104 -> {105}; + 105 -> {106}; 106 -> {107}; - 107 -> {108}; + 107 -> {140 108}; 108 -> {109}; - 109 -> {110 114}; - 110 -> {111}; + 109 -> {110}; + 110 -> {134 111}; 111 -> {112}; 112 -> {113}; - 113 -> {105}; + 113 -> {124 114}; 114 -> {115}; 115 -> {116}; - 116 -> {117 123}; + 116 -> {117}; 117 -> {118}; 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; - 122 -> {105}; - 123 -> {124}; + 122 -> {123}; + 123 -> {144}; 124 -> {125}; - 125 -> {126 136}; + 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; @@ -390,112 +391,111 @@ digraph when_kt { 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {134}; + 133 -> {144}; 134 -> {135}; - 135 -> {105}; + 135 -> {136}; 136 -> {137}; 137 -> {138}; 138 -> {139}; - 139 -> {140}; + 139 -> {144}; 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; - 145 -> {105}; - 146 -> {80}; + 145 -> {146}; subgraph cluster_36 { color=red 147 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_37 { color=blue - 149 [label="Enter block"]; + 148 [label="Enter block"]; subgraph cluster_38 { color=blue - 150 [label="Enter when"]; - 152 [label="Access variable R|/x|"]; - 153 [label="Variable declaration: lval y: R|kotlin/Any?|"]; + 149 [label="Enter when"]; + 150 [label="Access variable R|/x|"]; + 151 [label="Variable declaration: lval y: R|kotlin/Any?|"]; subgraph cluster_39 { color=blue - 154 [label="Enter when branch condition "]; - 155 [label="Type operator: ($subj$ is R|A|)"]; - 156 [label="Exit when branch condition"]; + 152 [label="Enter when branch condition "]; + 153 [label="Type operator: ($subj$ is R|A|)"]; + 154 [label="Exit when branch condition"]; } subgraph cluster_40 { color=blue - 165 [label="Enter when branch condition "]; - 166 [label="Type operator: ($subj$ is R|B|)"]; - 167 [label="Exit when branch condition"]; + 155 [label="Enter when branch condition "]; + 156 [label="Type operator: ($subj$ is R|B|)"]; + 157 [label="Exit when branch condition"]; } - 176 [label="Synthetic else branch"]; - 168 [label="Enter when branch result"]; + 158 [label="Synthetic else branch"]; + 159 [label="Enter when branch result"]; subgraph cluster_41 { color=blue - 169 [label="Enter block"]; - 170 [label="Access variable R|/x|"]; - 171 [label="Function call: R|/x|.R|/B.bar|()"]; - 172 [label="Access variable R|/y|"]; - 173 [label="Function call: R|/y|.R|/B.bar|()"]; - 174 [label="Exit block"]; + 160 [label="Enter block"]; + 161 [label="Access variable R|/x|"]; + 162 [label="Function call: R|/x|.R|/B.bar|()"]; + 163 [label="Access variable R|/y|"]; + 164 [label="Function call: R|/y|.R|/B.bar|()"]; + 165 [label="Exit block"]; } - 175 [label="Exit when branch result"]; - 157 [label="Enter when branch result"]; + 166 [label="Exit when branch result"]; + 167 [label="Enter when branch result"]; subgraph cluster_42 { color=blue - 158 [label="Enter block"]; - 159 [label="Access variable R|/x|"]; - 160 [label="Function call: R|/x|.R|/A.foo|()"]; - 161 [label="Access variable R|/y|"]; - 162 [label="Function call: R|/y|.R|/A.foo|()"]; - 163 [label="Exit block"]; + 168 [label="Enter block"]; + 169 [label="Access variable R|/x|"]; + 170 [label="Function call: R|/x|.R|/A.foo|()"]; + 171 [label="Access variable R|/y|"]; + 172 [label="Function call: R|/y|.R|/A.foo|()"]; + 173 [label="Exit block"]; } - 164 [label="Exit when branch result"]; - 151 [label="Exit when"]; + 174 [label="Exit when branch result"]; + 175 [label="Exit when"]; } subgraph cluster_43 { color=blue - 177 [label="Enter when"]; - 179 [label="Access variable R|/x|"]; - 180 [label="Variable declaration: lval y: R|kotlin/Any?|"]; + 176 [label="Enter when"]; + 177 [label="Access variable R|/x|"]; + 178 [label="Variable declaration: lval y: R|kotlin/Any?|"]; subgraph cluster_44 { color=blue - 181 [label="Enter when branch condition "]; - 182 [label="Type operator: ($subj$ !is R|A|)"]; - 183 [label="Exit when branch condition"]; + 179 [label="Enter when branch condition "]; + 180 [label="Type operator: ($subj$ !is R|A|)"]; + 181 [label="Exit when branch condition"]; } subgraph cluster_45 { color=blue - 188 [label="Enter when branch condition "]; - 189 [label="Type operator: ($subj$ !is R|B|)"]; - 190 [label="Exit when branch condition"]; + 182 [label="Enter when branch condition "]; + 183 [label="Type operator: ($subj$ !is R|B|)"]; + 184 [label="Exit when branch condition"]; } subgraph cluster_46 { color=blue - 199 [label="Enter when branch condition "]; - 200 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; - 201 [label="Exit when branch condition"]; + 185 [label="Enter when branch condition "]; + 186 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; + 187 [label="Exit when branch condition"]; } subgraph cluster_47 { color=blue - 218 [label="Enter when branch condition else"]; - 219 [label="Exit when branch condition"]; + 188 [label="Enter when branch condition else"]; + 189 [label="Exit when branch condition"]; } - 220 [label="Enter when branch result"]; + 190 [label="Enter when branch result"]; subgraph cluster_48 { color=blue - 221 [label="Enter block"]; - 222 [label="Access variable R|/x|"]; - 223 [label="Function call: R|/x|.R|/A.foo|()"]; - 224 [label="Access variable R|/x|"]; - 225 [label="Function call: R|/x|.R|/B.bar|()"]; - 226 [label="Access variable R|/y|"]; - 227 [label="Function call: R|/y|.R|/A.foo|()"]; - 228 [label="Access variable R|/y|"]; - 229 [label="Function call: R|/y|.R|/B.bar|()"]; - 230 [label="Exit block"]; + 191 [label="Enter block"]; + 192 [label="Access variable R|/x|"]; + 193 [label="Function call: R|/x|.R|/A.foo|()"]; + 194 [label="Access variable R|/x|"]; + 195 [label="Function call: R|/x|.R|/B.bar|()"]; + 196 [label="Access variable R|/y|"]; + 197 [label="Function call: R|/y|.R|/A.foo|()"]; + 198 [label="Access variable R|/y|"]; + 199 [label="Function call: R|/y|.R|/B.bar|()"]; + 200 [label="Exit block"]; } - 231 [label="Exit when branch result"]; + 201 [label="Exit when branch result"]; 202 [label="Enter when branch result"]; subgraph cluster_49 { color=blue @@ -515,50 +515,51 @@ digraph when_kt { 216 [label="Exit block"]; } 217 [label="Exit when branch result"]; - 191 [label="Enter when branch result"]; + 218 [label="Enter when branch result"]; subgraph cluster_50 { 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|/y|"]; - 196 [label="Function call: R|/y|.R|/A.foo|()"]; - 197 [label="Exit block"]; + 219 [label="Enter block"]; + 220 [label="Access variable R|/x|"]; + 221 [label="Function call: R|/x|.R|/A.foo|()"]; + 222 [label="Access variable R|/y|"]; + 223 [label="Function call: R|/y|.R|/A.foo|()"]; + 224 [label="Exit block"]; } - 198 [label="Exit when branch result"]; - 184 [label="Enter when branch result"]; + 225 [label="Exit when branch result"]; + 226 [label="Enter when branch result"]; subgraph cluster_51 { color=blue - 185 [label="Enter block"]; - 186 [label="Exit block"]; + 227 [label="Enter block"]; + 228 [label="Exit block"]; } - 187 [label="Exit when branch result"]; - 178 [label="Exit when"]; + 229 [label="Exit when branch result"]; + 230 [label="Exit when"]; } - 232 [label="Exit block"]; + 231 [label="Exit block"]; } - 148 [label="Exit function test_3" style="filled" fillcolor=red]; + 232 [label="Exit function test_3" style="filled" fillcolor=red]; } - 147 -> {149}; + 147 -> {148}; + 148 -> {149}; 149 -> {150}; - 150 -> {152}; - 151 -> {177}; + 150 -> {151}; + 151 -> {152}; 152 -> {153}; 153 -> {154}; - 154 -> {155}; + 154 -> {167 155}; 155 -> {156}; - 156 -> {157 165}; - 157 -> {158}; - 158 -> {159}; + 156 -> {157}; + 157 -> {159 158}; + 158 -> {175}; 159 -> {160}; 160 -> {161}; 161 -> {162}; 162 -> {163}; 163 -> {164}; - 164 -> {151}; + 164 -> {165}; 165 -> {166}; - 166 -> {167}; - 167 -> {168 176}; + 166 -> {175}; + 167 -> {168}; 168 -> {169}; 169 -> {170}; 170 -> {171}; @@ -566,22 +567,22 @@ digraph when_kt { 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {151}; - 176 -> {151}; - 177 -> {179}; - 178 -> {232}; + 175 -> {176}; + 176 -> {177}; + 177 -> {178}; + 178 -> {179}; 179 -> {180}; 180 -> {181}; - 181 -> {182}; + 181 -> {226 182}; 182 -> {183}; - 183 -> {184 188}; - 184 -> {185}; + 183 -> {184}; + 184 -> {218 185}; 185 -> {186}; 186 -> {187}; - 187 -> {178}; + 187 -> {202 188}; 188 -> {189}; 189 -> {190}; - 190 -> {191 199}; + 190 -> {191}; 191 -> {192}; 192 -> {193}; 193 -> {194}; @@ -589,10 +590,10 @@ digraph when_kt { 195 -> {196}; 196 -> {197}; 197 -> {198}; - 198 -> {178}; + 198 -> {199}; 199 -> {200}; 200 -> {201}; - 201 -> {202 218}; + 201 -> {230}; 202 -> {203}; 203 -> {204}; 204 -> {205}; @@ -608,7 +609,7 @@ digraph when_kt { 214 -> {215}; 215 -> {216}; 216 -> {217}; - 217 -> {178}; + 217 -> {230}; 218 -> {219}; 219 -> {220}; 220 -> {221}; @@ -616,70 +617,69 @@ digraph when_kt { 222 -> {223}; 223 -> {224}; 224 -> {225}; - 225 -> {226}; + 225 -> {230}; 226 -> {227}; 227 -> {228}; 228 -> {229}; 229 -> {230}; 230 -> {231}; - 231 -> {178}; - 232 -> {148}; + 231 -> {232}; subgraph cluster_52 { color=red 233 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_53 { color=blue - 235 [label="Enter block"]; + 234 [label="Enter block"]; subgraph cluster_54 { color=blue - 236 [label="Enter when"]; - 238 [label="Access variable R|/x|"]; - 239 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 235 [label="Enter when"]; + 236 [label="Access variable R|/x|"]; + 237 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; subgraph cluster_55 { color=blue - 240 [label="Enter when branch condition "]; - 241 [label="Const: Int(1)"]; - 242 [label="Operator =="]; - 243 [label="Exit when branch condition"]; + 238 [label="Enter when branch condition "]; + 239 [label="Const: Int(1)"]; + 240 [label="Operator =="]; + 241 [label="Exit when branch condition"]; } - 250 [label="Synthetic else branch"]; - 244 [label="Enter when branch result"]; + 242 [label="Synthetic else branch"]; + 243 [label="Enter when branch result"]; subgraph cluster_56 { color=blue - 245 [label="Enter block"]; - 246 [label="Access variable R|/x|"]; - 247 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 248 [label="Exit block"]; + 244 [label="Enter block"]; + 245 [label="Access variable R|/x|"]; + 246 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 247 [label="Exit block"]; } - 249 [label="Exit when branch result"]; - 237 [label="Exit when"]; + 248 [label="Exit when branch result"]; + 249 [label="Exit when"]; } - 251 [label="Access variable R|/x|"]; - 252 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 253 [label="Exit block"]; + 250 [label="Access variable R|/x|"]; + 251 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 252 [label="Exit block"]; } - 234 [label="Exit function test_4" style="filled" fillcolor=red]; + 253 [label="Exit function test_4" style="filled" fillcolor=red]; } - 233 -> {235}; + 233 -> {234}; + 234 -> {235}; 235 -> {236}; - 236 -> {238}; - 237 -> {251}; + 236 -> {237}; + 237 -> {238}; 238 -> {239}; 239 -> {240}; 240 -> {241}; - 241 -> {242}; - 242 -> {243}; - 243 -> {244 250}; + 241 -> {243 242}; + 242 -> {249}; + 243 -> {244}; 244 -> {245}; 245 -> {246}; 246 -> {247}; 247 -> {248}; 248 -> {249}; - 249 -> {237}; - 250 -> {237}; + 249 -> {250}; + 250 -> {251}; 251 -> {252}; 252 -> {253}; - 253 -> {234}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot index 162ab1bdac9..2a20a0f620e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot @@ -12,80 +12,81 @@ digraph equalsAndIdentity_kt { subgraph cluster_1 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 2 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red 4 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; + 5 [label="Enter block"]; subgraph cluster_4 { color=blue - 7 [label="Enter when"]; + 6 [label="Enter when"]; subgraph cluster_5 { color=blue - 9 [label="Enter when branch condition "]; - 10 [label="Access variable R|/x|"]; - 11 [label="Access variable R|/y|"]; - 12 [label="Operator =="]; - 13 [label="Exit when branch condition"]; + 7 [label="Enter when branch condition "]; + 8 [label="Access variable R|/x|"]; + 9 [label="Access variable R|/y|"]; + 10 [label="Operator =="]; + 11 [label="Exit when branch condition"]; } - 22 [label="Synthetic else branch"]; - 14 [label="Enter when branch result"]; + 12 [label="Synthetic else branch"]; + 13 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 15 [label="Enter block"]; - 16 [label="Access variable R|/x|"]; - 17 [label="Function call: R|/x|.R|/A.foo|()"]; - 18 [label="Access variable R|/y|"]; - 19 [label="Function call: R|/y|.R|/A.foo|()"]; - 20 [label="Exit block"]; + 14 [label="Enter block"]; + 15 [label="Access variable R|/x|"]; + 16 [label="Function call: R|/x|.R|/A.foo|()"]; + 17 [label="Access variable R|/y|"]; + 18 [label="Function call: R|/y|.R|/A.foo|()"]; + 19 [label="Exit block"]; } - 21 [label="Exit when branch result"]; - 8 [label="Exit when"]; + 20 [label="Exit when branch result"]; + 21 [label="Exit when"]; } subgraph cluster_7 { color=blue - 23 [label="Enter when"]; + 22 [label="Enter when"]; subgraph cluster_8 { color=blue - 25 [label="Enter when branch condition "]; - 26 [label="Access variable R|/x|"]; - 27 [label="Access variable R|/y|"]; - 28 [label="Operator ==="]; - 29 [label="Exit when branch condition"]; + 23 [label="Enter when branch condition "]; + 24 [label="Access variable R|/x|"]; + 25 [label="Access variable R|/y|"]; + 26 [label="Operator ==="]; + 27 [label="Exit when branch condition"]; } - 38 [label="Synthetic else branch"]; - 30 [label="Enter when branch result"]; + 28 [label="Synthetic else branch"]; + 29 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 31 [label="Enter block"]; - 32 [label="Access variable R|/x|"]; - 33 [label="Function call: R|/x|.R|/A.foo|()"]; - 34 [label="Access variable R|/y|"]; - 35 [label="Function call: R|/y|.R|/A.foo|()"]; - 36 [label="Exit block"]; + 30 [label="Enter block"]; + 31 [label="Access variable R|/x|"]; + 32 [label="Function call: R|/x|.R|/A.foo|()"]; + 33 [label="Access variable R|/y|"]; + 34 [label="Function call: R|/y|.R|/A.foo|()"]; + 35 [label="Exit block"]; } - 37 [label="Exit when branch result"]; - 24 [label="Exit when"]; + 36 [label="Exit when branch result"]; + 37 [label="Exit when"]; } - 39 [label="Exit block"]; + 38 [label="Exit block"]; } - 5 [label="Exit function test_1" style="filled" fillcolor=red]; + 39 [label="Exit function test_1" style="filled" fillcolor=red]; } - 4 -> {6}; + 4 -> {5}; + 5 -> {6}; 6 -> {7}; - 7 -> {9}; - 8 -> {23}; + 7 -> {8}; + 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {12}; - 12 -> {13}; - 13 -> {14 22}; + 11 -> {13 12}; + 12 -> {21}; + 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; @@ -93,15 +94,15 @@ digraph equalsAndIdentity_kt { 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {8}; - 22 -> {8}; - 23 -> {25}; - 24 -> {39}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {28}; - 28 -> {29}; - 29 -> {30 38}; + 27 -> {29 28}; + 28 -> {37}; + 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; @@ -109,79 +110,79 @@ digraph equalsAndIdentity_kt { 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {24}; - 38 -> {24}; - 39 -> {5}; + 37 -> {38}; + 38 -> {39}; subgraph cluster_10 { color=red 40 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 42 [label="Enter block"]; + 41 [label="Enter block"]; subgraph cluster_12 { color=blue - 43 [label="Enter when"]; + 42 [label="Enter when"]; subgraph cluster_13 { color=blue - 45 [label="Enter when branch condition "]; - 46 [label="Access variable R|/x|"]; - 47 [label="Access variable R|/y|"]; - 48 [label="Operator =="]; - 49 [label="Exit when branch condition"]; + 43 [label="Enter when branch condition "]; + 44 [label="Access variable R|/x|"]; + 45 [label="Access variable R|/y|"]; + 46 [label="Operator =="]; + 47 [label="Exit when branch condition"]; } - 58 [label="Synthetic else branch"]; - 50 [label="Enter when branch result"]; + 48 [label="Synthetic else branch"]; + 49 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 51 [label="Enter block"]; - 52 [label="Access variable R|/x|"]; - 53 [label="Function call: R|/x|.#()"]; - 54 [label="Access variable R|/y|"]; - 55 [label="Function call: R|/y|.#()"]; - 56 [label="Exit block"]; + 50 [label="Enter block"]; + 51 [label="Access variable R|/x|"]; + 52 [label="Function call: R|/x|.#()"]; + 53 [label="Access variable R|/y|"]; + 54 [label="Function call: R|/y|.#()"]; + 55 [label="Exit block"]; } - 57 [label="Exit when branch result"]; - 44 [label="Exit when"]; + 56 [label="Exit when branch result"]; + 57 [label="Exit when"]; } subgraph cluster_15 { color=blue - 59 [label="Enter when"]; + 58 [label="Enter when"]; subgraph cluster_16 { color=blue - 61 [label="Enter when branch condition "]; - 62 [label="Access variable R|/x|"]; - 63 [label="Access variable R|/y|"]; - 64 [label="Operator ==="]; - 65 [label="Exit when branch condition"]; + 59 [label="Enter when branch condition "]; + 60 [label="Access variable R|/x|"]; + 61 [label="Access variable R|/y|"]; + 62 [label="Operator ==="]; + 63 [label="Exit when branch condition"]; } - 74 [label="Synthetic else branch"]; - 66 [label="Enter when branch result"]; + 64 [label="Synthetic else branch"]; + 65 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 67 [label="Enter block"]; - 68 [label="Access variable R|/x|"]; - 69 [label="Function call: R|/x|.#()"]; - 70 [label="Access variable R|/y|"]; - 71 [label="Function call: R|/y|.#()"]; - 72 [label="Exit block"]; + 66 [label="Enter block"]; + 67 [label="Access variable R|/x|"]; + 68 [label="Function call: R|/x|.#()"]; + 69 [label="Access variable R|/y|"]; + 70 [label="Function call: R|/y|.#()"]; + 71 [label="Exit block"]; } - 73 [label="Exit when branch result"]; - 60 [label="Exit when"]; + 72 [label="Exit when branch result"]; + 73 [label="Exit when"]; } - 75 [label="Exit block"]; + 74 [label="Exit block"]; } - 41 [label="Exit function test_2" style="filled" fillcolor=red]; + 75 [label="Exit function test_2" style="filled" fillcolor=red]; } - 40 -> {42}; + 40 -> {41}; + 41 -> {42}; 42 -> {43}; - 43 -> {45}; - 44 -> {59}; + 43 -> {44}; + 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; - 48 -> {49}; - 49 -> {50 58}; + 47 -> {49 48}; + 48 -> {57}; + 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; @@ -189,15 +190,15 @@ digraph equalsAndIdentity_kt { 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {44}; - 58 -> {44}; - 59 -> {61}; - 60 -> {75}; + 57 -> {58}; + 58 -> {59}; + 59 -> {60}; + 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {64}; - 64 -> {65}; - 65 -> {66 74}; + 63 -> {65 64}; + 64 -> {73}; + 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; @@ -205,117 +206,117 @@ digraph equalsAndIdentity_kt { 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {60}; - 74 -> {60}; - 75 -> {41}; + 73 -> {74}; + 74 -> {75}; subgraph cluster_18 { color=red 76 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 78 [label="Enter block"]; + 77 [label="Enter block"]; subgraph cluster_20 { color=blue - 79 [label="Enter when"]; + 78 [label="Enter when"]; subgraph cluster_21 { color=blue - 81 [label="Enter when branch condition "]; - 82 [label="Access variable R|/y|"]; - 83 [label="Const: Null(null)"]; - 84 [label="Operator =="]; - 85 [label="Exit when branch condition"]; + 79 [label="Enter when branch condition "]; + 80 [label="Access variable R|/y|"]; + 81 [label="Const: Null(null)"]; + 82 [label="Operator =="]; + 83 [label="Exit when branch condition"]; } - 92 [label="Synthetic else branch"]; - 86 [label="Enter when branch result"]; + 84 [label="Synthetic else branch"]; + 85 [label="Enter when branch result"]; subgraph cluster_22 { color=blue - 87 [label="Enter block"]; - 88 [label="Jump: ^test_3 Unit"]; - 89 [label="Stub" style="filled" fillcolor=gray]; - 90 [label="Exit block" style="filled" fillcolor=gray]; + 86 [label="Enter block"]; + 87 [label="Jump: ^test_3 Unit"]; + 88 [label="Stub" style="filled" fillcolor=gray]; + 89 [label="Exit block" style="filled" fillcolor=gray]; } - 91 [label="Exit when branch result" style="filled" fillcolor=gray]; - 80 [label="Exit when"]; + 90 [label="Exit when branch result" style="filled" fillcolor=gray]; + 91 [label="Exit when"]; } subgraph cluster_23 { color=blue - 93 [label="Enter when"]; + 92 [label="Enter when"]; subgraph cluster_24 { color=blue - 95 [label="Enter when branch condition "]; - 96 [label="Access variable R|/x|"]; - 97 [label="Access variable R|/y|"]; - 98 [label="Operator =="]; - 99 [label="Exit when branch condition"]; + 93 [label="Enter when branch condition "]; + 94 [label="Access variable R|/x|"]; + 95 [label="Access variable R|/y|"]; + 96 [label="Operator =="]; + 97 [label="Exit when branch condition"]; } - 108 [label="Synthetic else branch"]; - 100 [label="Enter when branch result"]; + 98 [label="Synthetic else branch"]; + 99 [label="Enter when branch result"]; subgraph cluster_25 { color=blue - 101 [label="Enter block"]; - 102 [label="Access variable R|/x|"]; - 103 [label="Function call: R|/x|.R|/A.foo|()"]; - 104 [label="Access variable R|/y|"]; - 105 [label="Function call: R|/y|.R|/A.foo|()"]; - 106 [label="Exit block"]; + 100 [label="Enter block"]; + 101 [label="Access variable R|/x|"]; + 102 [label="Function call: R|/x|.R|/A.foo|()"]; + 103 [label="Access variable R|/y|"]; + 104 [label="Function call: R|/y|.R|/A.foo|()"]; + 105 [label="Exit block"]; } - 107 [label="Exit when branch result"]; - 94 [label="Exit when"]; + 106 [label="Exit when branch result"]; + 107 [label="Exit when"]; } subgraph cluster_26 { color=blue - 109 [label="Enter when"]; + 108 [label="Enter when"]; subgraph cluster_27 { color=blue - 111 [label="Enter when branch condition "]; - 112 [label="Access variable R|/x|"]; - 113 [label="Access variable R|/y|"]; - 114 [label="Operator ==="]; - 115 [label="Exit when branch condition"]; + 109 [label="Enter when branch condition "]; + 110 [label="Access variable R|/x|"]; + 111 [label="Access variable R|/y|"]; + 112 [label="Operator ==="]; + 113 [label="Exit when branch condition"]; } - 124 [label="Synthetic else branch"]; - 116 [label="Enter when branch result"]; + 114 [label="Synthetic else branch"]; + 115 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 117 [label="Enter block"]; - 118 [label="Access variable R|/x|"]; - 119 [label="Function call: R|/x|.R|/A.foo|()"]; - 120 [label="Access variable R|/y|"]; - 121 [label="Function call: R|/y|.R|/A.foo|()"]; - 122 [label="Exit block"]; + 116 [label="Enter block"]; + 117 [label="Access variable R|/x|"]; + 118 [label="Function call: R|/x|.R|/A.foo|()"]; + 119 [label="Access variable R|/y|"]; + 120 [label="Function call: R|/y|.R|/A.foo|()"]; + 121 [label="Exit block"]; } - 123 [label="Exit when branch result"]; - 110 [label="Exit when"]; + 122 [label="Exit when branch result"]; + 123 [label="Exit when"]; } - 125 [label="Exit block"]; + 124 [label="Exit block"]; } - 77 [label="Exit function test_3" style="filled" fillcolor=red]; + 125 [label="Exit function test_3" style="filled" fillcolor=red]; } - 76 -> {78}; + 76 -> {77}; + 77 -> {78}; 78 -> {79}; - 79 -> {81}; - 80 -> {93}; + 79 -> {80}; + 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {84}; - 84 -> {85}; - 85 -> {86 92}; + 83 -> {85 84}; + 84 -> {91}; + 85 -> {86}; 86 -> {87}; - 87 -> {88}; - 88 -> {77}; + 87 -> {125}; + 87 -> {88} [style=dotted]; 88 -> {89} [style=dotted]; 89 -> {90} [style=dotted]; 90 -> {91} [style=dotted]; - 91 -> {80} [style=dotted]; - 92 -> {80}; - 93 -> {95}; - 94 -> {109}; + 91 -> {92}; + 92 -> {93}; + 93 -> {94}; + 94 -> {95}; 95 -> {96}; 96 -> {97}; - 97 -> {98}; - 98 -> {99}; - 99 -> {100 108}; + 97 -> {99 98}; + 98 -> {107}; + 99 -> {100}; 100 -> {101}; 101 -> {102}; 102 -> {103}; @@ -323,15 +324,15 @@ digraph equalsAndIdentity_kt { 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {94}; - 108 -> {94}; - 109 -> {111}; - 110 -> {125}; + 107 -> {108}; + 108 -> {109}; + 109 -> {110}; + 110 -> {111}; 111 -> {112}; 112 -> {113}; - 113 -> {114}; - 114 -> {115}; - 115 -> {116 124}; + 113 -> {115 114}; + 114 -> {123}; + 115 -> {116}; 116 -> {117}; 117 -> {118}; 118 -> {119}; @@ -339,8 +340,7 @@ digraph equalsAndIdentity_kt { 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {110}; - 124 -> {110}; - 125 -> {77}; + 123 -> {124}; + 124 -> {125}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot index f0dde385b9f..fb1bf868e39 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot @@ -12,10 +12,10 @@ digraph inPlaceLambdas_kt { subgraph cluster_1 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 2 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red @@ -26,209 +26,209 @@ digraph inPlaceLambdas_kt { subgraph cluster_3 { color=red - 7 [label="Enter class B" style="filled" fillcolor=red]; - 6 [label="Exit class B" style="filled" fillcolor=red]; + 6 [label="Enter class B" style="filled" fillcolor=red]; + 7 [label="Exit class B" style="filled" fillcolor=red]; } - 7 -> {6} [color=green]; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red 8 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; + 9 [label="Enter block"]; subgraph cluster_6 { color=blue - 11 [label="Enter when"]; + 10 [label="Enter when"]; subgraph cluster_7 { color=blue - 13 [label="Enter when branch condition "]; - 14 [label="Access variable R|/x|"]; - 15 [label="Type operator: (R|/x| is R|A|)"]; - 16 [label="Exit when branch condition"]; + 11 [label="Enter when branch condition "]; + 12 [label="Access variable R|/x|"]; + 13 [label="Type operator: (R|/x| is R|A|)"]; + 14 [label="Exit when branch condition"]; } - 25 [label="Synthetic else branch"]; - 17 [label="Enter when branch result"]; + 15 [label="Synthetic else branch"]; + 16 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 18 [label="Enter block"]; - 19 [label="Postponed enter to lambda"]; + 17 [label="Enter block"]; + 18 [label="Postponed enter to lambda"]; subgraph cluster_9 { color=blue 27 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; 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="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"]; } - 28 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 32 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 22 [label="Call arguments union" style="filled" fillcolor=yellow]; + 19 [label="Call arguments union" style="filled" fillcolor=yellow]; 20 [label="Postponed exit from lambda"]; 21 [label="Function call: R|kotlin/run|(...)"]; - 23 [label="Exit block"]; + 22 [label="Exit block"]; } - 24 [label="Exit when branch result"]; - 12 [label="Exit when"]; + 23 [label="Exit when branch result"]; + 24 [label="Exit when"]; } - 26 [label="Exit block"]; + 25 [label="Exit block"]; } - 9 [label="Exit function test_1" style="filled" fillcolor=red]; + 26 [label="Exit function test_1" style="filled" fillcolor=red]; } - 8 -> {10}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; - 11 -> {13}; - 12 -> {26}; + 11 -> {12}; + 12 -> {13}; 13 -> {14}; - 14 -> {15}; - 15 -> {16}; - 16 -> {17 25}; + 14 -> {16 15}; + 15 -> {24}; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; - 19 -> {27}; - 19 -> {20} [color=red]; + 18 -> {27}; + 18 -> {20} [color=red]; + 19 -> {21} [color=red]; 20 -> {21} [color=green]; - 21 -> {23}; - 22 -> {21} [color=red]; + 21 -> {22}; + 22 -> {23}; 23 -> {24}; - 24 -> {12}; - 25 -> {12}; - 26 -> {9}; - 27 -> {29}; - 28 -> {20} [color=green]; - 28 -> {22} [color=red]; + 24 -> {25}; + 25 -> {26}; + 27 -> {28}; + 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {28}; + 32 -> {20} [color=green]; + 32 -> {19} [color=red]; subgraph cluster_11 { color=red 33 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 35 [label="Enter block"]; - 36 [label="Postponed enter to lambda"]; + 34 [label="Enter block"]; + 35 [label="Postponed enter to lambda"]; subgraph cluster_13 { color=blue 43 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 45 [label="Enter block"]; - 46 [label="Access variable R|/x|"]; - 47 [label="Type operator: (R|/x| as R|B|)"]; - 48 [label="Exit block"]; + 44 [label="Enter block"]; + 45 [label="Access variable R|/x|"]; + 46 [label="Type operator: (R|/x| as R|B|)"]; + 47 [label="Exit block"]; } - 44 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 48 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 39 [label="Call arguments union" style="filled" fillcolor=yellow]; + 36 [label="Call arguments union" style="filled" fillcolor=yellow]; 37 [label="Postponed exit from lambda"]; 38 [label="Function call: R|kotlin/run|(...)"]; - 40 [label="Access variable R|/x|"]; - 41 [label="Function call: R|/x|.R|/B.bar|()"]; - 42 [label="Exit block"]; + 39 [label="Access variable R|/x|"]; + 40 [label="Function call: R|/x|.R|/B.bar|()"]; + 41 [label="Exit block"]; } - 34 [label="Exit function test_2" style="filled" fillcolor=red]; + 42 [label="Exit function test_2" style="filled" fillcolor=red]; } - 33 -> {35}; - 35 -> {36}; - 36 -> {43}; - 36 -> {37} [color=red]; + 33 -> {34}; + 34 -> {35}; + 35 -> {43}; + 35 -> {37} [color=red]; + 36 -> {38} [color=red]; 37 -> {38} [color=green]; - 38 -> {40}; - 39 -> {38} [color=red]; + 38 -> {39}; + 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {34}; - 43 -> {45}; - 44 -> {37} [color=green]; - 44 -> {39} [color=red]; + 43 -> {44}; + 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {44}; + 48 -> {37} [color=green]; + 48 -> {36} [color=red]; subgraph cluster_15 { color=red 49 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_16 { color=blue - 51 [label="Enter block"]; + 50 [label="Enter block"]; subgraph cluster_17 { color=blue - 52 [label="Enter when"]; + 51 [label="Enter when"]; subgraph cluster_18 { color=blue - 54 [label="Enter when branch condition "]; - 55 [label="Access variable R|/x|"]; - 56 [label="Type operator: (R|/x| is R|A|)"]; - 57 [label="Exit when branch condition"]; + 52 [label="Enter when branch condition "]; + 53 [label="Access variable R|/x|"]; + 54 [label="Type operator: (R|/x| is R|A|)"]; + 55 [label="Exit when branch condition"]; } - 68 [label="Synthetic else branch"]; - 58 [label="Enter when branch result"]; + 56 [label="Synthetic else branch"]; + 57 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 59 [label="Enter block"]; - 60 [label="Postponed enter to lambda"]; + 58 [label="Enter block"]; + 59 [label="Postponed enter to lambda"]; subgraph cluster_20 { color=blue 70 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 72 [label="Enter block"]; - 73 [label="Access variable R|/x|"]; - 74 [label="Function call: R|/x|.R|/A.foo|()"]; - 75 [label="Access variable R|/x|"]; - 76 [label="Type operator: (R|/x| as R|B|)"]; - 77 [label="Exit block"]; + 71 [label="Enter block"]; + 72 [label="Access variable R|/x|"]; + 73 [label="Function call: R|/x|.R|/A.foo|()"]; + 74 [label="Access variable R|/x|"]; + 75 [label="Type operator: (R|/x| as R|B|)"]; + 76 [label="Exit block"]; } - 71 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 77 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 63 [label="Call arguments union" style="filled" fillcolor=yellow]; + 60 [label="Call arguments union" style="filled" fillcolor=yellow]; 61 [label="Postponed exit from lambda"]; 62 [label="Function call: R|kotlin/run|(...)"]; - 64 [label="Access variable R|/x|"]; - 65 [label="Function call: R|/x|.R|/B.bar|()"]; - 66 [label="Exit block"]; + 63 [label="Access variable R|/x|"]; + 64 [label="Function call: R|/x|.R|/B.bar|()"]; + 65 [label="Exit block"]; } - 67 [label="Exit when branch result"]; - 53 [label="Exit when"]; + 66 [label="Exit when branch result"]; + 67 [label="Exit when"]; } - 69 [label="Exit block"]; + 68 [label="Exit block"]; } - 50 [label="Exit function test_3" style="filled" fillcolor=red]; + 69 [label="Exit function test_3" style="filled" fillcolor=red]; } - 49 -> {51}; + 49 -> {50}; + 50 -> {51}; 51 -> {52}; - 52 -> {54}; - 53 -> {69}; + 52 -> {53}; + 53 -> {54}; 54 -> {55}; - 55 -> {56}; - 56 -> {57}; - 57 -> {58 68}; + 55 -> {57 56}; + 56 -> {67}; + 57 -> {58}; 58 -> {59}; - 59 -> {60}; - 60 -> {70}; - 60 -> {61} [color=red]; + 59 -> {70}; + 59 -> {61} [color=red]; + 60 -> {62} [color=red]; 61 -> {62} [color=green]; - 62 -> {64}; - 63 -> {62} [color=red]; + 62 -> {63}; + 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {53}; - 68 -> {53}; - 69 -> {50}; - 70 -> {72}; - 71 -> {61} [color=green]; - 71 -> {63} [color=red]; + 67 -> {68}; + 68 -> {69}; + 70 -> {71}; + 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {71}; + 77 -> {61} [color=green]; + 77 -> {60} [color=red]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot index 054307f4d97..8873ee0fdb9 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot @@ -8,48 +8,48 @@ digraph smartcastOnLambda_kt { 0 [label="Enter function test" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Enter when"]; + 2 [label="Enter when"]; subgraph cluster_3 { color=blue - 5 [label="Enter when branch condition "]; - 6 [label="Access variable R|/func|"]; - 7 [label="Const: Null(null)"]; - 8 [label="Operator !="]; - 9 [label="Exit when branch condition"]; + 3 [label="Enter when branch condition "]; + 4 [label="Access variable R|/func|"]; + 5 [label="Const: Null(null)"]; + 6 [label="Operator !="]; + 7 [label="Exit when branch condition"]; } - 15 [label="Synthetic else branch"]; - 10 [label="Enter when branch result"]; + 8 [label="Synthetic else branch"]; + 9 [label="Enter when branch result"]; subgraph cluster_4 { color=blue - 11 [label="Enter block"]; - 12 [label="Function call: R|/func|.R|FakeOverride|()"]; - 13 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Function call: R|/func|.R|FakeOverride|()"]; + 12 [label="Exit block"]; } - 14 [label="Exit when branch result"]; - 4 [label="Exit when"]; + 13 [label="Exit when branch result"]; + 14 [label="Exit when"]; } - 16 [label="Exit block"]; + 15 [label="Exit block"]; } - 1 [label="Exit function test" style="filled" fillcolor=red]; + 16 [label="Exit function test" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {16}; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8}; - 8 -> {9}; - 9 -> {10 15}; + 7 -> {9 8}; + 8 -> {14}; + 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {4}; - 15 -> {4}; - 16 -> {1}; + 14 -> {15}; + 15 -> {16}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot index fd04310d6e8..4074a02264f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot @@ -12,92 +12,92 @@ digraph dataFlowInfoFromWhileCondition_kt { subgraph cluster_1 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 2 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 5 [label="Enter class B" style="filled" fillcolor=red]; - 4 [label="Exit class B" style="filled" fillcolor=red]; + 4 [label="Enter class B" style="filled" fillcolor=red]; + 5 [label="Exit class B" style="filled" fillcolor=red]; } - 5 -> {4} [color=green]; + 4 -> {5} [color=green]; subgraph cluster_3 { color=red - 7 [label="Enter class C" style="filled" fillcolor=red]; - 6 [label="Exit class C" style="filled" fillcolor=red]; + 6 [label="Enter class C" style="filled" fillcolor=red]; + 7 [label="Exit class C" style="filled" fillcolor=red]; } - 7 -> {6} [color=green]; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red 8 [label="Enter function test" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Const: Null(null)"]; - 12 [label="Variable declaration: lvar a: R|A?|"]; + 9 [label="Enter block"]; + 10 [label="Const: Null(null)"]; + 11 [label="Variable declaration: lvar a: R|A?|"]; subgraph cluster_6 { color=blue - 13 [label="Enter while loop"]; + 12 [label="Enter while loop"]; subgraph cluster_7 { color=blue - 15 [label="Enter loop condition"]; + 13 [label="Enter loop condition"]; subgraph cluster_8 { color=blue - 17 [label="Enter ||"]; - 18 [label="Access variable R|/a|"]; - 19 [label="Type operator: (R|/a| is R|B|)"]; - 20 [label="Exit left part of ||"]; - 21 [label="Enter right part of ||"]; - 22 [label="Access variable R|/a|"]; - 23 [label="Type operator: (R|/a| is R|C|)"]; - 16 [label="Exit ||"]; + 14 [label="Enter ||"]; + 15 [label="Access variable R|/a|"]; + 16 [label="Type operator: (R|/a| is R|B|)"]; + 17 [label="Exit left part of ||"]; + 18 [label="Enter right part of ||"]; + 19 [label="Access variable R|/a|"]; + 20 [label="Type operator: (R|/a| is R|C|)"]; + 21 [label="Exit ||"]; } - 24 [label="Exit loop condition"]; + 22 [label="Exit loop condition"]; } subgraph cluster_9 { color=blue - 25 [label="Enter loop block"]; + 23 [label="Enter loop block"]; subgraph cluster_10 { color=blue - 26 [label="Enter block"]; - 27 [label="Access variable R|/a|"]; - 28 [label="Function call: R|/a|.R|/A.foo|()"]; - 29 [label="Exit block"]; + 24 [label="Enter block"]; + 25 [label="Access variable R|/a|"]; + 26 [label="Function call: R|/a|.R|/A.foo|()"]; + 27 [label="Exit block"]; } - 30 [label="Exit loop block"]; + 28 [label="Exit loop block"]; } - 14 [label="Exit whileloop"]; + 29 [label="Exit whileloop"]; } - 31 [label="Exit block"]; + 30 [label="Exit block"]; } - 9 [label="Exit function test" style="filled" fillcolor=red]; + 31 [label="Exit function test" style="filled" fillcolor=red]; } - 8 -> {10}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {15}; - 14 -> {31}; - 15 -> {17}; - 16 -> {24}; - 17 -> {18}; + 13 -> {14}; + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; + 17 -> {21 18}; 18 -> {19}; 19 -> {20}; - 20 -> {16 21}; + 20 -> {21}; 21 -> {22}; - 22 -> {23}; - 23 -> {16}; - 24 -> {14 25}; + 22 -> {29 23}; + 23 -> {24}; + 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29}; + 28 -> {13} [color=green style=dashed]; 29 -> {30}; - 30 -> {15} [color=green style=dashed]; - 31 -> {9}; + 30 -> {31}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot index 513a134c3b4..822e9ea2cdf 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot @@ -12,623 +12,623 @@ digraph endlessLoops_kt { subgraph cluster_1 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 2 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red 4 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; + 5 [label="Enter block"]; subgraph cluster_4 { color=blue - 7 [label="Enter while loop"]; + 6 [label="Enter while loop"]; subgraph cluster_5 { color=blue - 9 [label="Enter loop condition"]; - 10 [label="Const: Boolean(true)"]; - 11 [label="Exit loop condition"]; + 7 [label="Enter loop condition"]; + 8 [label="Const: Boolean(true)"]; + 9 [label="Exit loop condition"]; } subgraph cluster_6 { color=blue - 12 [label="Enter loop block"]; + 10 [label="Enter loop block"]; subgraph cluster_7 { color=blue - 13 [label="Enter block"]; - 14 [label="Access variable R|/x|"]; - 15 [label="Type operator: (R|/x| as R|A|)"]; + 11 [label="Enter block"]; + 12 [label="Access variable R|/x|"]; + 13 [label="Type operator: (R|/x| as R|A|)"]; subgraph cluster_8 { color=blue - 16 [label="Enter when"]; + 14 [label="Enter when"]; subgraph cluster_9 { color=blue - 18 [label="Enter when branch condition "]; - 19 [label="Access variable R|/b|"]; - 20 [label="Exit when branch condition"]; + 15 [label="Enter when branch condition "]; + 16 [label="Access variable R|/b|"]; + 17 [label="Exit when branch condition"]; } - 27 [label="Synthetic else branch"]; - 21 [label="Enter when branch result"]; + 18 [label="Synthetic else branch"]; + 19 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 22 [label="Enter block"]; - 23 [label="Jump: break@@@[Boolean(true)] "]; - 24 [label="Stub" style="filled" fillcolor=gray]; - 25 [label="Exit block" style="filled" fillcolor=gray]; + 20 [label="Enter block"]; + 21 [label="Jump: break@@@[Boolean(true)] "]; + 22 [label="Stub" style="filled" fillcolor=gray]; + 23 [label="Exit block" style="filled" fillcolor=gray]; } - 26 [label="Exit when branch result" style="filled" fillcolor=gray]; - 17 [label="Exit when"]; + 24 [label="Exit when branch result" style="filled" fillcolor=gray]; + 25 [label="Exit when"]; } - 28 [label="Exit block"]; + 26 [label="Exit block"]; } - 29 [label="Exit loop block"]; + 27 [label="Exit loop block"]; } - 8 [label="Exit whileloop"]; + 28 [label="Exit whileloop"]; } - 30 [label="Access variable R|/x|"]; - 31 [label="Function call: R|/x|.R|/A.foo|()"]; - 32 [label="Exit block"]; + 29 [label="Access variable R|/x|"]; + 30 [label="Function call: R|/x|.R|/A.foo|()"]; + 31 [label="Exit block"]; } - 5 [label="Exit function test_1" style="filled" fillcolor=red]; + 32 [label="Exit function test_1" style="filled" fillcolor=red]; } - 4 -> {6}; + 4 -> {5}; + 5 -> {6}; 6 -> {7}; - 7 -> {9}; - 8 -> {30}; + 7 -> {8}; + 8 -> {9}; 9 -> {10}; + 9 -> {28} [style=dotted]; 10 -> {11}; 11 -> {12}; - 11 -> {8} [style=dotted]; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; - 16 -> {18}; - 17 -> {28}; - 18 -> {19}; + 16 -> {17}; + 17 -> {19 18}; + 18 -> {25}; 19 -> {20}; - 20 -> {21 27}; - 21 -> {22}; - 22 -> {23}; - 23 -> {8}; + 20 -> {21}; + 21 -> {28}; + 21 -> {22} [style=dotted]; + 22 -> {23} [style=dotted]; 23 -> {24} [style=dotted]; 24 -> {25} [style=dotted]; - 25 -> {26} [style=dotted]; - 26 -> {17} [style=dotted]; - 27 -> {17}; + 25 -> {26}; + 26 -> {27}; + 27 -> {7} [color=green style=dashed]; 28 -> {29}; - 29 -> {9} [color=green style=dashed]; + 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {5}; subgraph cluster_11 { color=red 33 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 35 [label="Enter block"]; + 34 [label="Enter block"]; subgraph cluster_13 { color=blue - 36 [label="Enter while loop"]; + 35 [label="Enter while loop"]; subgraph cluster_14 { color=blue - 38 [label="Enter loop condition"]; - 39 [label="Const: Boolean(true)"]; - 40 [label="Exit loop condition"]; + 36 [label="Enter loop condition"]; + 37 [label="Const: Boolean(true)"]; + 38 [label="Exit loop condition"]; } subgraph cluster_15 { color=blue - 41 [label="Enter loop block"]; + 39 [label="Enter loop block"]; subgraph cluster_16 { color=blue - 42 [label="Enter block"]; + 40 [label="Enter block"]; subgraph cluster_17 { color=blue - 43 [label="Enter when"]; + 41 [label="Enter when"]; subgraph cluster_18 { color=blue - 45 [label="Enter when branch condition "]; - 46 [label="Access variable R|/b|"]; - 47 [label="Exit when branch condition"]; + 42 [label="Enter when branch condition "]; + 43 [label="Access variable R|/b|"]; + 44 [label="Exit when branch condition"]; } - 56 [label="Synthetic else branch"]; - 48 [label="Enter when branch result"]; + 45 [label="Synthetic else branch"]; + 46 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 49 [label="Enter block"]; - 50 [label="Access variable R|/x|"]; - 51 [label="Type operator: (R|/x| as R|A|)"]; - 52 [label="Jump: break@@@[Boolean(true)] "]; - 53 [label="Stub" style="filled" fillcolor=gray]; - 54 [label="Exit block" style="filled" fillcolor=gray]; + 47 [label="Enter block"]; + 48 [label="Access variable R|/x|"]; + 49 [label="Type operator: (R|/x| as R|A|)"]; + 50 [label="Jump: break@@@[Boolean(true)] "]; + 51 [label="Stub" style="filled" fillcolor=gray]; + 52 [label="Exit block" style="filled" fillcolor=gray]; } - 55 [label="Exit when branch result" style="filled" fillcolor=gray]; - 44 [label="Exit when"]; + 53 [label="Exit when branch result" style="filled" fillcolor=gray]; + 54 [label="Exit when"]; } - 57 [label="Exit block"]; + 55 [label="Exit block"]; } - 58 [label="Exit loop block"]; + 56 [label="Exit loop block"]; } - 37 [label="Exit whileloop"]; + 57 [label="Exit whileloop"]; } - 59 [label="Access variable R|/x|"]; - 60 [label="Function call: R|/x|.R|/A.foo|()"]; - 61 [label="Exit block"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Function call: R|/x|.R|/A.foo|()"]; + 60 [label="Exit block"]; } - 34 [label="Exit function test_2" style="filled" fillcolor=red]; + 61 [label="Exit function test_2" style="filled" fillcolor=red]; } - 33 -> {35}; + 33 -> {34}; + 34 -> {35}; 35 -> {36}; - 36 -> {38}; - 37 -> {59}; + 36 -> {37}; + 37 -> {38}; 38 -> {39}; + 38 -> {57} [style=dotted]; 39 -> {40}; 40 -> {41}; - 40 -> {37} [style=dotted]; 41 -> {42}; 42 -> {43}; - 43 -> {45}; - 44 -> {57}; - 45 -> {46}; + 43 -> {44}; + 44 -> {46 45}; + 45 -> {54}; 46 -> {47}; - 47 -> {48 56}; + 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {51}; - 51 -> {52}; - 52 -> {37}; + 50 -> {57}; + 50 -> {51} [style=dotted]; + 51 -> {52} [style=dotted]; 52 -> {53} [style=dotted]; 53 -> {54} [style=dotted]; - 54 -> {55} [style=dotted]; - 55 -> {44} [style=dotted]; - 56 -> {44}; + 54 -> {55}; + 55 -> {56}; + 56 -> {36} [color=green style=dashed]; 57 -> {58}; - 58 -> {38} [color=green style=dashed]; + 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {34}; subgraph cluster_20 { color=red 62 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 64 [label="Enter block"]; + 63 [label="Enter block"]; subgraph cluster_22 { color=blue - 65 [label="Enter while loop"]; + 64 [label="Enter while loop"]; subgraph cluster_23 { color=blue - 67 [label="Enter loop condition"]; - 68 [label="Const: Boolean(true)"]; - 69 [label="Exit loop condition"]; + 65 [label="Enter loop condition"]; + 66 [label="Const: Boolean(true)"]; + 67 [label="Exit loop condition"]; } subgraph cluster_24 { color=blue - 70 [label="Enter loop block"]; + 68 [label="Enter loop block"]; subgraph cluster_25 { color=blue - 71 [label="Enter block"]; - 72 [label="Access variable R|/x|"]; - 73 [label="Type operator: (R|/x| as R|A|)"]; + 69 [label="Enter block"]; + 70 [label="Access variable R|/x|"]; + 71 [label="Type operator: (R|/x| as R|A|)"]; subgraph cluster_26 { color=blue - 74 [label="Enter when"]; + 72 [label="Enter when"]; subgraph cluster_27 { color=blue - 76 [label="Enter when branch condition "]; - 77 [label="Access variable R|/b|"]; - 78 [label="Exit when branch condition"]; + 73 [label="Enter when branch condition "]; + 74 [label="Access variable R|/b|"]; + 75 [label="Exit when branch condition"]; } - 85 [label="Synthetic else branch"]; - 79 [label="Enter when branch result"]; + 76 [label="Synthetic else branch"]; + 77 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 80 [label="Enter block"]; - 81 [label="Jump: break@@@[Boolean(true)] "]; - 82 [label="Stub" style="filled" fillcolor=gray]; - 83 [label="Exit block" style="filled" fillcolor=gray]; + 78 [label="Enter block"]; + 79 [label="Jump: break@@@[Boolean(true)] "]; + 80 [label="Stub" style="filled" fillcolor=gray]; + 81 [label="Exit block" style="filled" fillcolor=gray]; } - 84 [label="Exit when branch result" style="filled" fillcolor=gray]; - 75 [label="Exit when"]; + 82 [label="Exit when branch result" style="filled" fillcolor=gray]; + 83 [label="Exit when"]; } subgraph cluster_29 { color=blue - 86 [label="Enter when"]; + 84 [label="Enter when"]; subgraph cluster_30 { color=blue - 88 [label="Enter when branch condition "]; - 89 [label="Access variable R|/b|"]; - 90 [label="Exit when branch condition"]; + 85 [label="Enter when branch condition "]; + 86 [label="Access variable R|/b|"]; + 87 [label="Exit when branch condition"]; } - 97 [label="Synthetic else branch"]; - 91 [label="Enter when branch result"]; + 88 [label="Synthetic else branch"]; + 89 [label="Enter when branch result"]; subgraph cluster_31 { color=blue - 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]; + 90 [label="Enter block"]; + 91 [label="Jump: break@@@[Boolean(true)] "]; + 92 [label="Stub" style="filled" fillcolor=gray]; + 93 [label="Exit block" style="filled" fillcolor=gray]; } - 96 [label="Exit when branch result" style="filled" fillcolor=gray]; - 87 [label="Exit when"]; + 94 [label="Exit when branch result" style="filled" fillcolor=gray]; + 95 [label="Exit when"]; } - 98 [label="Exit block"]; + 96 [label="Exit block"]; } - 99 [label="Exit loop block"]; + 97 [label="Exit loop block"]; } - 66 [label="Exit whileloop"]; + 98 [label="Exit whileloop"]; } - 100 [label="Access variable R|/x|"]; - 101 [label="Function call: R|/x|.R|/A.foo|()"]; - 102 [label="Exit block"]; + 99 [label="Access variable R|/x|"]; + 100 [label="Function call: R|/x|.R|/A.foo|()"]; + 101 [label="Exit block"]; } - 63 [label="Exit function test_3" style="filled" fillcolor=red]; + 102 [label="Exit function test_3" style="filled" fillcolor=red]; } - 62 -> {64}; + 62 -> {63}; + 63 -> {64}; 64 -> {65}; - 65 -> {67}; - 66 -> {100}; + 65 -> {66}; + 66 -> {67}; 67 -> {68}; + 67 -> {98} [style=dotted]; 68 -> {69}; 69 -> {70}; - 69 -> {66} [style=dotted]; 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; - 74 -> {76}; - 75 -> {86}; - 76 -> {77}; + 74 -> {75}; + 75 -> {77 76}; + 76 -> {83}; 77 -> {78}; - 78 -> {79 85}; - 79 -> {80}; - 80 -> {81}; - 81 -> {66}; + 78 -> {79}; + 79 -> {98}; + 79 -> {80} [style=dotted]; + 80 -> {81} [style=dotted]; 81 -> {82} [style=dotted]; 82 -> {83} [style=dotted]; - 83 -> {84} [style=dotted]; - 84 -> {75} [style=dotted]; - 85 -> {75}; - 86 -> {88}; - 87 -> {98}; - 88 -> {89}; + 83 -> {84}; + 84 -> {85}; + 85 -> {86}; + 86 -> {87}; + 87 -> {89 88}; + 88 -> {95}; 89 -> {90}; - 90 -> {91 97}; - 91 -> {92}; - 92 -> {93}; - 93 -> {66}; + 90 -> {91}; + 91 -> {98}; + 91 -> {92} [style=dotted]; + 92 -> {93} [style=dotted]; 93 -> {94} [style=dotted]; 94 -> {95} [style=dotted]; - 95 -> {96} [style=dotted]; - 96 -> {87} [style=dotted]; - 97 -> {87}; + 95 -> {96}; + 96 -> {97}; + 97 -> {65} [color=green style=dashed]; 98 -> {99}; - 99 -> {67} [color=green style=dashed]; + 99 -> {100}; 100 -> {101}; 101 -> {102}; - 102 -> {63}; subgraph cluster_32 { color=red 103 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_33 { color=blue - 105 [label="Enter block"]; + 104 [label="Enter block"]; subgraph cluster_34 { color=blue - 106 [label="Enter while loop"]; + 105 [label="Enter while loop"]; subgraph cluster_35 { color=blue - 108 [label="Enter loop condition"]; - 109 [label="Const: Boolean(true)"]; - 110 [label="Exit loop condition"]; + 106 [label="Enter loop condition"]; + 107 [label="Const: Boolean(true)"]; + 108 [label="Exit loop condition"]; } subgraph cluster_36 { color=blue - 111 [label="Enter loop block"]; + 109 [label="Enter loop block"]; subgraph cluster_37 { color=blue - 112 [label="Enter block"]; + 110 [label="Enter block"]; subgraph cluster_38 { color=blue - 113 [label="Enter when"]; + 111 [label="Enter when"]; subgraph cluster_39 { color=blue - 115 [label="Enter when branch condition "]; - 116 [label="Access variable R|/b|"]; - 117 [label="Exit when branch condition"]; + 112 [label="Enter when branch condition "]; + 113 [label="Access variable R|/b|"]; + 114 [label="Exit when branch condition"]; } - 126 [label="Synthetic else branch"]; - 118 [label="Enter when branch result"]; + 115 [label="Synthetic else branch"]; + 116 [label="Enter when branch result"]; subgraph cluster_40 { color=blue - 119 [label="Enter block"]; - 120 [label="Access variable R|/x|"]; - 121 [label="Type operator: (R|/x| as R|A|)"]; - 122 [label="Jump: break@@@[Boolean(true)] "]; - 123 [label="Stub" style="filled" fillcolor=gray]; - 124 [label="Exit block" style="filled" fillcolor=gray]; + 117 [label="Enter block"]; + 118 [label="Access variable R|/x|"]; + 119 [label="Type operator: (R|/x| as R|A|)"]; + 120 [label="Jump: break@@@[Boolean(true)] "]; + 121 [label="Stub" style="filled" fillcolor=gray]; + 122 [label="Exit block" style="filled" fillcolor=gray]; } - 125 [label="Exit when branch result" style="filled" fillcolor=gray]; - 114 [label="Exit when"]; + 123 [label="Exit when branch result" style="filled" fillcolor=gray]; + 124 [label="Exit when"]; } - 127 [label="Jump: break@@@[Boolean(true)] "]; - 128 [label="Stub" style="filled" fillcolor=gray]; - 129 [label="Exit block" style="filled" fillcolor=gray]; + 125 [label="Jump: break@@@[Boolean(true)] "]; + 126 [label="Stub" style="filled" fillcolor=gray]; + 127 [label="Exit block" style="filled" fillcolor=gray]; } - 130 [label="Exit loop block" style="filled" fillcolor=gray]; + 128 [label="Exit loop block" style="filled" fillcolor=gray]; } - 107 [label="Exit whileloop"]; + 129 [label="Exit whileloop"]; } - 131 [label="Access variable R|/x|"]; - 132 [label="Function call: R|/x|.#()"]; - 133 [label="Exit block"]; + 130 [label="Access variable R|/x|"]; + 131 [label="Function call: R|/x|.#()"]; + 132 [label="Exit block"]; } - 104 [label="Exit function test_4" style="filled" fillcolor=red]; + 133 [label="Exit function test_4" style="filled" fillcolor=red]; } - 103 -> {105}; + 103 -> {104}; + 104 -> {105}; 105 -> {106}; - 106 -> {108}; - 107 -> {131}; + 106 -> {107}; + 107 -> {108}; 108 -> {109}; + 108 -> {129} [style=dotted]; 109 -> {110}; 110 -> {111}; - 110 -> {107} [style=dotted]; 111 -> {112}; 112 -> {113}; - 113 -> {115}; - 114 -> {127}; - 115 -> {116}; + 113 -> {114}; + 114 -> {116 115}; + 115 -> {124}; 116 -> {117}; - 117 -> {118 126}; + 117 -> {118}; 118 -> {119}; 119 -> {120}; - 120 -> {121}; - 121 -> {122}; - 122 -> {107}; + 120 -> {129}; + 120 -> {121} [style=dotted]; + 121 -> {122} [style=dotted]; 122 -> {123} [style=dotted]; 123 -> {124} [style=dotted]; - 124 -> {125} [style=dotted]; - 125 -> {114} [style=dotted]; - 126 -> {114}; - 127 -> {107}; + 124 -> {125}; + 125 -> {129}; + 125 -> {126} [style=dotted]; + 126 -> {127} [style=dotted]; 127 -> {128} [style=dotted]; - 128 -> {129} [style=dotted]; - 129 -> {130} [style=dotted]; - 130 -> {108} [color=green style=dotted]; + 128 -> {106} [color=green style=dotted]; + 129 -> {130}; + 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {104}; subgraph cluster_41 { color=red 134 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_42 { color=blue - 136 [label="Enter block"]; + 135 [label="Enter block"]; subgraph cluster_43 { color=blue - 137 [label="Enter do-while loop"]; + 136 [label="Enter do-while loop"]; subgraph cluster_44 { color=blue - 139 [label="Enter loop block"]; + 137 [label="Enter loop block"]; subgraph cluster_45 { color=blue - 140 [label="Enter block"]; + 138 [label="Enter block"]; subgraph cluster_46 { color=blue - 141 [label="Enter when"]; + 139 [label="Enter when"]; subgraph cluster_47 { color=blue - 143 [label="Enter when branch condition "]; - 144 [label="Access variable R|/b|"]; - 145 [label="Exit when branch condition"]; + 140 [label="Enter when branch condition "]; + 141 [label="Access variable R|/b|"]; + 142 [label="Exit when branch condition"]; } - 154 [label="Synthetic else branch"]; - 146 [label="Enter when branch result"]; + 143 [label="Synthetic else branch"]; + 144 [label="Enter when branch result"]; subgraph cluster_48 { color=blue - 147 [label="Enter block"]; - 148 [label="Access variable R|/x|"]; - 149 [label="Type operator: (R|/x| as R|A|)"]; - 150 [label="Jump: break@@@[Boolean(true)] "]; - 151 [label="Stub" style="filled" fillcolor=gray]; - 152 [label="Exit block" style="filled" fillcolor=gray]; + 145 [label="Enter block"]; + 146 [label="Access variable R|/x|"]; + 147 [label="Type operator: (R|/x| as R|A|)"]; + 148 [label="Jump: break@@@[Boolean(true)] "]; + 149 [label="Stub" style="filled" fillcolor=gray]; + 150 [label="Exit block" style="filled" fillcolor=gray]; } - 153 [label="Exit when branch result" style="filled" fillcolor=gray]; - 142 [label="Exit when"]; + 151 [label="Exit when branch result" style="filled" fillcolor=gray]; + 152 [label="Exit when"]; } - 155 [label="Exit block"]; + 153 [label="Exit block"]; } - 156 [label="Exit loop block"]; + 154 [label="Exit loop block"]; } subgraph cluster_49 { color=blue - 157 [label="Enter loop condition"]; - 158 [label="Const: Boolean(true)"]; - 159 [label="Exit loop condition"]; + 155 [label="Enter loop condition"]; + 156 [label="Const: Boolean(true)"]; + 157 [label="Exit loop condition"]; } - 138 [label="Exit do-whileloop"]; + 158 [label="Exit do-whileloop"]; } - 160 [label="Access variable R|/x|"]; - 161 [label="Function call: R|/x|.R|/A.foo|()"]; - 162 [label="Exit block"]; + 159 [label="Access variable R|/x|"]; + 160 [label="Function call: R|/x|.R|/A.foo|()"]; + 161 [label="Exit block"]; } - 135 [label="Exit function test_5" style="filled" fillcolor=red]; + 162 [label="Exit function test_5" style="filled" fillcolor=red]; } - 134 -> {136}; + 134 -> {135}; + 135 -> {136}; 136 -> {137}; - 137 -> {139}; - 138 -> {160}; + 137 -> {138}; + 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {143}; - 142 -> {155}; - 143 -> {144}; + 141 -> {142}; + 142 -> {144 143}; + 143 -> {152}; 144 -> {145}; - 145 -> {146 154}; + 145 -> {146}; 146 -> {147}; 147 -> {148}; - 148 -> {149}; - 149 -> {150}; - 150 -> {138}; + 148 -> {158}; + 148 -> {149} [style=dotted]; + 149 -> {150} [style=dotted]; 150 -> {151} [style=dotted]; 151 -> {152} [style=dotted]; - 152 -> {153} [style=dotted]; - 153 -> {142} [style=dotted]; - 154 -> {142}; + 152 -> {153}; + 153 -> {154}; + 154 -> {155}; 155 -> {156}; 156 -> {157}; - 157 -> {158}; + 157 -> {158} [style=dotted]; + 157 -> {137} [color=green style=dashed]; 158 -> {159}; - 159 -> {138} [style=dotted]; - 159 -> {139} [color=green style=dashed]; + 159 -> {160}; 160 -> {161}; 161 -> {162}; - 162 -> {135}; subgraph cluster_50 { color=red 163 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_51 { color=blue - 165 [label="Enter block"]; + 164 [label="Enter block"]; subgraph cluster_52 { color=blue - 166 [label="Enter do-while loop"]; + 165 [label="Enter do-while loop"]; subgraph cluster_53 { color=blue - 168 [label="Enter loop block"]; + 166 [label="Enter loop block"]; subgraph cluster_54 { color=blue - 169 [label="Enter block"]; - 170 [label="Access variable R|/x|"]; - 171 [label="Type operator: (R|/x| as R|A|)"]; + 167 [label="Enter block"]; + 168 [label="Access variable R|/x|"]; + 169 [label="Type operator: (R|/x| as R|A|)"]; subgraph cluster_55 { color=blue - 172 [label="Enter when"]; + 170 [label="Enter when"]; subgraph cluster_56 { color=blue - 174 [label="Enter when branch condition "]; - 175 [label="Access variable R|/b|"]; - 176 [label="Exit when branch condition"]; + 171 [label="Enter when branch condition "]; + 172 [label="Access variable R|/b|"]; + 173 [label="Exit when branch condition"]; } - 183 [label="Synthetic else branch"]; - 177 [label="Enter when branch result"]; + 174 [label="Synthetic else branch"]; + 175 [label="Enter when branch result"]; subgraph cluster_57 { color=blue - 178 [label="Enter block"]; - 179 [label="Jump: break@@@[Boolean(true)] "]; - 180 [label="Stub" style="filled" fillcolor=gray]; - 181 [label="Exit block" style="filled" fillcolor=gray]; + 176 [label="Enter block"]; + 177 [label="Jump: break@@@[Boolean(true)] "]; + 178 [label="Stub" style="filled" fillcolor=gray]; + 179 [label="Exit block" style="filled" fillcolor=gray]; } - 182 [label="Exit when branch result" style="filled" fillcolor=gray]; - 173 [label="Exit when"]; + 180 [label="Exit when branch result" style="filled" fillcolor=gray]; + 181 [label="Exit when"]; } - 184 [label="Exit block"]; + 182 [label="Exit block"]; } - 185 [label="Exit loop block"]; + 183 [label="Exit loop block"]; } subgraph cluster_58 { color=blue - 186 [label="Enter loop condition"]; - 187 [label="Const: Boolean(true)"]; - 188 [label="Exit loop condition"]; + 184 [label="Enter loop condition"]; + 185 [label="Const: Boolean(true)"]; + 186 [label="Exit loop condition"]; } - 167 [label="Exit do-whileloop"]; + 187 [label="Exit do-whileloop"]; } - 189 [label="Access variable R|/x|"]; - 190 [label="Function call: R|/x|.R|/A.foo|()"]; - 191 [label="Exit block"]; + 188 [label="Access variable R|/x|"]; + 189 [label="Function call: R|/x|.R|/A.foo|()"]; + 190 [label="Exit block"]; } - 164 [label="Exit function test_6" style="filled" fillcolor=red]; + 191 [label="Exit function test_6" style="filled" fillcolor=red]; } - 163 -> {165}; + 163 -> {164}; + 164 -> {165}; 165 -> {166}; - 166 -> {168}; - 167 -> {189}; + 166 -> {167}; + 167 -> {168}; 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; - 172 -> {174}; - 173 -> {184}; - 174 -> {175}; + 172 -> {173}; + 173 -> {175 174}; + 174 -> {181}; 175 -> {176}; - 176 -> {177 183}; - 177 -> {178}; - 178 -> {179}; - 179 -> {167}; + 176 -> {177}; + 177 -> {187}; + 177 -> {178} [style=dotted]; + 178 -> {179} [style=dotted]; 179 -> {180} [style=dotted]; 180 -> {181} [style=dotted]; - 181 -> {182} [style=dotted]; - 182 -> {173} [style=dotted]; - 183 -> {173}; + 181 -> {182}; + 182 -> {183}; + 183 -> {184}; 184 -> {185}; 185 -> {186}; - 186 -> {187}; + 186 -> {187} [style=dotted]; + 186 -> {166} [color=green style=dashed]; 187 -> {188}; - 188 -> {167} [style=dotted]; - 188 -> {168} [color=green style=dashed]; + 188 -> {189}; 189 -> {190}; 190 -> {191}; - 191 -> {164}; subgraph cluster_59 { color=red 192 [label="Enter function test_7" style="filled" fillcolor=red]; subgraph cluster_60 { color=blue - 194 [label="Enter block"]; + 193 [label="Enter block"]; subgraph cluster_61 { color=blue - 195 [label="Enter do-while loop"]; + 194 [label="Enter do-while loop"]; subgraph cluster_62 { color=blue - 197 [label="Enter loop block"]; + 195 [label="Enter loop block"]; subgraph cluster_63 { color=blue - 198 [label="Enter block"]; - 199 [label="Access variable R|/x|"]; - 200 [label="Type operator: (R|/x| as R|A|)"]; - 201 [label="Exit block"]; + 196 [label="Enter block"]; + 197 [label="Access variable R|/x|"]; + 198 [label="Type operator: (R|/x| as R|A|)"]; + 199 [label="Exit block"]; } - 202 [label="Exit loop block"]; + 200 [label="Exit loop block"]; } subgraph cluster_64 { color=blue - 203 [label="Enter loop condition"]; - 204 [label="Const: Boolean(true)"]; - 205 [label="Exit loop condition"]; + 201 [label="Enter loop condition"]; + 202 [label="Const: Boolean(true)"]; + 203 [label="Exit loop condition"]; } - 196 [label="Exit do-whileloop" style="filled" fillcolor=gray]; + 204 [label="Exit do-whileloop" style="filled" fillcolor=gray]; } - 206 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 207 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=gray]; - 208 [label="Exit block" style="filled" fillcolor=gray]; + 205 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 206 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=gray]; + 207 [label="Exit block" style="filled" fillcolor=gray]; } - 193 [label="Exit function test_7" style="filled" fillcolor=red style="filled" fillcolor=gray]; + 208 [label="Exit function test_7" style="filled" fillcolor=red style="filled" fillcolor=gray]; } - 192 -> {194}; + 192 -> {193}; + 193 -> {194}; 194 -> {195}; - 195 -> {197}; - 196 -> {206} [style=dotted]; + 195 -> {196}; + 196 -> {197}; 197 -> {198}; 198 -> {199}; 199 -> {200}; 200 -> {201}; 201 -> {202}; 202 -> {203}; - 203 -> {204}; - 204 -> {205}; - 205 -> {196} [style=dotted]; - 205 -> {197} [color=green style=dashed]; + 203 -> {204} [style=dotted]; + 203 -> {195} [color=green style=dashed]; + 204 -> {205} [style=dotted]; + 205 -> {206} [style=dotted]; 206 -> {207} [style=dotted]; 207 -> {208} [style=dotted]; - 208 -> {193} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot index 16a6252bd9b..8e474e97a09 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot @@ -12,10 +12,10 @@ digraph multipleCasts_kt { subgraph cluster_1 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 2 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red @@ -26,55 +26,56 @@ digraph multipleCasts_kt { subgraph cluster_3 { color=red - 7 [label="Enter class B" style="filled" fillcolor=red]; - 6 [label="Exit class B" style="filled" fillcolor=red]; + 6 [label="Enter class B" style="filled" fillcolor=red]; + 7 [label="Exit class B" style="filled" fillcolor=red]; } - 7 -> {6} [color=green]; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red 8 [label="Enter function getAny" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Const: Null(null)"]; - 12 [label="Jump: ^getAny Null(null)"]; - 13 [label="Stub" style="filled" fillcolor=gray]; - 14 [label="Exit block" style="filled" fillcolor=gray]; + 9 [label="Enter block"]; + 10 [label="Const: Null(null)"]; + 11 [label="Jump: ^getAny Null(null)"]; + 12 [label="Stub" style="filled" fillcolor=gray]; + 13 [label="Exit block" style="filled" fillcolor=gray]; } - 9 [label="Exit function getAny" style="filled" fillcolor=red]; + 14 [label="Exit function getAny" style="filled" fillcolor=red]; } - 8 -> {10}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; - 11 -> {12}; - 12 -> {9}; + 11 -> {14}; + 11 -> {12} [style=dotted]; 12 -> {13} [style=dotted]; 13 -> {14} [style=dotted]; - 14 -> {9} [style=dotted]; subgraph cluster_6 { color=red 15 [label="Enter function test_0" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 17 [label="Enter block"]; - 18 [label="Function call: R|/getAny|()"]; - 19 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 20 [label="Function call: R|/getAny|()"]; - 21 [label="Variable declaration: lval b: R|kotlin/Any?|"]; - 22 [label="Access variable R|/a|"]; - 23 [label="Type operator: (R|/a| as R|A|)"]; - 24 [label="Access variable R|/a|"]; - 25 [label="Function call: R|/a|.R|/A.foo|()"]; - 26 [label="Access variable R|/b|"]; - 27 [label="Type operator: (R|/b| as R|B|)"]; - 28 [label="Access variable R|/b|"]; - 29 [label="Function call: R|/b|.R|/B.foo|()"]; - 30 [label="Exit block"]; + 16 [label="Enter block"]; + 17 [label="Function call: R|/getAny|()"]; + 18 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + 19 [label="Function call: R|/getAny|()"]; + 20 [label="Variable declaration: lval b: R|kotlin/Any?|"]; + 21 [label="Access variable R|/a|"]; + 22 [label="Type operator: (R|/a| as R|A|)"]; + 23 [label="Access variable R|/a|"]; + 24 [label="Function call: R|/a|.R|/A.foo|()"]; + 25 [label="Access variable R|/b|"]; + 26 [label="Type operator: (R|/b| as R|B|)"]; + 27 [label="Access variable R|/b|"]; + 28 [label="Function call: R|/b|.R|/B.foo|()"]; + 29 [label="Exit block"]; } - 16 [label="Exit function test_0" style="filled" fillcolor=red]; + 30 [label="Exit function test_0" style="filled" fillcolor=red]; } - 15 -> {17}; + 15 -> {16}; + 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; @@ -88,73 +89,73 @@ digraph multipleCasts_kt { 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {16}; subgraph cluster_8 { color=red 31 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 33 [label="Enter block"]; - 34 [label="Function call: R|/getAny|()"]; - 35 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 36 [label="Function call: R|/getAny|()"]; - 37 [label="Variable declaration: lval b: R|kotlin/Any?|"]; + 32 [label="Enter block"]; + 33 [label="Function call: R|/getAny|()"]; + 34 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + 35 [label="Function call: R|/getAny|()"]; + 36 [label="Variable declaration: lval b: R|kotlin/Any?|"]; subgraph cluster_10 { color=blue - 38 [label="Enter when"]; + 37 [label="Enter when"]; subgraph cluster_11 { color=blue - 40 [label="Enter when branch condition "]; + 38 [label="Enter when branch condition "]; subgraph cluster_12 { color=blue - 42 [label="Enter &&"]; - 43 [label="Access variable R|/a|"]; - 44 [label="Type operator: (R|/a| is R|A|)"]; - 45 [label="Exit left part of &&"]; - 46 [label="Enter right part of &&"]; - 47 [label="Access variable R|/b|"]; - 48 [label="Type operator: (R|/b| is R|B|)"]; - 41 [label="Exit &&"]; + 39 [label="Enter &&"]; + 40 [label="Access variable R|/a|"]; + 41 [label="Type operator: (R|/a| is R|A|)"]; + 42 [label="Exit left part of &&"]; + 43 [label="Enter right part of &&"]; + 44 [label="Access variable R|/b|"]; + 45 [label="Type operator: (R|/b| is R|B|)"]; + 46 [label="Exit &&"]; } - 49 [label="Exit when branch condition"]; + 47 [label="Exit when branch condition"]; } - 58 [label="Synthetic else branch"]; - 50 [label="Enter when branch result"]; + 48 [label="Synthetic else branch"]; + 49 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 51 [label="Enter block"]; - 52 [label="Access variable R|/a|"]; - 53 [label="Function call: R|/a|.R|/A.foo|()"]; - 54 [label="Access variable R|/b|"]; - 55 [label="Function call: R|/b|.R|/B.foo|()"]; - 56 [label="Exit block"]; + 50 [label="Enter block"]; + 51 [label="Access variable R|/a|"]; + 52 [label="Function call: R|/a|.R|/A.foo|()"]; + 53 [label="Access variable R|/b|"]; + 54 [label="Function call: R|/b|.R|/B.foo|()"]; + 55 [label="Exit block"]; } - 57 [label="Exit when branch result"]; - 39 [label="Exit when"]; + 56 [label="Exit when branch result"]; + 57 [label="Exit when"]; } - 59 [label="Exit block"]; + 58 [label="Exit block"]; } - 32 [label="Exit function test_1" style="filled" fillcolor=red]; + 59 [label="Exit function test_1" style="filled" fillcolor=red]; } - 31 -> {33}; + 31 -> {32}; + 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {40}; - 39 -> {59}; - 40 -> {42}; - 41 -> {49}; - 42 -> {43}; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; + 41 -> {42}; + 42 -> {46 43}; 43 -> {44}; 44 -> {45}; - 45 -> {41 46}; + 45 -> {46}; 46 -> {47}; - 47 -> {48}; - 48 -> {41}; - 49 -> {50 58}; + 47 -> {49 48}; + 48 -> {57}; + 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; @@ -162,8 +163,7 @@ digraph multipleCasts_kt { 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {39}; - 58 -> {39}; - 59 -> {32}; + 57 -> {58}; + 58 -> {59}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot index fa9a3ab58a7..31f6c2749b4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot @@ -19,10 +19,10 @@ digraph nullability_kt { subgraph cluster_2 { color=red - 5 [label="Enter class A" style="filled" fillcolor=red]; - 4 [label="Exit class A" style="filled" fillcolor=red]; + 4 [label="Enter class A" style="filled" fillcolor=red]; + 5 [label="Exit class A" style="filled" fillcolor=red]; } - 5 -> {4} [color=green]; + 4 -> {5} [color=green]; subgraph cluster_3 { color=red @@ -40,10 +40,10 @@ digraph nullability_kt { subgraph cluster_5 { color=red - 11 [label="Enter class MyData" style="filled" fillcolor=red]; - 10 [label="Exit class MyData" style="filled" fillcolor=red]; + 10 [label="Enter class MyData" style="filled" fillcolor=red]; + 11 [label="Exit class MyData" style="filled" fillcolor=red]; } - 11 -> {10} [color=green]; + 10 -> {11} [color=green]; subgraph cluster_6 { color=red @@ -61,19 +61,19 @@ digraph nullability_kt { subgraph cluster_8 { color=red - 17 [label="Enter class Q" style="filled" fillcolor=red]; - 16 [label="Exit class Q" style="filled" fillcolor=red]; + 16 [label="Enter class Q" style="filled" fillcolor=red]; + 17 [label="Exit class Q" style="filled" fillcolor=red]; } - 17 -> {16} [color=green]; + 16 -> {17} [color=green]; subgraph cluster_9 { color=red 18 [label="Enter function " style="filled" fillcolor=red]; - 20 [label="Delegated constructor call: super()"]; - 19 [label="Exit function " style="filled" fillcolor=red]; + 19 [label="Delegated constructor call: super()"]; + 20 [label="Exit function " style="filled" fillcolor=red]; } - 18 -> {20}; - 20 -> {19}; + 18 -> {19}; + 19 -> {20}; subgraph cluster_10 { color=red @@ -87,46 +87,46 @@ digraph nullability_kt { 26 [label="Enter function fdata" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 28 [label="Enter block"]; - 29 [label="Const: Null(null)"]; - 30 [label="Jump: ^fdata Null(null)"]; - 31 [label="Stub" style="filled" fillcolor=gray]; - 32 [label="Exit block" style="filled" fillcolor=gray]; + 27 [label="Enter block"]; + 28 [label="Const: Null(null)"]; + 29 [label="Jump: ^fdata Null(null)"]; + 30 [label="Stub" style="filled" fillcolor=gray]; + 31 [label="Exit block" style="filled" fillcolor=gray]; } - 27 [label="Exit function fdata" style="filled" fillcolor=red]; + 32 [label="Exit function fdata" style="filled" fillcolor=red]; } - 26 -> {28}; + 26 -> {27}; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; - 30 -> {27}; + 29 -> {32}; + 29 -> {30} [style=dotted]; 30 -> {31} [style=dotted]; 31 -> {32} [style=dotted]; - 32 -> {27} [style=dotted]; subgraph cluster_13 { color=red - 34 [label="Enter class QImpl" style="filled" fillcolor=red]; + 33 [label="Enter class QImpl" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue 23 [label="Enter property" style="filled" fillcolor=red]; - 25 [label="Access variable R|/data|"]; - 24 [label="Exit property" style="filled" fillcolor=red]; + 24 [label="Access variable R|/data|"]; + 25 [label="Exit property" style="filled" fillcolor=red]; } - 33 [label="Exit class QImpl" style="filled" fillcolor=red]; + 34 [label="Exit class QImpl" style="filled" fillcolor=red]; } - 34 -> {23} [color=green]; - 23 -> {25}; - 24 -> {33} [color=green]; - 25 -> {24}; + 33 -> {23} [color=green]; + 23 -> {24}; + 24 -> {25}; + 25 -> {34} [color=green]; subgraph cluster_15 { color=red 35 [label="Enter function " style="filled" fillcolor=red]; - 37 [label="Delegated constructor call: super()"]; - 36 [label="Exit function " style="filled" fillcolor=red]; + 36 [label="Delegated constructor call: super()"]; + 37 [label="Exit function " style="filled" fillcolor=red]; } - 35 -> {37}; - 37 -> {36}; + 35 -> {36}; + 36 -> {37}; subgraph cluster_16 { color=red @@ -147,159 +147,160 @@ digraph nullability_kt { 45 [label="Enter function fdata" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 47 [label="Enter block"]; - 48 [label="Const: Null(null)"]; - 49 [label="Jump: ^fdata Null(null)"]; - 50 [label="Stub" style="filled" fillcolor=gray]; - 51 [label="Exit block" style="filled" fillcolor=gray]; + 46 [label="Enter block"]; + 47 [label="Const: Null(null)"]; + 48 [label="Jump: ^fdata Null(null)"]; + 49 [label="Stub" style="filled" fillcolor=gray]; + 50 [label="Exit block" style="filled" fillcolor=gray]; } - 46 [label="Exit function fdata" style="filled" fillcolor=red]; + 51 [label="Exit function fdata" style="filled" fillcolor=red]; } - 45 -> {47}; + 45 -> {46}; + 46 -> {47}; 47 -> {48}; - 48 -> {49}; - 49 -> {46}; + 48 -> {51}; + 48 -> {49} [style=dotted]; 49 -> {50} [style=dotted]; 50 -> {51} [style=dotted]; - 51 -> {46} [style=dotted]; subgraph cluster_20 { color=red - 53 [label="Enter class QImplMutable" style="filled" fillcolor=red]; + 52 [label="Enter class QImplMutable" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue 42 [label="Enter property" style="filled" fillcolor=red]; - 44 [label="Access variable R|/data|"]; - 43 [label="Exit property" style="filled" fillcolor=red]; + 43 [label="Access variable R|/data|"]; + 44 [label="Exit property" style="filled" fillcolor=red]; } - 52 [label="Exit class QImplMutable" style="filled" fillcolor=red]; + 53 [label="Exit class QImplMutable" style="filled" fillcolor=red]; } - 53 -> {42} [color=green]; - 42 -> {44}; - 43 -> {52} [color=green]; - 44 -> {43}; + 52 -> {42} [color=green]; + 42 -> {43}; + 43 -> {44}; + 44 -> {53} [color=green]; subgraph cluster_22 { color=red 54 [label="Enter function " style="filled" fillcolor=red]; - 56 [label="Delegated constructor call: super()"]; - 55 [label="Exit function " style="filled" fillcolor=red]; + 55 [label="Delegated constructor call: super()"]; + 56 [label="Exit function " style="filled" fillcolor=red]; } - 54 -> {56}; - 56 -> {55}; + 54 -> {55}; + 55 -> {56}; subgraph cluster_23 { color=red 57 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_24 { color=blue - 59 [label="Enter block"]; - 60 [label="Const: Null(null)"]; - 61 [label="Jump: ^ Null(null)"]; - 62 [label="Stub" style="filled" fillcolor=gray]; - 63 [label="Exit block" style="filled" fillcolor=gray]; + 58 [label="Enter block"]; + 59 [label="Const: Null(null)"]; + 60 [label="Jump: ^ Null(null)"]; + 61 [label="Stub" style="filled" fillcolor=gray]; + 62 [label="Exit block" style="filled" fillcolor=gray]; } - 58 [label="Exit function getter" style="filled" fillcolor=red]; + 63 [label="Exit function getter" style="filled" fillcolor=red]; } - 57 -> {59}; + 57 -> {58}; + 58 -> {59}; 59 -> {60}; - 60 -> {61}; - 61 -> {58}; + 60 -> {63}; + 60 -> {61} [style=dotted]; 61 -> {62} [style=dotted]; 62 -> {63} [style=dotted]; - 63 -> {58} [style=dotted]; subgraph cluster_25 { color=red 64 [label="Enter function fdata" style="filled" fillcolor=red]; subgraph cluster_26 { color=blue - 66 [label="Enter block"]; - 67 [label="Const: Null(null)"]; - 68 [label="Jump: ^fdata Null(null)"]; - 69 [label="Stub" style="filled" fillcolor=gray]; - 70 [label="Exit block" style="filled" fillcolor=gray]; + 65 [label="Enter block"]; + 66 [label="Const: Null(null)"]; + 67 [label="Jump: ^fdata Null(null)"]; + 68 [label="Stub" style="filled" fillcolor=gray]; + 69 [label="Exit block" style="filled" fillcolor=gray]; } - 65 [label="Exit function fdata" style="filled" fillcolor=red]; + 70 [label="Exit function fdata" style="filled" fillcolor=red]; } - 64 -> {66}; + 64 -> {65}; + 65 -> {66}; 66 -> {67}; - 67 -> {68}; - 68 -> {65}; + 67 -> {70}; + 67 -> {68} [style=dotted]; 68 -> {69} [style=dotted]; 69 -> {70} [style=dotted]; - 70 -> {65} [style=dotted]; subgraph cluster_27 { color=red - 72 [label="Enter class QImplWithCustomGetter" style="filled" fillcolor=red]; - 71 [label="Exit class QImplWithCustomGetter" style="filled" fillcolor=red]; + 71 [label="Enter class QImplWithCustomGetter" style="filled" fillcolor=red]; + 72 [label="Exit class QImplWithCustomGetter" style="filled" fillcolor=red]; } - 72 -> {71} [color=green]; + 71 -> {72} [color=green]; subgraph cluster_28 { color=red 73 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_29 { color=blue - 75 [label="Enter block"]; + 74 [label="Enter block"]; subgraph cluster_30 { color=blue - 76 [label="Enter when"]; + 75 [label="Enter when"]; subgraph cluster_31 { color=blue - 78 [label="Enter when branch condition "]; - 79 [label="Access variable R|/x|"]; - 80 [label="Const: Null(null)"]; - 81 [label="Operator !="]; - 82 [label="Exit when branch condition"]; + 76 [label="Enter when branch condition "]; + 77 [label="Access variable R|/x|"]; + 78 [label="Const: Null(null)"]; + 79 [label="Operator !="]; + 80 [label="Exit when branch condition"]; } subgraph cluster_32 { color=blue - 89 [label="Enter when branch condition else"]; - 90 [label="Exit when branch condition"]; + 81 [label="Enter when branch condition else"]; + 82 [label="Exit when branch condition"]; } - 91 [label="Enter when branch result"]; - subgraph cluster_33 { - color=blue - 92 [label="Enter block"]; - 93 [label="Access variable R|/x|"]; - 94 [label="Function call: R|/x|.#()"]; - 95 [label="Exit block"]; - } - 96 [label="Exit when branch result"]; 83 [label="Enter when branch result"]; - subgraph cluster_34 { + subgraph cluster_33 { color=blue 84 [label="Enter block"]; 85 [label="Access variable R|/x|"]; - 86 [label="Function call: R|/x|.R|/A.foo|()"]; + 86 [label="Function call: R|/x|.#()"]; 87 [label="Exit block"]; } 88 [label="Exit when branch result"]; - 77 [label="Exit when"]; + 89 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 90 [label="Enter block"]; + 91 [label="Access variable R|/x|"]; + 92 [label="Function call: R|/x|.R|/A.foo|()"]; + 93 [label="Exit block"]; + } + 94 [label="Exit when branch result"]; + 95 [label="Exit when"]; } - 97 [label="Access variable R|/x|"]; - 98 [label="Function call: R|/x|.#()"]; - 99 [label="Exit block"]; + 96 [label="Access variable R|/x|"]; + 97 [label="Function call: R|/x|.#()"]; + 98 [label="Exit block"]; } - 74 [label="Exit function test_1" style="filled" fillcolor=red]; + 99 [label="Exit function test_1" style="filled" fillcolor=red]; } - 73 -> {75}; + 73 -> {74}; + 74 -> {75}; 75 -> {76}; - 76 -> {78}; - 77 -> {97}; + 76 -> {77}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {81}; + 80 -> {89 81}; 81 -> {82}; - 82 -> {83 89}; + 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {77}; + 88 -> {95}; 89 -> {90}; 90 -> {91}; 91 -> {92}; @@ -307,74 +308,74 @@ digraph nullability_kt { 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {77}; + 96 -> {97}; 97 -> {98}; 98 -> {99}; - 99 -> {74}; subgraph cluster_35 { color=red 100 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_36 { color=blue - 102 [label="Enter block"]; + 101 [label="Enter block"]; subgraph cluster_37 { color=blue - 103 [label="Enter when"]; + 102 [label="Enter when"]; subgraph cluster_38 { color=blue - 105 [label="Enter when branch condition "]; - 106 [label="Access variable R|/x|"]; - 107 [label="Const: Null(null)"]; - 108 [label="Operator =="]; - 109 [label="Exit when branch condition"]; + 103 [label="Enter when branch condition "]; + 104 [label="Access variable R|/x|"]; + 105 [label="Const: Null(null)"]; + 106 [label="Operator =="]; + 107 [label="Exit when branch condition"]; } subgraph cluster_39 { color=blue - 116 [label="Enter when branch condition else"]; - 117 [label="Exit when branch condition"]; + 108 [label="Enter when branch condition else"]; + 109 [label="Exit when branch condition"]; } - 118 [label="Enter when branch result"]; - subgraph cluster_40 { - color=blue - 119 [label="Enter block"]; - 120 [label="Access variable R|/x|"]; - 121 [label="Function call: R|/x|.R|/A.foo|()"]; - 122 [label="Exit block"]; - } - 123 [label="Exit when branch result"]; 110 [label="Enter when branch result"]; - subgraph cluster_41 { + subgraph cluster_40 { color=blue 111 [label="Enter block"]; 112 [label="Access variable R|/x|"]; - 113 [label="Function call: R|/x|.#()"]; + 113 [label="Function call: R|/x|.R|/A.foo|()"]; 114 [label="Exit block"]; } 115 [label="Exit when branch result"]; - 104 [label="Exit when"]; + 116 [label="Enter when branch result"]; + subgraph cluster_41 { + color=blue + 117 [label="Enter block"]; + 118 [label="Access variable R|/x|"]; + 119 [label="Function call: R|/x|.#()"]; + 120 [label="Exit block"]; + } + 121 [label="Exit when branch result"]; + 122 [label="Exit when"]; } - 124 [label="Access variable R|/x|"]; - 125 [label="Function call: R|/x|.#()"]; - 126 [label="Exit block"]; + 123 [label="Access variable R|/x|"]; + 124 [label="Function call: R|/x|.#()"]; + 125 [label="Exit block"]; } - 101 [label="Exit function test_2" style="filled" fillcolor=red]; + 126 [label="Exit function test_2" style="filled" fillcolor=red]; } - 100 -> {102}; + 100 -> {101}; + 101 -> {102}; 102 -> {103}; - 103 -> {105}; - 104 -> {124}; + 103 -> {104}; + 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {108}; + 107 -> {116 108}; 108 -> {109}; - 109 -> {110 116}; + 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; - 115 -> {104}; + 115 -> {122}; 116 -> {117}; 117 -> {118}; 118 -> {119}; @@ -382,216 +383,216 @@ digraph nullability_kt { 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {104}; + 123 -> {124}; 124 -> {125}; 125 -> {126}; - 126 -> {101}; subgraph cluster_42 { color=red 127 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_43 { color=blue - 129 [label="Enter block"]; + 128 [label="Enter block"]; subgraph cluster_44 { color=blue - 130 [label="Enter when"]; - 132 [label="Access variable R|/x|"]; - 133 [label="Variable declaration: lval : R|A?|"]; + 129 [label="Enter when"]; + 130 [label="Access variable R|/x|"]; + 131 [label="Variable declaration: lval : R|A?|"]; subgraph cluster_45 { color=blue - 134 [label="Enter when branch condition "]; - 135 [label="Const: Null(null)"]; - 136 [label="Operator =="]; - 137 [label="Exit when branch condition"]; + 132 [label="Enter when branch condition "]; + 133 [label="Const: Null(null)"]; + 134 [label="Operator =="]; + 135 [label="Exit when branch condition"]; } subgraph cluster_46 { color=blue - 144 [label="Enter when branch condition else"]; - 145 [label="Exit when branch condition"]; + 136 [label="Enter when branch condition else"]; + 137 [label="Exit when branch condition"]; } - 146 [label="Enter when branch result"]; + 138 [label="Enter when branch result"]; subgraph cluster_47 { color=blue - 147 [label="Enter block"]; - 148 [label="Access variable R|/|"]; - 149 [label="Exit block"]; + 139 [label="Enter block"]; + 140 [label="Access variable R|/|"]; + 141 [label="Exit block"]; } - 150 [label="Exit when branch result"]; - 138 [label="Enter when branch result"]; + 142 [label="Exit when branch result"]; + 143 [label="Enter when branch result"]; subgraph cluster_48 { color=blue - 139 [label="Enter block"]; - 140 [label="Jump: ^test_3 Unit"]; - 141 [label="Stub" style="filled" fillcolor=gray]; - 142 [label="Exit block" style="filled" fillcolor=gray]; + 144 [label="Enter block"]; + 145 [label="Jump: ^test_3 Unit"]; + 146 [label="Stub" style="filled" fillcolor=gray]; + 147 [label="Exit block" style="filled" fillcolor=gray]; } - 143 [label="Exit when branch result" style="filled" fillcolor=gray]; - 131 [label="Exit when"]; + 148 [label="Exit when branch result" style="filled" fillcolor=gray]; + 149 [label="Exit when"]; } - 151 [label="Access variable R|/x|"]; - 152 [label="Function call: R|/x|.R|/A.foo|()"]; - 153 [label="Exit block"]; + 150 [label="Access variable R|/x|"]; + 151 [label="Function call: R|/x|.R|/A.foo|()"]; + 152 [label="Exit block"]; } - 128 [label="Exit function test_3" style="filled" fillcolor=red]; + 153 [label="Exit function test_3" style="filled" fillcolor=red]; } - 127 -> {129}; + 127 -> {128}; + 128 -> {129}; 129 -> {130}; - 130 -> {132}; - 131 -> {151}; + 130 -> {131}; + 131 -> {132}; 132 -> {133}; 133 -> {134}; 134 -> {135}; - 135 -> {136}; + 135 -> {143 136}; 136 -> {137}; - 137 -> {138 144}; + 137 -> {138}; 138 -> {139}; 139 -> {140}; - 140 -> {128}; - 140 -> {141} [style=dotted]; - 141 -> {142} [style=dotted]; - 142 -> {143} [style=dotted]; - 143 -> {131} [style=dotted]; + 140 -> {141}; + 141 -> {142}; + 142 -> {149}; + 143 -> {144}; 144 -> {145}; - 145 -> {146}; - 146 -> {147}; - 147 -> {148}; - 148 -> {149}; + 145 -> {153}; + 145 -> {146} [style=dotted]; + 146 -> {147} [style=dotted]; + 147 -> {148} [style=dotted]; + 148 -> {149} [style=dotted]; 149 -> {150}; - 150 -> {131}; + 150 -> {151}; 151 -> {152}; 152 -> {153}; - 153 -> {128}; subgraph cluster_49 { color=red 154 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_50 { color=blue - 156 [label="Enter block"]; + 155 [label="Enter block"]; subgraph cluster_51 { color=blue - 157 [label="Enter when"]; + 156 [label="Enter when"]; subgraph cluster_52 { color=blue - 159 [label="Enter when branch condition "]; - 160 [label="Access variable R|/x|"]; - 161 [label="Enter safe call"]; - 163 [label="Function call: $subj$.R|/A.getA|()"]; - 162 [label="Exit safe call"]; - 164 [label="Const: Null(null)"]; - 165 [label="Operator =="]; - 166 [label="Exit when branch condition"]; + 157 [label="Enter when branch condition "]; + 158 [label="Access variable R|/x|"]; + 159 [label="Enter safe call"]; + 160 [label="Function call: $subj$.R|/A.getA|()"]; + 161 [label="Exit safe call"]; + 162 [label="Const: Null(null)"]; + 163 [label="Operator =="]; + 164 [label="Exit when branch condition"]; } - 173 [label="Synthetic else branch"]; - 167 [label="Enter when branch result"]; + 165 [label="Synthetic else branch"]; + 166 [label="Enter when branch result"]; subgraph cluster_53 { color=blue - 168 [label="Enter block"]; - 169 [label="Jump: ^test_4 Unit"]; - 170 [label="Stub" style="filled" fillcolor=gray]; - 171 [label="Exit block" style="filled" fillcolor=gray]; + 167 [label="Enter block"]; + 168 [label="Jump: ^test_4 Unit"]; + 169 [label="Stub" style="filled" fillcolor=gray]; + 170 [label="Exit block" style="filled" fillcolor=gray]; } - 172 [label="Exit when branch result" style="filled" fillcolor=gray]; - 158 [label="Exit when"]; + 171 [label="Exit when branch result" style="filled" fillcolor=gray]; + 172 [label="Exit when"]; } - 174 [label="Access variable R|/x|"]; - 175 [label="Function call: R|/x|.R|/A.foo|()"]; - 176 [label="Exit block"]; + 173 [label="Access variable R|/x|"]; + 174 [label="Function call: R|/x|.R|/A.foo|()"]; + 175 [label="Exit block"]; } - 155 [label="Exit function test_4" style="filled" fillcolor=red]; + 176 [label="Exit function test_4" style="filled" fillcolor=red]; } - 154 -> {156}; + 154 -> {155}; + 155 -> {156}; 156 -> {157}; - 157 -> {159}; - 158 -> {174}; + 157 -> {158}; + 158 -> {159 161}; 159 -> {160}; - 160 -> {161 162}; - 161 -> {163}; - 162 -> {164}; - 163 -> {162}; - 164 -> {165}; - 165 -> {166}; - 166 -> {167 173}; + 160 -> {161}; + 161 -> {162}; + 162 -> {163}; + 163 -> {164}; + 164 -> {166 165}; + 165 -> {172}; + 166 -> {167}; 167 -> {168}; - 168 -> {169}; - 169 -> {155}; + 168 -> {176}; + 168 -> {169} [style=dotted]; 169 -> {170} [style=dotted]; 170 -> {171} [style=dotted]; 171 -> {172} [style=dotted]; - 172 -> {158} [style=dotted]; - 173 -> {158}; + 172 -> {173}; + 173 -> {174}; 174 -> {175}; 175 -> {176}; - 176 -> {155}; subgraph cluster_54 { color=red 177 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_55 { color=blue - 179 [label="Enter block"]; + 178 [label="Enter block"]; subgraph cluster_56 { color=blue - 180 [label="Enter when"]; + 179 [label="Enter when"]; subgraph cluster_57 { color=blue - 182 [label="Enter when branch condition "]; - 183 [label="Access variable R|/q|"]; - 184 [label="Enter safe call"]; - 186 [label="Access variable R|/Q.data|"]; - 185 [label="Exit safe call"]; - 187 [label="Enter safe call"]; - 189 [label="Access variable R|/MyData.s|"]; - 188 [label="Exit safe call"]; - 190 [label="Enter safe call"]; - 192 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; - 191 [label="Exit safe call"]; - 193 [label="Const: Null(null)"]; - 194 [label="Operator !="]; - 195 [label="Exit when branch condition"]; + 180 [label="Enter when branch condition "]; + 181 [label="Access variable R|/q|"]; + 182 [label="Enter safe call"]; + 183 [label="Access variable R|/Q.data|"]; + 184 [label="Exit safe call"]; + 185 [label="Enter safe call"]; + 186 [label="Access variable R|/MyData.s|"]; + 187 [label="Exit safe call"]; + 188 [label="Enter safe call"]; + 189 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; + 190 [label="Exit safe call"]; + 191 [label="Const: Null(null)"]; + 192 [label="Operator !="]; + 193 [label="Exit when branch condition"]; } - 209 [label="Synthetic else branch"]; - 196 [label="Enter when branch result"]; + 194 [label="Synthetic else branch"]; + 195 [label="Enter when branch result"]; subgraph cluster_58 { color=blue - 197 [label="Enter block"]; - 198 [label="Access variable R|/q|"]; - 199 [label="Access variable R|/Q.data|"]; - 200 [label="Access variable R|/q|"]; - 201 [label="Access variable R|/Q.data|"]; - 202 [label="Access variable #"]; - 203 [label="Access variable R|/q|"]; - 204 [label="Access variable R|/Q.data|"]; - 205 [label="Access variable #"]; - 206 [label="Function call: R|/q|.R|/Q.data|.#.#()"]; - 207 [label="Exit block"]; + 196 [label="Enter block"]; + 197 [label="Access variable R|/q|"]; + 198 [label="Access variable R|/Q.data|"]; + 199 [label="Access variable R|/q|"]; + 200 [label="Access variable R|/Q.data|"]; + 201 [label="Access variable #"]; + 202 [label="Access variable R|/q|"]; + 203 [label="Access variable R|/Q.data|"]; + 204 [label="Access variable #"]; + 205 [label="Function call: R|/q|.R|/Q.data|.#.#()"]; + 206 [label="Exit block"]; } - 208 [label="Exit when branch result"]; - 181 [label="Exit when"]; + 207 [label="Exit when branch result"]; + 208 [label="Exit when"]; } - 210 [label="Exit block"]; + 209 [label="Exit block"]; } - 178 [label="Exit function test_5" style="filled" fillcolor=red]; + 210 [label="Exit function test_5" style="filled" fillcolor=red]; } - 177 -> {179}; + 177 -> {178}; + 178 -> {179}; 179 -> {180}; - 180 -> {182}; - 181 -> {210}; + 180 -> {181}; + 181 -> {182 184}; 182 -> {183}; - 183 -> {184 185}; - 184 -> {186}; - 185 -> {187 188}; - 186 -> {185}; - 187 -> {189}; - 188 -> {190 191}; - 189 -> {188}; - 190 -> {192}; - 191 -> {193}; - 192 -> {191}; - 193 -> {194}; - 194 -> {195}; - 195 -> {196 209}; + 183 -> {184}; + 184 -> {185 187}; + 185 -> {186}; + 186 -> {187}; + 187 -> {188 190}; + 188 -> {189}; + 189 -> {190}; + 190 -> {191}; + 191 -> {192}; + 192 -> {193}; + 193 -> {195 194}; + 194 -> {208}; + 195 -> {196}; 196 -> {197}; 197 -> {198}; 198 -> {199}; @@ -604,107 +605,107 @@ digraph nullability_kt { 205 -> {206}; 206 -> {207}; 207 -> {208}; - 208 -> {181}; - 209 -> {181}; - 210 -> {178}; + 208 -> {209}; + 209 -> {210}; subgraph cluster_59 { color=red 211 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_60 { color=blue - 213 [label="Enter block"]; + 212 [label="Enter block"]; subgraph cluster_61 { color=blue - 214 [label="Enter when"]; - 216 [label="Access variable R|/q|"]; - 217 [label="Enter safe call"]; - 219 [label="Access variable R|/Q.data|"]; - 218 [label="Exit safe call"]; - 220 [label="Enter safe call"]; - 222 [label="Access variable R|/MyData.s|"]; - 221 [label="Exit safe call"]; - 223 [label="Enter safe call"]; - 225 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; - 224 [label="Exit safe call"]; - 226 [label="Variable declaration: lval : R|kotlin/Int?|"]; + 213 [label="Enter when"]; + 214 [label="Access variable R|/q|"]; + 215 [label="Enter safe call"]; + 216 [label="Access variable R|/Q.data|"]; + 217 [label="Exit safe call"]; + 218 [label="Enter safe call"]; + 219 [label="Access variable R|/MyData.s|"]; + 220 [label="Exit safe call"]; + 221 [label="Enter safe call"]; + 222 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; + 223 [label="Exit safe call"]; + 224 [label="Variable declaration: lval : R|kotlin/Int?|"]; subgraph cluster_62 { color=blue - 227 [label="Enter when branch condition "]; - 228 [label="Const: Null(null)"]; - 229 [label="Operator =="]; - 230 [label="Exit when branch condition"]; + 225 [label="Enter when branch condition "]; + 226 [label="Const: Null(null)"]; + 227 [label="Operator =="]; + 228 [label="Exit when branch condition"]; } subgraph cluster_63 { color=blue - 237 [label="Enter when branch condition else"]; - 238 [label="Exit when branch condition"]; + 229 [label="Enter when branch condition else"]; + 230 [label="Exit when branch condition"]; } - 239 [label="Enter when branch result"]; + 231 [label="Enter when branch result"]; subgraph cluster_64 { color=blue - 240 [label="Enter block"]; - 241 [label="Access variable R|/|"]; - 242 [label="Exit block"]; + 232 [label="Enter block"]; + 233 [label="Access variable R|/|"]; + 234 [label="Exit block"]; } - 243 [label="Exit when branch result"]; - 231 [label="Enter when branch result"]; + 235 [label="Exit when branch result"]; + 236 [label="Enter when branch result"]; subgraph cluster_65 { color=blue - 232 [label="Enter block"]; - 233 [label="Jump: ^test_6 Unit"]; - 234 [label="Stub" style="filled" fillcolor=gray]; - 235 [label="Exit block" style="filled" fillcolor=gray]; + 237 [label="Enter block"]; + 238 [label="Jump: ^test_6 Unit"]; + 239 [label="Stub" style="filled" fillcolor=gray]; + 240 [label="Exit block" style="filled" fillcolor=gray]; } - 236 [label="Exit when branch result" style="filled" fillcolor=gray]; - 215 [label="Exit when"]; + 241 [label="Exit when branch result" style="filled" fillcolor=gray]; + 242 [label="Exit when"]; } - 244 [label="Access variable R|/q|"]; - 245 [label="Access variable R|/Q.data|"]; - 246 [label="Access variable R|/q|"]; - 247 [label="Access variable R|/Q.data|"]; - 248 [label="Access variable #"]; - 249 [label="Access variable R|/q|"]; - 250 [label="Access variable R|/Q.data|"]; - 251 [label="Access variable #"]; - 252 [label="Function call: R|/q|.R|/Q.data|.#.#()"]; - 253 [label="Exit block"]; + 243 [label="Access variable R|/q|"]; + 244 [label="Access variable R|/Q.data|"]; + 245 [label="Access variable R|/q|"]; + 246 [label="Access variable R|/Q.data|"]; + 247 [label="Access variable #"]; + 248 [label="Access variable R|/q|"]; + 249 [label="Access variable R|/Q.data|"]; + 250 [label="Access variable #"]; + 251 [label="Function call: R|/q|.R|/Q.data|.#.#()"]; + 252 [label="Exit block"]; } - 212 [label="Exit function test_6" style="filled" fillcolor=red]; + 253 [label="Exit function test_6" style="filled" fillcolor=red]; } - 211 -> {213}; + 211 -> {212}; + 212 -> {213}; 213 -> {214}; - 214 -> {216}; - 215 -> {244}; - 216 -> {217 218}; - 217 -> {219}; - 218 -> {220 221}; - 219 -> {218}; - 220 -> {222}; - 221 -> {223 224}; - 222 -> {221}; - 223 -> {225}; - 224 -> {226}; - 225 -> {224}; + 214 -> {215 217}; + 215 -> {216}; + 216 -> {217}; + 217 -> {218 220}; + 218 -> {219}; + 219 -> {220}; + 220 -> {221 223}; + 221 -> {222}; + 222 -> {223}; + 223 -> {224}; + 224 -> {225}; + 225 -> {226}; 226 -> {227}; 227 -> {228}; - 228 -> {229}; + 228 -> {236 229}; 229 -> {230}; - 230 -> {231 237}; + 230 -> {231}; 231 -> {232}; 232 -> {233}; - 233 -> {212}; - 233 -> {234} [style=dotted]; - 234 -> {235} [style=dotted]; - 235 -> {236} [style=dotted]; - 236 -> {215} [style=dotted]; + 233 -> {234}; + 234 -> {235}; + 235 -> {242}; + 236 -> {237}; 237 -> {238}; - 238 -> {239}; - 239 -> {240}; - 240 -> {241}; - 241 -> {242}; + 238 -> {253}; + 238 -> {239} [style=dotted]; + 239 -> {240} [style=dotted]; + 240 -> {241} [style=dotted]; + 241 -> {242} [style=dotted]; 242 -> {243}; - 243 -> {215}; + 243 -> {244}; 244 -> {245}; 245 -> {246}; 246 -> {247}; @@ -714,75 +715,75 @@ digraph nullability_kt { 250 -> {251}; 251 -> {252}; 252 -> {253}; - 253 -> {212}; subgraph cluster_66 { color=red 254 [label="Enter function test_7" style="filled" fillcolor=red]; subgraph cluster_67 { color=blue - 256 [label="Enter block"]; + 255 [label="Enter block"]; subgraph cluster_68 { color=blue - 257 [label="Enter when"]; + 256 [label="Enter when"]; subgraph cluster_69 { color=blue - 259 [label="Enter when branch condition "]; - 260 [label="Access variable R|/q|"]; - 261 [label="Enter safe call"]; - 263 [label="Function call: $subj$.R|/Q.fdata|()"]; - 262 [label="Exit safe call"]; - 264 [label="Enter safe call"]; - 266 [label="Function call: $subj$.R|/MyData.fs|()"]; - 265 [label="Exit safe call"]; - 267 [label="Enter safe call"]; - 269 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; - 268 [label="Exit safe call"]; - 270 [label="Const: Null(null)"]; - 271 [label="Operator !="]; - 272 [label="Exit when branch condition"]; + 257 [label="Enter when branch condition "]; + 258 [label="Access variable R|/q|"]; + 259 [label="Enter safe call"]; + 260 [label="Function call: $subj$.R|/Q.fdata|()"]; + 261 [label="Exit safe call"]; + 262 [label="Enter safe call"]; + 263 [label="Function call: $subj$.R|/MyData.fs|()"]; + 264 [label="Exit safe call"]; + 265 [label="Enter safe call"]; + 266 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; + 267 [label="Exit safe call"]; + 268 [label="Const: Null(null)"]; + 269 [label="Operator !="]; + 270 [label="Exit when branch condition"]; } - 286 [label="Synthetic else branch"]; - 273 [label="Enter when branch result"]; + 271 [label="Synthetic else branch"]; + 272 [label="Enter when branch result"]; subgraph cluster_70 { color=blue - 274 [label="Enter block"]; - 275 [label="Access variable R|/q|"]; - 276 [label="Function call: R|/q|.R|/Q.fdata|()"]; - 277 [label="Access variable R|/q|"]; - 278 [label="Function call: R|/q|.R|/Q.fdata|()"]; - 279 [label="Function call: R|/q|.R|/Q.fdata|().#()"]; - 280 [label="Access variable R|/q|"]; - 281 [label="Function call: R|/q|.R|/Q.fdata|()"]; - 282 [label="Function call: R|/q|.R|/Q.fdata|().#()"]; - 283 [label="Function call: R|/q|.R|/Q.fdata|().#().#()"]; - 284 [label="Exit block"]; + 273 [label="Enter block"]; + 274 [label="Access variable R|/q|"]; + 275 [label="Function call: R|/q|.R|/Q.fdata|()"]; + 276 [label="Access variable R|/q|"]; + 277 [label="Function call: R|/q|.R|/Q.fdata|()"]; + 278 [label="Function call: R|/q|.R|/Q.fdata|().#()"]; + 279 [label="Access variable R|/q|"]; + 280 [label="Function call: R|/q|.R|/Q.fdata|()"]; + 281 [label="Function call: R|/q|.R|/Q.fdata|().#()"]; + 282 [label="Function call: R|/q|.R|/Q.fdata|().#().#()"]; + 283 [label="Exit block"]; } - 285 [label="Exit when branch result"]; - 258 [label="Exit when"]; + 284 [label="Exit when branch result"]; + 285 [label="Exit when"]; } - 287 [label="Exit block"]; + 286 [label="Exit block"]; } - 255 [label="Exit function test_7" style="filled" fillcolor=red]; + 287 [label="Exit function test_7" style="filled" fillcolor=red]; } - 254 -> {256}; + 254 -> {255}; + 255 -> {256}; 256 -> {257}; - 257 -> {259}; - 258 -> {287}; + 257 -> {258}; + 258 -> {259 261}; 259 -> {260}; - 260 -> {261 262}; - 261 -> {263}; - 262 -> {264 265}; - 263 -> {262}; - 264 -> {266}; - 265 -> {267 268}; - 266 -> {265}; - 267 -> {269}; - 268 -> {270}; - 269 -> {268}; - 270 -> {271}; - 271 -> {272}; - 272 -> {273 286}; + 260 -> {261}; + 261 -> {262 264}; + 262 -> {263}; + 263 -> {264}; + 264 -> {265 267}; + 265 -> {266}; + 266 -> {267}; + 267 -> {268}; + 268 -> {269}; + 269 -> {270}; + 270 -> {272 271}; + 271 -> {285}; + 272 -> {273}; 273 -> {274}; 274 -> {275}; 275 -> {276}; @@ -795,522 +796,522 @@ digraph nullability_kt { 282 -> {283}; 283 -> {284}; 284 -> {285}; - 285 -> {258}; - 286 -> {258}; - 287 -> {255}; + 285 -> {286}; + 286 -> {287}; subgraph cluster_71 { color=red 288 [label="Enter function test_8" style="filled" fillcolor=red]; subgraph cluster_72 { color=blue - 290 [label="Enter block"]; + 289 [label="Enter block"]; subgraph cluster_73 { color=blue - 291 [label="Enter when"]; + 290 [label="Enter when"]; subgraph cluster_74 { color=blue - 293 [label="Enter when branch condition "]; - 294 [label="Access variable R|/b|"]; - 295 [label="Const: Boolean(true)"]; - 296 [label="Operator =="]; - 297 [label="Exit when branch condition"]; + 291 [label="Enter when branch condition "]; + 292 [label="Access variable R|/b|"]; + 293 [label="Const: Boolean(true)"]; + 294 [label="Operator =="]; + 295 [label="Exit when branch condition"]; } - 304 [label="Synthetic else branch"]; - 298 [label="Enter when branch result"]; + 296 [label="Synthetic else branch"]; + 297 [label="Enter when branch result"]; subgraph cluster_75 { color=blue - 299 [label="Enter block"]; - 300 [label="Access variable R|/b|"]; - 301 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; - 302 [label="Exit block"]; + 298 [label="Enter block"]; + 299 [label="Access variable R|/b|"]; + 300 [label="Function call: R|/b|.R|kotlin/Boolean.not|()"]; + 301 [label="Exit block"]; } - 303 [label="Exit when branch result"]; - 292 [label="Exit when"]; + 302 [label="Exit when branch result"]; + 303 [label="Exit when"]; } - 305 [label="Exit block"]; + 304 [label="Exit block"]; } - 289 [label="Exit function test_8" style="filled" fillcolor=red]; + 305 [label="Exit function test_8" style="filled" fillcolor=red]; } - 288 -> {290}; + 288 -> {289}; + 289 -> {290}; 290 -> {291}; - 291 -> {293}; - 292 -> {305}; + 291 -> {292}; + 292 -> {293}; 293 -> {294}; 294 -> {295}; - 295 -> {296}; - 296 -> {297}; - 297 -> {298 304}; + 295 -> {297 296}; + 296 -> {303}; + 297 -> {298}; 298 -> {299}; 299 -> {300}; 300 -> {301}; 301 -> {302}; 302 -> {303}; - 303 -> {292}; - 304 -> {292}; - 305 -> {289}; + 303 -> {304}; + 304 -> {305}; subgraph cluster_76 { color=red 306 [label="Enter function test_9" style="filled" fillcolor=red]; subgraph cluster_77 { color=blue - 308 [label="Enter block"]; + 307 [label="Enter block"]; subgraph cluster_78 { color=blue - 309 [label="Enter when"]; + 308 [label="Enter when"]; subgraph cluster_79 { color=blue - 311 [label="Enter when branch condition "]; - 312 [label="Access variable R|/a|"]; - 313 [label="Access variable R|/b|"]; - 314 [label="Operator =="]; - 315 [label="Exit when branch condition"]; + 309 [label="Enter when branch condition "]; + 310 [label="Access variable R|/a|"]; + 311 [label="Access variable R|/b|"]; + 312 [label="Operator =="]; + 313 [label="Exit when branch condition"]; } - 322 [label="Synthetic else branch"]; - 316 [label="Enter when branch result"]; + 314 [label="Synthetic else branch"]; + 315 [label="Enter when branch result"]; subgraph cluster_80 { color=blue - 317 [label="Enter block"]; - 318 [label="Access variable R|/b|"]; - 319 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; - 320 [label="Exit block"]; + 316 [label="Enter block"]; + 317 [label="Access variable R|/b|"]; + 318 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; + 319 [label="Exit block"]; } - 321 [label="Exit when branch result"]; - 310 [label="Exit when"]; + 320 [label="Exit when branch result"]; + 321 [label="Exit when"]; } - 323 [label="Access variable R|/b|"]; - 324 [label="Function call: R|/b|.#()"]; + 322 [label="Access variable R|/b|"]; + 323 [label="Function call: R|/b|.#()"]; subgraph cluster_81 { color=blue - 325 [label="Enter when"]; + 324 [label="Enter when"]; subgraph cluster_82 { color=blue - 327 [label="Enter when branch condition "]; - 328 [label="Access variable R|/a|"]; - 329 [label="Access variable R|/b|"]; - 330 [label="Operator ==="]; - 331 [label="Exit when branch condition"]; + 325 [label="Enter when branch condition "]; + 326 [label="Access variable R|/a|"]; + 327 [label="Access variable R|/b|"]; + 328 [label="Operator ==="]; + 329 [label="Exit when branch condition"]; } - 338 [label="Synthetic else branch"]; - 332 [label="Enter when branch result"]; + 330 [label="Synthetic else branch"]; + 331 [label="Enter when branch result"]; subgraph cluster_83 { color=blue - 333 [label="Enter block"]; - 334 [label="Access variable R|/b|"]; - 335 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; - 336 [label="Exit block"]; + 332 [label="Enter block"]; + 333 [label="Access variable R|/b|"]; + 334 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; + 335 [label="Exit block"]; } - 337 [label="Exit when branch result"]; - 326 [label="Exit when"]; + 336 [label="Exit when branch result"]; + 337 [label="Exit when"]; } - 339 [label="Access variable R|/b|"]; - 340 [label="Function call: R|/b|.#()"]; + 338 [label="Access variable R|/b|"]; + 339 [label="Function call: R|/b|.#()"]; subgraph cluster_84 { color=blue - 341 [label="Enter when"]; + 340 [label="Enter when"]; subgraph cluster_85 { color=blue - 343 [label="Enter when branch condition "]; - 344 [label="Access variable R|/b|"]; - 345 [label="Access variable R|/a|"]; - 346 [label="Operator =="]; - 347 [label="Exit when branch condition"]; + 341 [label="Enter when branch condition "]; + 342 [label="Access variable R|/b|"]; + 343 [label="Access variable R|/a|"]; + 344 [label="Operator =="]; + 345 [label="Exit when branch condition"]; } - 354 [label="Synthetic else branch"]; - 348 [label="Enter when branch result"]; + 346 [label="Synthetic else branch"]; + 347 [label="Enter when branch result"]; subgraph cluster_86 { color=blue - 349 [label="Enter block"]; - 350 [label="Access variable R|/b|"]; - 351 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; - 352 [label="Exit block"]; + 348 [label="Enter block"]; + 349 [label="Access variable R|/b|"]; + 350 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; + 351 [label="Exit block"]; } - 353 [label="Exit when branch result"]; - 342 [label="Exit when"]; + 352 [label="Exit when branch result"]; + 353 [label="Exit when"]; } - 355 [label="Access variable R|/b|"]; - 356 [label="Function call: R|/b|.#()"]; + 354 [label="Access variable R|/b|"]; + 355 [label="Function call: R|/b|.#()"]; subgraph cluster_87 { color=blue - 357 [label="Enter when"]; + 356 [label="Enter when"]; subgraph cluster_88 { color=blue - 359 [label="Enter when branch condition "]; - 360 [label="Access variable R|/b|"]; - 361 [label="Access variable R|/a|"]; - 362 [label="Operator ==="]; - 363 [label="Exit when branch condition"]; + 357 [label="Enter when branch condition "]; + 358 [label="Access variable R|/b|"]; + 359 [label="Access variable R|/a|"]; + 360 [label="Operator ==="]; + 361 [label="Exit when branch condition"]; } - 370 [label="Synthetic else branch"]; - 364 [label="Enter when branch result"]; + 362 [label="Synthetic else branch"]; + 363 [label="Enter when branch result"]; subgraph cluster_89 { color=blue - 365 [label="Enter block"]; - 366 [label="Access variable R|/b|"]; - 367 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; - 368 [label="Exit block"]; + 364 [label="Enter block"]; + 365 [label="Access variable R|/b|"]; + 366 [label="Function call: R|/b|.R|kotlin/Int.inc|()"]; + 367 [label="Exit block"]; } - 369 [label="Exit when branch result"]; - 358 [label="Exit when"]; + 368 [label="Exit when branch result"]; + 369 [label="Exit when"]; } - 371 [label="Access variable R|/b|"]; - 372 [label="Function call: R|/b|.#()"]; - 373 [label="Exit block"]; + 370 [label="Access variable R|/b|"]; + 371 [label="Function call: R|/b|.#()"]; + 372 [label="Exit block"]; } - 307 [label="Exit function test_9" style="filled" fillcolor=red]; + 373 [label="Exit function test_9" style="filled" fillcolor=red]; } - 306 -> {308}; + 306 -> {307}; + 307 -> {308}; 308 -> {309}; - 309 -> {311}; - 310 -> {323}; + 309 -> {310}; + 310 -> {311}; 311 -> {312}; 312 -> {313}; - 313 -> {314}; - 314 -> {315}; - 315 -> {316 322}; + 313 -> {315 314}; + 314 -> {321}; + 315 -> {316}; 316 -> {317}; 317 -> {318}; 318 -> {319}; 319 -> {320}; 320 -> {321}; - 321 -> {310}; - 322 -> {310}; + 321 -> {322}; + 322 -> {323}; 323 -> {324}; 324 -> {325}; - 325 -> {327}; - 326 -> {339}; + 325 -> {326}; + 326 -> {327}; 327 -> {328}; 328 -> {329}; - 329 -> {330}; - 330 -> {331}; - 331 -> {332 338}; + 329 -> {331 330}; + 330 -> {337}; + 331 -> {332}; 332 -> {333}; 333 -> {334}; 334 -> {335}; 335 -> {336}; 336 -> {337}; - 337 -> {326}; - 338 -> {326}; + 337 -> {338}; + 338 -> {339}; 339 -> {340}; 340 -> {341}; - 341 -> {343}; - 342 -> {355}; + 341 -> {342}; + 342 -> {343}; 343 -> {344}; 344 -> {345}; - 345 -> {346}; - 346 -> {347}; - 347 -> {348 354}; + 345 -> {347 346}; + 346 -> {353}; + 347 -> {348}; 348 -> {349}; 349 -> {350}; 350 -> {351}; 351 -> {352}; 352 -> {353}; - 353 -> {342}; - 354 -> {342}; + 353 -> {354}; + 354 -> {355}; 355 -> {356}; 356 -> {357}; - 357 -> {359}; - 358 -> {371}; + 357 -> {358}; + 358 -> {359}; 359 -> {360}; 360 -> {361}; - 361 -> {362}; - 362 -> {363}; - 363 -> {364 370}; + 361 -> {363 362}; + 362 -> {369}; + 363 -> {364}; 364 -> {365}; 365 -> {366}; 366 -> {367}; 367 -> {368}; 368 -> {369}; - 369 -> {358}; - 370 -> {358}; + 369 -> {370}; + 370 -> {371}; 371 -> {372}; 372 -> {373}; - 373 -> {307}; subgraph cluster_90 { color=red 374 [label="Enter function test_10" style="filled" fillcolor=red]; subgraph cluster_91 { color=blue - 376 [label="Enter block"]; + 375 [label="Enter block"]; subgraph cluster_92 { color=blue - 377 [label="Enter when"]; + 376 [label="Enter when"]; subgraph cluster_93 { color=blue - 379 [label="Enter when branch condition "]; - 380 [label="Access variable R|/a|"]; - 381 [label="Access variable R|/b|"]; - 382 [label="Operator =="]; - 383 [label="Exit when branch condition"]; + 377 [label="Enter when branch condition "]; + 378 [label="Access variable R|/a|"]; + 379 [label="Access variable R|/b|"]; + 380 [label="Operator =="]; + 381 [label="Exit when branch condition"]; } - 390 [label="Synthetic else branch"]; - 384 [label="Enter when branch result"]; + 382 [label="Synthetic else branch"]; + 383 [label="Enter when branch result"]; subgraph cluster_94 { color=blue - 385 [label="Enter block"]; - 386 [label="Access variable R|/b|"]; - 387 [label="Function call: R|/b|.#()"]; - 388 [label="Exit block"]; + 384 [label="Enter block"]; + 385 [label="Access variable R|/b|"]; + 386 [label="Function call: R|/b|.#()"]; + 387 [label="Exit block"]; } - 389 [label="Exit when branch result"]; - 378 [label="Exit when"]; + 388 [label="Exit when branch result"]; + 389 [label="Exit when"]; } - 391 [label="Access variable R|/b|"]; - 392 [label="Function call: R|/b|.#()"]; + 390 [label="Access variable R|/b|"]; + 391 [label="Function call: R|/b|.#()"]; subgraph cluster_95 { color=blue - 393 [label="Enter when"]; + 392 [label="Enter when"]; subgraph cluster_96 { color=blue - 395 [label="Enter when branch condition "]; - 396 [label="Access variable R|/a|"]; - 397 [label="Access variable R|/b|"]; - 398 [label="Operator ==="]; - 399 [label="Exit when branch condition"]; + 393 [label="Enter when branch condition "]; + 394 [label="Access variable R|/a|"]; + 395 [label="Access variable R|/b|"]; + 396 [label="Operator ==="]; + 397 [label="Exit when branch condition"]; } - 406 [label="Synthetic else branch"]; - 400 [label="Enter when branch result"]; + 398 [label="Synthetic else branch"]; + 399 [label="Enter when branch result"]; subgraph cluster_97 { color=blue - 401 [label="Enter block"]; - 402 [label="Access variable R|/b|"]; - 403 [label="Function call: R|/b|.#()"]; - 404 [label="Exit block"]; + 400 [label="Enter block"]; + 401 [label="Access variable R|/b|"]; + 402 [label="Function call: R|/b|.#()"]; + 403 [label="Exit block"]; } - 405 [label="Exit when branch result"]; - 394 [label="Exit when"]; + 404 [label="Exit when branch result"]; + 405 [label="Exit when"]; } - 407 [label="Access variable R|/b|"]; - 408 [label="Function call: R|/b|.#()"]; + 406 [label="Access variable R|/b|"]; + 407 [label="Function call: R|/b|.#()"]; subgraph cluster_98 { color=blue - 409 [label="Enter when"]; + 408 [label="Enter when"]; subgraph cluster_99 { color=blue - 411 [label="Enter when branch condition "]; - 412 [label="Access variable R|/b|"]; - 413 [label="Access variable R|/a|"]; - 414 [label="Operator =="]; - 415 [label="Exit when branch condition"]; + 409 [label="Enter when branch condition "]; + 410 [label="Access variable R|/b|"]; + 411 [label="Access variable R|/a|"]; + 412 [label="Operator =="]; + 413 [label="Exit when branch condition"]; } - 422 [label="Synthetic else branch"]; - 416 [label="Enter when branch result"]; + 414 [label="Synthetic else branch"]; + 415 [label="Enter when branch result"]; subgraph cluster_100 { color=blue - 417 [label="Enter block"]; - 418 [label="Access variable R|/b|"]; - 419 [label="Function call: R|/b|.#()"]; - 420 [label="Exit block"]; + 416 [label="Enter block"]; + 417 [label="Access variable R|/b|"]; + 418 [label="Function call: R|/b|.#()"]; + 419 [label="Exit block"]; } - 421 [label="Exit when branch result"]; - 410 [label="Exit when"]; + 420 [label="Exit when branch result"]; + 421 [label="Exit when"]; } - 423 [label="Access variable R|/b|"]; - 424 [label="Function call: R|/b|.#()"]; + 422 [label="Access variable R|/b|"]; + 423 [label="Function call: R|/b|.#()"]; subgraph cluster_101 { color=blue - 425 [label="Enter when"]; + 424 [label="Enter when"]; subgraph cluster_102 { color=blue - 427 [label="Enter when branch condition "]; - 428 [label="Access variable R|/b|"]; - 429 [label="Access variable R|/a|"]; - 430 [label="Operator ==="]; - 431 [label="Exit when branch condition"]; + 425 [label="Enter when branch condition "]; + 426 [label="Access variable R|/b|"]; + 427 [label="Access variable R|/a|"]; + 428 [label="Operator ==="]; + 429 [label="Exit when branch condition"]; } - 438 [label="Synthetic else branch"]; - 432 [label="Enter when branch result"]; + 430 [label="Synthetic else branch"]; + 431 [label="Enter when branch result"]; subgraph cluster_103 { color=blue - 433 [label="Enter block"]; - 434 [label="Access variable R|/b|"]; - 435 [label="Function call: R|/b|.#()"]; - 436 [label="Exit block"]; + 432 [label="Enter block"]; + 433 [label="Access variable R|/b|"]; + 434 [label="Function call: R|/b|.#()"]; + 435 [label="Exit block"]; } - 437 [label="Exit when branch result"]; - 426 [label="Exit when"]; + 436 [label="Exit when branch result"]; + 437 [label="Exit when"]; } - 439 [label="Access variable R|/b|"]; - 440 [label="Function call: R|/b|.#()"]; - 441 [label="Exit block"]; + 438 [label="Access variable R|/b|"]; + 439 [label="Function call: R|/b|.#()"]; + 440 [label="Exit block"]; } - 375 [label="Exit function test_10" style="filled" fillcolor=red]; + 441 [label="Exit function test_10" style="filled" fillcolor=red]; } - 374 -> {376}; + 374 -> {375}; + 375 -> {376}; 376 -> {377}; - 377 -> {379}; - 378 -> {391}; + 377 -> {378}; + 378 -> {379}; 379 -> {380}; 380 -> {381}; - 381 -> {382}; - 382 -> {383}; - 383 -> {384 390}; + 381 -> {383 382}; + 382 -> {389}; + 383 -> {384}; 384 -> {385}; 385 -> {386}; 386 -> {387}; 387 -> {388}; 388 -> {389}; - 389 -> {378}; - 390 -> {378}; + 389 -> {390}; + 390 -> {391}; 391 -> {392}; 392 -> {393}; - 393 -> {395}; - 394 -> {407}; + 393 -> {394}; + 394 -> {395}; 395 -> {396}; 396 -> {397}; - 397 -> {398}; - 398 -> {399}; - 399 -> {400 406}; + 397 -> {399 398}; + 398 -> {405}; + 399 -> {400}; 400 -> {401}; 401 -> {402}; 402 -> {403}; 403 -> {404}; 404 -> {405}; - 405 -> {394}; - 406 -> {394}; + 405 -> {406}; + 406 -> {407}; 407 -> {408}; 408 -> {409}; - 409 -> {411}; - 410 -> {423}; + 409 -> {410}; + 410 -> {411}; 411 -> {412}; 412 -> {413}; - 413 -> {414}; - 414 -> {415}; - 415 -> {416 422}; + 413 -> {415 414}; + 414 -> {421}; + 415 -> {416}; 416 -> {417}; 417 -> {418}; 418 -> {419}; 419 -> {420}; 420 -> {421}; - 421 -> {410}; - 422 -> {410}; + 421 -> {422}; + 422 -> {423}; 423 -> {424}; 424 -> {425}; - 425 -> {427}; - 426 -> {439}; + 425 -> {426}; + 426 -> {427}; 427 -> {428}; 428 -> {429}; - 429 -> {430}; - 430 -> {431}; - 431 -> {432 438}; + 429 -> {431 430}; + 430 -> {437}; + 431 -> {432}; 432 -> {433}; 433 -> {434}; 434 -> {435}; 435 -> {436}; 436 -> {437}; - 437 -> {426}; - 438 -> {426}; + 437 -> {438}; + 438 -> {439}; 439 -> {440}; 440 -> {441}; - 441 -> {375}; subgraph cluster_104 { color=red 442 [label="Enter function test_11" style="filled" fillcolor=red]; subgraph cluster_105 { color=blue - 444 [label="Enter block"]; + 443 [label="Enter block"]; subgraph cluster_106 { color=blue - 445 [label="Enter when"]; + 444 [label="Enter when"]; subgraph cluster_107 { color=blue - 447 [label="Enter when branch condition "]; - 448 [label="Access variable R|/q|"]; - 449 [label="Enter safe call"]; - 451 [label="Access variable R|/QImpl.data|"]; - 450 [label="Exit safe call"]; - 452 [label="Enter safe call"]; - 454 [label="Access variable R|/MyData.s|"]; - 453 [label="Exit safe call"]; - 455 [label="Enter safe call"]; - 457 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; - 456 [label="Exit safe call"]; - 458 [label="Const: Null(null)"]; - 459 [label="Operator !="]; - 460 [label="Exit when branch condition"]; + 445 [label="Enter when branch condition "]; + 446 [label="Access variable R|/q|"]; + 447 [label="Enter safe call"]; + 448 [label="Access variable R|/QImpl.data|"]; + 449 [label="Exit safe call"]; + 450 [label="Enter safe call"]; + 451 [label="Access variable R|/MyData.s|"]; + 452 [label="Exit safe call"]; + 453 [label="Enter safe call"]; + 454 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; + 455 [label="Exit safe call"]; + 456 [label="Const: Null(null)"]; + 457 [label="Operator !="]; + 458 [label="Exit when branch condition"]; } - 503 [label="Synthetic else branch"]; - 461 [label="Enter when branch result"]; + 459 [label="Synthetic else branch"]; + 460 [label="Enter when branch result"]; subgraph cluster_108 { color=blue - 462 [label="Enter block"]; - 463 [label="Access variable R|/q|"]; - 464 [label="Access variable R|/QImpl.data|"]; - 465 [label="Access variable R|/q|"]; - 466 [label="Access variable R|/QImpl.data|"]; - 467 [label="Access variable R|/MyData.s|"]; - 468 [label="Access variable R|/q|"]; - 469 [label="Access variable R|/QImpl.data|"]; - 470 [label="Access variable R|/MyData.s|"]; - 471 [label="Function call: R|/q|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()"]; - 472 [label="Access variable R|/q2|"]; - 473 [label="Access variable R|/QImpl.data|"]; - 474 [label="Access variable R|/q2|"]; - 475 [label="Access variable R|/QImpl.data|"]; - 476 [label="Access variable #"]; - 477 [label="Access variable R|/q2|"]; - 478 [label="Access variable R|/QImpl.data|"]; - 479 [label="Access variable #"]; - 480 [label="Function call: R|/q2|.R|/QImpl.data|.#.#()"]; + 461 [label="Enter block"]; + 462 [label="Access variable R|/q|"]; + 463 [label="Access variable R|/QImpl.data|"]; + 464 [label="Access variable R|/q|"]; + 465 [label="Access variable R|/QImpl.data|"]; + 466 [label="Access variable R|/MyData.s|"]; + 467 [label="Access variable R|/q|"]; + 468 [label="Access variable R|/QImpl.data|"]; + 469 [label="Access variable R|/MyData.s|"]; + 470 [label="Function call: R|/q|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()"]; + 471 [label="Access variable R|/q2|"]; + 472 [label="Access variable R|/QImpl.data|"]; + 473 [label="Access variable R|/q2|"]; + 474 [label="Access variable R|/QImpl.data|"]; + 475 [label="Access variable #"]; + 476 [label="Access variable R|/q2|"]; + 477 [label="Access variable R|/QImpl.data|"]; + 478 [label="Access variable #"]; + 479 [label="Function call: R|/q2|.R|/QImpl.data|.#.#()"]; subgraph cluster_109 { color=blue - 481 [label="Enter when"]; + 480 [label="Enter when"]; subgraph cluster_110 { color=blue - 483 [label="Enter when branch condition "]; - 484 [label="Access variable R|/q2|"]; - 485 [label="Access variable R|/QImpl.data|"]; - 486 [label="Const: Null(null)"]; - 487 [label="Operator !="]; - 488 [label="Exit when branch condition"]; + 481 [label="Enter when branch condition "]; + 482 [label="Access variable R|/q2|"]; + 483 [label="Access variable R|/QImpl.data|"]; + 484 [label="Const: Null(null)"]; + 485 [label="Operator !="]; + 486 [label="Exit when branch condition"]; } - 500 [label="Synthetic else branch"]; - 489 [label="Enter when branch result"]; + 487 [label="Synthetic else branch"]; + 488 [label="Enter when branch result"]; subgraph cluster_111 { color=blue - 490 [label="Enter block"]; - 491 [label="Access variable R|/q2|"]; - 492 [label="Access variable R|/QImpl.data|"]; - 493 [label="Access variable R|/MyData.s|"]; - 494 [label="Access variable R|/q2|"]; - 495 [label="Access variable R|/QImpl.data|"]; - 496 [label="Access variable R|/MyData.s|"]; - 497 [label="Function call: R|/q2|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()"]; - 498 [label="Exit block"]; + 489 [label="Enter block"]; + 490 [label="Access variable R|/q2|"]; + 491 [label="Access variable R|/QImpl.data|"]; + 492 [label="Access variable R|/MyData.s|"]; + 493 [label="Access variable R|/q2|"]; + 494 [label="Access variable R|/QImpl.data|"]; + 495 [label="Access variable R|/MyData.s|"]; + 496 [label="Function call: R|/q2|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()"]; + 497 [label="Exit block"]; } - 499 [label="Exit when branch result"]; - 482 [label="Exit when"]; + 498 [label="Exit when branch result"]; + 499 [label="Exit when"]; } - 501 [label="Exit block"]; + 500 [label="Exit block"]; } - 502 [label="Exit when branch result"]; - 446 [label="Exit when"]; + 501 [label="Exit when branch result"]; + 502 [label="Exit when"]; } - 504 [label="Exit block"]; + 503 [label="Exit block"]; } - 443 [label="Exit function test_11" style="filled" fillcolor=red]; + 504 [label="Exit function test_11" style="filled" fillcolor=red]; } - 442 -> {444}; + 442 -> {443}; + 443 -> {444}; 444 -> {445}; - 445 -> {447}; - 446 -> {504}; + 445 -> {446}; + 446 -> {447 449}; 447 -> {448}; - 448 -> {449 450}; - 449 -> {451}; - 450 -> {452 453}; - 451 -> {450}; - 452 -> {454}; - 453 -> {455 456}; - 454 -> {453}; - 455 -> {457}; - 456 -> {458}; - 457 -> {456}; - 458 -> {459}; - 459 -> {460}; - 460 -> {461 503}; + 448 -> {449}; + 449 -> {450 452}; + 450 -> {451}; + 451 -> {452}; + 452 -> {453 455}; + 453 -> {454}; + 454 -> {455}; + 455 -> {456}; + 456 -> {457}; + 457 -> {458}; + 458 -> {460 459}; + 459 -> {502}; + 460 -> {461}; 461 -> {462}; 462 -> {463}; 463 -> {464}; @@ -1331,14 +1332,14 @@ digraph nullability_kt { 478 -> {479}; 479 -> {480}; 480 -> {481}; - 481 -> {483}; - 482 -> {501}; + 481 -> {482}; + 482 -> {483}; 483 -> {484}; 484 -> {485}; 485 -> {486}; - 486 -> {487}; - 487 -> {488}; - 488 -> {489 500}; + 486 -> {488 487}; + 487 -> {499}; + 488 -> {489}; 489 -> {490}; 490 -> {491}; 491 -> {492}; @@ -1349,80 +1350,80 @@ digraph nullability_kt { 496 -> {497}; 497 -> {498}; 498 -> {499}; - 499 -> {482}; - 500 -> {482}; + 499 -> {500}; + 500 -> {501}; 501 -> {502}; - 502 -> {446}; - 503 -> {446}; - 504 -> {443}; + 502 -> {503}; + 503 -> {504}; subgraph cluster_112 { color=red 505 [label="Enter function test_12" style="filled" fillcolor=red]; subgraph cluster_113 { color=blue - 507 [label="Enter block"]; + 506 [label="Enter block"]; subgraph cluster_114 { color=blue - 508 [label="Enter when"]; + 507 [label="Enter when"]; subgraph cluster_115 { color=blue - 510 [label="Enter when branch condition "]; - 511 [label="Access variable R|/q|"]; - 512 [label="Enter safe call"]; - 514 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 513 [label="Exit safe call"]; - 515 [label="Enter safe call"]; - 517 [label="Access variable R|/MyData.s|"]; - 516 [label="Exit safe call"]; - 518 [label="Enter safe call"]; - 520 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; - 519 [label="Exit safe call"]; - 521 [label="Const: Null(null)"]; - 522 [label="Operator !="]; - 523 [label="Exit when branch condition"]; + 508 [label="Enter when branch condition "]; + 509 [label="Access variable R|/q|"]; + 510 [label="Enter safe call"]; + 511 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 512 [label="Exit safe call"]; + 513 [label="Enter safe call"]; + 514 [label="Access variable R|/MyData.s|"]; + 515 [label="Exit safe call"]; + 516 [label="Enter safe call"]; + 517 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; + 518 [label="Exit safe call"]; + 519 [label="Const: Null(null)"]; + 520 [label="Operator !="]; + 521 [label="Exit when branch condition"]; } - 537 [label="Synthetic else branch"]; - 524 [label="Enter when branch result"]; + 522 [label="Synthetic else branch"]; + 523 [label="Enter when branch result"]; subgraph cluster_116 { color=blue - 525 [label="Enter block"]; - 526 [label="Access variable R|/q|"]; - 527 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 528 [label="Access variable R|/q|"]; - 529 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 530 [label="Access variable #"]; - 531 [label="Access variable R|/q|"]; - 532 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 533 [label="Access variable #"]; - 534 [label="Function call: R|/q|.R|/QImplWithCustomGetter.data|.#.#()"]; - 535 [label="Exit block"]; + 524 [label="Enter block"]; + 525 [label="Access variable R|/q|"]; + 526 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 527 [label="Access variable R|/q|"]; + 528 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 529 [label="Access variable #"]; + 530 [label="Access variable R|/q|"]; + 531 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 532 [label="Access variable #"]; + 533 [label="Function call: R|/q|.R|/QImplWithCustomGetter.data|.#.#()"]; + 534 [label="Exit block"]; } - 536 [label="Exit when branch result"]; - 509 [label="Exit when"]; + 535 [label="Exit when branch result"]; + 536 [label="Exit when"]; } - 538 [label="Exit block"]; + 537 [label="Exit block"]; } - 506 [label="Exit function test_12" style="filled" fillcolor=red]; + 538 [label="Exit function test_12" style="filled" fillcolor=red]; } - 505 -> {507}; + 505 -> {506}; + 506 -> {507}; 507 -> {508}; - 508 -> {510}; - 509 -> {538}; + 508 -> {509}; + 509 -> {510 512}; 510 -> {511}; - 511 -> {512 513}; - 512 -> {514}; - 513 -> {515 516}; - 514 -> {513}; - 515 -> {517}; - 516 -> {518 519}; - 517 -> {516}; - 518 -> {520}; - 519 -> {521}; - 520 -> {519}; - 521 -> {522}; - 522 -> {523}; - 523 -> {524 537}; + 511 -> {512}; + 512 -> {513 515}; + 513 -> {514}; + 514 -> {515}; + 515 -> {516 518}; + 516 -> {517}; + 517 -> {518}; + 518 -> {519}; + 519 -> {520}; + 520 -> {521}; + 521 -> {523 522}; + 522 -> {536}; + 523 -> {524}; 524 -> {525}; 525 -> {526}; 526 -> {527}; @@ -1435,77 +1436,77 @@ digraph nullability_kt { 533 -> {534}; 534 -> {535}; 535 -> {536}; - 536 -> {509}; - 537 -> {509}; - 538 -> {506}; + 536 -> {537}; + 537 -> {538}; subgraph cluster_117 { color=red 539 [label="Enter function test_13" style="filled" fillcolor=red]; subgraph cluster_118 { color=blue - 541 [label="Enter block"]; + 540 [label="Enter block"]; subgraph cluster_119 { color=blue - 542 [label="Enter when"]; + 541 [label="Enter when"]; subgraph cluster_120 { color=blue - 544 [label="Enter when branch condition "]; - 545 [label="Access variable R|/q|"]; - 546 [label="Enter safe call"]; - 548 [label="Access variable R|/QImplMutable.data|"]; - 547 [label="Exit safe call"]; - 549 [label="Enter safe call"]; - 551 [label="Access variable R|/MyData.s|"]; - 550 [label="Exit safe call"]; - 552 [label="Enter safe call"]; - 554 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; - 553 [label="Exit safe call"]; - 555 [label="Const: Null(null)"]; - 556 [label="Operator !="]; - 557 [label="Exit when branch condition"]; + 542 [label="Enter when branch condition "]; + 543 [label="Access variable R|/q|"]; + 544 [label="Enter safe call"]; + 545 [label="Access variable R|/QImplMutable.data|"]; + 546 [label="Exit safe call"]; + 547 [label="Enter safe call"]; + 548 [label="Access variable R|/MyData.s|"]; + 549 [label="Exit safe call"]; + 550 [label="Enter safe call"]; + 551 [label="Function call: $subj$.R|kotlin/Int.inc|()"]; + 552 [label="Exit safe call"]; + 553 [label="Const: Null(null)"]; + 554 [label="Operator !="]; + 555 [label="Exit when branch condition"]; } - 571 [label="Synthetic else branch"]; - 558 [label="Enter when branch result"]; + 556 [label="Synthetic else branch"]; + 557 [label="Enter when branch result"]; subgraph cluster_121 { color=blue - 559 [label="Enter block"]; - 560 [label="Access variable R|/q|"]; - 561 [label="Access variable R|/QImplMutable.data|"]; - 562 [label="Access variable R|/q|"]; - 563 [label="Access variable R|/QImplMutable.data|"]; - 564 [label="Access variable #"]; - 565 [label="Access variable R|/q|"]; - 566 [label="Access variable R|/QImplMutable.data|"]; - 567 [label="Access variable #"]; - 568 [label="Function call: R|/q|.R|/QImplMutable.data|.#.#()"]; - 569 [label="Exit block"]; + 558 [label="Enter block"]; + 559 [label="Access variable R|/q|"]; + 560 [label="Access variable R|/QImplMutable.data|"]; + 561 [label="Access variable R|/q|"]; + 562 [label="Access variable R|/QImplMutable.data|"]; + 563 [label="Access variable #"]; + 564 [label="Access variable R|/q|"]; + 565 [label="Access variable R|/QImplMutable.data|"]; + 566 [label="Access variable #"]; + 567 [label="Function call: R|/q|.R|/QImplMutable.data|.#.#()"]; + 568 [label="Exit block"]; } - 570 [label="Exit when branch result"]; - 543 [label="Exit when"]; + 569 [label="Exit when branch result"]; + 570 [label="Exit when"]; } - 572 [label="Exit block"]; + 571 [label="Exit block"]; } - 540 [label="Exit function test_13" style="filled" fillcolor=red]; + 572 [label="Exit function test_13" style="filled" fillcolor=red]; } - 539 -> {541}; + 539 -> {540}; + 540 -> {541}; 541 -> {542}; - 542 -> {544}; - 543 -> {572}; + 542 -> {543}; + 543 -> {544 546}; 544 -> {545}; - 545 -> {546 547}; - 546 -> {548}; - 547 -> {549 550}; - 548 -> {547}; - 549 -> {551}; - 550 -> {552 553}; - 551 -> {550}; - 552 -> {554}; - 553 -> {555}; - 554 -> {553}; - 555 -> {556}; - 556 -> {557}; - 557 -> {558 571}; + 545 -> {546}; + 546 -> {547 549}; + 547 -> {548}; + 548 -> {549}; + 549 -> {550 552}; + 550 -> {551}; + 551 -> {552}; + 552 -> {553}; + 553 -> {554}; + 554 -> {555}; + 555 -> {557 556}; + 556 -> {570}; + 557 -> {558}; 558 -> {559}; 559 -> {560}; 560 -> {561}; @@ -1518,8 +1519,7 @@ digraph nullability_kt { 567 -> {568}; 568 -> {569}; 569 -> {570}; - 570 -> {543}; - 571 -> {543}; - 572 -> {540}; + 570 -> {571}; + 571 -> {572}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceiverAsWhenSubject.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceiverAsWhenSubject.dot index d0ad3cec623..4246d02c591 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceiverAsWhenSubject.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceiverAsWhenSubject.dot @@ -8,56 +8,56 @@ digraph implicitReceiverAsWhenSubject_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; + 1 [label="Enter block"]; subgraph cluster_2 { color=blue - 3 [label="Enter when"]; - 5 [label="Access variable this@R|/test_1|"]; + 2 [label="Enter when"]; + 3 [label="Access variable this@R|/test_1|"]; subgraph cluster_3 { color=blue - 6 [label="Enter when branch condition "]; - 7 [label="Type operator: ($subj$ is R|kotlin/collections/List<*>|)"]; - 8 [label="Exit when branch condition"]; + 4 [label="Enter when branch condition "]; + 5 [label="Type operator: ($subj$ is R|kotlin/collections/List<*>|)"]; + 6 [label="Exit when branch condition"]; } subgraph cluster_4 { color=blue - 15 [label="Enter when branch condition "]; - 16 [label="Type operator: ($subj$ is R|kotlin/String|)"]; - 17 [label="Exit when branch condition"]; + 7 [label="Enter when branch condition "]; + 8 [label="Type operator: ($subj$ is R|kotlin/String|)"]; + 9 [label="Exit when branch condition"]; } subgraph cluster_5 { color=blue - 23 [label="Enter when branch condition else"]; - 24 [label="Exit when branch condition"]; + 10 [label="Enter when branch condition else"]; + 11 [label="Exit when branch condition"]; } - 25 [label="Enter when branch result"]; + 12 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 26 [label="Enter block"]; - 27 [label="Const: Int(0)"]; - 28 [label="Exit block"]; + 13 [label="Enter block"]; + 14 [label="Const: Int(0)"]; + 15 [label="Exit block"]; } - 29 [label="Exit when branch result"]; - 18 [label="Enter when branch result"]; + 16 [label="Exit when branch result"]; + 17 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 19 [label="Enter block"]; - 20 [label="Access variable R|kotlin/String.length|"]; - 21 [label="Exit block"]; + 18 [label="Enter block"]; + 19 [label="Access variable R|kotlin/String.length|"]; + 20 [label="Exit block"]; } - 22 [label="Exit when branch result"]; - 9 [label="Enter when branch result"]; + 21 [label="Exit when branch result"]; + 22 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 10 [label="Enter block"]; - 11 [label="Access variable this@R|/test_1|"]; - 12 [label="Access variable R|kotlin/collections/List.size|"]; - 13 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Access variable this@R|/test_1|"]; + 25 [label="Access variable R|kotlin/collections/List.size|"]; + 26 [label="Exit block"]; } - 14 [label="Exit when branch result"]; - 4 [label="Exit when"]; + 27 [label="Exit when branch result"]; + 28 [label="Exit when"]; } - 30 [label="Jump: ^test_1 when (this@R|/test_1|) { + 29 [label="Jump: ^test_1 when (this@R|/test_1|) { ($subj$ is R|kotlin/collections/List<*>|) -> { this@R|/test_1|.R|kotlin/collections/List.size| } @@ -69,105 +69,105 @@ digraph implicitReceiverAsWhenSubject_kt { } } "]; - 31 [label="Stub" style="filled" fillcolor=gray]; - 32 [label="Exit block" style="filled" fillcolor=gray]; + 30 [label="Stub" style="filled" fillcolor=gray]; + 31 [label="Exit block" style="filled" fillcolor=gray]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 32 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {5}; - 4 -> {30}; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; - 6 -> {7}; + 6 -> {22 7}; 7 -> {8}; - 8 -> {9 15}; - 9 -> {10}; + 8 -> {9}; + 9 -> {17 10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {4}; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; - 17 -> {18 23}; + 16 -> {28}; + 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22}; - 22 -> {4}; + 21 -> {28}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {4}; - 30 -> {1}; + 29 -> {32}; + 29 -> {30} [style=dotted]; 30 -> {31} [style=dotted]; 31 -> {32} [style=dotted]; - 32 -> {1} [style=dotted]; subgraph cluster_9 { color=red 33 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 35 [label="Enter block"]; + 34 [label="Enter block"]; subgraph cluster_11 { color=blue - 36 [label="Enter when"]; - 38 [label="Access variable this@R|/test_2|"]; - 39 [label="Variable declaration: lval x: R|kotlin/Any|"]; + 35 [label="Enter when"]; + 36 [label="Access variable this@R|/test_2|"]; + 37 [label="Variable declaration: lval x: R|kotlin/Any|"]; subgraph cluster_12 { color=blue - 40 [label="Enter when branch condition "]; - 41 [label="Type operator: ($subj$ is R|kotlin/collections/List<*>|)"]; - 42 [label="Exit when branch condition"]; + 38 [label="Enter when branch condition "]; + 39 [label="Type operator: ($subj$ is R|kotlin/collections/List<*>|)"]; + 40 [label="Exit when branch condition"]; } subgraph cluster_13 { color=blue - 51 [label="Enter when branch condition "]; - 52 [label="Type operator: ($subj$ is R|kotlin/String|)"]; - 53 [label="Exit when branch condition"]; + 41 [label="Enter when branch condition "]; + 42 [label="Type operator: ($subj$ is R|kotlin/String|)"]; + 43 [label="Exit when branch condition"]; } subgraph cluster_14 { color=blue - 61 [label="Enter when branch condition else"]; - 62 [label="Exit when branch condition"]; + 44 [label="Enter when branch condition else"]; + 45 [label="Exit when branch condition"]; } - 63 [label="Enter when branch result"]; + 46 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 64 [label="Enter block"]; - 65 [label="Const: Int(0)"]; - 66 [label="Exit block"]; - } - 67 [label="Exit when branch result"]; - 54 [label="Enter when branch result"]; - subgraph cluster_16 { - color=blue - 55 [label="Enter block"]; - 56 [label="Access variable R|/x|"]; - 57 [label="Access variable R|kotlin/String.length|"]; - 58 [label="Access variable R|kotlin/String.length|"]; - 59 [label="Exit block"]; - } - 60 [label="Exit when branch result"]; - 43 [label="Enter when branch result"]; - subgraph cluster_17 { - color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/x|"]; - 46 [label="Access variable R|kotlin/collections/List.size|"]; - 47 [label="Access variable this@R|/test_2|"]; - 48 [label="Access variable R|kotlin/collections/List.size|"]; + 47 [label="Enter block"]; + 48 [label="Const: Int(0)"]; 49 [label="Exit block"]; } 50 [label="Exit when branch result"]; - 37 [label="Exit when"]; + 51 [label="Enter when branch result"]; + subgraph cluster_16 { + color=blue + 52 [label="Enter block"]; + 53 [label="Access variable R|/x|"]; + 54 [label="Access variable R|kotlin/String.length|"]; + 55 [label="Access variable R|kotlin/String.length|"]; + 56 [label="Exit block"]; + } + 57 [label="Exit when branch result"]; + 58 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 59 [label="Enter block"]; + 60 [label="Access variable R|/x|"]; + 61 [label="Access variable R|kotlin/collections/List.size|"]; + 62 [label="Access variable this@R|/test_2|"]; + 63 [label="Access variable R|kotlin/collections/List.size|"]; + 64 [label="Exit block"]; + } + 65 [label="Exit when branch result"]; + 66 [label="Exit when"]; } - 68 [label="Jump: ^test_2 when (lval x: R|kotlin/Any| = this@R|/test_2|) { + 67 [label="Jump: ^test_2 when (lval x: R|kotlin/Any| = this@R|/test_2|) { ($subj$ is R|kotlin/collections/List<*>|) -> { R|/x|.R|kotlin/collections/List.size| this@R|/test_2|.R|kotlin/collections/List.size| @@ -181,48 +181,48 @@ digraph implicitReceiverAsWhenSubject_kt { } } "]; - 69 [label="Stub" style="filled" fillcolor=gray]; - 70 [label="Exit block" style="filled" fillcolor=gray]; + 68 [label="Stub" style="filled" fillcolor=gray]; + 69 [label="Exit block" style="filled" fillcolor=gray]; } - 34 [label="Exit function test_2" style="filled" fillcolor=red]; + 70 [label="Exit function test_2" style="filled" fillcolor=red]; } - 33 -> {35}; + 33 -> {34}; + 34 -> {35}; 35 -> {36}; - 36 -> {38}; - 37 -> {68}; + 36 -> {37}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {41}; + 40 -> {58 41}; 41 -> {42}; - 42 -> {43 51}; - 43 -> {44}; + 42 -> {43}; + 43 -> {51 44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {37}; + 50 -> {66}; 51 -> {52}; 52 -> {53}; - 53 -> {54 61}; + 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58}; + 57 -> {66}; 58 -> {59}; 59 -> {60}; - 60 -> {37}; + 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {37}; - 68 -> {34}; + 67 -> {70}; + 67 -> {68} [style=dotted]; 68 -> {69} [style=dotted]; 69 -> {70} [style=dotted]; - 70 -> {34} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot index 9df64cee102..4b59cf6b94d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot @@ -6,142 +6,143 @@ digraph implicitReceivers_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red 3 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_2 { color=blue - 5 [label="Enter block"]; - 6 [label="Exit block"]; + 4 [label="Enter block"]; + 5 [label="Exit block"]; } - 4 [label="Exit function foo" style="filled" fillcolor=red]; + 6 [label="Exit function foo" style="filled" fillcolor=red]; } - 3 -> {5}; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; - 6 -> {4}; subgraph cluster_3 { color=red - 8 [label="Enter class A" style="filled" fillcolor=red]; - 7 [label="Exit class A" style="filled" fillcolor=red]; + 7 [label="Enter class A" style="filled" fillcolor=red]; + 8 [label="Exit class A" style="filled" fillcolor=red]; } - 8 -> {7} [color=green]; + 7 -> {8} [color=green]; subgraph cluster_4 { color=red 9 [label="Enter function " style="filled" fillcolor=red]; - 11 [label="Delegated constructor call: super()"]; - 10 [label="Exit function " style="filled" fillcolor=red]; + 10 [label="Delegated constructor call: super()"]; + 11 [label="Exit function " style="filled" fillcolor=red]; } - 9 -> {11}; - 11 -> {10}; + 9 -> {10}; + 10 -> {11}; subgraph cluster_5 { color=red 12 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 14 [label="Enter block"]; - 15 [label="Exit block"]; + 13 [label="Enter block"]; + 14 [label="Exit block"]; } - 13 [label="Exit function bar" style="filled" fillcolor=red]; + 15 [label="Exit function bar" style="filled" fillcolor=red]; } - 12 -> {14}; + 12 -> {13}; + 13 -> {14}; 14 -> {15}; - 15 -> {13}; subgraph cluster_7 { color=red - 17 [label="Enter class B" style="filled" fillcolor=red]; - 16 [label="Exit class B" style="filled" fillcolor=red]; + 16 [label="Enter class B" style="filled" fillcolor=red]; + 17 [label="Exit class B" style="filled" fillcolor=red]; } - 17 -> {16} [color=green]; + 16 -> {17} [color=green]; subgraph cluster_8 { color=red 18 [label="Enter function with" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 20 [label="Enter block"]; - 21 [label="Exit block"]; + 19 [label="Enter block"]; + 20 [label="Exit block"]; } - 19 [label="Exit function with" style="filled" fillcolor=red]; + 21 [label="Exit function with" style="filled" fillcolor=red]; } - 18 -> {20}; + 18 -> {19}; + 19 -> {20}; 20 -> {21}; - 21 -> {19}; subgraph cluster_10 { color=red 22 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 24 [label="Enter block"]; + 23 [label="Enter block"]; subgraph cluster_12 { color=blue - 25 [label="Enter when"]; + 24 [label="Enter when"]; subgraph cluster_13 { color=blue - 27 [label="Enter when branch condition "]; - 28 [label="Access variable this@R|/test_1|"]; - 29 [label="Type operator: (this@R|/test_1| is R|A|)"]; - 30 [label="Exit when branch condition"]; + 25 [label="Enter when branch condition "]; + 26 [label="Access variable this@R|/test_1|"]; + 27 [label="Type operator: (this@R|/test_1| is R|A|)"]; + 28 [label="Exit when branch condition"]; } subgraph cluster_14 { color=blue - 38 [label="Enter when branch condition else"]; - 39 [label="Exit when branch condition"]; + 29 [label="Enter when branch condition else"]; + 30 [label="Exit when branch condition"]; } - 40 [label="Enter when branch result"]; - subgraph cluster_15 { - color=blue - 41 [label="Enter block"]; - 42 [label="Access variable this@R|/test_1|"]; - 43 [label="Function call: this@R|/test_1|.#()"]; - 44 [label="Function call: #()"]; - 45 [label="Exit block"]; - } - 46 [label="Exit when branch result"]; 31 [label="Enter when branch result"]; - subgraph cluster_16 { + subgraph cluster_15 { color=blue 32 [label="Enter block"]; 33 [label="Access variable this@R|/test_1|"]; - 34 [label="Function call: this@R|/test_1|.R|/A.foo|()"]; - 35 [label="Function call: this@R|/test_1|.R|/A.foo|()"]; + 34 [label="Function call: this@R|/test_1|.#()"]; + 35 [label="Function call: #()"]; 36 [label="Exit block"]; } 37 [label="Exit when branch result"]; - 26 [label="Exit when"]; + 38 [label="Enter when branch result"]; + subgraph cluster_16 { + color=blue + 39 [label="Enter block"]; + 40 [label="Access variable this@R|/test_1|"]; + 41 [label="Function call: this@R|/test_1|.R|/A.foo|()"]; + 42 [label="Function call: this@R|/test_1|.R|/A.foo|()"]; + 43 [label="Exit block"]; + } + 44 [label="Exit when branch result"]; + 45 [label="Exit when"]; } - 47 [label="Access variable this@R|/test_1|"]; - 48 [label="Function call: this@R|/test_1|.#()"]; - 49 [label="Function call: #()"]; - 50 [label="Exit block"]; + 46 [label="Access variable this@R|/test_1|"]; + 47 [label="Function call: this@R|/test_1|.#()"]; + 48 [label="Function call: #()"]; + 49 [label="Exit block"]; } - 23 [label="Exit function test_1" style="filled" fillcolor=red]; + 50 [label="Exit function test_1" style="filled" fillcolor=red]; } - 22 -> {24}; + 22 -> {23}; + 23 -> {24}; 24 -> {25}; - 25 -> {27}; - 26 -> {47}; + 25 -> {26}; + 26 -> {27}; 27 -> {28}; - 28 -> {29}; + 28 -> {38 29}; 29 -> {30}; - 30 -> {31 38}; + 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {26}; + 37 -> {45}; 38 -> {39}; 39 -> {40}; 40 -> {41}; @@ -150,77 +151,77 @@ digraph implicitReceivers_kt { 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {26}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {23}; subgraph cluster_17 { color=red 51 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_18 { color=blue - 53 [label="Enter block"]; + 52 [label="Enter block"]; subgraph cluster_19 { color=blue - 54 [label="Enter when"]; + 53 [label="Enter when"]; subgraph cluster_20 { color=blue - 56 [label="Enter when branch condition "]; - 57 [label="Access variable this@R|/test_2|"]; - 58 [label="Type operator: (this@R|/test_2| !is R|A|)"]; - 59 [label="Exit when branch condition"]; + 54 [label="Enter when branch condition "]; + 55 [label="Access variable this@R|/test_2|"]; + 56 [label="Type operator: (this@R|/test_2| !is R|A|)"]; + 57 [label="Exit when branch condition"]; } subgraph cluster_21 { color=blue - 67 [label="Enter when branch condition else"]; - 68 [label="Exit when branch condition"]; + 58 [label="Enter when branch condition else"]; + 59 [label="Exit when branch condition"]; } - 69 [label="Enter when branch result"]; - subgraph cluster_22 { - color=blue - 70 [label="Enter block"]; - 71 [label="Access variable this@R|/test_2|"]; - 72 [label="Function call: this@R|/test_2|.R|/A.foo|()"]; - 73 [label="Function call: this@R|/test_2|.R|/A.foo|()"]; - 74 [label="Exit block"]; - } - 75 [label="Exit when branch result"]; 60 [label="Enter when branch result"]; - subgraph cluster_23 { + subgraph cluster_22 { color=blue 61 [label="Enter block"]; 62 [label="Access variable this@R|/test_2|"]; - 63 [label="Function call: this@R|/test_2|.#()"]; - 64 [label="Function call: #()"]; + 63 [label="Function call: this@R|/test_2|.R|/A.foo|()"]; + 64 [label="Function call: this@R|/test_2|.R|/A.foo|()"]; 65 [label="Exit block"]; } 66 [label="Exit when branch result"]; - 55 [label="Exit when"]; + 67 [label="Enter when branch result"]; + subgraph cluster_23 { + color=blue + 68 [label="Enter block"]; + 69 [label="Access variable this@R|/test_2|"]; + 70 [label="Function call: this@R|/test_2|.#()"]; + 71 [label="Function call: #()"]; + 72 [label="Exit block"]; + } + 73 [label="Exit when branch result"]; + 74 [label="Exit when"]; } - 76 [label="Access variable this@R|/test_2|"]; - 77 [label="Function call: this@R|/test_2|.#()"]; - 78 [label="Function call: #()"]; - 79 [label="Exit block"]; + 75 [label="Access variable this@R|/test_2|"]; + 76 [label="Function call: this@R|/test_2|.#()"]; + 77 [label="Function call: #()"]; + 78 [label="Exit block"]; } - 52 [label="Exit function test_2" style="filled" fillcolor=red]; + 79 [label="Exit function test_2" style="filled" fillcolor=red]; } - 51 -> {53}; + 51 -> {52}; + 52 -> {53}; 53 -> {54}; - 54 -> {56}; - 55 -> {76}; + 54 -> {55}; + 55 -> {56}; 56 -> {57}; - 57 -> {58}; + 57 -> {67 58}; 58 -> {59}; - 59 -> {60 67}; + 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {55}; + 66 -> {74}; 67 -> {68}; 68 -> {69}; 69 -> {70}; @@ -229,241 +230,241 @@ digraph implicitReceivers_kt { 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {55}; + 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {52}; subgraph cluster_24 { color=red 80 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 82 [label="Enter block"]; - 83 [label="Access variable R|/a|"]; - 84 [label="Postponed enter to lambda"]; + 81 [label="Enter block"]; + 82 [label="Access variable R|/a|"]; + 83 [label="Postponed enter to lambda"]; subgraph cluster_26 { color=blue 89 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_27 { color=blue - 91 [label="Enter block"]; - 92 [label="Access variable R|/b|"]; - 93 [label="Postponed enter to lambda"]; + 90 [label="Enter block"]; + 91 [label="Access variable R|/b|"]; + 92 [label="Postponed enter to lambda"]; subgraph cluster_28 { color=blue 97 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_29 { color=blue - 99 [label="Enter block"]; - 100 [label="Access variable R|/c|"]; - 101 [label="Postponed enter to lambda"]; + 98 [label="Enter block"]; + 99 [label="Access variable R|/c|"]; + 100 [label="Postponed enter to lambda"]; subgraph cluster_30 { color=blue 109 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_31 { color=blue - 111 [label="Enter block"]; - 112 [label="Access variable this@R|special/anonymous|"]; - 113 [label="Type operator: (this@R|special/anonymous| as R|A|)"]; - 114 [label="Access variable this@R|special/anonymous|"]; + 110 [label="Enter block"]; + 111 [label="Access variable this@R|special/anonymous|"]; + 112 [label="Type operator: (this@R|special/anonymous| as R|A|)"]; + 113 [label="Access variable this@R|special/anonymous|"]; + 114 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; 115 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; - 116 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; - 117 [label="Exit block"]; + 116 [label="Exit block"]; } - 110 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 117 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 104 [label="Call arguments union" style="filled" fillcolor=yellow]; + 101 [label="Call arguments union" style="filled" fillcolor=yellow]; 102 [label="Postponed exit from lambda"]; 103 [label="Function call: R|kotlin/with|(...)"]; - 105 [label="Access variable this@R|special/anonymous|"]; + 104 [label="Access variable this@R|special/anonymous|"]; + 105 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; 106 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; - 107 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; - 108 [label="Exit block"]; + 107 [label="Exit block"]; } - 98 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 108 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 94 [label="Postponed exit from lambda"]; - 95 [label="Function call: R|kotlin/with|(...)"]; - 96 [label="Exit block"]; + 93 [label="Postponed exit from lambda"]; + 94 [label="Function call: R|kotlin/with|(...)"]; + 95 [label="Exit block"]; } - 90 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 96 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 87 [label="Call arguments union" style="filled" fillcolor=yellow]; + 84 [label="Call arguments union" style="filled" fillcolor=yellow]; 85 [label="Postponed exit from lambda"]; 86 [label="Function call: R|kotlin/with|(...)"]; - 88 [label="Exit block"]; + 87 [label="Exit block"]; } - 81 [label="Exit function test_3" style="filled" fillcolor=red]; + 88 [label="Exit function test_3" style="filled" fillcolor=red]; } - 80 -> {82}; + 80 -> {81}; + 81 -> {82}; 82 -> {83}; - 83 -> {84}; - 84 -> {89}; - 84 -> {85} [color=red]; + 83 -> {89}; + 83 -> {85} [color=red]; + 84 -> {86} [color=red]; 85 -> {86} [color=green]; - 86 -> {88}; - 87 -> {86} [color=red]; - 88 -> {81}; - 89 -> {91}; - 90 -> {85} [color=green]; - 90 -> {87} [color=red]; + 86 -> {87}; + 87 -> {88}; + 89 -> {90}; + 90 -> {91}; 91 -> {92}; - 92 -> {93}; - 93 -> {97}; - 93 -> {94} [color=red]; + 92 -> {97}; + 92 -> {93} [color=red]; + 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {90}; - 97 -> {99}; - 98 -> {94} [color=green]; + 96 -> {85} [color=green]; + 96 -> {84} [color=red]; + 97 -> {98}; + 98 -> {99}; 99 -> {100}; - 100 -> {101}; - 101 -> {109}; - 101 -> {102} [color=red]; + 100 -> {109}; + 100 -> {102} [color=red]; + 101 -> {103} [color=red]; 102 -> {103} [color=green]; - 103 -> {105}; - 104 -> {103} [color=red]; + 103 -> {104}; + 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {98}; - 109 -> {111}; - 110 -> {102} [color=green]; - 110 -> {104} [color=red]; + 108 -> {93} [color=green]; + 109 -> {110}; + 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {110}; + 117 -> {102} [color=green]; + 117 -> {101} [color=red]; subgraph cluster_32 { color=red 118 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_33 { color=blue - 120 [label="Enter block"]; + 119 [label="Enter block"]; subgraph cluster_34 { color=blue - 121 [label="Enter when"]; + 120 [label="Enter when"]; subgraph cluster_35 { color=blue - 123 [label="Enter when branch condition "]; - 124 [label="Access variable this@R|/test_4|"]; - 125 [label="Type operator: (this@R|/test_4| !is R|A|)"]; - 126 [label="Exit when branch condition"]; + 121 [label="Enter when branch condition "]; + 122 [label="Access variable this@R|/test_4|"]; + 123 [label="Type operator: (this@R|/test_4| !is R|A|)"]; + 124 [label="Exit when branch condition"]; } subgraph cluster_36 { color=blue - 137 [label="Enter when branch condition else"]; - 138 [label="Exit when branch condition"]; + 125 [label="Enter when branch condition else"]; + 126 [label="Exit when branch condition"]; } - 139 [label="Enter when branch result"]; + 127 [label="Enter when branch result"]; subgraph cluster_37 { color=blue - 140 [label="Enter block"]; + 128 [label="Enter block"]; subgraph cluster_38 { color=blue - 141 [label="Enter when"]; + 129 [label="Enter when"]; subgraph cluster_39 { color=blue - 143 [label="Enter when branch condition "]; - 144 [label="Access variable this@R|/test_4|"]; - 145 [label="Type operator: (this@R|/test_4| !is R|B|)"]; - 146 [label="Exit when branch condition"]; + 130 [label="Enter when branch condition "]; + 131 [label="Access variable this@R|/test_4|"]; + 132 [label="Type operator: (this@R|/test_4| !is R|B|)"]; + 133 [label="Exit when branch condition"]; } subgraph cluster_40 { color=blue - 157 [label="Enter when branch condition else"]; - 158 [label="Exit when branch condition"]; + 134 [label="Enter when branch condition else"]; + 135 [label="Exit when branch condition"]; } - 159 [label="Enter when branch result"]; + 136 [label="Enter when branch result"]; subgraph cluster_41 { color=blue - 160 [label="Enter block"]; - 161 [label="Access variable this@R|/test_4|"]; - 162 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; - 163 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; - 164 [label="Access variable this@R|/test_4|"]; - 165 [label="Function call: this@R|/test_4|.R|/B.bar|()"]; - 166 [label="Function call: this@R|/test_4|.R|/B.bar|()"]; - 167 [label="Exit block"]; + 137 [label="Enter block"]; + 138 [label="Access variable this@R|/test_4|"]; + 139 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; + 140 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; + 141 [label="Access variable this@R|/test_4|"]; + 142 [label="Function call: this@R|/test_4|.R|/B.bar|()"]; + 143 [label="Function call: this@R|/test_4|.R|/B.bar|()"]; + 144 [label="Exit block"]; } - 168 [label="Exit when branch result"]; - 147 [label="Enter when branch result"]; + 145 [label="Exit when branch result"]; + 146 [label="Enter when branch result"]; subgraph cluster_42 { color=blue - 148 [label="Enter block"]; - 149 [label="Access variable this@R|/test_4|"]; - 150 [label="Function call: this@R|/test_4|.#()"]; - 151 [label="Function call: #()"]; - 152 [label="Access variable this@R|/test_4|"]; + 147 [label="Enter block"]; + 148 [label="Access variable this@R|/test_4|"]; + 149 [label="Function call: this@R|/test_4|.#()"]; + 150 [label="Function call: #()"]; + 151 [label="Access variable this@R|/test_4|"]; + 152 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; 153 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; - 154 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; - 155 [label="Exit block"]; + 154 [label="Exit block"]; } - 156 [label="Exit when branch result"]; - 142 [label="Exit when"]; + 155 [label="Exit when branch result"]; + 156 [label="Exit when"]; } - 169 [label="Exit block"]; + 157 [label="Exit block"]; } - 170 [label="Exit when branch result"]; - 127 [label="Enter when branch result"]; + 158 [label="Exit when branch result"]; + 159 [label="Enter when branch result"]; subgraph cluster_43 { color=blue - 128 [label="Enter block"]; - 129 [label="Access variable this@R|/test_4|"]; - 130 [label="Function call: this@R|/test_4|.#()"]; - 131 [label="Function call: #()"]; - 132 [label="Access variable this@R|/test_4|"]; - 133 [label="Function call: this@R|/test_4|.#()"]; - 134 [label="Function call: #()"]; - 135 [label="Exit block"]; + 160 [label="Enter block"]; + 161 [label="Access variable this@R|/test_4|"]; + 162 [label="Function call: this@R|/test_4|.#()"]; + 163 [label="Function call: #()"]; + 164 [label="Access variable this@R|/test_4|"]; + 165 [label="Function call: this@R|/test_4|.#()"]; + 166 [label="Function call: #()"]; + 167 [label="Exit block"]; } - 136 [label="Exit when branch result"]; - 122 [label="Exit when"]; + 168 [label="Exit when branch result"]; + 169 [label="Exit when"]; } - 171 [label="Access variable this@R|/test_4|"]; - 172 [label="Function call: this@R|/test_4|.#()"]; - 173 [label="Function call: #()"]; - 174 [label="Access variable this@R|/test_4|"]; - 175 [label="Function call: this@R|/test_4|.#()"]; - 176 [label="Function call: #()"]; - 177 [label="Exit block"]; + 170 [label="Access variable this@R|/test_4|"]; + 171 [label="Function call: this@R|/test_4|.#()"]; + 172 [label="Function call: #()"]; + 173 [label="Access variable this@R|/test_4|"]; + 174 [label="Function call: this@R|/test_4|.#()"]; + 175 [label="Function call: #()"]; + 176 [label="Exit block"]; } - 119 [label="Exit function test_4" style="filled" fillcolor=red]; + 177 [label="Exit function test_4" style="filled" fillcolor=red]; } - 118 -> {120}; + 118 -> {119}; + 119 -> {120}; 120 -> {121}; - 121 -> {123}; - 122 -> {171}; + 121 -> {122}; + 122 -> {123}; 123 -> {124}; - 124 -> {125}; + 124 -> {159 125}; 125 -> {126}; - 126 -> {127 137}; + 126 -> {127}; 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {134}; + 133 -> {146 134}; 134 -> {135}; 135 -> {136}; - 136 -> {122}; + 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {143}; - 142 -> {169}; + 141 -> {142}; + 142 -> {143}; 143 -> {144}; 144 -> {145}; - 145 -> {146}; - 146 -> {147 157}; + 145 -> {156}; + 146 -> {147}; 147 -> {148}; 148 -> {149}; 149 -> {150}; @@ -473,9 +474,9 @@ digraph implicitReceivers_kt { 153 -> {154}; 154 -> {155}; 155 -> {156}; - 156 -> {142}; + 156 -> {157}; 157 -> {158}; - 158 -> {159}; + 158 -> {169}; 159 -> {160}; 160 -> {161}; 161 -> {162}; @@ -485,53 +486,52 @@ digraph implicitReceivers_kt { 165 -> {166}; 166 -> {167}; 167 -> {168}; - 168 -> {142}; + 168 -> {169}; 169 -> {170}; - 170 -> {122}; + 170 -> {171}; 171 -> {172}; 172 -> {173}; 173 -> {174}; 174 -> {175}; 175 -> {176}; 176 -> {177}; - 177 -> {119}; subgraph cluster_44 { color=red 178 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_45 { color=blue - 180 [label="Enter block"]; + 179 [label="Enter block"]; subgraph cluster_46 { color=blue - 181 [label="Enter when"]; + 180 [label="Enter when"]; subgraph cluster_47 { color=blue - 183 [label="Enter when branch condition "]; - 184 [label="Access variable this@R|/test_5|"]; - 185 [label="Type operator: (this@R|/test_5| is R|kotlin/collections/List<*>|)"]; - 186 [label="Exit when branch condition"]; + 181 [label="Enter when branch condition "]; + 182 [label="Access variable this@R|/test_5|"]; + 183 [label="Type operator: (this@R|/test_5| is R|kotlin/collections/List<*>|)"]; + 184 [label="Exit when branch condition"]; } subgraph cluster_48 { color=blue - 192 [label="Enter when branch condition "]; - 193 [label="Access variable this@R|/test_5|"]; - 194 [label="Type operator: (this@R|/test_5| is R|kotlin/String|)"]; - 195 [label="Exit when branch condition"]; + 185 [label="Enter when branch condition "]; + 186 [label="Access variable this@R|/test_5|"]; + 187 [label="Type operator: (this@R|/test_5| is R|kotlin/String|)"]; + 188 [label="Exit when branch condition"]; } subgraph cluster_49 { color=blue - 201 [label="Enter when branch condition else"]; - 202 [label="Exit when branch condition"]; + 189 [label="Enter when branch condition else"]; + 190 [label="Exit when branch condition"]; } - 203 [label="Enter when branch result"]; + 191 [label="Enter when branch result"]; subgraph cluster_50 { color=blue - 204 [label="Enter block"]; - 205 [label="Const: Int(0)"]; - 206 [label="Exit block"]; + 192 [label="Enter block"]; + 193 [label="Const: Int(0)"]; + 194 [label="Exit block"]; } - 207 [label="Exit when branch result"]; + 195 [label="Exit when branch result"]; 196 [label="Enter when branch result"]; subgraph cluster_51 { color=blue @@ -540,17 +540,17 @@ digraph implicitReceivers_kt { 199 [label="Exit block"]; } 200 [label="Exit when branch result"]; - 187 [label="Enter when branch result"]; + 201 [label="Enter when branch result"]; subgraph cluster_52 { color=blue - 188 [label="Enter block"]; - 189 [label="Access variable R|kotlin/collections/List.size|"]; - 190 [label="Exit block"]; + 202 [label="Enter block"]; + 203 [label="Access variable R|kotlin/collections/List.size|"]; + 204 [label="Exit block"]; } - 191 [label="Exit when branch result"]; - 182 [label="Exit when"]; + 205 [label="Exit when branch result"]; + 206 [label="Exit when"]; } - 208 [label="Jump: ^test_5 when () { + 207 [label="Jump: ^test_5 when () { (this@R|/test_5| is R|kotlin/collections/List<*>|) -> { this@R|/test_5|.R|kotlin/collections/List.size| } @@ -562,62 +562,63 @@ digraph implicitReceivers_kt { } } "]; - 209 [label="Stub" style="filled" fillcolor=gray]; - 210 [label="Exit block" style="filled" fillcolor=gray]; + 208 [label="Stub" style="filled" fillcolor=gray]; + 209 [label="Exit block" style="filled" fillcolor=gray]; } - 179 [label="Exit function test_5" style="filled" fillcolor=red]; + 210 [label="Exit function test_5" style="filled" fillcolor=red]; } - 178 -> {180}; + 178 -> {179}; + 179 -> {180}; 180 -> {181}; - 181 -> {183}; - 182 -> {208}; + 181 -> {182}; + 182 -> {183}; 183 -> {184}; - 184 -> {185}; + 184 -> {201 185}; 185 -> {186}; - 186 -> {187 192}; + 186 -> {187}; 187 -> {188}; - 188 -> {189}; + 188 -> {196 189}; 189 -> {190}; 190 -> {191}; - 191 -> {182}; + 191 -> {192}; 192 -> {193}; 193 -> {194}; 194 -> {195}; - 195 -> {196 201}; + 195 -> {206}; 196 -> {197}; 197 -> {198}; 198 -> {199}; 199 -> {200}; - 200 -> {182}; + 200 -> {206}; 201 -> {202}; 202 -> {203}; 203 -> {204}; 204 -> {205}; 205 -> {206}; 206 -> {207}; - 207 -> {182}; - 208 -> {179}; + 207 -> {210}; + 207 -> {208} [style=dotted]; 208 -> {209} [style=dotted]; 209 -> {210} [style=dotted]; - 210 -> {179} [style=dotted]; subgraph cluster_53 { color=red 211 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_54 { color=blue - 213 [label="Enter block"]; - 214 [label="Access variable this@R|/test_6|"]; - 215 [label="Type operator: (this@R|/test_6| as R|kotlin/collections/List<*>|)"]; - 216 [label="Access variable R|kotlin/collections/List.size|"]; - 217 [label="Access variable this@R|/test_6|"]; - 218 [label="Type operator: (this@R|/test_6| as R|kotlin/String|)"]; - 219 [label="Access variable R|kotlin/String.length|"]; - 220 [label="Exit block"]; + 212 [label="Enter block"]; + 213 [label="Access variable this@R|/test_6|"]; + 214 [label="Type operator: (this@R|/test_6| as R|kotlin/collections/List<*>|)"]; + 215 [label="Access variable R|kotlin/collections/List.size|"]; + 216 [label="Access variable this@R|/test_6|"]; + 217 [label="Type operator: (this@R|/test_6| as R|kotlin/String|)"]; + 218 [label="Access variable R|kotlin/String.length|"]; + 219 [label="Exit block"]; } - 212 [label="Exit function test_6" style="filled" fillcolor=red]; + 220 [label="Exit function test_6" style="filled" fillcolor=red]; } - 211 -> {213}; + 211 -> {212}; + 212 -> {213}; 213 -> {214}; 214 -> {215}; 215 -> {216}; @@ -625,6 +626,5 @@ digraph implicitReceivers_kt { 217 -> {218}; 218 -> {219}; 219 -> {220}; - 220 -> {212}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/thisOfExtensionProperty.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/thisOfExtensionProperty.dot index 44e16684fd3..519dcf644aa 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/thisOfExtensionProperty.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/thisOfExtensionProperty.dot @@ -5,10 +5,10 @@ digraph thisOfExtensionProperty_kt { subgraph cluster_0 { color=red - 1 [label="Enter class A" style="filled" fillcolor=red]; - 0 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter class A" style="filled" fillcolor=red]; + 1 [label="Exit class A" style="filled" fillcolor=red]; } - 1 -> {0} [color=green]; + 0 -> {1} [color=green]; subgraph cluster_1 { color=red @@ -19,83 +19,83 @@ digraph thisOfExtensionProperty_kt { subgraph cluster_2 { color=red - 5 [label="Enter class B" style="filled" fillcolor=red]; - 4 [label="Exit class B" style="filled" fillcolor=red]; + 4 [label="Enter class B" style="filled" fillcolor=red]; + 5 [label="Exit class B" style="filled" fillcolor=red]; } - 5 -> {4} [color=green]; + 4 -> {5} [color=green]; subgraph cluster_3 { color=red 6 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 8 [label="Enter block"]; + 7 [label="Enter block"]; subgraph cluster_5 { color=blue - 10 [label="Enter &&"]; - 11 [label="Access variable this@R|/check_1|"]; - 12 [label="Type operator: (this@R|/check_1| is R|B|)"]; - 13 [label="Exit left part of &&"]; - 14 [label="Enter right part of &&"]; - 15 [label="Access variable R|/B.b|"]; - 9 [label="Exit &&"]; + 8 [label="Enter &&"]; + 9 [label="Access variable this@R|/check_1|"]; + 10 [label="Type operator: (this@R|/check_1| is R|B|)"]; + 11 [label="Exit left part of &&"]; + 12 [label="Enter right part of &&"]; + 13 [label="Access variable R|/B.b|"]; + 14 [label="Exit &&"]; } - 16 [label="Jump: ^ (this@R|/check_1| is R|B|) && this@R|/check_1|.R|/B.b|"]; - 17 [label="Stub" style="filled" fillcolor=gray]; - 18 [label="Exit block" style="filled" fillcolor=gray]; + 15 [label="Jump: ^ (this@R|/check_1| is R|B|) && this@R|/check_1|.R|/B.b|"]; + 16 [label="Stub" style="filled" fillcolor=gray]; + 17 [label="Exit block" style="filled" fillcolor=gray]; } - 7 [label="Exit function getter" style="filled" fillcolor=red]; + 18 [label="Exit function getter" style="filled" fillcolor=red]; } - 6 -> {8}; - 8 -> {10}; - 9 -> {16}; + 6 -> {7}; + 7 -> {8}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; - 11 -> {12}; + 11 -> {14 12}; 12 -> {13}; - 13 -> {9 14}; + 13 -> {14}; 14 -> {15}; - 15 -> {9}; - 16 -> {7}; + 15 -> {18}; + 15 -> {16} [style=dotted]; 16 -> {17} [style=dotted]; 17 -> {18} [style=dotted]; - 18 -> {7} [style=dotted]; subgraph cluster_6 { color=red 19 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 21 [label="Enter block"]; + 20 [label="Enter block"]; subgraph cluster_8 { color=blue - 23 [label="Enter &&"]; - 24 [label="Access variable this@R|/check_2|"]; - 25 [label="Type operator: (this@R|/check_2| is R|B|)"]; - 26 [label="Exit left part of &&"]; - 27 [label="Enter right part of &&"]; - 28 [label="Access variable this@R|/check_2|"]; - 29 [label="Access variable R|/B.b|"]; - 22 [label="Exit &&"]; + 21 [label="Enter &&"]; + 22 [label="Access variable this@R|/check_2|"]; + 23 [label="Type operator: (this@R|/check_2| is R|B|)"]; + 24 [label="Exit left part of &&"]; + 25 [label="Enter right part of &&"]; + 26 [label="Access variable this@R|/check_2|"]; + 27 [label="Access variable R|/B.b|"]; + 28 [label="Exit &&"]; } - 30 [label="Jump: ^ (this@R|/check_2| is R|B|) && this@R|/check_2|.R|/B.b|"]; - 31 [label="Stub" style="filled" fillcolor=gray]; - 32 [label="Exit block" style="filled" fillcolor=gray]; + 29 [label="Jump: ^ (this@R|/check_2| is R|B|) && this@R|/check_2|.R|/B.b|"]; + 30 [label="Stub" style="filled" fillcolor=gray]; + 31 [label="Exit block" style="filled" fillcolor=gray]; } - 20 [label="Exit function getter" style="filled" fillcolor=red]; + 32 [label="Exit function getter" style="filled" fillcolor=red]; } - 19 -> {21}; - 21 -> {23}; - 22 -> {30}; + 19 -> {20}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; 23 -> {24}; - 24 -> {25}; + 24 -> {28 25}; 25 -> {26}; - 26 -> {22 27}; + 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {22}; - 30 -> {20}; + 29 -> {32}; + 29 -> {30} [style=dotted]; 30 -> {31} [style=dotted]; 31 -> {32} [style=dotted]; - 32 -> {20} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot index 354b0782e5b..71dab85abd2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot @@ -6,32 +6,32 @@ digraph assignSafeCall_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red 3 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_2 { color=blue - 5 [label="Enter block"]; - 6 [label="Const: Int(1)"]; - 7 [label="Jump: ^foo Int(1)"]; - 8 [label="Stub" style="filled" fillcolor=gray]; - 9 [label="Exit block" style="filled" fillcolor=gray]; + 4 [label="Enter block"]; + 5 [label="Const: Int(1)"]; + 6 [label="Jump: ^foo Int(1)"]; + 7 [label="Stub" style="filled" fillcolor=gray]; + 8 [label="Exit block" style="filled" fillcolor=gray]; } - 4 [label="Exit function foo" style="filled" fillcolor=red]; + 9 [label="Exit function foo" style="filled" fillcolor=red]; } - 3 -> {5}; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; - 6 -> {7}; - 7 -> {4}; + 6 -> {9}; + 6 -> {7} [style=dotted]; 7 -> {8} [style=dotted]; 8 -> {9} [style=dotted]; - 9 -> {4} [style=dotted]; subgraph cluster_3 { color=red @@ -45,236 +45,236 @@ digraph assignSafeCall_kt { 15 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 17 [label="Enter block"]; - 18 [label="Exit block"]; + 16 [label="Enter block"]; + 17 [label="Exit block"]; } - 16 [label="Exit function bar" style="filled" fillcolor=red]; + 18 [label="Exit function bar" style="filled" fillcolor=red]; } - 15 -> {17}; + 15 -> {16}; + 16 -> {17}; 17 -> {18}; - 18 -> {16}; subgraph cluster_6 { color=red - 20 [label="Enter class A" style="filled" fillcolor=red]; + 19 [label="Enter class A" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue 12 [label="Enter property" style="filled" fillcolor=red]; - 14 [label="Const: Int(1)"]; - 13 [label="Exit property" style="filled" fillcolor=red]; + 13 [label="Const: Int(1)"]; + 14 [label="Exit property" style="filled" fillcolor=red]; } - 19 [label="Exit class A" style="filled" fillcolor=red]; + 20 [label="Exit class A" style="filled" fillcolor=red]; } - 20 -> {12} [color=green]; - 12 -> {14}; - 13 -> {19} [color=green]; - 14 -> {13}; + 19 -> {12} [color=green]; + 12 -> {13}; + 13 -> {14}; + 14 -> {20} [color=green]; subgraph cluster_8 { color=red 21 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 23 [label="Enter block"]; - 24 [label="Access variable R|/a|"]; - 25 [label="Enter safe call"]; - 27 [label="Access variable R|/A.x|"]; + 22 [label="Enter block"]; + 23 [label="Access variable R|/a|"]; + 24 [label="Enter safe call"]; + 25 [label="Access variable R|/A.x|"]; 26 [label="Exit safe call"]; - 28 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + 27 [label="Variable declaration: lval x: R|kotlin/Int?|"]; subgraph cluster_10 { color=blue - 29 [label="Enter when"]; + 28 [label="Enter when"]; subgraph cluster_11 { color=blue - 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"]; + 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"]; } - 42 [label="Synthetic else branch"]; - 36 [label="Enter when branch result"]; + 34 [label="Synthetic else branch"]; + 35 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 37 [label="Enter block"]; - 38 [label="Access variable R|/a|"]; - 39 [label="Function call: R|/a|.R|/A.bar|()"]; - 40 [label="Exit block"]; + 36 [label="Enter block"]; + 37 [label="Access variable R|/a|"]; + 38 [label="Function call: R|/a|.R|/A.bar|()"]; + 39 [label="Exit block"]; } - 41 [label="Exit when branch result"]; - 30 [label="Exit when"]; + 40 [label="Exit when branch result"]; + 41 [label="Exit when"]; } - 43 [label="Exit block"]; + 42 [label="Exit block"]; } - 22 [label="Exit function test_1" style="filled" fillcolor=red]; + 43 [label="Exit function test_1" style="filled" fillcolor=red]; } - 21 -> {23}; - 23 -> {24}; - 24 -> {25 26}; - 25 -> {27}; - 26 -> {28}; - 27 -> {26}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24 26}; + 24 -> {25}; + 25 -> {26}; + 26 -> {27}; + 27 -> {28}; 28 -> {29}; - 29 -> {31}; - 30 -> {43}; + 29 -> {30}; + 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {34}; - 34 -> {35}; - 35 -> {36 42}; + 33 -> {35 34}; + 34 -> {41}; + 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {30}; - 42 -> {30}; - 43 -> {22}; + 41 -> {42}; + 42 -> {43}; subgraph cluster_13 { color=red 44 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 46 [label="Enter block"]; - 47 [label="Access variable R|/a|"]; - 48 [label="Enter safe call"]; - 50 [label="Function call: $subj$.R|/A.foo|()"]; + 45 [label="Enter block"]; + 46 [label="Access variable R|/a|"]; + 47 [label="Enter safe call"]; + 48 [label="Function call: $subj$.R|/A.foo|()"]; 49 [label="Exit safe call"]; - 51 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + 50 [label="Variable declaration: lval x: R|kotlin/Int?|"]; subgraph cluster_15 { color=blue - 52 [label="Enter when"]; + 51 [label="Enter when"]; subgraph cluster_16 { color=blue - 54 [label="Enter when branch condition "]; - 55 [label="Access variable R|/x|"]; - 56 [label="Const: Null(null)"]; - 57 [label="Operator !="]; - 58 [label="Exit when branch condition"]; + 52 [label="Enter when branch condition "]; + 53 [label="Access variable R|/x|"]; + 54 [label="Const: Null(null)"]; + 55 [label="Operator !="]; + 56 [label="Exit when branch condition"]; } - 65 [label="Synthetic else branch"]; - 59 [label="Enter when branch result"]; + 57 [label="Synthetic else branch"]; + 58 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 60 [label="Enter block"]; - 61 [label="Access variable R|/a|"]; - 62 [label="Function call: R|/a|.R|/A.bar|()"]; - 63 [label="Exit block"]; + 59 [label="Enter block"]; + 60 [label="Access variable R|/a|"]; + 61 [label="Function call: R|/a|.R|/A.bar|()"]; + 62 [label="Exit block"]; } - 64 [label="Exit when branch result"]; - 53 [label="Exit when"]; + 63 [label="Exit when branch result"]; + 64 [label="Exit when"]; } - 66 [label="Exit block"]; + 65 [label="Exit block"]; } - 45 [label="Exit function test_2" style="filled" fillcolor=red]; + 66 [label="Exit function test_2" style="filled" fillcolor=red]; } - 44 -> {46}; - 46 -> {47}; - 47 -> {48 49}; - 48 -> {50}; - 49 -> {51}; - 50 -> {49}; + 44 -> {45}; + 45 -> {46}; + 46 -> {47 49}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50}; + 50 -> {51}; 51 -> {52}; - 52 -> {54}; - 53 -> {66}; + 52 -> {53}; + 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57}; - 57 -> {58}; - 58 -> {59 65}; + 56 -> {58 57}; + 57 -> {64}; + 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {53}; - 65 -> {53}; - 66 -> {45}; + 64 -> {65}; + 65 -> {66}; subgraph cluster_18 { color=red 67 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 69 [label="Enter block"]; + 68 [label="Enter block"]; subgraph cluster_20 { color=blue - 70 [label="Enter when"]; - 72 [label="Access variable R|/x|"]; - 73 [label="Type operator: (R|/x| as? R|A|)"]; - 74 [label="Variable declaration: lval : R|A?|"]; + 69 [label="Enter when"]; + 70 [label="Access variable R|/x|"]; + 71 [label="Type operator: (R|/x| as? R|A|)"]; + 72 [label="Variable declaration: lval : R|A?|"]; subgraph cluster_21 { color=blue - 75 [label="Enter when branch condition "]; - 76 [label="Const: Null(null)"]; - 77 [label="Operator =="]; - 78 [label="Exit when branch condition"]; + 73 [label="Enter when branch condition "]; + 74 [label="Const: Null(null)"]; + 75 [label="Operator =="]; + 76 [label="Exit when branch condition"]; } subgraph cluster_22 { color=blue - 85 [label="Enter when branch condition else"]; - 86 [label="Exit when branch condition"]; + 77 [label="Enter when branch condition else"]; + 78 [label="Exit when branch condition"]; } - 87 [label="Enter when branch result"]; + 79 [label="Enter when branch result"]; subgraph cluster_23 { color=blue - 88 [label="Enter block"]; - 89 [label="Access variable R|/|"]; - 90 [label="Exit block"]; + 80 [label="Enter block"]; + 81 [label="Access variable R|/|"]; + 82 [label="Exit block"]; } - 91 [label="Exit when branch result"]; - 79 [label="Enter when branch result"]; + 83 [label="Exit when branch result"]; + 84 [label="Enter when branch result"]; subgraph cluster_24 { color=blue - 80 [label="Enter block"]; - 81 [label="Jump: ^test_3 Unit"]; - 82 [label="Stub" style="filled" fillcolor=gray]; - 83 [label="Exit block" style="filled" fillcolor=gray]; + 85 [label="Enter block"]; + 86 [label="Jump: ^test_3 Unit"]; + 87 [label="Stub" style="filled" fillcolor=gray]; + 88 [label="Exit block" style="filled" fillcolor=gray]; } - 84 [label="Exit when branch result" style="filled" fillcolor=gray]; - 71 [label="Exit when"]; + 89 [label="Exit when branch result" style="filled" fillcolor=gray]; + 90 [label="Exit when"]; } - 92 [label="Variable declaration: lval a: R|A|"]; - 93 [label="Access variable R|/a|"]; - 94 [label="Function call: R|/a|.R|/A.foo|()"]; - 95 [label="Access variable R|/x|"]; - 96 [label="Function call: R|/x|.R|/A.foo|()"]; - 97 [label="Exit block"]; + 91 [label="Variable declaration: lval a: R|A|"]; + 92 [label="Access variable R|/a|"]; + 93 [label="Function call: R|/a|.R|/A.foo|()"]; + 94 [label="Access variable R|/x|"]; + 95 [label="Function call: R|/x|.R|/A.foo|()"]; + 96 [label="Exit block"]; } - 68 [label="Exit function test_3" style="filled" fillcolor=red]; + 97 [label="Exit function test_3" style="filled" fillcolor=red]; } - 67 -> {69}; + 67 -> {68}; + 68 -> {69}; 69 -> {70}; - 70 -> {72}; - 71 -> {92}; + 70 -> {71}; + 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {77}; + 76 -> {84 77}; 77 -> {78}; - 78 -> {79 85}; + 78 -> {79}; 79 -> {80}; 80 -> {81}; - 81 -> {68}; - 81 -> {82} [style=dotted]; - 82 -> {83} [style=dotted]; - 83 -> {84} [style=dotted]; - 84 -> {71} [style=dotted]; + 81 -> {82}; + 82 -> {83}; + 83 -> {90}; + 84 -> {85}; 85 -> {86}; - 86 -> {87}; - 87 -> {88}; - 88 -> {89}; - 89 -> {90}; + 86 -> {97}; + 86 -> {87} [style=dotted]; + 87 -> {88} [style=dotted]; + 88 -> {89} [style=dotted]; + 89 -> {90} [style=dotted]; 90 -> {91}; - 91 -> {71}; + 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; 96 -> {97}; - 97 -> {68}; subgraph cluster_25 { color=red @@ -299,215 +299,215 @@ digraph assignSafeCall_kt { subgraph cluster_28 { color=red - 105 [label="Enter class B" style="filled" fillcolor=red]; - 104 [label="Exit class B" style="filled" fillcolor=red]; + 104 [label="Enter class B" style="filled" fillcolor=red]; + 105 [label="Exit class B" style="filled" fillcolor=red]; } - 105 -> {104} [color=green]; + 104 -> {105} [color=green]; subgraph cluster_29 { color=red 106 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_30 { color=blue - 108 [label="Enter block"]; - 109 [label="Access variable R|/a|"]; - 110 [label="Enter safe call"]; - 112 [label="Access variable R|/B.x|"]; + 107 [label="Enter block"]; + 108 [label="Access variable R|/a|"]; + 109 [label="Enter safe call"]; + 110 [label="Access variable R|/B.x|"]; 111 [label="Exit safe call"]; - 113 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + 112 [label="Variable declaration: lval x: R|kotlin/Int?|"]; subgraph cluster_31 { color=blue - 114 [label="Enter when"]; + 113 [label="Enter when"]; subgraph cluster_32 { color=blue - 116 [label="Enter when branch condition "]; - 117 [label="Access variable R|/x|"]; - 118 [label="Const: Null(null)"]; - 119 [label="Operator !="]; - 120 [label="Exit when branch condition"]; + 114 [label="Enter when branch condition "]; + 115 [label="Access variable R|/x|"]; + 116 [label="Const: Null(null)"]; + 117 [label="Operator !="]; + 118 [label="Exit when branch condition"]; } - 127 [label="Synthetic else branch"]; - 121 [label="Enter when branch result"]; + 119 [label="Synthetic else branch"]; + 120 [label="Enter when branch result"]; subgraph cluster_33 { color=blue - 122 [label="Enter block"]; - 123 [label="Access variable R|/a|"]; - 124 [label="Function call: R|/a|.R|/B.bar|()"]; - 125 [label="Exit block"]; + 121 [label="Enter block"]; + 122 [label="Access variable R|/a|"]; + 123 [label="Function call: R|/a|.R|/B.bar|()"]; + 124 [label="Exit block"]; } - 126 [label="Exit when branch result"]; - 115 [label="Exit when"]; + 125 [label="Exit when branch result"]; + 126 [label="Exit when"]; } - 128 [label="Exit block"]; + 127 [label="Exit block"]; } - 107 [label="Exit function test_1" style="filled" fillcolor=red]; + 128 [label="Exit function test_1" style="filled" fillcolor=red]; } - 106 -> {108}; - 108 -> {109}; - 109 -> {110 111}; - 110 -> {112}; - 111 -> {113}; - 112 -> {111}; + 106 -> {107}; + 107 -> {108}; + 108 -> {109 111}; + 109 -> {110}; + 110 -> {111}; + 111 -> {112}; + 112 -> {113}; 113 -> {114}; - 114 -> {116}; - 115 -> {128}; + 114 -> {115}; + 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {119}; - 119 -> {120}; - 120 -> {121 127}; + 118 -> {120 119}; + 119 -> {126}; + 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; - 126 -> {115}; - 127 -> {115}; - 128 -> {107}; + 126 -> {127}; + 127 -> {128}; subgraph cluster_34 { color=red 129 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_35 { color=blue - 131 [label="Enter block"]; - 132 [label="Access variable R|/a|"]; - 133 [label="Enter safe call"]; - 135 [label="Function call: $subj$.R|/B.foo|()"]; + 130 [label="Enter block"]; + 131 [label="Access variable R|/a|"]; + 132 [label="Enter safe call"]; + 133 [label="Function call: $subj$.R|/B.foo|()"]; 134 [label="Exit safe call"]; - 136 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + 135 [label="Variable declaration: lval x: R|kotlin/Int?|"]; subgraph cluster_36 { color=blue - 137 [label="Enter when"]; + 136 [label="Enter when"]; subgraph cluster_37 { color=blue - 139 [label="Enter when branch condition "]; - 140 [label="Access variable R|/x|"]; - 141 [label="Const: Null(null)"]; - 142 [label="Operator !="]; - 143 [label="Exit when branch condition"]; + 137 [label="Enter when branch condition "]; + 138 [label="Access variable R|/x|"]; + 139 [label="Const: Null(null)"]; + 140 [label="Operator !="]; + 141 [label="Exit when branch condition"]; } - 150 [label="Synthetic else branch"]; - 144 [label="Enter when branch result"]; + 142 [label="Synthetic else branch"]; + 143 [label="Enter when branch result"]; subgraph cluster_38 { color=blue - 145 [label="Enter block"]; - 146 [label="Access variable R|/a|"]; - 147 [label="Function call: R|/a|.R|/B.bar|()"]; - 148 [label="Exit block"]; + 144 [label="Enter block"]; + 145 [label="Access variable R|/a|"]; + 146 [label="Function call: R|/a|.R|/B.bar|()"]; + 147 [label="Exit block"]; } - 149 [label="Exit when branch result"]; - 138 [label="Exit when"]; + 148 [label="Exit when branch result"]; + 149 [label="Exit when"]; } - 151 [label="Exit block"]; + 150 [label="Exit block"]; } - 130 [label="Exit function test_2" style="filled" fillcolor=red]; + 151 [label="Exit function test_2" style="filled" fillcolor=red]; } - 129 -> {131}; - 131 -> {132}; - 132 -> {133 134}; - 133 -> {135}; - 134 -> {136}; - 135 -> {134}; + 129 -> {130}; + 130 -> {131}; + 131 -> {132 134}; + 132 -> {133}; + 133 -> {134}; + 134 -> {135}; + 135 -> {136}; 136 -> {137}; - 137 -> {139}; - 138 -> {151}; + 137 -> {138}; + 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {142}; - 142 -> {143}; - 143 -> {144 150}; + 141 -> {143 142}; + 142 -> {149}; + 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; 147 -> {148}; 148 -> {149}; - 149 -> {138}; - 150 -> {138}; - 151 -> {130}; + 149 -> {150}; + 150 -> {151}; subgraph cluster_39 { color=red 152 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_40 { color=blue - 154 [label="Enter block"]; + 153 [label="Enter block"]; subgraph cluster_41 { color=blue - 155 [label="Enter when"]; - 157 [label="Access variable R|/x|"]; - 158 [label="Type operator: (R|/x| as? R|B|)"]; - 159 [label="Variable declaration: lval : R|B?|"]; + 154 [label="Enter when"]; + 155 [label="Access variable R|/x|"]; + 156 [label="Type operator: (R|/x| as? R|B|)"]; + 157 [label="Variable declaration: lval : R|B?|"]; subgraph cluster_42 { color=blue - 160 [label="Enter when branch condition "]; - 161 [label="Const: Null(null)"]; - 162 [label="Operator =="]; - 163 [label="Exit when branch condition"]; + 158 [label="Enter when branch condition "]; + 159 [label="Const: Null(null)"]; + 160 [label="Operator =="]; + 161 [label="Exit when branch condition"]; } subgraph cluster_43 { color=blue - 170 [label="Enter when branch condition else"]; - 171 [label="Exit when branch condition"]; + 162 [label="Enter when branch condition else"]; + 163 [label="Exit when branch condition"]; } - 172 [label="Enter when branch result"]; + 164 [label="Enter when branch result"]; subgraph cluster_44 { color=blue - 173 [label="Enter block"]; - 174 [label="Access variable R|/|"]; - 175 [label="Exit block"]; + 165 [label="Enter block"]; + 166 [label="Access variable R|/|"]; + 167 [label="Exit block"]; } - 176 [label="Exit when branch result"]; - 164 [label="Enter when branch result"]; + 168 [label="Exit when branch result"]; + 169 [label="Enter when branch result"]; subgraph cluster_45 { color=blue - 165 [label="Enter block"]; - 166 [label="Jump: ^test_3 Unit"]; - 167 [label="Stub" style="filled" fillcolor=gray]; - 168 [label="Exit block" style="filled" fillcolor=gray]; + 170 [label="Enter block"]; + 171 [label="Jump: ^test_3 Unit"]; + 172 [label="Stub" style="filled" fillcolor=gray]; + 173 [label="Exit block" style="filled" fillcolor=gray]; } - 169 [label="Exit when branch result" style="filled" fillcolor=gray]; - 156 [label="Exit when"]; + 174 [label="Exit when branch result" style="filled" fillcolor=gray]; + 175 [label="Exit when"]; } - 177 [label="Variable declaration: lval a: R|B|"]; - 178 [label="Access variable R|/a|"]; - 179 [label="Function call: R|/a|.R|/B.foo|()"]; - 180 [label="Access variable R|/x|"]; - 181 [label="Function call: R|/x|.R|/B.foo|()"]; - 182 [label="Exit block"]; + 176 [label="Variable declaration: lval a: R|B|"]; + 177 [label="Access variable R|/a|"]; + 178 [label="Function call: R|/a|.R|/B.foo|()"]; + 179 [label="Access variable R|/x|"]; + 180 [label="Function call: R|/x|.R|/B.foo|()"]; + 181 [label="Exit block"]; } - 153 [label="Exit function test_3" style="filled" fillcolor=red]; + 182 [label="Exit function test_3" style="filled" fillcolor=red]; } - 152 -> {154}; + 152 -> {153}; + 153 -> {154}; 154 -> {155}; - 155 -> {157}; - 156 -> {177}; + 155 -> {156}; + 156 -> {157}; 157 -> {158}; 158 -> {159}; 159 -> {160}; 160 -> {161}; - 161 -> {162}; + 161 -> {169 162}; 162 -> {163}; - 163 -> {164 170}; + 163 -> {164}; 164 -> {165}; 165 -> {166}; - 166 -> {153}; - 166 -> {167} [style=dotted]; - 167 -> {168} [style=dotted]; - 168 -> {169} [style=dotted]; - 169 -> {156} [style=dotted]; + 166 -> {167}; + 167 -> {168}; + 168 -> {175}; + 169 -> {170}; 170 -> {171}; - 171 -> {172}; - 172 -> {173}; - 173 -> {174}; - 174 -> {175}; + 171 -> {182}; + 171 -> {172} [style=dotted]; + 172 -> {173} [style=dotted]; + 173 -> {174} [style=dotted]; + 174 -> {175} [style=dotted]; 175 -> {176}; - 176 -> {156}; + 176 -> {177}; 177 -> {178}; 178 -> {179}; 179 -> {180}; 180 -> {181}; 181 -> {182}; - 182 -> {153}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot index 7a5e270759b..9a22cbf9c20 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot @@ -8,89 +8,90 @@ digraph safeCallAndEqualityToBool_kt { 0 [label="Enter function check" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Const: Boolean(true)"]; - 4 [label="Jump: ^check Boolean(true)"]; - 5 [label="Stub" style="filled" fillcolor=gray]; - 6 [label="Exit block" style="filled" fillcolor=gray]; + 1 [label="Enter block"]; + 2 [label="Const: Boolean(true)"]; + 3 [label="Jump: ^check Boolean(true)"]; + 4 [label="Stub" style="filled" fillcolor=gray]; + 5 [label="Exit block" style="filled" fillcolor=gray]; } - 1 [label="Exit function check" style="filled" fillcolor=red]; + 6 [label="Exit function check" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {4}; - 4 -> {1}; + 3 -> {6}; + 3 -> {4} [style=dotted]; 4 -> {5} [style=dotted]; 5 -> {6} [style=dotted]; - 6 -> {1} [style=dotted]; subgraph cluster_2 { color=red 7 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 9 [label="Enter block"]; + 8 [label="Enter block"]; subgraph cluster_4 { color=blue - 10 [label="Enter when"]; + 9 [label="Enter when"]; subgraph cluster_5 { color=blue - 12 [label="Enter when branch condition "]; - 13 [label="Access variable R|/s|"]; - 14 [label="Enter safe call"]; - 16 [label="Function call: $subj$.R|/check|()"]; - 15 [label="Exit safe call"]; - 17 [label="Const: Boolean(true)"]; - 18 [label="Operator =="]; - 19 [label="Exit when branch condition"]; + 10 [label="Enter when branch condition "]; + 11 [label="Access variable R|/s|"]; + 12 [label="Enter safe call"]; + 13 [label="Function call: $subj$.R|/check|()"]; + 14 [label="Exit safe call"]; + 15 [label="Const: Boolean(true)"]; + 16 [label="Operator =="]; + 17 [label="Exit when branch condition"]; } subgraph cluster_6 { color=blue - 26 [label="Enter when branch condition else"]; - 27 [label="Exit when branch condition"]; + 18 [label="Enter when branch condition else"]; + 19 [label="Exit when branch condition"]; } - 28 [label="Enter when branch result"]; - subgraph cluster_7 { - color=blue - 29 [label="Enter block"]; - 30 [label="Access variable R|/s|"]; - 31 [label="Access variable #"]; - 32 [label="Exit block"]; - } - 33 [label="Exit when branch result"]; 20 [label="Enter when branch result"]; - subgraph cluster_8 { + subgraph cluster_7 { color=blue 21 [label="Enter block"]; 22 [label="Access variable R|/s|"]; - 23 [label="Access variable R|kotlin/String.length|"]; + 23 [label="Access variable #"]; 24 [label="Exit block"]; } 25 [label="Exit when branch result"]; - 11 [label="Exit when"]; + 26 [label="Enter when branch result"]; + subgraph cluster_8 { + color=blue + 27 [label="Enter block"]; + 28 [label="Access variable R|/s|"]; + 29 [label="Access variable R|kotlin/String.length|"]; + 30 [label="Exit block"]; + } + 31 [label="Exit when branch result"]; + 32 [label="Exit when"]; } - 34 [label="Exit block"]; + 33 [label="Exit block"]; } - 8 [label="Exit function test_1" style="filled" fillcolor=red]; + 34 [label="Exit function test_1" style="filled" fillcolor=red]; } - 7 -> {9}; + 7 -> {8}; + 8 -> {9}; 9 -> {10}; - 10 -> {12}; - 11 -> {34}; + 10 -> {11}; + 11 -> {12 14}; 12 -> {13}; - 13 -> {14 15}; - 14 -> {16}; - 15 -> {17}; - 16 -> {15}; - 17 -> {18}; + 13 -> {14}; + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; + 17 -> {26 18}; 18 -> {19}; - 19 -> {20 26}; + 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {11}; + 25 -> {32}; 26 -> {27}; 27 -> {28}; 28 -> {29}; @@ -98,76 +99,76 @@ digraph safeCallAndEqualityToBool_kt { 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {11}; - 34 -> {8}; + 33 -> {34}; subgraph cluster_9 { color=red 35 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 37 [label="Enter block"]; + 36 [label="Enter block"]; subgraph cluster_11 { color=blue - 38 [label="Enter when"]; + 37 [label="Enter when"]; subgraph cluster_12 { color=blue - 40 [label="Enter when branch condition "]; - 41 [label="Access variable R|/s|"]; - 42 [label="Enter safe call"]; - 44 [label="Function call: $subj$.R|/check|()"]; - 43 [label="Exit safe call"]; - 45 [label="Const: Boolean(false)"]; - 46 [label="Operator =="]; - 47 [label="Exit when branch condition"]; + 38 [label="Enter when branch condition "]; + 39 [label="Access variable R|/s|"]; + 40 [label="Enter safe call"]; + 41 [label="Function call: $subj$.R|/check|()"]; + 42 [label="Exit safe call"]; + 43 [label="Const: Boolean(false)"]; + 44 [label="Operator =="]; + 45 [label="Exit when branch condition"]; } subgraph cluster_13 { color=blue - 54 [label="Enter when branch condition else"]; - 55 [label="Exit when branch condition"]; + 46 [label="Enter when branch condition else"]; + 47 [label="Exit when branch condition"]; } - 56 [label="Enter when branch result"]; - subgraph cluster_14 { - color=blue - 57 [label="Enter block"]; - 58 [label="Access variable R|/s|"]; - 59 [label="Access variable #"]; - 60 [label="Exit block"]; - } - 61 [label="Exit when branch result"]; 48 [label="Enter when branch result"]; - subgraph cluster_15 { + subgraph cluster_14 { color=blue 49 [label="Enter block"]; 50 [label="Access variable R|/s|"]; - 51 [label="Access variable R|kotlin/String.length|"]; + 51 [label="Access variable #"]; 52 [label="Exit block"]; } 53 [label="Exit when branch result"]; - 39 [label="Exit when"]; + 54 [label="Enter when branch result"]; + subgraph cluster_15 { + color=blue + 55 [label="Enter block"]; + 56 [label="Access variable R|/s|"]; + 57 [label="Access variable R|kotlin/String.length|"]; + 58 [label="Exit block"]; + } + 59 [label="Exit when branch result"]; + 60 [label="Exit when"]; } - 62 [label="Exit block"]; + 61 [label="Exit block"]; } - 36 [label="Exit function test_2" style="filled" fillcolor=red]; + 62 [label="Exit function test_2" style="filled" fillcolor=red]; } - 35 -> {37}; + 35 -> {36}; + 36 -> {37}; 37 -> {38}; - 38 -> {40}; - 39 -> {62}; + 38 -> {39}; + 39 -> {40 42}; 40 -> {41}; - 41 -> {42 43}; - 42 -> {44}; - 43 -> {45}; - 44 -> {43}; - 45 -> {46}; + 41 -> {42}; + 42 -> {43}; + 43 -> {44}; + 44 -> {45}; + 45 -> {54 46}; 46 -> {47}; - 47 -> {48 54}; + 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; - 53 -> {39}; + 53 -> {60}; 54 -> {55}; 55 -> {56}; 56 -> {57}; @@ -175,76 +176,76 @@ digraph safeCallAndEqualityToBool_kt { 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {39}; - 62 -> {36}; + 61 -> {62}; subgraph cluster_16 { color=red 63 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 65 [label="Enter block"]; + 64 [label="Enter block"]; subgraph cluster_18 { color=blue - 66 [label="Enter when"]; + 65 [label="Enter when"]; subgraph cluster_19 { color=blue - 68 [label="Enter when branch condition "]; - 69 [label="Access variable R|/s|"]; - 70 [label="Enter safe call"]; - 72 [label="Function call: $subj$.R|/check|()"]; - 71 [label="Exit safe call"]; - 73 [label="Const: Boolean(true)"]; - 74 [label="Operator !="]; - 75 [label="Exit when branch condition"]; + 66 [label="Enter when branch condition "]; + 67 [label="Access variable R|/s|"]; + 68 [label="Enter safe call"]; + 69 [label="Function call: $subj$.R|/check|()"]; + 70 [label="Exit safe call"]; + 71 [label="Const: Boolean(true)"]; + 72 [label="Operator !="]; + 73 [label="Exit when branch condition"]; } subgraph cluster_20 { color=blue - 82 [label="Enter when branch condition else"]; - 83 [label="Exit when branch condition"]; + 74 [label="Enter when branch condition else"]; + 75 [label="Exit when branch condition"]; } - 84 [label="Enter when branch result"]; - subgraph cluster_21 { - color=blue - 85 [label="Enter block"]; - 86 [label="Access variable R|/s|"]; - 87 [label="Access variable R|kotlin/String.length|"]; - 88 [label="Exit block"]; - } - 89 [label="Exit when branch result"]; 76 [label="Enter when branch result"]; - subgraph cluster_22 { + subgraph cluster_21 { color=blue 77 [label="Enter block"]; 78 [label="Access variable R|/s|"]; - 79 [label="Access variable #"]; + 79 [label="Access variable R|kotlin/String.length|"]; 80 [label="Exit block"]; } 81 [label="Exit when branch result"]; - 67 [label="Exit when"]; + 82 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 83 [label="Enter block"]; + 84 [label="Access variable R|/s|"]; + 85 [label="Access variable #"]; + 86 [label="Exit block"]; + } + 87 [label="Exit when branch result"]; + 88 [label="Exit when"]; } - 90 [label="Exit block"]; + 89 [label="Exit block"]; } - 64 [label="Exit function test_3" style="filled" fillcolor=red]; + 90 [label="Exit function test_3" style="filled" fillcolor=red]; } - 63 -> {65}; + 63 -> {64}; + 64 -> {65}; 65 -> {66}; - 66 -> {68}; - 67 -> {90}; + 66 -> {67}; + 67 -> {68 70}; 68 -> {69}; - 69 -> {70 71}; - 70 -> {72}; - 71 -> {73}; - 72 -> {71}; - 73 -> {74}; + 69 -> {70}; + 70 -> {71}; + 71 -> {72}; + 72 -> {73}; + 73 -> {82 74}; 74 -> {75}; - 75 -> {76 82}; + 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; - 81 -> {67}; + 81 -> {88}; 82 -> {83}; 83 -> {84}; 84 -> {85}; @@ -252,76 +253,76 @@ digraph safeCallAndEqualityToBool_kt { 86 -> {87}; 87 -> {88}; 88 -> {89}; - 89 -> {67}; - 90 -> {64}; + 89 -> {90}; subgraph cluster_23 { color=red 91 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_24 { color=blue - 93 [label="Enter block"]; + 92 [label="Enter block"]; subgraph cluster_25 { color=blue - 94 [label="Enter when"]; + 93 [label="Enter when"]; subgraph cluster_26 { color=blue - 96 [label="Enter when branch condition "]; - 97 [label="Access variable R|/s|"]; - 98 [label="Enter safe call"]; - 100 [label="Function call: $subj$.R|/check|()"]; - 99 [label="Exit safe call"]; - 101 [label="Const: Boolean(false)"]; - 102 [label="Operator !="]; - 103 [label="Exit when branch condition"]; + 94 [label="Enter when branch condition "]; + 95 [label="Access variable R|/s|"]; + 96 [label="Enter safe call"]; + 97 [label="Function call: $subj$.R|/check|()"]; + 98 [label="Exit safe call"]; + 99 [label="Const: Boolean(false)"]; + 100 [label="Operator !="]; + 101 [label="Exit when branch condition"]; } subgraph cluster_27 { color=blue - 110 [label="Enter when branch condition else"]; - 111 [label="Exit when branch condition"]; + 102 [label="Enter when branch condition else"]; + 103 [label="Exit when branch condition"]; } - 112 [label="Enter when branch result"]; - subgraph cluster_28 { - color=blue - 113 [label="Enter block"]; - 114 [label="Access variable R|/s|"]; - 115 [label="Access variable R|kotlin/String.length|"]; - 116 [label="Exit block"]; - } - 117 [label="Exit when branch result"]; 104 [label="Enter when branch result"]; - subgraph cluster_29 { + subgraph cluster_28 { color=blue 105 [label="Enter block"]; 106 [label="Access variable R|/s|"]; - 107 [label="Access variable #"]; + 107 [label="Access variable R|kotlin/String.length|"]; 108 [label="Exit block"]; } 109 [label="Exit when branch result"]; - 95 [label="Exit when"]; + 110 [label="Enter when branch result"]; + subgraph cluster_29 { + color=blue + 111 [label="Enter block"]; + 112 [label="Access variable R|/s|"]; + 113 [label="Access variable #"]; + 114 [label="Exit block"]; + } + 115 [label="Exit when branch result"]; + 116 [label="Exit when"]; } - 118 [label="Exit block"]; + 117 [label="Exit block"]; } - 92 [label="Exit function test_4" style="filled" fillcolor=red]; + 118 [label="Exit function test_4" style="filled" fillcolor=red]; } - 91 -> {93}; + 91 -> {92}; + 92 -> {93}; 93 -> {94}; - 94 -> {96}; - 95 -> {118}; + 94 -> {95}; + 95 -> {96 98}; 96 -> {97}; - 97 -> {98 99}; - 98 -> {100}; - 99 -> {101}; - 100 -> {99}; - 101 -> {102}; + 97 -> {98}; + 98 -> {99}; + 99 -> {100}; + 100 -> {101}; + 101 -> {110 102}; 102 -> {103}; - 103 -> {104 110}; + 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {95}; + 109 -> {116}; 110 -> {111}; 111 -> {112}; 112 -> {113}; @@ -329,7 +330,6 @@ digraph safeCallAndEqualityToBool_kt { 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {95}; - 118 -> {92}; + 117 -> {118}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot index 299d60b62c2..e631c06fce0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot @@ -8,69 +8,69 @@ digraph safeCalls_kt { 0 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Const: String()"]; - 4 [label="Jump: ^foo String()"]; - 5 [label="Stub" style="filled" fillcolor=gray]; - 6 [label="Exit block" style="filled" fillcolor=gray]; + 1 [label="Enter block"]; + 2 [label="Const: String()"]; + 3 [label="Jump: ^foo String()"]; + 4 [label="Stub" style="filled" fillcolor=gray]; + 5 [label="Exit block" style="filled" fillcolor=gray]; } - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 6 [label="Exit function foo" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {4}; - 4 -> {1}; + 3 -> {6}; + 3 -> {4} [style=dotted]; 4 -> {5} [style=dotted]; 5 -> {6} [style=dotted]; - 6 -> {1} [style=dotted]; subgraph cluster_2 { color=red 7 [label="Enter function let" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 9 [label="Enter block"]; - 10 [label="Exit block"]; + 8 [label="Enter block"]; + 9 [label="Exit block"]; } - 8 [label="Exit function let" style="filled" fillcolor=red]; + 10 [label="Exit function let" style="filled" fillcolor=red]; } - 7 -> {9}; + 7 -> {8}; + 8 -> {9}; 9 -> {10}; - 10 -> {8}; subgraph cluster_4 { color=red 11 [label="Enter function test" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 13 [label="Enter block"]; - 14 [label="Access variable R|/x|"]; - 15 [label="Enter safe call"]; - 17 [label="Access variable R|/x|"]; - 18 [label="Access variable R|kotlin/String.length|"]; - 19 [label="Const: Int(1)"]; - 20 [label="Operator =="]; - 21 [label="Function call: $subj$.R|/foo|(...)"]; - 16 [label="Exit safe call"]; - 22 [label="Access variable R|/x|"]; - 23 [label="Access variable #"]; - 24 [label="Exit block"]; + 12 [label="Enter block"]; + 13 [label="Access variable R|/x|"]; + 14 [label="Enter safe call"]; + 15 [label="Access variable R|/x|"]; + 16 [label="Access variable R|kotlin/String.length|"]; + 17 [label="Const: Int(1)"]; + 18 [label="Operator =="]; + 19 [label="Function call: $subj$.R|/foo|(...)"]; + 20 [label="Exit safe call"]; + 21 [label="Access variable R|/x|"]; + 22 [label="Access variable #"]; + 23 [label="Exit block"]; } - 12 [label="Exit function test" style="filled" fillcolor=red]; + 24 [label="Exit function test" style="filled" fillcolor=red]; } - 11 -> {13}; - 13 -> {14}; - 14 -> {15 16}; - 15 -> {17}; - 16 -> {22}; + 11 -> {12}; + 12 -> {13}; + 13 -> {14 20}; + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {16}; + 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {12}; subgraph cluster_6 { color=red @@ -95,212 +95,212 @@ digraph safeCalls_kt { subgraph cluster_9 { color=red - 32 [label="Enter class A" style="filled" fillcolor=red]; - 31 [label="Exit class A" style="filled" fillcolor=red]; + 31 [label="Enter class A" style="filled" fillcolor=red]; + 32 [label="Exit class A" style="filled" fillcolor=red]; } - 32 -> {31} [color=green]; + 31 -> {32} [color=green]; subgraph cluster_10 { color=red 33 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 35 [label="Enter block"]; - 36 [label="Access variable R|/x|"]; - 37 [label="Type operator: (R|/x| as? R|A|)"]; - 38 [label="Enter safe call"]; - 40 [label="Access variable R|/x|"]; - 41 [label="Function call: $subj$.R|/A.bar|(...)"]; - 39 [label="Exit safe call"]; - 42 [label="Exit block"]; + 34 [label="Enter block"]; + 35 [label="Access variable R|/x|"]; + 36 [label="Type operator: (R|/x| as? R|A|)"]; + 37 [label="Enter safe call"]; + 38 [label="Access variable R|/x|"]; + 39 [label="Function call: $subj$.R|/A.bar|(...)"]; + 40 [label="Exit safe call"]; + 41 [label="Exit block"]; } - 34 [label="Exit function test_2" style="filled" fillcolor=red]; + 42 [label="Exit function test_2" style="filled" fillcolor=red]; } - 33 -> {35}; + 33 -> {34}; + 34 -> {35}; 35 -> {36}; - 36 -> {37}; - 37 -> {38 39}; - 38 -> {40}; - 39 -> {42}; + 36 -> {37 40}; + 37 -> {38}; + 38 -> {39}; + 39 -> {40}; 40 -> {41}; - 41 -> {39}; - 42 -> {34}; + 41 -> {42}; subgraph cluster_12 { color=red 43 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 45 [label="Enter block"]; - 46 [label="Access variable R|/x|"]; - 47 [label="Type operator: (R|/x| as? R|A|)"]; - 48 [label="Enter safe call"]; - 50 [label="Access variable R|/x|"]; - 51 [label="Function call: $subj$.R|/A.bar|(...)"]; - 49 [label="Exit safe call"]; - 52 [label="Enter safe call"]; - 54 [label="Access variable R|/x|"]; - 55 [label="Function call: R|/x|.R|/A.bool|()"]; - 56 [label="Function call: $subj$.R|/foo|(...)"]; - 53 [label="Exit safe call"]; - 57 [label="Enter safe call"]; - 59 [label="Postponed enter to lambda"]; + 44 [label="Enter block"]; + 45 [label="Access variable R|/x|"]; + 46 [label="Type operator: (R|/x| as? R|A|)"]; + 47 [label="Enter safe call"]; + 48 [label="Access variable R|/x|"]; + 49 [label="Function call: $subj$.R|/A.bar|(...)"]; + 50 [label="Exit safe call"]; + 51 [label="Enter safe call"]; + 52 [label="Access variable R|/x|"]; + 53 [label="Function call: R|/x|.R|/A.bool|()"]; + 54 [label="Function call: $subj$.R|/foo|(...)"]; + 55 [label="Exit safe call"]; + 56 [label="Enter safe call"]; + 57 [label="Postponed enter to lambda"]; subgraph cluster_14 { color=blue 65 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 67 [label="Enter block"]; - 68 [label="Access variable R|/x|"]; - 69 [label="Function call: R|/x|.R|/A.bool|()"]; - 70 [label="Exit block"]; + 66 [label="Enter block"]; + 67 [label="Access variable R|/x|"]; + 68 [label="Function call: R|/x|.R|/A.bool|()"]; + 69 [label="Exit block"]; } - 66 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 70 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 60 [label="Postponed exit from lambda"]; - 61 [label="Function call: $subj$.R|/let|(...)"]; - 58 [label="Exit safe call"]; - 62 [label="Access variable R|/x|"]; - 63 [label="Function call: R|/x|.#()"]; - 64 [label="Exit block"]; + 58 [label="Postponed exit from lambda"]; + 59 [label="Function call: $subj$.R|/let|(...)"]; + 60 [label="Exit safe call"]; + 61 [label="Access variable R|/x|"]; + 62 [label="Function call: R|/x|.#()"]; + 63 [label="Exit block"]; } - 44 [label="Exit function test_3" style="filled" fillcolor=red]; + 64 [label="Exit function test_3" style="filled" fillcolor=red]; } - 43 -> {45}; + 43 -> {44}; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; - 47 -> {48 49}; - 48 -> {50}; - 49 -> {52 53}; - 50 -> {51}; - 51 -> {49}; - 52 -> {54}; - 53 -> {57 58}; + 46 -> {47 50}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50}; + 50 -> {51 55}; + 51 -> {52}; + 52 -> {53}; + 53 -> {54}; 54 -> {55}; - 55 -> {56}; - 56 -> {53}; - 57 -> {59}; - 58 -> {62}; - 59 -> {60 65}; + 55 -> {56 60}; + 56 -> {57}; + 57 -> {58 65}; + 58 -> {59}; + 59 -> {60}; 60 -> {61}; - 61 -> {58}; + 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {44}; - 65 -> {67}; + 65 -> {66}; + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {66}; subgraph cluster_16 { color=red 71 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 73 [label="Enter block"]; - 74 [label="Access variable R|/x|"]; - 75 [label="Enter safe call"]; - 77 [label="Function call: $subj$.R|/A.id|()"]; + 72 [label="Enter block"]; + 73 [label="Access variable R|/x|"]; + 74 [label="Enter safe call"]; + 75 [label="Function call: $subj$.R|/A.id|()"]; 76 [label="Exit safe call"]; - 78 [label="Enter safe call"]; - 80 [label="Function call: $subj$.R|/A.bool|()"]; + 77 [label="Enter safe call"]; + 78 [label="Function call: $subj$.R|/A.bool|()"]; 79 [label="Exit safe call"]; - 81 [label="Access variable R|/x|"]; - 82 [label="Function call: R|/x|.#()"]; - 83 [label="Exit block"]; + 80 [label="Access variable R|/x|"]; + 81 [label="Function call: R|/x|.#()"]; + 82 [label="Exit block"]; } - 72 [label="Exit function test_4" style="filled" fillcolor=red]; + 83 [label="Exit function test_4" style="filled" fillcolor=red]; } - 71 -> {73}; - 73 -> {74}; - 74 -> {75 76}; - 75 -> {77}; - 76 -> {78 79}; - 77 -> {76}; - 78 -> {80}; - 79 -> {81}; - 80 -> {79}; + 71 -> {72}; + 72 -> {73}; + 73 -> {74 76}; + 74 -> {75}; + 75 -> {76}; + 76 -> {77 79}; + 77 -> {78}; + 78 -> {79}; + 79 -> {80}; + 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {72}; subgraph cluster_18 { color=red 84 [label="Enter function boo" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 86 [label="Enter block"]; - 87 [label="Exit block"]; + 85 [label="Enter block"]; + 86 [label="Exit block"]; } - 85 [label="Exit function boo" style="filled" fillcolor=red]; + 87 [label="Exit function boo" style="filled" fillcolor=red]; } - 84 -> {86}; + 84 -> {85}; + 85 -> {86}; 86 -> {87}; - 87 -> {85}; subgraph cluster_20 { color=red 88 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 90 [label="Enter block"]; - 91 [label="Access variable R|/x|"]; - 92 [label="Enter safe call"]; - 94 [label="Postponed enter to lambda"]; + 89 [label="Enter block"]; + 90 [label="Access variable R|/x|"]; + 91 [label="Enter safe call"]; + 92 [label="Postponed enter to lambda"]; subgraph cluster_22 { color=blue 107 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 109 [label="Enter block"]; - 110 [label="Jump: ^test_5 Unit"]; - 111 [label="Stub" style="filled" fillcolor=gray]; - 112 [label="Exit block" style="filled" fillcolor=gray]; + 108 [label="Enter block"]; + 109 [label="Jump: ^test_5 Unit"]; + 110 [label="Stub" style="filled" fillcolor=gray]; + 111 [label="Exit block" style="filled" fillcolor=gray]; } - 108 [label="Exit function anonymousFunction" style="filled" fillcolor=red style="filled" fillcolor=gray]; + 112 [label="Exit function anonymousFunction" style="filled" fillcolor=red style="filled" fillcolor=gray]; } - 97 [label="Call arguments union" style="filled" fillcolor=gray]; - 95 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 96 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=gray]; - 98 [label="Stub" style="filled" fillcolor=gray]; - 93 [label="Exit safe call"]; - 99 [label="Enter safe call"]; - 101 [label="Access variable R|/x|"]; - 102 [label="Function call: R|/x|.R|/A.bool|()"]; - 103 [label="Function call: $subj$.R|/boo|(...)"]; - 100 [label="Exit safe call"]; - 104 [label="Access variable R|/x|"]; - 105 [label="Function call: R|/x|.#()"]; - 106 [label="Exit block"]; + 93 [label="Call arguments union" style="filled" fillcolor=gray]; + 94 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 95 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=gray]; + 96 [label="Stub" style="filled" fillcolor=gray]; + 97 [label="Exit safe call"]; + 98 [label="Enter safe call"]; + 99 [label="Access variable R|/x|"]; + 100 [label="Function call: R|/x|.R|/A.bool|()"]; + 101 [label="Function call: $subj$.R|/boo|(...)"]; + 102 [label="Exit safe call"]; + 103 [label="Access variable R|/x|"]; + 104 [label="Function call: R|/x|.#()"]; + 105 [label="Exit block"]; } - 89 [label="Exit function test_5" style="filled" fillcolor=red]; + 106 [label="Exit function test_5" style="filled" fillcolor=red]; } - 88 -> {90}; - 90 -> {91}; - 91 -> {92 93}; - 92 -> {94}; - 93 -> {99 100}; - 94 -> {107}; - 94 -> {95} [color=red]; - 95 -> {96} [style=dotted]; - 96 -> {89 98} [style=dotted]; - 97 -> {96} [style=dotted]; - 98 -> {93} [style=dotted]; - 99 -> {101}; - 100 -> {104}; + 88 -> {89}; + 89 -> {90}; + 90 -> {91 97}; + 91 -> {92}; + 92 -> {107}; + 92 -> {94} [color=red]; + 93 -> {95} [style=dotted]; + 94 -> {95} [style=dotted]; + 95 -> {106 96} [style=dotted]; + 96 -> {97} [style=dotted]; + 97 -> {98 102}; + 98 -> {99}; + 99 -> {100}; + 100 -> {101}; 101 -> {102}; 102 -> {103}; - 103 -> {100}; + 103 -> {104}; 104 -> {105}; 105 -> {106}; - 106 -> {89}; - 107 -> {109}; - 108 -> {95 97} [style=dotted]; - 109 -> {110}; - 110 -> {89}; + 107 -> {108}; + 108 -> {109}; + 109 -> {106}; + 109 -> {110} [style=dotted]; 110 -> {111} [style=dotted]; 111 -> {112} [style=dotted]; - 112 -> {108} [style=dotted]; + 112 -> {94 93} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot index 4e6841f3bb2..84ebe0fc22b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot @@ -5,10 +5,10 @@ digraph smartCastInInit_kt { subgraph cluster_0 { color=red - 1 [label="Enter class I" style="filled" fillcolor=red]; - 0 [label="Exit class I" style="filled" fillcolor=red]; + 0 [label="Enter class I" style="filled" fillcolor=red]; + 1 [label="Exit class I" style="filled" fillcolor=red]; } - 1 -> {0} [color=green]; + 0 -> {1} [color=green]; subgraph cluster_1 { color=red @@ -19,42 +19,42 @@ digraph smartCastInInit_kt { subgraph cluster_2 { color=red - 5 [label="Enter class S" style="filled" fillcolor=red]; - 4 [label="Exit class S" style="filled" fillcolor=red]; + 4 [label="Enter class S" style="filled" fillcolor=red]; + 5 [label="Exit class S" style="filled" fillcolor=red]; } - 5 -> {4} [color=green]; + 4 -> {5} [color=green]; subgraph cluster_3 { color=red 6 [label="Enter function s" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 8 [label="Enter block"]; - 9 [label="Function call: R|kotlin/TODO|()"]; - 10 [label="Stub" style="filled" fillcolor=gray]; - 11 [label="Jump: ^s R|kotlin/TODO|()" style="filled" fillcolor=gray]; - 12 [label="Stub" style="filled" fillcolor=gray]; - 13 [label="Exit block" style="filled" fillcolor=gray]; + 7 [label="Enter block"]; + 8 [label="Function call: R|kotlin/TODO|()"]; + 9 [label="Stub" style="filled" fillcolor=gray]; + 10 [label="Jump: ^s R|kotlin/TODO|()" style="filled" fillcolor=gray]; + 11 [label="Stub" style="filled" fillcolor=gray]; + 12 [label="Exit block" style="filled" fillcolor=gray]; } - 7 [label="Exit function s" style="filled" fillcolor=red]; + 13 [label="Exit function s" style="filled" fillcolor=red]; } - 6 -> {8}; - 8 -> {9}; - 9 -> {7}; + 6 -> {7}; + 7 -> {8}; + 8 -> {13}; + 8 -> {9} [style=dotted]; 9 -> {10} [style=dotted]; - 10 -> {11} [style=dotted]; - 11 -> {7 12} [style=dotted]; + 10 -> {13 11} [style=dotted]; + 11 -> {12} [style=dotted]; 12 -> {13} [style=dotted]; - 13 -> {7} [style=dotted]; subgraph cluster_5 { color=red 14 [label="Enter function " style="filled" fillcolor=red]; - 16 [label="Delegated constructor call: super()"]; - 15 [label="Exit function " style="filled" fillcolor=red]; + 15 [label="Delegated constructor call: super()"]; + 16 [label="Exit function " style="filled" fillcolor=red]; } - 14 -> {16}; - 16 -> {15}; + 14 -> {15}; + 15 -> {16}; subgraph cluster_6 { color=red @@ -65,31 +65,31 @@ digraph smartCastInInit_kt { subgraph cluster_7 { color=red - 28 [label="Enter class Main" style="filled" fillcolor=red]; + 27 [label="Enter class Main" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue 19 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 21 [label="Enter block"]; - 22 [label="Function call: R|/s|()"]; - 23 [label="Assignment: R|/Main.x|"]; - 24 [label="Access variable R|/Main.x|"]; - 25 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()"]; - 26 [label="Exit block"]; + 20 [label="Enter block"]; + 21 [label="Function call: R|/s|()"]; + 22 [label="Assignment: R|/Main.x|"]; + 23 [label="Access variable R|/Main.x|"]; + 24 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()"]; + 25 [label="Exit block"]; } - 20 [label="Exit init block" style="filled" fillcolor=red]; + 26 [label="Exit init block" style="filled" fillcolor=red]; } - 27 [label="Exit class Main" style="filled" fillcolor=red]; + 28 [label="Exit class Main" style="filled" fillcolor=red]; } - 28 -> {19} [color=green]; - 19 -> {21}; - 20 -> {27} [color=green]; + 27 -> {19} [color=green]; + 19 -> {20}; + 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {20}; + 26 -> {28} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot index 75fea0a76f5..93e8b5092b8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot @@ -8,120 +8,120 @@ digraph smartcastToNothing_kt { 0 [label="Enter function getNothing" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Function call: R|java/lang/Exception.Exception|()"]; - 4 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 5 [label="Stub" style="filled" fillcolor=gray]; - 6 [label="Jump: ^getNothing throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; - 7 [label="Stub" style="filled" fillcolor=gray]; - 8 [label="Exit block" style="filled" fillcolor=gray]; + 1 [label="Enter block"]; + 2 [label="Function call: R|java/lang/Exception.Exception|()"]; + 3 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 4 [label="Stub" style="filled" fillcolor=gray]; + 5 [label="Jump: ^getNothing throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Exit block" style="filled" fillcolor=gray]; } - 1 [label="Exit function getNothing" style="filled" fillcolor=red]; + 8 [label="Exit function getNothing" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {4}; - 4 -> {1}; + 3 -> {8}; + 3 -> {4} [style=dotted]; 4 -> {5} [style=dotted]; - 5 -> {6} [style=dotted]; - 6 -> {1 7} [style=dotted]; + 5 -> {8 6} [style=dotted]; + 6 -> {7} [style=dotted]; 7 -> {8} [style=dotted]; - 8 -> {1} [style=dotted]; subgraph cluster_2 { color=red 9 [label="Enter function getNullableNothing" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 11 [label="Enter block"]; - 12 [label="Const: Null(null)"]; - 13 [label="Jump: ^getNullableNothing Null(null)"]; - 14 [label="Stub" style="filled" fillcolor=gray]; - 15 [label="Exit block" style="filled" fillcolor=gray]; + 10 [label="Enter block"]; + 11 [label="Const: Null(null)"]; + 12 [label="Jump: ^getNullableNothing Null(null)"]; + 13 [label="Stub" style="filled" fillcolor=gray]; + 14 [label="Exit block" style="filled" fillcolor=gray]; } - 10 [label="Exit function getNullableNothing" style="filled" fillcolor=red]; + 15 [label="Exit function getNullableNothing" style="filled" fillcolor=red]; } - 9 -> {11}; + 9 -> {10}; + 10 -> {11}; 11 -> {12}; - 12 -> {13}; - 13 -> {10}; + 12 -> {15}; + 12 -> {13} [style=dotted]; 13 -> {14} [style=dotted]; 14 -> {15} [style=dotted]; - 15 -> {10} [style=dotted]; subgraph cluster_4 { color=red 16 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 18 [label="Enter block"]; - 19 [label="Const: Int(1)"]; - 20 [label="Jump: ^ Int(1)"]; - 21 [label="Stub" style="filled" fillcolor=gray]; - 22 [label="Exit block" style="filled" fillcolor=gray]; + 17 [label="Enter block"]; + 18 [label="Const: Int(1)"]; + 19 [label="Jump: ^ Int(1)"]; + 20 [label="Stub" style="filled" fillcolor=gray]; + 21 [label="Exit block" style="filled" fillcolor=gray]; } - 17 [label="Exit function getter" style="filled" fillcolor=red]; + 22 [label="Exit function getter" style="filled" fillcolor=red]; } - 16 -> {18}; + 16 -> {17}; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; - 20 -> {17}; + 19 -> {22}; + 19 -> {20} [style=dotted]; 20 -> {21} [style=dotted]; 21 -> {22} [style=dotted]; - 22 -> {17} [style=dotted]; subgraph cluster_6 { color=red 23 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 25 [label="Enter block"]; - 26 [label="Const: Int(2)"]; - 27 [label="Jump: ^ Int(2)"]; - 28 [label="Stub" style="filled" fillcolor=gray]; - 29 [label="Exit block" style="filled" fillcolor=gray]; + 24 [label="Enter block"]; + 25 [label="Const: Int(2)"]; + 26 [label="Jump: ^ Int(2)"]; + 27 [label="Stub" style="filled" fillcolor=gray]; + 28 [label="Exit block" style="filled" fillcolor=gray]; } - 24 [label="Exit function getter" style="filled" fillcolor=red]; + 29 [label="Exit function getter" style="filled" fillcolor=red]; } - 23 -> {25}; + 23 -> {24}; + 24 -> {25}; 25 -> {26}; - 26 -> {27}; - 27 -> {24}; + 26 -> {29}; + 26 -> {27} [style=dotted]; 27 -> {28} [style=dotted]; 28 -> {29} [style=dotted]; - 29 -> {24} [style=dotted]; subgraph cluster_8 { color=red 30 [label="Enter function myListOf" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 32 [label="Enter block"]; - 33 [label="Const: Null(null)"]; - 34 [label="Check not null: Null(null)!!"]; - 35 [label="Jump: ^myListOf Null(null)!!"]; - 36 [label="Stub" style="filled" fillcolor=gray]; - 37 [label="Exit block" style="filled" fillcolor=gray]; + 31 [label="Enter block"]; + 32 [label="Const: Null(null)"]; + 33 [label="Check not null: Null(null)!!"]; + 34 [label="Jump: ^myListOf Null(null)!!"]; + 35 [label="Stub" style="filled" fillcolor=gray]; + 36 [label="Exit block" style="filled" fillcolor=gray]; } - 31 [label="Exit function myListOf" style="filled" fillcolor=red]; + 37 [label="Exit function myListOf" style="filled" fillcolor=red]; } - 30 -> {32}; + 30 -> {31}; + 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {35}; - 35 -> {31}; + 34 -> {37}; + 34 -> {35} [style=dotted]; 35 -> {36} [style=dotted]; 36 -> {37} [style=dotted]; - 37 -> {31} [style=dotted]; subgraph cluster_10 { color=red 38 [label="Enter function " style="filled" fillcolor=red]; - 40 [label="Delegated constructor call: super()"]; - 39 [label="Exit function " style="filled" fillcolor=red]; + 39 [label="Delegated constructor call: super()"]; + 40 [label="Exit function " style="filled" fillcolor=red]; } - 38 -> {40}; - 40 -> {39}; + 38 -> {39}; + 39 -> {40}; subgraph cluster_11 { color=red @@ -139,169 +139,169 @@ digraph smartcastToNothing_kt { subgraph cluster_13 { color=red - 52 [label="Enter class A" style="filled" fillcolor=red]; + 51 [label="Enter class A" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue 43 [label="Enter property" style="filled" fillcolor=red]; - 45 [label="Const: Int(1)"]; - 44 [label="Exit property" style="filled" fillcolor=red]; + 44 [label="Const: Int(1)"]; + 45 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_15 { color=blue 48 [label="Enter property" style="filled" fillcolor=red]; - 50 [label="Const: Boolean(true)"]; - 49 [label="Exit property" style="filled" fillcolor=red]; + 49 [label="Const: Boolean(true)"]; + 50 [label="Exit property" style="filled" fillcolor=red]; } - 51 [label="Exit class A" style="filled" fillcolor=red]; + 52 [label="Exit class A" style="filled" fillcolor=red]; } - 52 -> {43} [color=green]; - 43 -> {45}; - 44 -> {48} [color=green]; - 45 -> {44}; - 48 -> {50}; - 49 -> {51} [color=green]; - 50 -> {49}; + 51 -> {43} [color=green]; + 43 -> {44}; + 44 -> {45}; + 45 -> {48} [color=green]; + 48 -> {49}; + 49 -> {50}; + 50 -> {52} [color=green]; subgraph cluster_16 { color=red 53 [label="Enter function test_0" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 55 [label="Enter block"]; - 56 [label="Const: Null(null)"]; - 57 [label="Variable declaration: lvar s: R|A?|"]; - 58 [label="Access variable R|/results|"]; - 59 [label="Function call: R|/results|.R|FakeOverride|>|()"]; - 60 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; + 54 [label="Enter block"]; + 55 [label="Const: Null(null)"]; + 56 [label="Variable declaration: lvar s: R|A?|"]; + 57 [label="Access variable R|/results|"]; + 58 [label="Function call: R|/results|.R|FakeOverride|>|()"]; + 59 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; subgraph cluster_18 { color=blue - 61 [label="Enter while loop"]; + 60 [label="Enter while loop"]; subgraph cluster_19 { color=blue - 63 [label="Enter loop condition"]; - 64 [label="Access variable R|/|"]; - 65 [label="Function call: R|/|.R|kotlin/collections/Iterator.hasNext|()"]; - 66 [label="Exit loop condition"]; + 61 [label="Enter loop condition"]; + 62 [label="Access variable R|/|"]; + 63 [label="Function call: R|/|.R|kotlin/collections/Iterator.hasNext|()"]; + 64 [label="Exit loop condition"]; } subgraph cluster_20 { color=blue - 67 [label="Enter loop block"]; + 65 [label="Enter loop block"]; subgraph cluster_21 { color=blue - 68 [label="Enter block"]; - 69 [label="Access variable R|/|"]; - 70 [label="Function call: R|/|.R|FakeOverride|()"]; - 71 [label="Stub" style="filled" fillcolor=gray]; - 72 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray]; - 73 [label="Access variable R|/result|" style="filled" fillcolor=gray]; - 74 [label="Stub" style="filled" fillcolor=gray]; - 75 [label="Assignment: R|/s|" style="filled" fillcolor=gray]; + 66 [label="Enter block"]; + 67 [label="Access variable R|/|"]; + 68 [label="Function call: R|/|.R|FakeOverride|()"]; + 69 [label="Stub" style="filled" fillcolor=gray]; + 70 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray]; + 71 [label="Access variable R|/result|" style="filled" fillcolor=gray]; + 72 [label="Stub" style="filled" fillcolor=gray]; + 73 [label="Assignment: R|/s|" style="filled" fillcolor=gray]; subgraph cluster_22 { color=blue - 76 [label="Enter when" style="filled" fillcolor=gray]; + 74 [label="Enter when" style="filled" fillcolor=gray]; subgraph cluster_23 { color=blue - 78 [label="Enter when branch condition " style="filled" fillcolor=gray]; - 79 [label="Access variable R|/result|" style="filled" fillcolor=gray]; - 80 [label="Stub" style="filled" fillcolor=gray]; - 81 [label="Access variable #" style="filled" fillcolor=gray]; - 82 [label="Exit when branch condition" style="filled" fillcolor=gray]; + 75 [label="Enter when branch condition " style="filled" fillcolor=gray]; + 76 [label="Access variable R|/result|" style="filled" fillcolor=gray]; + 77 [label="Stub" style="filled" fillcolor=gray]; + 78 [label="Access variable #" style="filled" fillcolor=gray]; + 79 [label="Exit when branch condition" style="filled" fillcolor=gray]; } - 89 [label="Synthetic else branch" style="filled" fillcolor=gray]; - 83 [label="Enter when branch result" style="filled" fillcolor=gray]; + 80 [label="Synthetic else branch" style="filled" fillcolor=gray]; + 81 [label="Enter when branch result" style="filled" fillcolor=gray]; subgraph cluster_24 { color=blue - 84 [label="Enter block" style="filled" fillcolor=gray]; - 85 [label="Jump: break@@@[R|/|.R|kotlin/collections/Iterator.hasNext|()] " style="filled" fillcolor=gray]; - 86 [label="Stub" style="filled" fillcolor=gray]; - 87 [label="Exit block" style="filled" fillcolor=gray]; + 82 [label="Enter block" style="filled" fillcolor=gray]; + 83 [label="Jump: break@@@[R|/|.R|kotlin/collections/Iterator.hasNext|()] " style="filled" fillcolor=gray]; + 84 [label="Stub" style="filled" fillcolor=gray]; + 85 [label="Exit block" style="filled" fillcolor=gray]; } - 88 [label="Exit when branch result" style="filled" fillcolor=gray]; - 77 [label="Exit when" style="filled" fillcolor=gray]; + 86 [label="Exit when branch result" style="filled" fillcolor=gray]; + 87 [label="Exit when" style="filled" fillcolor=gray]; } - 90 [label="Exit block" style="filled" fillcolor=gray]; + 88 [label="Exit block" style="filled" fillcolor=gray]; } - 91 [label="Exit loop block" style="filled" fillcolor=gray]; + 89 [label="Exit loop block" style="filled" fillcolor=gray]; } - 62 [label="Exit whileloop"]; + 90 [label="Exit whileloop"]; } - 92 [label="Access variable R|/s|"]; - 93 [label="Enter safe call"]; - 95 [label="Postponed enter to lambda"]; + 91 [label="Access variable R|/s|"]; + 92 [label="Enter safe call"]; + 93 [label="Postponed enter to lambda"]; subgraph cluster_25 { color=blue 100 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_26 { color=blue - 102 [label="Enter block"]; - 103 [label="Access variable R|/it|"]; - 104 [label="Access variable R|/A.a|"]; - 105 [label="Exit block"]; + 101 [label="Enter block"]; + 102 [label="Access variable R|/it|"]; + 103 [label="Access variable R|/A.a|"]; + 104 [label="Exit block"]; } - 101 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 105 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 98 [label="Call arguments union" style="filled" fillcolor=yellow]; - 96 [label="Postponed exit from lambda"]; - 97 [label="Function call: $subj$.R|kotlin/let|(...)"]; - 94 [label="Exit safe call"]; - 99 [label="Exit block"]; + 94 [label="Call arguments union" style="filled" fillcolor=yellow]; + 95 [label="Postponed exit from lambda"]; + 96 [label="Function call: $subj$.R|kotlin/let|(...)"]; + 97 [label="Exit safe call"]; + 98 [label="Exit block"]; } - 54 [label="Exit function test_0" style="filled" fillcolor=red]; + 99 [label="Exit function test_0" style="filled" fillcolor=red]; } - 53 -> {55}; + 53 -> {54}; + 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {63}; - 62 -> {92}; + 61 -> {62}; + 62 -> {63}; 63 -> {64}; - 64 -> {65}; + 64 -> {90 65}; 65 -> {66}; - 66 -> {62 67}; + 66 -> {67}; 67 -> {68}; - 68 -> {69}; - 69 -> {70}; - 70 -> {54}; + 68 -> {99}; + 68 -> {69} [style=dotted]; + 69 -> {70} [style=dotted]; 70 -> {71} [style=dotted]; - 71 -> {72} [style=dotted]; + 71 -> {99 72} [style=dotted]; 72 -> {73} [style=dotted]; - 73 -> {54 74} [style=dotted]; + 73 -> {74} [style=dotted]; 74 -> {75} [style=dotted]; 75 -> {76} [style=dotted]; - 76 -> {78} [style=dotted]; - 77 -> {90} [style=dotted]; + 76 -> {99 77} [style=dotted]; + 77 -> {78} [style=dotted]; 78 -> {79} [style=dotted]; - 79 -> {54 80} [style=dotted]; - 80 -> {81} [style=dotted]; + 79 -> {81 80} [style=dotted]; + 80 -> {87} [style=dotted]; 81 -> {82} [style=dotted]; - 82 -> {83 89} [style=dotted]; - 83 -> {84} [style=dotted]; + 82 -> {83} [style=dotted]; + 83 -> {90 84} [style=dotted]; 84 -> {85} [style=dotted]; - 85 -> {62 86} [style=dotted]; + 85 -> {86} [style=dotted]; 86 -> {87} [style=dotted]; 87 -> {88} [style=dotted]; - 88 -> {77} [style=dotted]; - 89 -> {77} [style=dotted]; - 90 -> {91} [style=dotted]; - 91 -> {63} [color=green style=dotted]; - 92 -> {93 94}; - 93 -> {95}; - 94 -> {99}; - 95 -> {100}; - 95 -> {96} [color=red]; - 96 -> {97} [color=green]; - 97 -> {94}; - 98 -> {97} [color=red]; - 99 -> {54}; - 100 -> {102}; - 101 -> {96} [color=green]; - 101 -> {98} [color=red]; + 88 -> {89} [style=dotted]; + 89 -> {61} [color=green style=dotted]; + 90 -> {91}; + 91 -> {92 97}; + 92 -> {93}; + 93 -> {100}; + 93 -> {95} [color=red]; + 94 -> {96} [color=red]; + 95 -> {96} [color=green]; + 96 -> {97}; + 97 -> {98}; + 98 -> {99}; + 100 -> {101}; + 101 -> {102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; - 105 -> {101}; + 105 -> {95} [color=green]; + 105 -> {94} [color=red]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/stability/overridenOpenVal.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/stability/overridenOpenVal.dot index 3be6af084c9..58b2ae6889c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/stability/overridenOpenVal.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/stability/overridenOpenVal.dot @@ -6,11 +6,11 @@ digraph overridenOpenVal_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red @@ -21,138 +21,138 @@ digraph overridenOpenVal_kt { subgraph cluster_2 { color=red - 9 [label="Enter class A" style="filled" fillcolor=red]; + 8 [label="Enter class A" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue 5 [label="Enter property" style="filled" fillcolor=red]; - 7 [label="Access variable R|/x|"]; - 6 [label="Exit property" style="filled" fillcolor=red]; + 6 [label="Access variable R|/x|"]; + 7 [label="Exit property" style="filled" fillcolor=red]; } - 8 [label="Exit class A" style="filled" fillcolor=red]; + 9 [label="Exit class A" style="filled" fillcolor=red]; } - 9 -> {5} [color=green]; - 5 -> {7}; - 6 -> {8} [color=green]; - 7 -> {6}; + 8 -> {5} [color=green]; + 5 -> {6}; + 6 -> {7}; + 7 -> {9} [color=green]; subgraph cluster_4 { color=red 10 [label="Enter function " style="filled" fillcolor=red]; - 12 [label="Access variable R|/x|"]; - 13 [label="Delegated constructor call: super(...)"]; - 11 [label="Exit function " style="filled" fillcolor=red]; + 11 [label="Access variable R|/x|"]; + 12 [label="Delegated constructor call: super(...)"]; + 13 [label="Exit function " style="filled" fillcolor=red]; } - 10 -> {12}; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; - 13 -> {11}; subgraph cluster_5 { color=red 14 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 16 [label="Enter block"]; + 15 [label="Enter block"]; subgraph cluster_7 { color=blue - 17 [label="Enter when"]; + 16 [label="Enter when"]; subgraph cluster_8 { color=blue - 19 [label="Enter when branch condition "]; - 20 [label="Access variable R|/A.x|"]; - 21 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"]; - 22 [label="Exit when branch condition"]; + 17 [label="Enter when branch condition "]; + 18 [label="Access variable R|/A.x|"]; + 19 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"]; + 20 [label="Exit when branch condition"]; } - 29 [label="Synthetic else branch"]; - 23 [label="Enter when branch result"]; + 21 [label="Synthetic else branch"]; + 22 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 24 [label="Enter block"]; - 25 [label="Access variable R|/A.x|"]; - 26 [label="Access variable R|kotlin/String.length|"]; - 27 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Access variable R|/A.x|"]; + 25 [label="Access variable R|kotlin/String.length|"]; + 26 [label="Exit block"]; } - 28 [label="Exit when branch result"]; - 18 [label="Exit when"]; + 27 [label="Exit when branch result"]; + 28 [label="Exit when"]; } - 30 [label="Exit block"]; + 29 [label="Exit block"]; } - 15 [label="Exit function test_1" style="filled" fillcolor=red]; + 30 [label="Exit function test_1" style="filled" fillcolor=red]; } - 14 -> {16}; + 14 -> {15}; + 15 -> {16}; 16 -> {17}; - 17 -> {19}; - 18 -> {30}; + 17 -> {18}; + 18 -> {19}; 19 -> {20}; - 20 -> {21}; - 21 -> {22}; - 22 -> {23 29}; + 20 -> {22 21}; + 21 -> {28}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {18}; - 29 -> {18}; - 30 -> {15}; + 28 -> {29}; + 29 -> {30}; subgraph cluster_10 { color=red - 32 [label="Enter class B" style="filled" fillcolor=red]; - 31 [label="Exit class B" style="filled" fillcolor=red]; + 31 [label="Enter class B" style="filled" fillcolor=red]; + 32 [label="Exit class B" style="filled" fillcolor=red]; } - 32 -> {31} [color=green]; + 31 -> {32} [color=green]; subgraph cluster_11 { color=red 33 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 35 [label="Enter block"]; + 34 [label="Enter block"]; subgraph cluster_13 { color=blue - 36 [label="Enter when"]; + 35 [label="Enter when"]; subgraph cluster_14 { color=blue - 38 [label="Enter when branch condition "]; - 39 [label="Access variable R|/b|"]; - 40 [label="Access variable R|/A.x|"]; - 41 [label="Type operator: (R|/b|.R|/A.x| is R|kotlin/String|)"]; - 42 [label="Exit when branch condition"]; + 36 [label="Enter when branch condition "]; + 37 [label="Access variable R|/b|"]; + 38 [label="Access variable R|/A.x|"]; + 39 [label="Type operator: (R|/b|.R|/A.x| is R|kotlin/String|)"]; + 40 [label="Exit when branch condition"]; } - 50 [label="Synthetic else branch"]; - 43 [label="Enter when branch result"]; + 41 [label="Synthetic else branch"]; + 42 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/b|"]; - 46 [label="Access variable R|/A.x|"]; - 47 [label="Access variable R|kotlin/String.length|"]; - 48 [label="Exit block"]; + 43 [label="Enter block"]; + 44 [label="Access variable R|/b|"]; + 45 [label="Access variable R|/A.x|"]; + 46 [label="Access variable R|kotlin/String.length|"]; + 47 [label="Exit block"]; } - 49 [label="Exit when branch result"]; - 37 [label="Exit when"]; + 48 [label="Exit when branch result"]; + 49 [label="Exit when"]; } - 51 [label="Exit block"]; + 50 [label="Exit block"]; } - 34 [label="Exit function test_2" style="filled" fillcolor=red]; + 51 [label="Exit function test_2" style="filled" fillcolor=red]; } - 33 -> {35}; + 33 -> {34}; + 34 -> {35}; 35 -> {36}; - 36 -> {38}; - 37 -> {51}; + 36 -> {37}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {41}; - 41 -> {42}; - 42 -> {43 50}; + 40 -> {42 41}; + 41 -> {49}; + 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {37}; - 50 -> {37}; - 51 -> {34}; + 49 -> {50}; + 50 -> {51}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot index 764f2dfd61f..b5e8abdcfe4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot @@ -6,98 +6,99 @@ digraph delayedAssignment_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red 3 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_2 { color=blue - 5 [label="Enter block"]; - 6 [label="Exit block"]; + 4 [label="Enter block"]; + 5 [label="Exit block"]; } - 4 [label="Exit function foo" style="filled" fillcolor=red]; + 6 [label="Exit function foo" style="filled" fillcolor=red]; } - 3 -> {5}; + 3 -> {4}; + 4 -> {5}; 5 -> {6}; - 6 -> {4}; subgraph cluster_3 { color=red - 8 [label="Enter class A" style="filled" fillcolor=red]; - 7 [label="Exit class A" style="filled" fillcolor=red]; + 7 [label="Enter class A" style="filled" fillcolor=red]; + 8 [label="Exit class A" style="filled" fillcolor=red]; } - 8 -> {7} [color=green]; + 7 -> {8} [color=green]; subgraph cluster_4 { color=red 9 [label="Enter function test" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 11 [label="Enter block"]; - 12 [label="Variable declaration: lval a: R|A?|"]; + 10 [label="Enter block"]; + 11 [label="Variable declaration: lval a: R|A?|"]; subgraph cluster_6 { color=blue - 13 [label="Enter when"]; + 12 [label="Enter when"]; subgraph cluster_7 { color=blue - 15 [label="Enter when branch condition "]; - 16 [label="Access variable R|/b|"]; - 17 [label="Exit when branch condition"]; + 13 [label="Enter when branch condition "]; + 14 [label="Access variable R|/b|"]; + 15 [label="Exit when branch condition"]; } subgraph cluster_8 { color=blue - 26 [label="Enter when branch condition else"]; - 27 [label="Exit when branch condition"]; + 16 [label="Enter when branch condition else"]; + 17 [label="Exit when branch condition"]; } - 28 [label="Enter when branch result"]; + 18 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 29 [label="Enter block"]; - 30 [label="Const: Null(null)"]; - 31 [label="Assignment: R|/a|"]; - 32 [label="Exit block"]; + 19 [label="Enter block"]; + 20 [label="Const: Null(null)"]; + 21 [label="Assignment: R|/a|"]; + 22 [label="Exit block"]; } - 33 [label="Exit when branch result"]; - 18 [label="Enter when branch result"]; + 23 [label="Exit when branch result"]; + 24 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 19 [label="Enter block"]; - 20 [label="Function call: R|/A.A|()"]; - 21 [label="Assignment: R|/a|"]; - 22 [label="Access variable R|/a|"]; - 23 [label="Function call: R|/a|.R|/A.foo|()"]; - 24 [label="Exit block"]; + 25 [label="Enter block"]; + 26 [label="Function call: R|/A.A|()"]; + 27 [label="Assignment: R|/a|"]; + 28 [label="Access variable R|/a|"]; + 29 [label="Function call: R|/a|.R|/A.foo|()"]; + 30 [label="Exit block"]; } - 25 [label="Exit when branch result"]; - 14 [label="Exit when"]; + 31 [label="Exit when branch result"]; + 32 [label="Exit when"]; } - 34 [label="Access variable R|/a|"]; - 35 [label="Function call: R|/a|.#()"]; - 36 [label="Exit block"]; + 33 [label="Access variable R|/a|"]; + 34 [label="Function call: R|/a|.#()"]; + 35 [label="Exit block"]; } - 10 [label="Exit function test" style="filled" fillcolor=red]; + 36 [label="Exit function test" style="filled" fillcolor=red]; } - 9 -> {11}; + 9 -> {10}; + 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {15}; - 14 -> {34}; - 15 -> {16}; + 13 -> {14}; + 14 -> {15}; + 15 -> {24 16}; 16 -> {17}; - 17 -> {18 26}; + 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {24}; + 23 -> {32}; 24 -> {25}; - 25 -> {14}; + 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; @@ -105,9 +106,8 @@ digraph delayedAssignment_kt { 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {14}; + 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {10}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/smartcastAfterReassignment.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/smartcastAfterReassignment.dot index 0da594290e9..b027af358ba 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/smartcastAfterReassignment.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/smartcastAfterReassignment.dot @@ -8,18 +8,19 @@ digraph smartcastAfterReassignment_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Const: Int(1)"]; - 4 [label="Variable declaration: lvar x: R|kotlin/Any|"]; - 5 [label="Const: String()"]; - 6 [label="Assignment: R|/x|"]; - 7 [label="Access variable R|/x|"]; - 8 [label="Access variable R|kotlin/String.length|"]; - 9 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Const: Int(1)"]; + 3 [label="Variable declaration: lvar x: R|kotlin/Any|"]; + 4 [label="Const: String()"]; + 5 [label="Assignment: R|/x|"]; + 6 [label="Access variable R|/x|"]; + 7 [label="Access variable R|kotlin/String.length|"]; + 8 [label="Exit block"]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 9 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; @@ -27,88 +28,88 @@ digraph smartcastAfterReassignment_kt { 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {1}; subgraph cluster_2 { color=red 10 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 12 [label="Enter block"]; - 13 [label="Const: Null(null)"]; - 14 [label="Variable declaration: lvar x: R|kotlin/String?|"]; + 11 [label="Enter block"]; + 12 [label="Const: Null(null)"]; + 13 [label="Variable declaration: lvar x: R|kotlin/String?|"]; subgraph cluster_4 { color=blue - 15 [label="Enter when"]; + 14 [label="Enter when"]; subgraph cluster_5 { color=blue - 17 [label="Enter when branch condition "]; - 18 [label="Access variable R|/x|"]; - 19 [label="Const: Null(null)"]; - 20 [label="Operator =="]; - 21 [label="Exit when branch condition"]; + 15 [label="Enter when branch condition "]; + 16 [label="Access variable R|/x|"]; + 17 [label="Const: Null(null)"]; + 18 [label="Operator =="]; + 19 [label="Exit when branch condition"]; } - 28 [label="Synthetic else branch"]; - 22 [label="Enter when branch result"]; + 20 [label="Synthetic else branch"]; + 21 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 23 [label="Enter block"]; - 24 [label="Const: String()"]; - 25 [label="Assignment: R|/x|"]; - 26 [label="Exit block"]; + 22 [label="Enter block"]; + 23 [label="Const: String()"]; + 24 [label="Assignment: R|/x|"]; + 25 [label="Exit block"]; } - 27 [label="Exit when branch result"]; - 16 [label="Exit when"]; + 26 [label="Exit when branch result"]; + 27 [label="Exit when"]; } - 29 [label="Access variable R|/x|"]; - 30 [label="Access variable R|kotlin/String.length|"]; - 31 [label="Exit block"]; + 28 [label="Access variable R|/x|"]; + 29 [label="Access variable R|kotlin/String.length|"]; + 30 [label="Exit block"]; } - 11 [label="Exit function test_2" style="filled" fillcolor=red]; + 31 [label="Exit function test_2" style="filled" fillcolor=red]; } - 10 -> {12}; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {17}; - 16 -> {29}; + 15 -> {16}; + 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20}; - 20 -> {21}; - 21 -> {22 28}; + 19 -> {21 20}; + 20 -> {27}; + 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {16}; - 28 -> {16}; + 27 -> {28}; + 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {11}; subgraph cluster_7 { color=red 32 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 34 [label="Enter block"]; - 35 [label="Const: Null(null)"]; - 36 [label="Variable declaration: lvar x: R|kotlin/String?|"]; - 37 [label="Const: String()"]; - 38 [label="Assignment: R|/x|"]; - 39 [label="Access variable R|/x|"]; - 40 [label="Access variable R|kotlin/String.length|"]; - 41 [label="Const: Null(null)"]; - 42 [label="Assignment: R|/x|"]; - 43 [label="Access variable R|/x|"]; - 44 [label="Access variable #"]; - 45 [label="Exit block"]; + 33 [label="Enter block"]; + 34 [label="Const: Null(null)"]; + 35 [label="Variable declaration: lvar x: R|kotlin/String?|"]; + 36 [label="Const: String()"]; + 37 [label="Assignment: R|/x|"]; + 38 [label="Access variable R|/x|"]; + 39 [label="Access variable R|kotlin/String.length|"]; + 40 [label="Const: Null(null)"]; + 41 [label="Assignment: R|/x|"]; + 42 [label="Access variable R|/x|"]; + 43 [label="Access variable #"]; + 44 [label="Exit block"]; } - 33 [label="Exit function test_3" style="filled" fillcolor=red]; + 45 [label="Exit function test_3" style="filled" fillcolor=red]; } - 32 -> {34}; + 32 -> {33}; + 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; @@ -120,6 +121,5 @@ digraph smartcastAfterReassignment_kt { 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {33}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot index 4d0ac5c03b7..9d0869038f7 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot @@ -5,139 +5,139 @@ digraph complexPostponedCfg_kt { subgraph cluster_0 { color=red - 1 [label="Enter class FirBase" style="filled" fillcolor=red]; - 0 [label="Exit class FirBase" style="filled" fillcolor=red]; + 0 [label="Enter class FirBase" style="filled" fillcolor=red]; + 1 [label="Exit class FirBase" style="filled" fillcolor=red]; } - 1 -> {0} [color=green]; + 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 3 [label="Enter class FirFunctionCall" style="filled" fillcolor=red]; - 2 [label="Exit class FirFunctionCall" style="filled" fillcolor=red]; + 2 [label="Enter class FirFunctionCall" style="filled" fillcolor=red]; + 3 [label="Exit class FirFunctionCall" style="filled" fillcolor=red]; } - 3 -> {2} [color=green]; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red 4 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; - 7 [label="Access variable R|/statements|"]; - 8 [label="Function call: R|/statements|.R|kotlin/collections/last|()"]; - 9 [label="Type operator: (R|/statements|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; - 10 [label="Postponed enter to lambda"]; + 5 [label="Enter block"]; + 6 [label="Access variable R|/statements|"]; + 7 [label="Function call: R|/statements|.R|kotlin/collections/last|()"]; + 8 [label="Type operator: (R|/statements|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; + 9 [label="Postponed enter to lambda"]; subgraph cluster_4 { color=blue 21 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 23 [label="Enter block"]; - 24 [label="Postponed enter to lambda"]; + 22 [label="Enter block"]; + 23 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue 28 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 30 [label="Enter block"]; - 31 [label="Access variable this@R|special/anonymous|"]; - 32 [label="Function call: this@R|special/anonymous|.R|FakeOverride|(...)"]; - 33 [label="Access variable R|/arguments|"]; - 34 [label="Function call: R|/arguments|.R|kotlin/collections/last|()"]; - 35 [label="Type operator: (R|/arguments|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; - 36 [label="Postponed enter to lambda"]; + 29 [label="Enter block"]; + 30 [label="Access variable this@R|special/anonymous|"]; + 31 [label="Function call: this@R|special/anonymous|.R|FakeOverride|(...)"]; + 32 [label="Access variable R|/arguments|"]; + 33 [label="Function call: R|/arguments|.R|kotlin/collections/last|()"]; + 34 [label="Type operator: (R|/arguments|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; + 35 [label="Postponed enter to lambda"]; subgraph cluster_8 { color=blue 41 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 43 [label="Enter block"]; - 44 [label="Access variable this@R|special/anonymous|"]; - 45 [label="Function call: this@R|special/anonymous|.R|FakeOverride|(...)"]; - 46 [label="Access variable R|/explicitReceiver|"]; - 47 [label="Type operator: (R|/explicitReceiver| as R|FirFunctionCall|)"]; - 48 [label="Function call: this@R|special/anonymous|.R|FakeOverride|(...)"]; - 49 [label="Exit block"]; + 42 [label="Enter block"]; + 43 [label="Access variable this@R|special/anonymous|"]; + 44 [label="Function call: this@R|special/anonymous|.R|FakeOverride|(...)"]; + 45 [label="Access variable R|/explicitReceiver|"]; + 46 [label="Type operator: (R|/explicitReceiver| as R|FirFunctionCall|)"]; + 47 [label="Function call: this@R|special/anonymous|.R|FakeOverride|(...)"]; + 48 [label="Exit block"]; } - 42 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 49 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 39 [label="Call arguments union" style="filled" fillcolor=yellow]; + 36 [label="Call arguments union" style="filled" fillcolor=yellow]; 37 [label="Postponed exit from lambda"]; 38 [label="Function call: R|kotlin/with|(...)"]; - 40 [label="Exit block"]; + 39 [label="Exit block"]; } - 29 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 40 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 25 [label="Postponed exit from lambda"]; - 26 [label="Function call: R|kotlin/collections/buildList|(...)"]; - 27 [label="Exit block"]; + 24 [label="Postponed exit from lambda"]; + 25 [label="Function call: R|kotlin/collections/buildList|(...)"]; + 26 [label="Exit block"]; } - 22 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 27 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 13 [label="Call arguments union" style="filled" fillcolor=yellow]; + 10 [label="Call arguments union" style="filled" fillcolor=yellow]; 11 [label="Postponed exit from lambda"]; 12 [label="Function call: R|kotlin/with|(...)"]; - 14 [label="Stub" style="filled" fillcolor=gray]; - 15 [label="Variable declaration: lval firstCalls: R|kotlin/Nothing|" style="filled" fillcolor=gray]; - 16 [label="Access variable R|/firstCalls|" style="filled" fillcolor=gray]; - 17 [label="Stub" style="filled" fillcolor=gray]; - 18 [label="Jump: ^foo R|/firstCalls|" style="filled" fillcolor=gray]; - 19 [label="Stub" style="filled" fillcolor=gray]; - 20 [label="Exit block" style="filled" fillcolor=gray]; + 13 [label="Stub" style="filled" fillcolor=gray]; + 14 [label="Variable declaration: lval firstCalls: R|kotlin/Nothing|" style="filled" fillcolor=gray]; + 15 [label="Access variable R|/firstCalls|" style="filled" fillcolor=gray]; + 16 [label="Stub" style="filled" fillcolor=gray]; + 17 [label="Jump: ^foo R|/firstCalls|" style="filled" fillcolor=gray]; + 18 [label="Stub" style="filled" fillcolor=gray]; + 19 [label="Exit block" style="filled" fillcolor=gray]; } - 5 [label="Exit function foo" style="filled" fillcolor=red]; + 20 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {6}; + 4 -> {5}; + 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {10}; - 10 -> {21}; - 10 -> {11} [color=red]; + 9 -> {21}; + 9 -> {11} [color=red]; + 10 -> {12} [color=red]; 11 -> {12} [color=green]; - 12 -> {5}; - 12 -> {14} [style=dotted]; - 13 -> {12} [color=red]; + 12 -> {20}; + 12 -> {13} [style=dotted]; + 13 -> {14} [style=dotted]; 14 -> {15} [style=dotted]; - 15 -> {16} [style=dotted]; - 16 -> {5 17} [style=dotted]; - 17 -> {18} [style=dotted]; - 18 -> {5 19} [style=dotted]; + 15 -> {20 16} [style=dotted]; + 16 -> {17} [style=dotted]; + 17 -> {20 18} [style=dotted]; + 18 -> {19} [style=dotted]; 19 -> {20} [style=dotted]; - 20 -> {5} [style=dotted]; - 21 -> {23}; - 22 -> {11} [color=green]; - 22 -> {13} [color=red]; - 23 -> {24}; - 24 -> {28}; - 24 -> {25} [color=red]; + 21 -> {22}; + 22 -> {23}; + 23 -> {28}; + 23 -> {24} [color=red]; + 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {22}; - 28 -> {30}; - 29 -> {25} [color=green]; - 29 -> {13} [color=red]; + 27 -> {11} [color=green]; + 27 -> {10} [color=red]; + 28 -> {29}; + 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36}; - 36 -> {41}; - 36 -> {37} [color=red]; + 35 -> {41}; + 35 -> {37} [color=red]; + 36 -> {38} [color=red]; 37 -> {38} [color=green]; - 38 -> {40}; - 39 -> {38} [color=red]; - 40 -> {29}; - 41 -> {43}; - 42 -> {37} [color=green]; - 42 -> {39} [color=red]; + 38 -> {39}; + 39 -> {40}; + 40 -> {24} [color=green]; + 40 -> {10} [color=red]; + 41 -> {42}; + 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {42}; + 49 -> {37} [color=green]; + 49 -> {36} [color=red]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot index e138244bfc4..6fc6a836b57 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot @@ -8,416 +8,416 @@ digraph callsInPlace_kt { 0 [label="Enter function test" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 4 [label="Postponed enter to lambda"]; + 1 [label="Enter block"]; + 2 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 3 [label="Postponed enter to lambda"]; subgraph cluster_2 { color=blue 11 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 13 [label="Enter block"]; - 14 [label="Const: Int(1)"]; - 15 [label="Assignment: R|/x|"]; - 16 [label="Exit block"]; + 12 [label="Enter block"]; + 13 [label="Const: Int(1)"]; + 14 [label="Assignment: R|/x|"]; + 15 [label="Exit block"]; } - 12 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 16 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 7 [label="Call arguments union" style="filled" fillcolor=yellow]; + 4 [label="Call arguments union" style="filled" fillcolor=yellow]; 5 [label="Postponed exit from lambda"]; 6 [label="Function call: R|kotlin/run|(...)"]; - 8 [label="Access variable R|/x|"]; - 9 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 10 [label="Exit block"]; + 7 [label="Access variable R|/x|"]; + 8 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 9 [label="Exit block"]; } - 1 [label="Exit function test" style="filled" fillcolor=red]; + 10 [label="Exit function test" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {4}; - 4 -> {11}; - 4 -> {5} [color=red]; + 3 -> {11}; + 3 -> {5} [color=red]; + 4 -> {6} [color=red]; 5 -> {6} [color=green]; - 6 -> {8}; - 7 -> {6} [color=red]; + 6 -> {7}; + 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {1}; - 11 -> {13}; - 12 -> {5} [color=green]; - 12 -> {7} [color=red]; + 11 -> {12}; + 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; - 16 -> {12}; + 16 -> {5} [color=green]; + 16 -> {4} [color=red]; subgraph cluster_4 { color=red 17 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 19 [label="Enter block"]; - 20 [label="Const: Int(10)"]; - 21 [label="Postponed enter to lambda"]; + 18 [label="Enter block"]; + 19 [label="Const: Int(10)"]; + 20 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue 25 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 27 [label="Enter block"]; - 28 [label="Const: String(test_2)"]; - 29 [label="Exit block"]; + 26 [label="Enter block"]; + 27 [label="Const: String(test_2)"]; + 28 [label="Exit block"]; } - 26 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 29 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 22 [label="Postponed exit from lambda"]; - 23 [label="Function call: R|kotlin/repeat|(...)"]; - 24 [label="Exit block"]; + 21 [label="Postponed exit from lambda"]; + 22 [label="Function call: R|kotlin/repeat|(...)"]; + 23 [label="Exit block"]; } - 18 [label="Exit function test_2" style="filled" fillcolor=red]; + 24 [label="Exit function test_2" style="filled" fillcolor=red]; } - 17 -> {19}; + 17 -> {18}; + 18 -> {19}; 19 -> {20}; - 20 -> {21}; - 21 -> {25}; - 21 -> {22} [color=red]; + 20 -> {25}; + 20 -> {21} [color=red]; + 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {18}; - 25 -> {26 27}; - 26 -> {22} [color=green]; - 26 -> {25} [color=green style=dashed]; + 25 -> {29 26}; + 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {26}; + 29 -> {21} [color=green]; + 29 -> {25} [color=green style=dashed]; subgraph cluster_8 { color=red 30 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 32 [label="Enter block"]; - 33 [label="Postponed enter to lambda"]; + 31 [label="Enter block"]; + 32 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue 38 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 40 [label="Enter block"]; - 41 [label="Const: String(test_3)"]; - 42 [label="Exit block"]; + 39 [label="Enter block"]; + 40 [label="Const: String(test_3)"]; + 41 [label="Exit block"]; } - 39 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 42 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 34 [label="Postponed exit from lambda"]; - 35 [label="Const: Int(10)"]; - 36 [label="Function call: R|kotlin/repeat|(...)"]; - 37 [label="Exit block"]; + 33 [label="Postponed exit from lambda"]; + 34 [label="Const: Int(10)"]; + 35 [label="Function call: R|kotlin/repeat|(...)"]; + 36 [label="Exit block"]; } - 31 [label="Exit function test_3" style="filled" fillcolor=red]; + 37 [label="Exit function test_3" style="filled" fillcolor=red]; } - 30 -> {32}; - 32 -> {33}; - 33 -> {38}; - 33 -> {34} [color=red]; + 30 -> {31}; + 31 -> {32}; + 32 -> {38}; + 32 -> {33} [color=red]; + 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {31}; - 38 -> {39 40}; - 39 -> {34} [color=green]; - 39 -> {38} [color=green style=dashed]; + 38 -> {42 39}; + 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {39}; + 42 -> {33} [color=green]; + 42 -> {38} [color=green style=dashed]; subgraph cluster_12 { color=red 43 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 45 [label="Enter block"]; - 46 [label="Const: Int(1)"]; - 47 [label="Postponed enter to lambda"]; + 44 [label="Enter block"]; + 45 [label="Const: Int(1)"]; + 46 [label="Postponed enter to lambda"]; subgraph cluster_14 { color=blue 52 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 54 [label="Enter block"]; - 55 [label="Const: String(test_4)"]; - 56 [label="Access variable R|/it|"]; - 57 [label="Const: Int(0)"]; - 58 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)"]; - 59 [label="Comparison >"]; - 60 [label="Exit block"]; + 53 [label="Enter block"]; + 54 [label="Const: String(test_4)"]; + 55 [label="Access variable R|/it|"]; + 56 [label="Const: Int(0)"]; + 57 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)"]; + 58 [label="Comparison >"]; + 59 [label="Exit block"]; } - 53 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 60 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 50 [label="Call arguments union" style="filled" fillcolor=yellow]; + 47 [label="Call arguments union" style="filled" fillcolor=yellow]; 48 [label="Postponed exit from lambda"]; 49 [label="Function call: Int(1).R|kotlin/takeUnless|(...)"]; - 51 [label="Exit block"]; + 50 [label="Exit block"]; } - 44 [label="Exit function test_4" style="filled" fillcolor=red]; + 51 [label="Exit function test_4" style="filled" fillcolor=red]; } - 43 -> {45}; + 43 -> {44}; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; - 47 -> {52}; - 47 -> {48} [color=red]; + 46 -> {52}; + 46 -> {48} [color=red]; + 47 -> {49} [color=red]; 48 -> {49} [color=green]; - 49 -> {51}; - 50 -> {49} [color=red]; - 51 -> {44}; - 52 -> {54}; - 53 -> {48} [color=green]; - 53 -> {50} [color=red]; + 49 -> {50}; + 50 -> {51}; + 52 -> {53}; + 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {53}; + 60 -> {48} [color=green]; + 60 -> {47} [color=red]; subgraph cluster_16 { color=red 61 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 63 [label="Enter block"]; - 64 [label="Const: Int(1)"]; - 65 [label="Postponed enter to lambda"]; + 62 [label="Enter block"]; + 63 [label="Const: Int(1)"]; + 64 [label="Postponed enter to lambda"]; subgraph cluster_18 { color=blue 70 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 72 [label="Enter block"]; - 73 [label="Const: String(test_5)"]; - 74 [label="Access variable R|/it|"]; - 75 [label="Const: Int(0)"]; - 76 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)"]; - 77 [label="Comparison >"]; - 78 [label="Exit block"]; + 71 [label="Enter block"]; + 72 [label="Const: String(test_5)"]; + 73 [label="Access variable R|/it|"]; + 74 [label="Const: Int(0)"]; + 75 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)"]; + 76 [label="Comparison >"]; + 77 [label="Exit block"]; } - 71 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 78 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 68 [label="Call arguments union" style="filled" fillcolor=yellow]; + 65 [label="Call arguments union" style="filled" fillcolor=yellow]; 66 [label="Postponed exit from lambda"]; 67 [label="Function call: Int(1).R|kotlin/takeUnless|(...)"]; - 69 [label="Exit block"]; + 68 [label="Exit block"]; } - 62 [label="Exit function test_5" style="filled" fillcolor=red]; + 69 [label="Exit function test_5" style="filled" fillcolor=red]; } - 61 -> {63}; + 61 -> {62}; + 62 -> {63}; 63 -> {64}; - 64 -> {65}; - 65 -> {70}; - 65 -> {66} [color=red]; + 64 -> {70}; + 64 -> {66} [color=red]; + 65 -> {67} [color=red]; 66 -> {67} [color=green]; - 67 -> {69}; - 68 -> {67} [color=red]; - 69 -> {62}; - 70 -> {72}; - 71 -> {66} [color=green]; - 71 -> {68} [color=red]; + 67 -> {68}; + 68 -> {69}; + 70 -> {71}; + 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; - 78 -> {71}; + 78 -> {66} [color=green]; + 78 -> {65} [color=red]; subgraph cluster_20 { color=red 79 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 81 [label="Enter block"]; - 82 [label="Function call: R|/block1|.R|FakeOverride|()"]; - 83 [label="Function call: R|/block2|.R|FakeOverride|()"]; - 84 [label="Exit block"]; + 80 [label="Enter block"]; + 81 [label="Function call: R|/block1|.R|FakeOverride|()"]; + 82 [label="Function call: R|/block2|.R|FakeOverride|()"]; + 83 [label="Exit block"]; } - 80 [label="Exit function myRun" style="filled" fillcolor=red]; + 84 [label="Exit function myRun" style="filled" fillcolor=red]; } - 79 -> {81}; + 79 -> {80}; + 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {80}; subgraph cluster_22 { color=red 85 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 87 [label="Enter block"]; - 88 [label="Postponed enter to lambda"]; + 86 [label="Enter block"]; + 87 [label="Postponed enter to lambda"]; subgraph cluster_24 { color=blue 94 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 96 [label="Enter block"]; - 97 [label="Const: String(test_6_1)"]; - 98 [label="Exit block"]; + 95 [label="Enter block"]; + 96 [label="Const: String(test_6_1)"]; + 97 [label="Exit block"]; } - 95 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 98 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 89 [label="Postponed exit from lambda"]; - 90 [label="Postponed enter to lambda"]; + 88 [label="Postponed exit from lambda"]; + 89 [label="Postponed enter to lambda"]; subgraph cluster_26 { color=blue 99 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_27 { color=blue - 101 [label="Enter block"]; - 102 [label="Const: String(test_6_2)"]; - 103 [label="Exit block"]; + 100 [label="Enter block"]; + 101 [label="Const: String(test_6_2)"]; + 102 [label="Exit block"]; } - 100 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 103 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 91 [label="Postponed exit from lambda"]; - 92 [label="Function call: R|/myRun|(...)"]; - 93 [label="Exit block"]; + 90 [label="Postponed exit from lambda"]; + 91 [label="Function call: R|/myRun|(...)"]; + 92 [label="Exit block"]; } - 86 [label="Exit function test_6" style="filled" fillcolor=red]; + 93 [label="Exit function test_6" style="filled" fillcolor=red]; } - 85 -> {87}; - 87 -> {88}; - 88 -> {94}; - 88 -> {89} [color=red]; - 89 -> {90}; - 90 -> {99}; - 90 -> {91} [color=red]; + 85 -> {86}; + 86 -> {87}; + 87 -> {94}; + 87 -> {88} [color=red]; + 88 -> {89}; + 89 -> {99}; + 89 -> {90} [color=red]; + 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {86}; - 94 -> {95 96}; - 95 -> {89} [color=green]; - 95 -> {94} [color=green style=dashed]; + 94 -> {98 95}; + 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {95}; - 99 -> {100 101}; - 100 -> {91} [color=green]; - 100 -> {99} [color=green style=dashed]; + 98 -> {88} [color=green]; + 98 -> {94} [color=green style=dashed]; + 99 -> {103 100}; + 100 -> {101}; 101 -> {102}; 102 -> {103}; - 103 -> {100}; + 103 -> {90} [color=green]; + 103 -> {99} [color=green style=dashed]; subgraph cluster_28 { color=red 104 [label="Enter function test_7" style="filled" fillcolor=red]; subgraph cluster_29 { color=blue - 106 [label="Enter block"]; - 107 [label="Postponed enter to lambda"]; + 105 [label="Enter block"]; + 106 [label="Postponed enter to lambda"]; subgraph cluster_30 { color=blue 113 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_31 { color=blue - 115 [label="Enter block"]; - 116 [label="Const: String(test_7_2)"]; - 117 [label="Exit block"]; + 114 [label="Enter block"]; + 115 [label="Const: String(test_7_2)"]; + 116 [label="Exit block"]; } - 114 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 117 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 108 [label="Postponed exit from lambda"]; - 109 [label="Postponed enter to lambda"]; + 107 [label="Postponed exit from lambda"]; + 108 [label="Postponed enter to lambda"]; subgraph cluster_32 { color=blue 118 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_33 { color=blue - 120 [label="Enter block"]; - 121 [label="Const: String(test_7_1)"]; - 122 [label="Exit block"]; + 119 [label="Enter block"]; + 120 [label="Const: String(test_7_1)"]; + 121 [label="Exit block"]; } - 119 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 122 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 110 [label="Postponed exit from lambda"]; - 111 [label="Function call: R|/myRun|(...)"]; - 112 [label="Exit block"]; + 109 [label="Postponed exit from lambda"]; + 110 [label="Function call: R|/myRun|(...)"]; + 111 [label="Exit block"]; } - 105 [label="Exit function test_7" style="filled" fillcolor=red]; + 112 [label="Exit function test_7" style="filled" fillcolor=red]; } - 104 -> {106}; - 106 -> {107}; - 107 -> {113}; - 107 -> {108} [color=red]; - 108 -> {109}; - 109 -> {118}; - 109 -> {110} [color=red]; + 104 -> {105}; + 105 -> {106}; + 106 -> {113}; + 106 -> {107} [color=red]; + 107 -> {108}; + 108 -> {118}; + 108 -> {109} [color=red]; + 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {105}; - 113 -> {114 115}; - 114 -> {108} [color=green]; - 114 -> {113} [color=green style=dashed]; + 113 -> {117 114}; + 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {114}; - 118 -> {119 120}; - 119 -> {110} [color=green]; - 119 -> {118} [color=green style=dashed]; + 117 -> {107} [color=green]; + 117 -> {113} [color=green style=dashed]; + 118 -> {122 119}; + 119 -> {120}; 120 -> {121}; 121 -> {122}; - 122 -> {119}; + 122 -> {109} [color=green]; + 122 -> {118} [color=green style=dashed]; subgraph cluster_34 { color=red 123 [label="Enter function myDummyRun" style="filled" fillcolor=red]; subgraph cluster_35 { color=blue - 125 [label="Enter block"]; - 126 [label="Function call: R|/block|.R|FakeOverride|()"]; - 127 [label="Exit block"]; + 124 [label="Enter block"]; + 125 [label="Function call: R|/block|.R|FakeOverride|()"]; + 126 [label="Exit block"]; } - 124 [label="Exit function myDummyRun" style="filled" fillcolor=red]; + 127 [label="Exit function myDummyRun" style="filled" fillcolor=red]; } - 123 -> {125}; + 123 -> {124}; + 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {124}; subgraph cluster_36 { color=red 128 [label="Enter function test_8" style="filled" fillcolor=red]; subgraph cluster_37 { color=blue - 130 [label="Enter block"]; - 131 [label="Postponed enter to lambda"]; + 129 [label="Enter block"]; + 130 [label="Postponed enter to lambda"]; subgraph cluster_38 { color=blue 135 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_39 { color=blue - 137 [label="Enter block"]; - 138 [label="Const: String(test_8)"]; - 139 [label="Exit block"]; + 136 [label="Enter block"]; + 137 [label="Const: String(test_8)"]; + 138 [label="Exit block"]; } - 136 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 139 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 132 [label="Postponed exit from lambda"]; - 133 [label="Function call: R|/myDummyRun|(...)"]; - 134 [label="Exit block"]; + 131 [label="Postponed exit from lambda"]; + 132 [label="Function call: R|/myDummyRun|(...)"]; + 133 [label="Exit block"]; } - 129 [label="Exit function test_8" style="filled" fillcolor=red]; + 134 [label="Exit function test_8" style="filled" fillcolor=red]; } - 128 -> {130}; - 130 -> {131}; - 131 -> {132 135}; + 128 -> {129}; + 129 -> {130}; + 130 -> {131 135}; + 131 -> {132}; 132 -> {133}; 133 -> {134}; - 134 -> {129}; - 135 -> {137}; + 135 -> {136}; + 136 -> {137}; 137 -> {138}; 138 -> {139}; - 139 -> {136}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot index c1b4fec7ce4..cfc898977d2 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot @@ -8,24 +8,25 @@ digraph conditionalEffects_kt { 0 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Access variable R|/x|"]; - 4 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 5 [label="Function call: R|kotlin/require|(...)"]; + 1 [label="Enter block"]; + 2 [label="Access variable R|/x|"]; + 3 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 4 [label="Function call: R|kotlin/require|(...)"]; subgraph cluster_2 { color=blue - 6 [label="Enter contract"]; - 7 [label="Access variable R|/x|"]; - 8 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 9 [label="Exit contract"]; + 5 [label="Enter contract"]; + 6 [label="Access variable R|/x|"]; + 7 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 8 [label="Exit contract"]; } - 10 [label="Access variable R|/x|"]; - 11 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 12 [label="Exit block"]; + 9 [label="Access variable R|/x|"]; + 10 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 11 [label="Exit block"]; } - 1 [label="Exit function test_1" style="filled" fillcolor=red]; + 12 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; @@ -36,31 +37,31 @@ digraph conditionalEffects_kt { 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {1}; subgraph cluster_3 { color=red 13 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 15 [label="Enter block"]; - 16 [label="Access variable R|/x|"]; - 17 [label="Function call: R|kotlin/requireNotNull|(...)"]; + 14 [label="Enter block"]; + 15 [label="Access variable R|/x|"]; + 16 [label="Function call: R|kotlin/requireNotNull|(...)"]; subgraph cluster_5 { color=blue - 18 [label="Enter contract"]; - 19 [label="Access variable R|/x|"]; - 20 [label="Const: Null(null)"]; - 21 [label="Operator !="]; - 22 [label="Exit contract"]; + 17 [label="Enter contract"]; + 18 [label="Access variable R|/x|"]; + 19 [label="Const: Null(null)"]; + 20 [label="Operator !="]; + 21 [label="Exit contract"]; } - 23 [label="Access variable R|/x|"]; - 24 [label="Access variable R|kotlin/String.length|"]; - 25 [label="Exit block"]; + 22 [label="Access variable R|/x|"]; + 23 [label="Access variable R|kotlin/String.length|"]; + 24 [label="Exit block"]; } - 14 [label="Exit function test_2" style="filled" fillcolor=red]; + 25 [label="Exit function test_2" style="filled" fillcolor=red]; } - 13 -> {15}; + 13 -> {14}; + 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; @@ -71,33 +72,33 @@ digraph conditionalEffects_kt { 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {14}; subgraph cluster_6 { color=red 26 [label="Enter function test_3" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 28 [label="Enter block"]; - 29 [label="Access variable R|/x|"]; - 30 [label="Const: Null(null)"]; - 31 [label="Operator !="]; - 32 [label="Function call: R|kotlin/require|(...)"]; + 27 [label="Enter block"]; + 28 [label="Access variable R|/x|"]; + 29 [label="Const: Null(null)"]; + 30 [label="Operator !="]; + 31 [label="Function call: R|kotlin/require|(...)"]; subgraph cluster_8 { color=blue - 33 [label="Enter contract"]; - 34 [label="Access variable R|/x|"]; - 35 [label="Const: Null(null)"]; - 36 [label="Operator !="]; - 37 [label="Exit contract"]; + 32 [label="Enter contract"]; + 33 [label="Access variable R|/x|"]; + 34 [label="Const: Null(null)"]; + 35 [label="Operator !="]; + 36 [label="Exit contract"]; } - 38 [label="Access variable R|/x|"]; - 39 [label="Access variable R|kotlin/String.length|"]; - 40 [label="Exit block"]; + 37 [label="Access variable R|/x|"]; + 38 [label="Access variable R|kotlin/String.length|"]; + 39 [label="Exit block"]; } - 27 [label="Exit function test_3" style="filled" fillcolor=red]; + 40 [label="Exit function test_3" style="filled" fillcolor=red]; } - 26 -> {28}; + 26 -> {27}; + 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; @@ -110,157 +111,157 @@ digraph conditionalEffects_kt { 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {27}; subgraph cluster_9 { color=red 41 [label="Enter function test_4" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 43 [label="Enter block"]; + 42 [label="Enter block"]; subgraph cluster_11 { color=blue - 45 [label="Enter &&"]; - 46 [label="Access variable R|/x|"]; - 47 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 48 [label="Exit left part of &&"]; - 49 [label="Enter right part of &&"]; - 50 [label="Access variable R|/y|"]; - 51 [label="Const: Null(null)"]; - 52 [label="Operator !="]; - 44 [label="Exit &&"]; + 43 [label="Enter &&"]; + 44 [label="Access variable R|/x|"]; + 45 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 46 [label="Exit left part of &&"]; + 47 [label="Enter right part of &&"]; + 48 [label="Access variable R|/y|"]; + 49 [label="Const: Null(null)"]; + 50 [label="Operator !="]; + 51 [label="Exit &&"]; } - 53 [label="Function call: R|kotlin/require|(...)"]; + 52 [label="Function call: R|kotlin/require|(...)"]; subgraph cluster_12 { color=blue - 54 [label="Enter contract"]; + 53 [label="Enter contract"]; subgraph cluster_13 { color=blue - 56 [label="Enter &&"]; - 57 [label="Access variable R|/x|"]; - 58 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 59 [label="Exit left part of &&"]; - 60 [label="Enter right part of &&"]; - 61 [label="Access variable R|/y|"]; - 62 [label="Const: Null(null)"]; - 63 [label="Operator !="]; - 55 [label="Exit &&"]; + 54 [label="Enter &&"]; + 55 [label="Access variable R|/x|"]; + 56 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 57 [label="Exit left part of &&"]; + 58 [label="Enter right part of &&"]; + 59 [label="Access variable R|/y|"]; + 60 [label="Const: Null(null)"]; + 61 [label="Operator !="]; + 62 [label="Exit &&"]; } - 64 [label="Exit contract"]; + 63 [label="Exit contract"]; } - 65 [label="Access variable R|/x|"]; - 66 [label="Access variable R|kotlin/String.length|"]; - 67 [label="Access variable R|/y|"]; - 68 [label="Access variable R|kotlin/String.length|"]; - 69 [label="Exit block"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Access variable R|kotlin/String.length|"]; + 66 [label="Access variable R|/y|"]; + 67 [label="Access variable R|kotlin/String.length|"]; + 68 [label="Exit block"]; } - 42 [label="Exit function test_4" style="filled" fillcolor=red]; + 69 [label="Exit function test_4" style="filled" fillcolor=red]; } - 41 -> {43}; - 43 -> {45}; - 44 -> {53}; + 41 -> {42}; + 42 -> {43}; + 43 -> {44}; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + 46 -> {51 47}; 47 -> {48}; - 48 -> {44 49}; + 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {44}; + 52 -> {53}; 53 -> {54}; - 54 -> {56}; - 55 -> {64}; + 54 -> {55}; + 55 -> {56}; 56 -> {57}; - 57 -> {58}; + 57 -> {62 58}; 58 -> {59}; - 59 -> {55 60}; + 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {55}; + 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {42}; subgraph cluster_14 { color=red 70 [label="Enter function test_5" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 72 [label="Enter block"]; + 71 [label="Enter block"]; subgraph cluster_16 { color=blue - 73 [label="Enter when"]; + 72 [label="Enter when"]; subgraph cluster_17 { color=blue - 75 [label="Enter when branch condition "]; - 76 [label="Access variable R|/b|"]; - 77 [label="Exit when branch condition"]; + 73 [label="Enter when branch condition "]; + 74 [label="Access variable R|/b|"]; + 75 [label="Exit when branch condition"]; } subgraph cluster_18 { color=blue - 91 [label="Enter when branch condition else"]; - 92 [label="Exit when branch condition"]; + 76 [label="Enter when branch condition else"]; + 77 [label="Exit when branch condition"]; } - 93 [label="Enter when branch result"]; - subgraph cluster_19 { - color=blue - 94 [label="Enter block"]; - 95 [label="Access variable R|/x|"]; - 96 [label="Access variable #"]; - 97 [label="Exit block"]; - } - 98 [label="Exit when branch result"]; 78 [label="Enter when branch result"]; - subgraph cluster_20 { + subgraph cluster_19 { color=blue 79 [label="Enter block"]; 80 [label="Access variable R|/x|"]; - 81 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 82 [label="Function call: R|kotlin/require|(...)"]; + 81 [label="Access variable #"]; + 82 [label="Exit block"]; + } + 83 [label="Exit when branch result"]; + 84 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 85 [label="Enter block"]; + 86 [label="Access variable R|/x|"]; + 87 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 88 [label="Function call: R|kotlin/require|(...)"]; subgraph cluster_21 { color=blue - 83 [label="Enter contract"]; - 84 [label="Access variable R|/x|"]; - 85 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 86 [label="Exit contract"]; + 89 [label="Enter contract"]; + 90 [label="Access variable R|/x|"]; + 91 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 92 [label="Exit contract"]; } - 87 [label="Access variable R|/x|"]; - 88 [label="Access variable R|kotlin/String.length|"]; - 89 [label="Exit block"]; + 93 [label="Access variable R|/x|"]; + 94 [label="Access variable R|kotlin/String.length|"]; + 95 [label="Exit block"]; } - 90 [label="Exit when branch result"]; - 74 [label="Exit when"]; + 96 [label="Exit when branch result"]; + 97 [label="Exit when"]; } - 99 [label="Access variable R|/x|"]; - 100 [label="Access variable #"]; - 101 [label="Exit block"]; + 98 [label="Access variable R|/x|"]; + 99 [label="Access variable #"]; + 100 [label="Exit block"]; } - 71 [label="Exit function test_5" style="filled" fillcolor=red]; + 101 [label="Exit function test_5" style="filled" fillcolor=red]; } - 70 -> {72}; + 70 -> {71}; + 71 -> {72}; 72 -> {73}; - 73 -> {75}; - 74 -> {99}; - 75 -> {76}; + 73 -> {74}; + 74 -> {75}; + 75 -> {84 76}; 76 -> {77}; - 77 -> {78 91}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {84}; + 83 -> {97}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; - 90 -> {74}; + 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; @@ -268,58 +269,38 @@ digraph conditionalEffects_kt { 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {74}; + 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {71}; subgraph cluster_22 { color=red 102 [label="Enter function test_6" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 104 [label="Enter block"]; + 103 [label="Enter block"]; subgraph cluster_24 { color=blue - 105 [label="Enter when"]; + 104 [label="Enter when"]; subgraph cluster_25 { color=blue - 107 [label="Enter when branch condition "]; - 108 [label="Access variable R|/b|"]; - 109 [label="Exit when branch condition"]; + 105 [label="Enter when branch condition "]; + 106 [label="Access variable R|/b|"]; + 107 [label="Exit when branch condition"]; } subgraph cluster_26 { color=blue - 123 [label="Enter when branch condition else"]; - 124 [label="Exit when branch condition"]; + 108 [label="Enter when branch condition else"]; + 109 [label="Exit when branch condition"]; } - 125 [label="Enter when branch result"]; - subgraph cluster_27 { - color=blue - 126 [label="Enter block"]; - 127 [label="Access variable R|/x|"]; - 128 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 129 [label="Function call: R|kotlin/require|(...)"]; - subgraph cluster_28 { - color=blue - 130 [label="Enter contract"]; - 131 [label="Access variable R|/x|"]; - 132 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 133 [label="Exit contract"]; - } - 134 [label="Access variable R|/x|"]; - 135 [label="Access variable R|kotlin/String.length|"]; - 136 [label="Exit block"]; - } - 137 [label="Exit when branch result"]; 110 [label="Enter when branch result"]; - subgraph cluster_29 { + subgraph cluster_27 { color=blue 111 [label="Enter block"]; 112 [label="Access variable R|/x|"]; 113 [label="Type operator: (R|/x| is R|kotlin/String|)"]; 114 [label="Function call: R|kotlin/require|(...)"]; - subgraph cluster_30 { + subgraph cluster_28 { color=blue 115 [label="Enter contract"]; 116 [label="Access variable R|/x|"]; @@ -331,21 +312,41 @@ digraph conditionalEffects_kt { 121 [label="Exit block"]; } 122 [label="Exit when branch result"]; - 106 [label="Exit when"]; + 123 [label="Enter when branch result"]; + subgraph cluster_29 { + color=blue + 124 [label="Enter block"]; + 125 [label="Access variable R|/x|"]; + 126 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 127 [label="Function call: R|kotlin/require|(...)"]; + subgraph cluster_30 { + color=blue + 128 [label="Enter contract"]; + 129 [label="Access variable R|/x|"]; + 130 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 131 [label="Exit contract"]; + } + 132 [label="Access variable R|/x|"]; + 133 [label="Access variable R|kotlin/String.length|"]; + 134 [label="Exit block"]; + } + 135 [label="Exit when branch result"]; + 136 [label="Exit when"]; } - 138 [label="Access variable R|/x|"]; - 139 [label="Access variable R|kotlin/String.length|"]; - 140 [label="Exit block"]; + 137 [label="Access variable R|/x|"]; + 138 [label="Access variable R|kotlin/String.length|"]; + 139 [label="Exit block"]; } - 103 [label="Exit function test_6" style="filled" fillcolor=red]; + 140 [label="Exit function test_6" style="filled" fillcolor=red]; } - 102 -> {104}; + 102 -> {103}; + 103 -> {104}; 104 -> {105}; - 105 -> {107}; - 106 -> {138}; - 107 -> {108}; + 105 -> {106}; + 106 -> {107}; + 107 -> {123 108}; 108 -> {109}; - 109 -> {110 123}; + 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; @@ -358,7 +359,7 @@ digraph conditionalEffects_kt { 119 -> {120}; 120 -> {121}; 121 -> {122}; - 122 -> {106}; + 122 -> {136}; 123 -> {124}; 124 -> {125}; 125 -> {126}; @@ -373,9 +374,8 @@ digraph conditionalEffects_kt { 134 -> {135}; 135 -> {136}; 136 -> {137}; - 137 -> {106}; + 137 -> {138}; 138 -> {139}; 139 -> {140}; - 140 -> {103}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot index 3e34cb9f0e6..f9daa3fdf6f 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot @@ -8,123 +8,123 @@ digraph atLeastOnce_kt { 0 [label="Enter function inlineRun" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Function call: R|/block|.R|FakeOverride|()"]; - 4 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Function call: R|/block|.R|FakeOverride|()"]; + 3 [label="Exit block"]; } - 1 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 4 [label="Exit function inlineRun" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {1}; subgraph cluster_2 { color=red 5 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 7 [label="Enter block"]; - 8 [label="Function call: R|/block|.R|FakeOverride|()"]; - 9 [label="Exit block"]; + 6 [label="Enter block"]; + 7 [label="Function call: R|/block|.R|FakeOverride|()"]; + 8 [label="Exit block"]; } - 6 [label="Exit function myRun" style="filled" fillcolor=red]; + 9 [label="Exit function myRun" style="filled" fillcolor=red]; } - 5 -> {7}; + 5 -> {6}; + 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {6}; subgraph cluster_4 { color=red 10 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 12 [label="Enter block"]; - 13 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 14 [label="Postponed enter to lambda"]; + 11 [label="Enter block"]; + 12 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 13 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue 20 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 22 [label="Enter block"]; - 23 [label="Const: Int(1)"]; - 24 [label="Assignment: R|/x|"]; - 25 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Const: Int(1)"]; + 23 [label="Assignment: R|/x|"]; + 24 [label="Exit block"]; } - 21 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 25 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 15 [label="Postponed exit from lambda"]; - 16 [label="Function call: R|/inlineRun|(...)"]; - 17 [label="Access variable R|/x|"]; - 18 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 19 [label="Exit block"]; + 14 [label="Postponed exit from lambda"]; + 15 [label="Function call: R|/inlineRun|(...)"]; + 16 [label="Access variable R|/x|"]; + 17 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 18 [label="Exit block"]; } - 11 [label="Exit function test_1" style="filled" fillcolor=red]; + 19 [label="Exit function test_1" style="filled" fillcolor=red]; } - 10 -> {12}; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; - 14 -> {20}; - 14 -> {15} [color=red]; + 13 -> {20}; + 13 -> {14} [color=red]; + 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {11}; - 20 -> {22}; - 21 -> {15} [color=green]; - 21 -> {20} [color=green style=dashed]; + 20 -> {21}; + 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {21}; + 25 -> {14} [color=green]; + 25 -> {20} [color=green style=dashed]; subgraph cluster_8 { color=red 26 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 28 [label="Enter block"]; - 29 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 30 [label="Postponed enter to lambda"]; + 27 [label="Enter block"]; + 28 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 29 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue 36 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 38 [label="Enter block"]; - 39 [label="Const: Int(1)"]; - 40 [label="Assignment: R|/x|"]; - 41 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Const: Int(1)"]; + 39 [label="Assignment: R|/x|"]; + 40 [label="Exit block"]; } - 37 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 41 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 31 [label="Postponed exit from lambda"]; - 32 [label="Function call: R|/myRun|(...)"]; - 33 [label="Access variable R|/x|"]; - 34 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 35 [label="Exit block"]; + 30 [label="Postponed exit from lambda"]; + 31 [label="Function call: R|/myRun|(...)"]; + 32 [label="Access variable R|/x|"]; + 33 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 34 [label="Exit block"]; } - 27 [label="Exit function test_2" style="filled" fillcolor=red]; + 35 [label="Exit function test_2" style="filled" fillcolor=red]; } - 26 -> {28}; + 26 -> {27}; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; - 30 -> {36}; - 30 -> {31} [color=red]; + 29 -> {36}; + 29 -> {30} [color=red]; + 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {27}; - 36 -> {38}; - 37 -> {31} [color=green]; - 37 -> {36} [color=green style=dashed]; + 36 -> {37}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {37}; + 41 -> {30} [color=green]; + 41 -> {36} [color=green style=dashed]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot index eff78419c06..5d935068d66 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot @@ -8,121 +8,121 @@ digraph atMostOnce_kt { 0 [label="Enter function inlineRun" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Function call: R|/block|.R|FakeOverride|()"]; - 4 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Function call: R|/block|.R|FakeOverride|()"]; + 3 [label="Exit block"]; } - 1 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 4 [label="Exit function inlineRun" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {1}; subgraph cluster_2 { color=red 5 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 7 [label="Enter block"]; - 8 [label="Function call: R|/block|.R|FakeOverride|()"]; - 9 [label="Exit block"]; + 6 [label="Enter block"]; + 7 [label="Function call: R|/block|.R|FakeOverride|()"]; + 8 [label="Exit block"]; } - 6 [label="Exit function myRun" style="filled" fillcolor=red]; + 9 [label="Exit function myRun" style="filled" fillcolor=red]; } - 5 -> {7}; + 5 -> {6}; + 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {6}; subgraph cluster_4 { color=red 10 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 12 [label="Enter block"]; - 13 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 14 [label="Postponed enter to lambda"]; + 11 [label="Enter block"]; + 12 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 13 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue 20 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 22 [label="Enter block"]; - 23 [label="Const: Int(1)"]; - 24 [label="Assignment: R|/x|"]; - 25 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Const: Int(1)"]; + 23 [label="Assignment: R|/x|"]; + 24 [label="Exit block"]; } - 21 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 25 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 15 [label="Postponed exit from lambda"]; - 16 [label="Function call: R|/inlineRun|(...)"]; - 17 [label="Access variable R|/x|"]; - 18 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 19 [label="Exit block"]; + 14 [label="Postponed exit from lambda"]; + 15 [label="Function call: R|/inlineRun|(...)"]; + 16 [label="Access variable R|/x|"]; + 17 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 18 [label="Exit block"]; } - 11 [label="Exit function test_1" style="filled" fillcolor=red]; + 19 [label="Exit function test_1" style="filled" fillcolor=red]; } - 10 -> {12}; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; - 14 -> {20}; - 14 -> {15} [color=red]; + 13 -> {20}; + 13 -> {14} [color=red]; + 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {11}; - 20 -> {21 22}; - 21 -> {15} [color=green]; + 20 -> {25 21}; + 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {21}; + 25 -> {14} [color=green]; subgraph cluster_8 { color=red 26 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 28 [label="Enter block"]; - 29 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 30 [label="Postponed enter to lambda"]; + 27 [label="Enter block"]; + 28 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 29 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue 36 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 38 [label="Enter block"]; - 39 [label="Const: Int(1)"]; - 40 [label="Assignment: R|/x|"]; - 41 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Const: Int(1)"]; + 39 [label="Assignment: R|/x|"]; + 40 [label="Exit block"]; } - 37 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 41 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 31 [label="Postponed exit from lambda"]; - 32 [label="Function call: R|/myRun|(...)"]; - 33 [label="Access variable R|/x|"]; - 34 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 35 [label="Exit block"]; + 30 [label="Postponed exit from lambda"]; + 31 [label="Function call: R|/myRun|(...)"]; + 32 [label="Access variable R|/x|"]; + 33 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 34 [label="Exit block"]; } - 27 [label="Exit function test_2" style="filled" fillcolor=red]; + 35 [label="Exit function test_2" style="filled" fillcolor=red]; } - 26 -> {28}; + 26 -> {27}; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; - 30 -> {36}; - 30 -> {31} [color=red]; + 29 -> {36}; + 29 -> {30} [color=red]; + 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {27}; - 36 -> {37 38}; - 37 -> {31} [color=green]; + 36 -> {41 37}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {37}; + 41 -> {30} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot index 1a278d98458..5f7704d5ce8 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot @@ -8,127 +8,127 @@ digraph exactlyOnce_kt { 0 [label="Enter function inlineRun" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Function call: R|/block|.R|FakeOverride|()"]; - 4 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Function call: R|/block|.R|FakeOverride|()"]; + 3 [label="Exit block"]; } - 1 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 4 [label="Exit function inlineRun" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {1}; subgraph cluster_2 { color=red 5 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 7 [label="Enter block"]; - 8 [label="Function call: R|/block|.R|FakeOverride|()"]; - 9 [label="Exit block"]; + 6 [label="Enter block"]; + 7 [label="Function call: R|/block|.R|FakeOverride|()"]; + 8 [label="Exit block"]; } - 6 [label="Exit function myRun" style="filled" fillcolor=red]; + 9 [label="Exit function myRun" style="filled" fillcolor=red]; } - 5 -> {7}; + 5 -> {6}; + 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {6}; subgraph cluster_4 { color=red 10 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 12 [label="Enter block"]; - 13 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 14 [label="Postponed enter to lambda"]; + 11 [label="Enter block"]; + 12 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 13 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue 21 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 23 [label="Enter block"]; - 24 [label="Const: Int(1)"]; - 25 [label="Assignment: R|/x|"]; - 26 [label="Exit block"]; + 22 [label="Enter block"]; + 23 [label="Const: Int(1)"]; + 24 [label="Assignment: R|/x|"]; + 25 [label="Exit block"]; } - 22 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 26 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 17 [label="Call arguments union" style="filled" fillcolor=yellow]; + 14 [label="Call arguments union" style="filled" fillcolor=yellow]; 15 [label="Postponed exit from lambda"]; 16 [label="Function call: R|/inlineRun|(...)"]; - 18 [label="Access variable R|/x|"]; - 19 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 20 [label="Exit block"]; + 17 [label="Access variable R|/x|"]; + 18 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 19 [label="Exit block"]; } - 11 [label="Exit function test_1" style="filled" fillcolor=red]; + 20 [label="Exit function test_1" style="filled" fillcolor=red]; } - 10 -> {12}; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; - 14 -> {21}; - 14 -> {15} [color=red]; + 13 -> {21}; + 13 -> {15} [color=red]; + 14 -> {16} [color=red]; 15 -> {16} [color=green]; - 16 -> {18}; - 17 -> {16} [color=red]; + 16 -> {17}; + 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {11}; - 21 -> {23}; - 22 -> {15} [color=green]; - 22 -> {17} [color=red]; + 21 -> {22}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {22}; + 26 -> {15} [color=green]; + 26 -> {14} [color=red]; subgraph cluster_8 { color=red 27 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 29 [label="Enter block"]; - 30 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 31 [label="Postponed enter to lambda"]; + 28 [label="Enter block"]; + 29 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 30 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue 38 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 40 [label="Enter block"]; - 41 [label="Const: Int(1)"]; - 42 [label="Assignment: R|/x|"]; - 43 [label="Exit block"]; + 39 [label="Enter block"]; + 40 [label="Const: Int(1)"]; + 41 [label="Assignment: R|/x|"]; + 42 [label="Exit block"]; } - 39 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 43 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 34 [label="Call arguments union" style="filled" fillcolor=yellow]; + 31 [label="Call arguments union" style="filled" fillcolor=yellow]; 32 [label="Postponed exit from lambda"]; 33 [label="Function call: R|/myRun|(...)"]; - 35 [label="Access variable R|/x|"]; - 36 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 37 [label="Exit block"]; + 34 [label="Access variable R|/x|"]; + 35 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 36 [label="Exit block"]; } - 28 [label="Exit function test_2" style="filled" fillcolor=red]; + 37 [label="Exit function test_2" style="filled" fillcolor=red]; } - 27 -> {29}; + 27 -> {28}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; - 31 -> {38}; - 31 -> {32} [color=red]; + 30 -> {38}; + 30 -> {32} [color=red]; + 31 -> {33} [color=red]; 32 -> {33} [color=green]; - 33 -> {35}; - 34 -> {33} [color=red]; + 33 -> {34}; + 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {28}; - 38 -> {40}; - 39 -> {32} [color=green]; - 39 -> {34} [color=red]; + 38 -> {39}; + 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {39}; + 43 -> {32} [color=green]; + 43 -> {31} [color=red]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot index 160d33c9722..e79a3991202 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot @@ -8,123 +8,123 @@ digraph unknown_kt { 0 [label="Enter function inlineRun" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Function call: R|/block|.R|FakeOverride|()"]; - 4 [label="Exit block"]; + 1 [label="Enter block"]; + 2 [label="Function call: R|/block|.R|FakeOverride|()"]; + 3 [label="Exit block"]; } - 1 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 4 [label="Exit function inlineRun" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {1}; subgraph cluster_2 { color=red 5 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 7 [label="Enter block"]; - 8 [label="Function call: R|/block|.R|FakeOverride|()"]; - 9 [label="Exit block"]; + 6 [label="Enter block"]; + 7 [label="Function call: R|/block|.R|FakeOverride|()"]; + 8 [label="Exit block"]; } - 6 [label="Exit function myRun" style="filled" fillcolor=red]; + 9 [label="Exit function myRun" style="filled" fillcolor=red]; } - 5 -> {7}; + 5 -> {6}; + 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {6}; subgraph cluster_4 { color=red 10 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 12 [label="Enter block"]; - 13 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 14 [label="Postponed enter to lambda"]; + 11 [label="Enter block"]; + 12 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 13 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue 20 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 22 [label="Enter block"]; - 23 [label="Const: Int(1)"]; - 24 [label="Assignment: R|/x|"]; - 25 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Const: Int(1)"]; + 23 [label="Assignment: R|/x|"]; + 24 [label="Exit block"]; } - 21 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 25 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 15 [label="Postponed exit from lambda"]; - 16 [label="Function call: R|/inlineRun|(...)"]; - 17 [label="Access variable R|/x|"]; - 18 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 19 [label="Exit block"]; + 14 [label="Postponed exit from lambda"]; + 15 [label="Function call: R|/inlineRun|(...)"]; + 16 [label="Access variable R|/x|"]; + 17 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 18 [label="Exit block"]; } - 11 [label="Exit function test_1" style="filled" fillcolor=red]; + 19 [label="Exit function test_1" style="filled" fillcolor=red]; } - 10 -> {12}; + 10 -> {11}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; - 14 -> {20}; - 14 -> {15} [color=red]; + 13 -> {20}; + 13 -> {14} [color=red]; + 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {11}; - 20 -> {21 22}; - 21 -> {15} [color=green]; - 21 -> {20} [color=green style=dashed]; + 20 -> {25 21}; + 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {21}; + 25 -> {14} [color=green]; + 25 -> {20} [color=green style=dashed]; subgraph cluster_8 { color=red 26 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 28 [label="Enter block"]; - 29 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 30 [label="Postponed enter to lambda"]; + 27 [label="Enter block"]; + 28 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 29 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue 36 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 38 [label="Enter block"]; - 39 [label="Const: Int(1)"]; - 40 [label="Assignment: R|/x|"]; - 41 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Const: Int(1)"]; + 39 [label="Assignment: R|/x|"]; + 40 [label="Exit block"]; } - 37 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 41 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 31 [label="Postponed exit from lambda"]; - 32 [label="Function call: R|/myRun|(...)"]; - 33 [label="Access variable R|/x|"]; - 34 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; - 35 [label="Exit block"]; + 30 [label="Postponed exit from lambda"]; + 31 [label="Function call: R|/myRun|(...)"]; + 32 [label="Access variable R|/x|"]; + 33 [label="Function call: R|/x|.R|kotlin/Int.inc|()"]; + 34 [label="Exit block"]; } - 27 [label="Exit function test_2" style="filled" fillcolor=red]; + 35 [label="Exit function test_2" style="filled" fillcolor=red]; } - 26 -> {28}; + 26 -> {27}; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; - 30 -> {36}; - 30 -> {31} [color=red]; + 29 -> {36}; + 29 -> {30} [color=red]; + 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {27}; - 36 -> {37 38}; - 37 -> {31} [color=green]; - 37 -> {36} [color=green style=dashed]; + 36 -> {41 37}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {37}; + 41 -> {30} [color=green]; + 41 -> {36} [color=green style=dashed]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot index 7ddd7421294..b6467c634ed 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot @@ -6,233 +6,233 @@ digraph delegateWithAnonymousObject_kt { subgraph cluster_0 { color=red 0 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()"]; - 1 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Delegated constructor call: super()"]; + 2 [label="Exit function " style="filled" fillcolor=red]; } - 0 -> {2}; - 2 -> {1}; + 0 -> {1}; + 1 -> {2}; subgraph cluster_1 { color=red - 4 [label="Enter class DelegateProvider" style="filled" fillcolor=red]; - 3 [label="Exit class DelegateProvider" style="filled" fillcolor=red]; + 3 [label="Enter class DelegateProvider" style="filled" fillcolor=red]; + 4 [label="Exit class DelegateProvider" style="filled" fillcolor=red]; } - 4 -> {3} [color=green]; + 3 -> {4} [color=green]; subgraph cluster_2 { color=red 5 [label="Enter function delegate" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 7 [label="Enter block"]; - 8 [label="Const: Null(null)"]; - 9 [label="Check not null: Null(null)!!"]; - 10 [label="Jump: ^delegate Null(null)!!"]; - 11 [label="Stub" style="filled" fillcolor=gray]; - 12 [label="Exit block" style="filled" fillcolor=gray]; + 6 [label="Enter block"]; + 7 [label="Const: Null(null)"]; + 8 [label="Check not null: Null(null)!!"]; + 9 [label="Jump: ^delegate Null(null)!!"]; + 10 [label="Stub" style="filled" fillcolor=gray]; + 11 [label="Exit block" style="filled" fillcolor=gray]; } - 6 [label="Exit function delegate" style="filled" fillcolor=red]; + 12 [label="Exit function delegate" style="filled" fillcolor=red]; } - 5 -> {7}; + 5 -> {6}; + 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {10}; - 10 -> {6}; + 9 -> {12}; + 9 -> {10} [style=dotted]; 10 -> {11} [style=dotted]; 11 -> {12} [style=dotted]; - 12 -> {6} [style=dotted]; subgraph cluster_4 { color=red 13 [label="Enter function " style="filled" fillcolor=red]; - 15 [label="Delegated constructor call: super|>()"]; - 14 [label="Exit function " style="filled" fillcolor=red]; + 14 [label="Delegated constructor call: super|>()"]; + 15 [label="Exit function " style="filled" fillcolor=red]; } - 13 -> {15}; - 15 -> {14}; + 13 -> {14}; + 14 -> {15}; subgraph cluster_5 { color=red 16 [label="Enter function updateFrom" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 18 [label="Enter block"]; - 19 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Exit block"]; } - 17 [label="Exit function updateFrom" style="filled" fillcolor=red]; + 19 [label="Exit function updateFrom" style="filled" fillcolor=red]; } - 16 -> {18}; + 16 -> {17}; + 17 -> {18}; 18 -> {19}; - 19 -> {17}; subgraph cluster_7 { color=red - 21 [label="Enter class IssueListView" style="filled" fillcolor=red]; - 20 [label="Exit class IssueListView" style="filled" fillcolor=red]; + 20 [label="Enter class IssueListView" style="filled" fillcolor=red]; + 21 [label="Exit class IssueListView" style="filled" fillcolor=red]; } - 21 -> {20} [color=green]; + 20 -> {21} [color=green]; subgraph cluster_8 { color=red 22 [label="Enter function " style="filled" fillcolor=red]; - 24 [label="Delegated constructor call: super|>()"]; - 23 [label="Exit function " style="filled" fillcolor=red]; + 23 [label="Delegated constructor call: super|>()"]; + 24 [label="Exit function " style="filled" fillcolor=red]; } - 22 -> {24}; - 24 -> {23}; + 22 -> {23}; + 23 -> {24}; subgraph cluster_9 { color=red 32 [label="Enter function " style="filled" fillcolor=red]; - 34 [label="Delegated constructor call: super()"]; - 33 [label="Exit function " style="filled" fillcolor=red]; + 33 [label="Delegated constructor call: super()"]; + 34 [label="Exit function " style="filled" fillcolor=red]; } - 32 -> {34}; - 34 -> {33}; + 32 -> {33}; + 33 -> {34}; subgraph cluster_10 { color=red 35 [label="Enter function getValue" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 37 [label="Enter block"]; - 38 [label="Function call: R|/IssueListView.IssueListView|()"]; - 39 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"]; - 40 [label="Stub" style="filled" fillcolor=gray]; - 41 [label="Exit block" style="filled" fillcolor=gray]; + 36 [label="Enter block"]; + 37 [label="Function call: R|/IssueListView.IssueListView|()"]; + 38 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"]; + 39 [label="Stub" style="filled" fillcolor=gray]; + 40 [label="Exit block" style="filled" fillcolor=gray]; } - 36 [label="Exit function getValue" style="filled" fillcolor=red]; + 41 [label="Exit function getValue" style="filled" fillcolor=red]; } - 35 -> {37}; + 35 -> {36}; + 36 -> {37}; 37 -> {38}; - 38 -> {39}; - 39 -> {36}; + 38 -> {41}; + 38 -> {39} [style=dotted]; 39 -> {40} [style=dotted]; 40 -> {41} [style=dotted]; - 41 -> {36} [style=dotted]; subgraph cluster_12 { color=red 42 [label="Enter function setValue" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 44 [label="Enter block"]; - 45 [label="Function call: R|/IssueListView.IssueListView|()"]; - 46 [label="Access variable R|/value|"]; - 47 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)"]; - 48 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|/value|)"]; - 49 [label="Stub" style="filled" fillcolor=gray]; - 50 [label="Exit block" style="filled" fillcolor=gray]; + 43 [label="Enter block"]; + 44 [label="Function call: R|/IssueListView.IssueListView|()"]; + 45 [label="Access variable R|/value|"]; + 46 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)"]; + 47 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|/value|)"]; + 48 [label="Stub" style="filled" fillcolor=gray]; + 49 [label="Exit block" style="filled" fillcolor=gray]; } - 43 [label="Exit function setValue" style="filled" fillcolor=red]; + 50 [label="Exit function setValue" style="filled" fillcolor=red]; } - 42 -> {44}; + 42 -> {43}; + 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; - 48 -> {43}; + 47 -> {50}; + 47 -> {48} [style=dotted]; 48 -> {49} [style=dotted]; 49 -> {50} [style=dotted]; - 50 -> {43} [style=dotted]; subgraph cluster_14 { color=red 51 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 53 [label="Enter block"]; - 54 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; - 55 [label="Access variable this@R|/IssuesListUserProfile|"]; - 56 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride|(...)"]; - 57 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; + 52 [label="Enter block"]; + 53 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; + 54 [label="Access variable this@R|/IssuesListUserProfile|"]; + 55 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride|(...)"]; + 56 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; + 57 [label="Stub" style="filled" fillcolor=gray]; + 58 [label="Exit block" style="filled" fillcolor=gray]; } - 52 [label="Exit function getter" style="filled" fillcolor=red]; + 59 [label="Exit function getter" style="filled" fillcolor=red]; } - 51 -> {53}; + 51 -> {52}; + 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57}; - 57 -> {52}; + 56 -> {59}; + 56 -> {57} [style=dotted]; 57 -> {58} [style=dotted]; 58 -> {59} [style=dotted]; - 59 -> {52} [style=dotted]; subgraph cluster_16 { color=red 60 [label="Enter function setter" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 62 [label="Enter block"]; - 63 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; - 64 [label="Access variable this@R|/IssuesListUserProfile|"]; - 65 [label="Access variable R|/issueListView|"]; - 66 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride|(...)"]; - 67 [label="Exit block"]; + 61 [label="Enter block"]; + 62 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; + 63 [label="Access variable this@R|/IssuesListUserProfile|"]; + 64 [label="Access variable R|/issueListView|"]; + 65 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride|(...)"]; + 66 [label="Exit block"]; } - 61 [label="Exit function setter" style="filled" fillcolor=red]; + 67 [label="Exit function setter" style="filled" fillcolor=red]; } - 60 -> {62}; + 60 -> {61}; + 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {61}; subgraph cluster_18 { color=red - 79 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red]; + 78 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 31 [label="Enter class " style="filled" fillcolor=red]; - 30 [label="Exit class " style="filled" fillcolor=red]; + 30 [label="Enter class " style="filled" fillcolor=red]; + 31 [label="Exit class " style="filled" fillcolor=red]; } subgraph cluster_20 { color=blue 68 [label="Enter property" style="filled" fillcolor=red]; - 70 [label="Postponed enter to lambda"]; - 71 [label="Postponed exit from lambda"]; - 72 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)"]; - 73 [label="Access variable this@R|/IssuesListUserProfile|"]; - 74 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...).#(...)"]; - 75 [label="Postponed enter to lambda"]; + 69 [label="Postponed enter to lambda"]; + 70 [label="Postponed exit from lambda"]; + 71 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)"]; + 72 [label="Access variable this@R|/IssuesListUserProfile|"]; + 73 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...).#(...)"]; + 74 [label="Postponed enter to lambda"]; subgraph cluster_21 { color=blue 25 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_22 { color=blue - 27 [label="Enter block"]; - 28 [label="Exit anonymous object"]; - 29 [label="Exit block"]; + 26 [label="Enter block"]; + 27 [label="Exit anonymous object"]; + 28 [label="Exit block"]; } - 26 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 29 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 76 [label="Postponed exit from lambda"]; - 77 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)"]; - 69 [label="Exit property" style="filled" fillcolor=red]; + 75 [label="Postponed exit from lambda"]; + 76 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)"]; + 77 [label="Exit property" style="filled" fillcolor=red]; } - 78 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red]; + 79 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red]; } - 79 -> {68} [color=green]; - 68 -> {70}; - 69 -> {78} [color=green]; + 78 -> {68} [color=green]; + 68 -> {69}; + 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; - 74 -> {75}; - 75 -> {76 25}; + 74 -> {75 25}; + 75 -> {76}; 76 -> {77}; - 77 -> {69}; - 25 -> {27}; + 77 -> {79} [color=green]; + 25 -> {26}; + 26 -> {27}; + 26 -> {32 35 42} [color=red]; 27 -> {28}; - 27 -> {32 35 42} [color=red]; 28 -> {29}; - 29 -> {26}; - 31 -> {30} [color=green]; + 30 -> {31} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot index ecaa749c3cc..77032fe50c4 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot @@ -8,83 +8,83 @@ digraph tryWithLambdaInside_kt { 0 [label="Enter function notInPlaceFilter" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter block"]; - 3 [label="Access variable this@R|/notInPlaceFilter|"]; - 4 [label="Jump: ^notInPlaceFilter this@R|/notInPlaceFilter|"]; - 5 [label="Stub" style="filled" fillcolor=gray]; - 6 [label="Exit block" style="filled" fillcolor=gray]; + 1 [label="Enter block"]; + 2 [label="Access variable this@R|/notInPlaceFilter|"]; + 3 [label="Jump: ^notInPlaceFilter this@R|/notInPlaceFilter|"]; + 4 [label="Stub" style="filled" fillcolor=gray]; + 5 [label="Exit block" style="filled" fillcolor=gray]; } - 1 [label="Exit function notInPlaceFilter" style="filled" fillcolor=red]; + 6 [label="Exit function notInPlaceFilter" style="filled" fillcolor=red]; } - 0 -> {2}; + 0 -> {1}; + 1 -> {2}; 2 -> {3}; - 3 -> {4}; - 4 -> {1}; + 3 -> {6}; + 3 -> {4} [style=dotted]; 4 -> {5} [style=dotted]; 5 -> {6} [style=dotted]; - 6 -> {1} [style=dotted]; subgraph cluster_2 { color=red 7 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 9 [label="Enter block"]; - 10 [label="Exit block"]; + 8 [label="Enter block"]; + 9 [label="Exit block"]; } - 8 [label="Exit function foo" style="filled" fillcolor=red]; + 10 [label="Exit function foo" style="filled" fillcolor=red]; } - 7 -> {9}; + 7 -> {8}; + 8 -> {9}; 9 -> {10}; - 10 -> {8}; subgraph cluster_4 { color=red 11 [label="Enter function testInPlace" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 13 [label="Enter block"]; + 12 [label="Enter block"]; subgraph cluster_6 { color=blue - 14 [label="Try expression enter"]; + 13 [label="Try expression enter"]; subgraph cluster_7 { color=blue - 16 [label="Try main block enter"]; + 14 [label="Try main block enter"]; subgraph cluster_8 { color=blue - 18 [label="Enter block"]; - 19 [label="Access variable R|/list|"]; - 20 [label="Postponed enter to lambda"]; + 15 [label="Enter block"]; + 16 [label="Access variable R|/list|"]; + 17 [label="Postponed enter to lambda"]; subgraph cluster_9 { color=blue 31 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 33 [label="Enter block"]; - 34 [label="Access variable R|/it|"]; - 35 [label="Exit block"]; + 32 [label="Enter block"]; + 33 [label="Access variable R|/it|"]; + 34 [label="Exit block"]; } - 32 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 35 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 21 [label="Postponed exit from lambda"]; - 22 [label="Function call: R|/list|.R|kotlin/collections/filter|(...)"]; - 23 [label="Exit block"]; + 18 [label="Postponed exit from lambda"]; + 19 [label="Function call: R|/list|.R|kotlin/collections/filter|(...)"]; + 20 [label="Exit block"]; } - 24 [label="Try main block exit"]; + 21 [label="Try main block exit"]; } subgraph cluster_11 { color=blue - 17 [label="Enter finally"]; + 22 [label="Enter finally"]; subgraph cluster_12 { color=blue - 25 [label="Enter block"]; - 26 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Exit block"]; } - 27 [label="Exit finally"]; + 25 [label="Exit finally"]; } - 15 [label="Try expression exit"]; + 26 [label="Try expression exit"]; } - 28 [label="Jump: ^testInPlace try { + 27 [label="Jump: ^testInPlace try { R|/list|.R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } @@ -93,86 +93,86 @@ digraph tryWithLambdaInside_kt { finally { } "]; - 29 [label="Stub" style="filled" fillcolor=gray]; - 30 [label="Exit block" style="filled" fillcolor=gray]; + 28 [label="Stub" style="filled" fillcolor=gray]; + 29 [label="Exit block" style="filled" fillcolor=gray]; } - 12 [label="Exit function testInPlace" style="filled" fillcolor=red]; + 30 [label="Exit function testInPlace" style="filled" fillcolor=red]; } - 11 -> {13}; + 11 -> {12}; + 12 -> {13}; 13 -> {14}; - 14 -> {16}; - 15 -> {28}; - 16 -> {12 17 18}; - 17 -> {25}; + 14 -> {30 22 15}; + 15 -> {16}; + 16 -> {17}; + 17 -> {31}; + 17 -> {18} [color=red]; 18 -> {19}; 19 -> {20}; - 20 -> {31}; - 20 -> {21} [color=red]; - 21 -> {22}; + 20 -> {21}; + 21 -> {26}; 22 -> {23}; 23 -> {24}; - 24 -> {15}; + 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {15}; - 28 -> {12}; + 27 -> {30}; + 27 -> {28} [style=dotted]; 28 -> {29} [style=dotted]; 29 -> {30} [style=dotted]; - 30 -> {12} [style=dotted]; - 31 -> {32 33}; - 32 -> {21} [color=green]; - 32 -> {31} [color=green style=dashed]; + 31 -> {35 32}; + 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {32}; + 35 -> {18} [color=green]; + 35 -> {31} [color=green style=dashed]; subgraph cluster_13 { color=red 36 [label="Enter function testNotInPlace" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 38 [label="Enter block"]; + 37 [label="Enter block"]; subgraph cluster_15 { color=blue - 39 [label="Try expression enter"]; + 38 [label="Try expression enter"]; subgraph cluster_16 { color=blue - 41 [label="Try main block enter"]; + 39 [label="Try main block enter"]; subgraph cluster_17 { color=blue - 43 [label="Enter block"]; - 44 [label="Access variable R|/list|"]; - 45 [label="Postponed enter to lambda"]; + 40 [label="Enter block"]; + 41 [label="Access variable R|/list|"]; + 42 [label="Postponed enter to lambda"]; subgraph cluster_18 { color=blue 56 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 58 [label="Enter block"]; - 59 [label="Access variable R|/it|"]; - 60 [label="Exit block"]; + 57 [label="Enter block"]; + 58 [label="Access variable R|/it|"]; + 59 [label="Exit block"]; } - 57 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 60 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 46 [label="Postponed exit from lambda"]; - 47 [label="Function call: R|/list|.R|/notInPlaceFilter|(...)"]; - 48 [label="Exit block"]; + 43 [label="Postponed exit from lambda"]; + 44 [label="Function call: R|/list|.R|/notInPlaceFilter|(...)"]; + 45 [label="Exit block"]; } - 49 [label="Try main block exit"]; + 46 [label="Try main block exit"]; } subgraph cluster_20 { color=blue - 42 [label="Enter finally"]; + 47 [label="Enter finally"]; subgraph cluster_21 { color=blue - 50 [label="Enter block"]; - 51 [label="Exit block"]; + 48 [label="Enter block"]; + 49 [label="Exit block"]; } - 52 [label="Exit finally"]; + 50 [label="Exit finally"]; } - 40 [label="Try expression exit"]; + 51 [label="Try expression exit"]; } - 53 [label="Jump: ^testNotInPlace try { + 52 [label="Jump: ^testNotInPlace try { R|/list|.R|/notInPlaceFilter|( = notInPlaceFilter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } @@ -181,34 +181,34 @@ finally { finally { } "]; - 54 [label="Stub" style="filled" fillcolor=gray]; - 55 [label="Exit block" style="filled" fillcolor=gray]; + 53 [label="Stub" style="filled" fillcolor=gray]; + 54 [label="Exit block" style="filled" fillcolor=gray]; } - 37 [label="Exit function testNotInPlace" style="filled" fillcolor=red]; + 55 [label="Exit function testNotInPlace" style="filled" fillcolor=red]; } - 36 -> {38}; + 36 -> {37}; + 37 -> {38}; 38 -> {39}; - 39 -> {41}; - 40 -> {53}; - 41 -> {37 42 43}; - 42 -> {50}; + 39 -> {55 47 40}; + 40 -> {41}; + 41 -> {42}; + 42 -> {43 56}; 43 -> {44}; 44 -> {45}; - 45 -> {46 56}; - 46 -> {47}; + 45 -> {46}; + 46 -> {51}; 47 -> {48}; 48 -> {49}; - 49 -> {40}; + 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {40}; - 53 -> {37}; + 52 -> {55}; + 52 -> {53} [style=dotted]; 53 -> {54} [style=dotted]; 54 -> {55} [style=dotted]; - 55 -> {37} [style=dotted]; - 56 -> {58}; + 56 -> {57}; + 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {57}; }