diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot index ab7fb2beece..21f9c44dc20 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot @@ -5,20 +5,20 @@ digraph annotatedLocalClass_kt { subgraph cluster_0 { color=red - 3 [label="Enter class Ann" style="filled" fillcolor=red]; - 4 [label="Exit class Ann" style="filled" fillcolor=red]; + 0 [label="Enter class Ann" style="filled" fillcolor=red]; + 1 [label="Exit class Ann" style="filled" fillcolor=red]; } subgraph cluster_1 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 2 [label="Enter function " style="filled" fillcolor=red]; + 3 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 4 [label="Exit function " style="filled" fillcolor=red]; } - 3 -> {4} [color=green]; - 4 -> {0} [color=green]; - 4 -> {0} [style=dashed]; - 0 -> {1}; - 1 -> {2}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; + 3 -> {4}; subgraph cluster_2 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot index e34258e620f..e0504dd43e8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot @@ -5,18 +5,18 @@ digraph complex_kt { subgraph cluster_0 { color=red - 2 [label="Enter class AutoCloseable" style="filled" fillcolor=red]; - 3 [label="Exit class AutoCloseable" style="filled" fillcolor=red]; + 0 [label="Enter class AutoCloseable" style="filled" fillcolor=red]; + 1 [label="Exit class AutoCloseable" style="filled" fillcolor=red]; } subgraph cluster_1 { color=blue - 0 [label="Enter function close" style="filled" fillcolor=red]; - 1 [label="Exit function close" style="filled" fillcolor=red]; + 2 [label="Enter function close" style="filled" fillcolor=red]; + 3 [label="Exit function close" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot index ea0e03441a7..da22067582b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot @@ -30,66 +30,66 @@ digraph defaultArguments_kt { 8 [label="Enter default value of y"]; subgraph cluster_3 { color=blue - 16 [label="Enter default value of y" style="filled" fillcolor=red]; - 17 [label="Access variable R|/x|"]; - 18 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 19 [label="Exit default value of y" style="filled" fillcolor=red]; + 9 [label="Enter default value of y" style="filled" fillcolor=red]; + 10 [label="Access variable R|/x|"]; + 11 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 12 [label="Exit default value of y" style="filled" fillcolor=red]; } - 9 [label="Exit default value of y"]; - 10 [label="Enter default value of z"]; + 13 [label="Exit default value of y"]; + 14 [label="Enter default value of z"]; subgraph cluster_4 { color=blue - 20 [label="Enter default value of z" style="filled" fillcolor=red]; - 21 [label="Postponed enter to lambda"]; + 15 [label="Enter default value of z" style="filled" fillcolor=red]; + 16 [label="Postponed enter to lambda"]; subgraph cluster_5 { color=blue - 25 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 17 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 26 [label="Enter block"]; - 27 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; + 18 [label="Enter block"]; + 19 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; + 20 [label="Exit block"]; } - 29 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 21 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } 22 [label="Postponed exit from lambda"]; 23 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; 24 [label="Exit default value of z" style="filled" fillcolor=red]; } - 11 [label="Exit default value of z"]; + 25 [label="Exit default value of z"]; subgraph cluster_7 { color=blue - 12 [label="Enter block"]; - 13 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; + 26 [label="Enter block"]; + 27 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; } - 15 [label="Exit function test" style="filled" fillcolor=red]; + 29 [label="Exit function test" style="filled" fillcolor=red]; } 7 -> {8}; - 8 -> {9 16}; - 8 -> {16} [style=dashed]; + 8 -> {9 13}; + 8 -> {9} [style=dashed]; 9 -> {10}; - 10 -> {11 20}; - 10 -> {20} [style=dashed]; + 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15}; - 16 -> {17}; + 14 -> {15 25}; + 14 -> {15} [style=dashed]; + 15 -> {16}; + 16 -> {17 23}; + 16 -> {22} [style=dotted]; + 16 -> {17} [style=dashed]; 17 -> {18}; 18 -> {19}; - 19 -> {9}; + 19 -> {20}; 20 -> {21}; - 21 -> {23 25}; - 21 -> {22} [style=dotted]; - 21 -> {25} [style=dashed]; + 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {11}; + 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {22}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot index c79da7b02cf..5de13d13bf9 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot @@ -33,52 +33,101 @@ digraph flowFromInplaceLambda_kt { subgraph cluster_3 { color=red - 17 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; + 9 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 18 [label="Enter block"]; + 10 [label="Enter block"]; subgraph cluster_5 { color=blue - 19 [label="Enter block"]; - 20 [label="Exit block"]; + 11 [label="Enter block"]; + 12 [label="Exit block"]; } - 21 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 22 [label="Jump: ^atLeastOnce R|/x|.R|SubstitutionOverride|()"]; - 23 [label="Stub" style="filled" fillcolor=gray]; - 24 [label="Exit block" style="filled" fillcolor=gray]; + 13 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 14 [label="Jump: ^atLeastOnce R|/x|.R|SubstitutionOverride|()"]; + 15 [label="Stub" style="filled" fillcolor=gray]; + 16 [label="Exit block" style="filled" fillcolor=gray]; } - 25 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; + 17 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; + } + 9 -> {10}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; + 13 -> {14}; + 14 -> {17}; + 14 -> {15} [style=dotted]; + 15 -> {16} [style=dotted]; + 16 -> {17} [style=dotted]; + + subgraph cluster_6 { + color=red + 18 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 19 [label="Enter block"]; + subgraph cluster_8 { + color=blue + 20 [label="Enter block"]; + 21 [label="Exit block"]; + } + 22 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 23 [label="Jump: ^exactlyOnce R|/x|.R|SubstitutionOverride|()"]; + 24 [label="Stub" style="filled" fillcolor=gray]; + 25 [label="Exit block" style="filled" fillcolor=gray]; + } + 26 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; } - 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {25}; - 22 -> {23} [style=dotted]; + 22 -> {23}; + 23 -> {26}; 23 -> {24} [style=dotted]; 24 -> {25} [style=dotted]; + 25 -> {26} [style=dotted]; - subgraph cluster_6 { + subgraph cluster_9 { color=red - 34 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_7 { + 27 [label="Enter function atMostOnce" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 35 [label="Enter block"]; - subgraph cluster_8 { + 28 [label="Enter block"]; + subgraph cluster_11 { color=blue - 36 [label="Enter block"]; - 37 [label="Exit block"]; + 29 [label="Enter block"]; + 30 [label="Exit block"]; } + 31 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 32 [label="Jump: ^atMostOnce R|/x|.R|SubstitutionOverride|()"]; + 33 [label="Stub" style="filled" fillcolor=gray]; + 34 [label="Exit block" style="filled" fillcolor=gray]; + } + 35 [label="Exit function atMostOnce" style="filled" fillcolor=red]; + } + 27 -> {28}; + 28 -> {29}; + 29 -> {30}; + 30 -> {31}; + 31 -> {32}; + 32 -> {35}; + 32 -> {33} [style=dotted]; + 33 -> {34} [style=dotted]; + 34 -> {35} [style=dotted]; + + subgraph cluster_12 { + color=red + 36 [label="Enter function noContract" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 37 [label="Enter block"]; 38 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 39 [label="Jump: ^exactlyOnce R|/x|.R|SubstitutionOverride|()"]; + 39 [label="Jump: ^noContract R|/x|.R|SubstitutionOverride|()"]; 40 [label="Stub" style="filled" fillcolor=gray]; 41 [label="Exit block" style="filled" fillcolor=gray]; } - 42 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; + 42 [label="Exit function noContract" style="filled" fillcolor=red]; } - 34 -> {35}; - 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; @@ -87,246 +136,289 @@ digraph flowFromInplaceLambda_kt { 40 -> {41} [style=dotted]; 41 -> {42} [style=dotted]; - subgraph cluster_9 { + subgraph cluster_14 { color=red - 51 [label="Enter function atMostOnce" style="filled" fillcolor=red]; - subgraph cluster_10 { + 43 [label="Enter function select" style="filled" fillcolor=red]; + subgraph cluster_15 { color=blue - 52 [label="Enter block"]; - subgraph cluster_11 { - color=blue - 53 [label="Enter block"]; - 54 [label="Exit block"]; - } - 55 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 56 [label="Jump: ^atMostOnce R|/x|.R|SubstitutionOverride|()"]; - 57 [label="Stub" style="filled" fillcolor=gray]; - 58 [label="Exit block" style="filled" fillcolor=gray]; + 44 [label="Enter block"]; + 45 [label="Access variable R|/x|"]; + 46 [label="Const: Int(0)"]; + 47 [label="Function call: R|/x|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 48 [label="Jump: ^select R|/x|.R|SubstitutionOverride|(Int(0))"]; + 49 [label="Stub" style="filled" fillcolor=gray]; + 50 [label="Exit block" style="filled" fillcolor=gray]; } - 59 [label="Exit function atMostOnce" style="filled" fillcolor=red]; + 51 [label="Exit function select" style="filled" fillcolor=red]; + } + 43 -> {44}; + 44 -> {45}; + 45 -> {46}; + 46 -> {47}; + 47 -> {48}; + 48 -> {51}; + 48 -> {49} [style=dotted]; + 49 -> {50} [style=dotted]; + 50 -> {51} [style=dotted]; + + subgraph cluster_16 { + color=red + 52 [label="Enter function id" style="filled" fillcolor=red]; + subgraph cluster_17 { + color=blue + 53 [label="Enter block"]; + 54 [label="Access variable R|/x|"]; + 55 [label="Jump: ^id R|/x|"]; + 56 [label="Stub" style="filled" fillcolor=gray]; + 57 [label="Exit block" style="filled" fillcolor=gray]; + } + 58 [label="Exit function id" style="filled" fillcolor=red]; } - 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {56}; - 56 -> {59}; + 55 -> {58}; + 55 -> {56} [style=dotted]; 56 -> {57} [style=dotted]; 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; - subgraph cluster_12 { + subgraph cluster_18 { color=red - 68 [label="Enter function noContract" style="filled" fillcolor=red]; - subgraph cluster_13 { + 59 [label="Enter function materialize" style="filled" fillcolor=red]; + subgraph cluster_19 { + color=blue + 60 [label="Enter block"]; + 61 [label="Const: Null(null)"]; + 62 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; + 63 [label="Stub" style="filled" fillcolor=gray]; + 64 [label="Jump: ^materialize Null(null)!!" style="filled" fillcolor=gray]; + 65 [label="Stub" style="filled" fillcolor=gray]; + 66 [label="Exit block" style="filled" fillcolor=gray]; + } + 67 [label="Exit function materialize" style="filled" fillcolor=gray]; + } + 59 -> {60}; + 60 -> {61}; + 61 -> {62}; + 62 -> {63} [style=dotted]; + 63 -> {64} [style=dotted]; + 64 -> {65 67} [style=dotted]; + 65 -> {66} [style=dotted]; + 66 -> {67} [style=dotted]; + + subgraph cluster_20 { + color=red + 68 [label="Enter function basic" style="filled" fillcolor=red]; + subgraph cluster_21 { color=blue 69 [label="Enter block"]; - 70 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 71 [label="Jump: ^noContract R|/x|.R|SubstitutionOverride|()"]; - 72 [label="Stub" style="filled" fillcolor=gray]; - 73 [label="Exit block" style="filled" fillcolor=gray]; + 70 [label="Postponed enter to lambda"]; + subgraph cluster_22 { + color=blue + 71 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_23 { + color=blue + 72 [label="Enter block"]; + 73 [label="Access variable R|/x|"]; + 74 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 75 [label="Exit block"]; + } + 76 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 77 [label="Postponed exit from lambda"]; + 78 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 79 [label="Access variable R|/x|"]; + 80 [label="Smart cast: R|/x|"]; + 81 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 82 [label="Exit block"]; } - 74 [label="Exit function noContract" style="filled" fillcolor=red]; + 83 [label="Exit function basic" style="filled" fillcolor=red]; } 68 -> {69}; 69 -> {70}; - 70 -> {71}; - 71 -> {74}; - 71 -> {72} [style=dotted]; - 72 -> {73} [style=dotted]; - 73 -> {74} [style=dotted]; - - subgraph cluster_14 { - color=red - 75 [label="Enter function select" style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 76 [label="Enter block"]; - 77 [label="Access variable R|/x|"]; - 78 [label="Const: Int(0)"]; - 79 [label="Function call: R|/x|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 80 [label="Jump: ^select R|/x|.R|SubstitutionOverride|(Int(0))"]; - 81 [label="Stub" style="filled" fillcolor=gray]; - 82 [label="Exit block" style="filled" fillcolor=gray]; - } - 83 [label="Exit function select" style="filled" fillcolor=red]; - } + 70 -> {71 78}; + 70 -> {77} [style=dotted]; + 70 -> {71} [style=dashed]; + 71 -> {72}; + 72 -> {73}; + 73 -> {74}; + 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {83}; - 80 -> {81} [style=dotted]; - 81 -> {82} [style=dotted]; - 82 -> {83} [style=dotted]; + 80 -> {81}; + 81 -> {82}; + 82 -> {83}; - subgraph cluster_16 { + subgraph cluster_24 { color=red - 84 [label="Enter function id" style="filled" fillcolor=red]; - subgraph cluster_17 { + 84 [label="Enter function completedCallExactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_25 { color=blue 85 [label="Enter block"]; - 86 [label="Access variable R|/x|"]; - 87 [label="Jump: ^id R|/x|"]; - 88 [label="Stub" style="filled" fillcolor=gray]; - 89 [label="Exit block" style="filled" fillcolor=gray]; + 86 [label="Postponed enter to lambda"]; + subgraph cluster_26 { + color=blue + 87 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_27 { + color=blue + 88 [label="Enter block"]; + 89 [label="Access variable R|/y|"]; + 90 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 91 [label="Access variable R|/x|"]; + 92 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 93 [label="Exit block"]; + } + 94 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 95 [label="Postponed exit from lambda"]; + 96 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 97 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 98 [label="Access variable R|/y|"]; + 99 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 100 [label="Postponed enter to lambda"]; + subgraph cluster_28 { + color=blue + 101 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 102 [label="Enter block"]; + 103 [label="Access variable R|/x|"]; + 104 [label="Smart cast: R|/x|"]; + 105 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 106 [label="Access variable R|/y|"]; + 107 [label="Smart cast: R|/y|"]; + 108 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 109 [label="Const: Int(1)"]; + 110 [label="Exit block"]; + } + 111 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 112 [label="Postponed exit from lambda"]; + 113 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 114 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 115 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 116 [label="Access variable R|/x|"]; + 117 [label="Smart cast: R|/x|"]; + 118 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 119 [label="Access variable R|/y|"]; + 120 [label="Smart cast: R|/y|"]; + 121 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 122 [label="Exit block"]; } - 90 [label="Exit function id" style="filled" fillcolor=red]; + 123 [label="Exit function completedCallExactlyOnce" style="filled" fillcolor=red]; } 84 -> {85}; 85 -> {86}; - 86 -> {87}; - 87 -> {90}; - 87 -> {88} [style=dotted]; - 88 -> {89} [style=dotted]; - 89 -> {90} [style=dotted]; - - subgraph cluster_18 { - color=red - 91 [label="Enter function materialize" style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 92 [label="Enter block"]; - 93 [label="Const: Null(null)"]; - 94 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 95 [label="Stub" style="filled" fillcolor=gray]; - 96 [label="Jump: ^materialize Null(null)!!" style="filled" fillcolor=gray]; - 97 [label="Stub" style="filled" fillcolor=gray]; - 98 [label="Exit block" style="filled" fillcolor=gray]; - } - 99 [label="Exit function materialize" style="filled" fillcolor=gray]; - } + 86 -> {87 96}; + 86 -> {95} [style=dotted]; + 86 -> {87} [style=dashed]; + 87 -> {88}; + 88 -> {89}; + 89 -> {90}; + 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; - 94 -> {95} [style=dotted]; - 95 -> {96} [style=dotted]; - 96 -> {97 99} [style=dotted]; - 97 -> {98} [style=dotted]; - 98 -> {99} [style=dotted]; - - subgraph cluster_20 { - color=red - 100 [label="Enter function basic" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 101 [label="Enter block"]; - 102 [label="Postponed enter to lambda"]; - subgraph cluster_22 { - color=blue - 110 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 111 [label="Enter block"]; - 112 [label="Access variable R|/x|"]; - 113 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 114 [label="Exit block"]; - } - 115 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 103 [label="Postponed exit from lambda"]; - 104 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 105 [label="Access variable R|/x|"]; - 106 [label="Smart cast: R|/x|"]; - 107 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 108 [label="Exit block"]; - } - 109 [label="Exit function basic" style="filled" fillcolor=red]; - } - 100 -> {101}; + 94 -> {95}; + 95 -> {96} [color=green]; + 95 -> {97} [color=red]; + 96 -> {97}; + 97 -> {98}; + 98 -> {99}; + 99 -> {100}; + 100 -> {101 113}; + 100 -> {112} [style=dotted]; + 100 -> {101} [style=dashed]; 101 -> {102}; - 102 -> {104 110}; - 102 -> {103} [style=dotted]; - 102 -> {110} [style=dashed]; + 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; 108 -> {109}; + 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; + 112 -> {113} [color=green]; + 112 -> {114} [color=red]; 113 -> {114}; 114 -> {115}; - 115 -> {103}; - - subgraph cluster_24 { - color=red - 116 [label="Enter function completedCallExactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 117 [label="Enter block"]; - 118 [label="Postponed enter to lambda"]; - subgraph cluster_26 { - color=blue - 137 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 138 [label="Enter block"]; - 139 [label="Access variable R|/y|"]; - 140 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 141 [label="Access variable R|/x|"]; - 142 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 143 [label="Exit block"]; - } - 144 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 119 [label="Postponed exit from lambda"]; - 120 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 121 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 122 [label="Access variable R|/y|"]; - 123 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 124 [label="Postponed enter to lambda"]; - subgraph cluster_28 { - color=blue - 145 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 146 [label="Enter block"]; - 147 [label="Access variable R|/x|"]; - 148 [label="Smart cast: R|/x|"]; - 149 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 150 [label="Access variable R|/y|"]; - 151 [label="Smart cast: R|/y|"]; - 152 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 153 [label="Const: Int(1)"]; - 154 [label="Exit block"]; - } - 155 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 125 [label="Postponed exit from lambda"]; - 126 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 127 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 128 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 129 [label="Access variable R|/x|"]; - 130 [label="Smart cast: R|/x|"]; - 131 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 132 [label="Access variable R|/y|"]; - 133 [label="Smart cast: R|/y|"]; - 134 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 135 [label="Exit block"]; - } - 136 [label="Exit function completedCallExactlyOnce" style="filled" fillcolor=red]; - } + 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {120 137}; - 118 -> {119} [style=dotted]; - 118 -> {137} [style=dashed]; - 119 -> {120} [color=green]; - 119 -> {121} [color=red]; + 118 -> {119}; + 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124}; - 124 -> {126 145}; - 124 -> {125} [style=dotted]; - 124 -> {145} [style=dashed]; - 125 -> {126} [color=green]; - 125 -> {127} [color=red]; - 126 -> {127}; + + subgraph cluster_30 { + color=red + 124 [label="Enter function completedCallAtLeastOnce" style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 125 [label="Enter block"]; + 126 [label="Postponed enter to lambda"]; + subgraph cluster_32 { + color=blue + 127 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_33 { + color=blue + 128 [label="Enter block"]; + 129 [label="Access variable R|/y|"]; + 130 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 131 [label="Access variable R|/x|"]; + 132 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 133 [label="Exit block"]; + } + 134 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 135 [label="Postponed exit from lambda"]; + 136 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 137 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 138 [label="Access variable R|/y|"]; + 139 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 140 [label="Postponed enter to lambda"]; + subgraph cluster_34 { + color=blue + 141 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_35 { + color=blue + 142 [label="Enter block"]; + 143 [label="Access variable R|/x|"]; + 144 [label="Smart cast: R|/x|"]; + 145 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 146 [label="Access variable R|/y|"]; + 147 [label="Smart cast: R|/y|"]; + 148 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 149 [label="Const: Int(1)"]; + 150 [label="Exit block"]; + } + 151 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 152 [label="Postponed exit from lambda"]; + 153 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 154 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 155 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 156 [label="Access variable R|/x|"]; + 157 [label="Smart cast: R|/x|"]; + 158 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 159 [label="Access variable R|/y|"]; + 160 [label="Smart cast: R|/y|"]; + 161 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 162 [label="Exit block"]; + } + 163 [label="Exit function completedCallAtLeastOnce" style="filled" fillcolor=red]; + } + 124 -> {125}; + 125 -> {126}; + 126 -> {127 136}; + 126 -> {135} [style=dotted]; + 126 -> {127} [style=dashed]; 127 -> {128}; 128 -> {129}; 129 -> {130}; @@ -335,15 +427,20 @@ digraph flowFromInplaceLambda_kt { 132 -> {133}; 133 -> {134}; 134 -> {135}; - 135 -> {136}; + 135 -> {126} [color=green style=dashed]; + 135 -> {136} [color=green]; + 135 -> {137} [color=red]; + 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; - 140 -> {141}; + 140 -> {141 153}; + 140 -> {152} [style=dotted]; + 140 -> {141} [style=dashed]; 141 -> {142}; 142 -> {143}; 143 -> {144}; - 144 -> {119}; + 144 -> {145}; 145 -> {146}; 146 -> {147}; 147 -> {148}; @@ -351,88 +448,80 @@ digraph flowFromInplaceLambda_kt { 149 -> {150}; 150 -> {151}; 151 -> {152}; - 152 -> {153}; + 152 -> {140} [color=green style=dashed]; + 152 -> {153} [color=green]; + 152 -> {154} [color=red]; 153 -> {154}; 154 -> {155}; - 155 -> {125}; - - subgraph cluster_30 { - color=red - 156 [label="Enter function completedCallAtLeastOnce" style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 157 [label="Enter block"]; - 158 [label="Postponed enter to lambda"]; - subgraph cluster_32 { - color=blue - 177 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_33 { - color=blue - 178 [label="Enter block"]; - 179 [label="Access variable R|/y|"]; - 180 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 181 [label="Access variable R|/x|"]; - 182 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 183 [label="Exit block"]; - } - 184 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 159 [label="Postponed exit from lambda"]; - 160 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 161 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 162 [label="Access variable R|/y|"]; - 163 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 164 [label="Postponed enter to lambda"]; - subgraph cluster_34 { - color=blue - 185 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_35 { - color=blue - 186 [label="Enter block"]; - 187 [label="Access variable R|/x|"]; - 188 [label="Smart cast: R|/x|"]; - 189 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 190 [label="Access variable R|/y|"]; - 191 [label="Smart cast: R|/y|"]; - 192 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 193 [label="Const: Int(1)"]; - 194 [label="Exit block"]; - } - 195 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 165 [label="Postponed exit from lambda"]; - 166 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 167 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 168 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 169 [label="Access variable R|/x|"]; - 170 [label="Smart cast: R|/x|"]; - 171 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 172 [label="Access variable R|/y|"]; - 173 [label="Smart cast: R|/y|"]; - 174 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 175 [label="Exit block"]; - } - 176 [label="Exit function completedCallAtLeastOnce" style="filled" fillcolor=red]; - } + 155 -> {156}; 156 -> {157}; 157 -> {158}; - 158 -> {160 177}; - 158 -> {159} [style=dotted]; - 158 -> {177} [style=dashed]; - 159 -> {158} [color=green style=dashed]; - 159 -> {160} [color=green]; - 159 -> {161} [color=red]; + 158 -> {159}; + 159 -> {160}; 160 -> {161}; 161 -> {162}; 162 -> {163}; - 163 -> {164}; - 164 -> {166 185}; - 164 -> {165} [style=dotted]; - 164 -> {185} [style=dashed]; - 165 -> {164} [color=green style=dashed]; - 165 -> {166} [color=green]; - 165 -> {167} [color=red]; - 166 -> {167}; + + subgraph cluster_36 { + color=red + 164 [label="Enter function completedCallAtMostOnce" style="filled" fillcolor=red]; + subgraph cluster_37 { + color=blue + 165 [label="Enter block"]; + 166 [label="Postponed enter to lambda"]; + subgraph cluster_38 { + color=blue + 167 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_39 { + color=blue + 168 [label="Enter block"]; + 169 [label="Access variable R|/y|"]; + 170 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 171 [label="Access variable R|/x|"]; + 172 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 173 [label="Exit block"]; + } + 174 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 175 [label="Postponed exit from lambda"]; + 176 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 177 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 178 [label="Access variable R|/y|"]; + 179 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 180 [label="Postponed enter to lambda"]; + subgraph cluster_40 { + color=blue + 181 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_41 { + color=blue + 182 [label="Enter block"]; + 183 [label="Access variable R|/x|"]; + 184 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 185 [label="Access variable R|/y|"]; + 186 [label="Smart cast: R|/y|"]; + 187 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 188 [label="Const: Int(1)"]; + 189 [label="Exit block"]; + } + 190 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 191 [label="Postponed exit from lambda"]; + 192 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 193 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 194 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 195 [label="Access variable R|/x|"]; + 196 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 197 [label="Access variable R|/y|"]; + 198 [label="Smart cast: R|/y|"]; + 199 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 200 [label="Exit block"]; + } + 201 [label="Exit function completedCallAtMostOnce" style="filled" fillcolor=red]; + } + 164 -> {165}; + 165 -> {166}; + 166 -> {167 175 176}; + 166 -> {167} [style=dashed]; 167 -> {168}; 168 -> {169}; 169 -> {170}; @@ -441,97 +530,97 @@ digraph flowFromInplaceLambda_kt { 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {176}; + 175 -> {176} [color=green]; + 175 -> {177} [color=red]; + 176 -> {177}; 177 -> {178}; 178 -> {179}; 179 -> {180}; - 180 -> {181}; + 180 -> {181 191 192}; + 180 -> {181} [style=dashed]; 181 -> {182}; 182 -> {183}; 183 -> {184}; - 184 -> {159}; + 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; 189 -> {190}; 190 -> {191}; - 191 -> {192}; + 191 -> {192} [color=green]; + 191 -> {193} [color=red]; 192 -> {193}; 193 -> {194}; 194 -> {195}; - 195 -> {165}; - - subgraph cluster_36 { - color=red - 196 [label="Enter function completedCallAtMostOnce" style="filled" fillcolor=red]; - subgraph cluster_37 { - color=blue - 197 [label="Enter block"]; - 198 [label="Postponed enter to lambda"]; - subgraph cluster_38 { - color=blue - 216 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_39 { - color=blue - 217 [label="Enter block"]; - 218 [label="Access variable R|/y|"]; - 219 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 220 [label="Access variable R|/x|"]; - 221 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 222 [label="Exit block"]; - } - 223 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 199 [label="Postponed exit from lambda"]; - 200 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 201 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 202 [label="Access variable R|/y|"]; - 203 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 204 [label="Postponed enter to lambda"]; - subgraph cluster_40 { - color=blue - 224 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_41 { - color=blue - 225 [label="Enter block"]; - 226 [label="Access variable R|/x|"]; - 227 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 228 [label="Access variable R|/y|"]; - 229 [label="Smart cast: R|/y|"]; - 230 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 231 [label="Const: Int(1)"]; - 232 [label="Exit block"]; - } - 233 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 205 [label="Postponed exit from lambda"]; - 206 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 207 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 208 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 209 [label="Access variable R|/x|"]; - 210 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 211 [label="Access variable R|/y|"]; - 212 [label="Smart cast: R|/y|"]; - 213 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 214 [label="Exit block"]; - } - 215 [label="Exit function completedCallAtMostOnce" style="filled" fillcolor=red]; - } + 195 -> {196}; 196 -> {197}; 197 -> {198}; - 198 -> {199 200 216}; - 198 -> {216} [style=dashed]; - 199 -> {200} [color=green]; - 199 -> {201} [color=red]; + 198 -> {199}; + 199 -> {200}; 200 -> {201}; - 201 -> {202}; + + subgraph cluster_42 { + color=red + 202 [label="Enter function completedCallUnknown" style="filled" fillcolor=red]; + subgraph cluster_43 { + color=blue + 203 [label="Enter block"]; + 204 [label="Postponed enter to lambda"]; + subgraph cluster_44 { + color=blue + 205 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_45 { + color=blue + 206 [label="Enter block"]; + 207 [label="Access variable R|/y|"]; + 208 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 209 [label="Access variable R|/x|"]; + 210 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 211 [label="Exit block"]; + } + 212 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 213 [label="Postponed exit from lambda"]; + 214 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 215 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 216 [label="Access variable R|/y|"]; + 217 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 218 [label="Postponed enter to lambda"]; + subgraph cluster_46 { + color=blue + 219 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_47 { + color=blue + 220 [label="Enter block"]; + 221 [label="Access variable R|/x|"]; + 222 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 223 [label="Access variable R|/y|"]; + 224 [label="Smart cast: R|/y|"]; + 225 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 226 [label="Const: Int(1)"]; + 227 [label="Exit block"]; + } + 228 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 229 [label="Postponed exit from lambda"]; + 230 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 231 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 232 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 233 [label="Access variable R|/x|"]; + 234 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 235 [label="Access variable R|/y|"]; + 236 [label="Smart cast: R|/y|"]; + 237 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 238 [label="Exit block"]; + } + 239 [label="Exit function completedCallUnknown" style="filled" fillcolor=red]; + } 202 -> {203}; 203 -> {204}; - 204 -> {205 206 224}; - 204 -> {224} [style=dashed]; - 205 -> {206} [color=green]; - 205 -> {207} [color=red]; + 204 -> {205 213 214}; + 204 -> {205} [style=dashed]; + 205 -> {206}; 206 -> {207}; 207 -> {208}; 208 -> {209}; @@ -539,197 +628,201 @@ digraph flowFromInplaceLambda_kt { 210 -> {211}; 211 -> {212}; 212 -> {213}; - 213 -> {214}; + 213 -> {204} [color=green style=dashed]; + 213 -> {214} [color=green]; + 213 -> {215} [color=red]; 214 -> {215}; + 215 -> {216}; 216 -> {217}; 217 -> {218}; - 218 -> {219}; + 218 -> {219 229 230}; + 218 -> {219} [style=dashed]; 219 -> {220}; 220 -> {221}; 221 -> {222}; 222 -> {223}; - 223 -> {199}; + 223 -> {224}; 224 -> {225}; 225 -> {226}; 226 -> {227}; 227 -> {228}; 228 -> {229}; - 229 -> {230}; + 229 -> {218} [color=green style=dashed]; + 229 -> {230} [color=green]; + 229 -> {231} [color=red]; 230 -> {231}; 231 -> {232}; 232 -> {233}; - 233 -> {205}; - - subgraph cluster_42 { - color=red - 234 [label="Enter function completedCallUnknown" style="filled" fillcolor=red]; - subgraph cluster_43 { - color=blue - 235 [label="Enter block"]; - 236 [label="Postponed enter to lambda"]; - subgraph cluster_44 { - color=blue - 254 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_45 { - color=blue - 255 [label="Enter block"]; - 256 [label="Access variable R|/y|"]; - 257 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 258 [label="Access variable R|/x|"]; - 259 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 260 [label="Exit block"]; - } - 261 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 237 [label="Postponed exit from lambda"]; - 238 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 239 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 240 [label="Access variable R|/y|"]; - 241 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 242 [label="Postponed enter to lambda"]; - subgraph cluster_46 { - color=blue - 262 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_47 { - color=blue - 263 [label="Enter block"]; - 264 [label="Access variable R|/x|"]; - 265 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 266 [label="Access variable R|/y|"]; - 267 [label="Smart cast: R|/y|"]; - 268 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 269 [label="Const: Int(1)"]; - 270 [label="Exit block"]; - } - 271 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 243 [label="Postponed exit from lambda"]; - 244 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 245 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 246 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 247 [label="Access variable R|/x|"]; - 248 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 249 [label="Access variable R|/y|"]; - 250 [label="Smart cast: R|/y|"]; - 251 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 252 [label="Exit block"]; - } - 253 [label="Exit function completedCallUnknown" style="filled" fillcolor=red]; - } + 233 -> {234}; 234 -> {235}; 235 -> {236}; - 236 -> {237 238 254}; - 236 -> {254} [style=dashed]; - 237 -> {236} [color=green style=dashed]; - 237 -> {238} [color=green]; - 237 -> {239} [color=red]; + 236 -> {237}; + 237 -> {238}; 238 -> {239}; - 239 -> {240}; + + subgraph cluster_48 { + color=red + 240 [label="Enter function completedCallNoContract" style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 241 [label="Enter block"]; + 242 [label="Postponed enter to lambda"]; + subgraph cluster_50 { + color=blue + 243 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_51 { + color=blue + 244 [label="Enter block"]; + 245 [label="Access variable R|/y|"]; + 246 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 247 [label="Access variable R|/x|"]; + 248 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 249 [label="Exit block"]; + } + 250 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 251 [label="Postponed exit from lambda"]; + 252 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 253 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 254 [label="Access variable R|/y|"]; + 255 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 256 [label="Postponed enter to lambda"]; + subgraph cluster_52 { + color=blue + 257 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_53 { + color=blue + 258 [label="Enter block"]; + 259 [label="Access variable R|/x|"]; + 260 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 261 [label="Access variable R|/y|"]; + 262 [label="Smart cast: R|/y|"]; + 263 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 264 [label="Const: Int(1)"]; + 265 [label="Exit block"]; + } + 266 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 267 [label="Postponed exit from lambda"]; + 268 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 269 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 270 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 271 [label="Access variable R|/x|"]; + 272 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 273 [label="Access variable R|/y|"]; + 274 [label="Smart cast: R|/y|"]; + 275 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 276 [label="Exit block"]; + } + 277 [label="Exit function completedCallNoContract" style="filled" fillcolor=red]; + } 240 -> {241}; 241 -> {242}; - 242 -> {243 244 262}; - 242 -> {262} [style=dashed]; - 243 -> {242} [color=green style=dashed]; - 243 -> {244} [color=green]; - 243 -> {245} [color=red]; + 242 -> {243 251 252}; + 242 -> {243} [style=dashed]; + 243 -> {244}; 244 -> {245}; 245 -> {246}; 246 -> {247}; 247 -> {248}; 248 -> {249}; 249 -> {250}; - 250 -> {251}; - 251 -> {252}; + 251 -> {252} [color=green]; + 251 -> {253} [color=red]; 252 -> {253}; + 253 -> {254}; 254 -> {255}; 255 -> {256}; - 256 -> {257}; + 256 -> {257 267 268}; + 256 -> {257} [style=dashed]; 257 -> {258}; 258 -> {259}; 259 -> {260}; 260 -> {261}; - 261 -> {237}; + 261 -> {262}; 262 -> {263}; 263 -> {264}; 264 -> {265}; 265 -> {266}; - 266 -> {267}; - 267 -> {268}; + 267 -> {268} [color=green]; + 267 -> {269} [color=red]; 268 -> {269}; 269 -> {270}; 270 -> {271}; - 271 -> {243}; - - subgraph cluster_48 { - color=red - 272 [label="Enter function completedCallNoContract" style="filled" fillcolor=red]; - subgraph cluster_49 { - color=blue - 273 [label="Enter block"]; - 274 [label="Postponed enter to lambda"]; - subgraph cluster_50 { - color=blue - 292 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_51 { - color=blue - 293 [label="Enter block"]; - 294 [label="Access variable R|/y|"]; - 295 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 296 [label="Access variable R|/x|"]; - 297 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 298 [label="Exit block"]; - } - 299 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 275 [label="Postponed exit from lambda"]; - 276 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 277 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 278 [label="Access variable R|/y|"]; - 279 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 280 [label="Postponed enter to lambda"]; - subgraph cluster_52 { - color=blue - 300 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_53 { - color=blue - 301 [label="Enter block"]; - 302 [label="Access variable R|/x|"]; - 303 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 304 [label="Access variable R|/y|"]; - 305 [label="Smart cast: R|/y|"]; - 306 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 307 [label="Const: Int(1)"]; - 308 [label="Exit block"]; - } - 309 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 281 [label="Postponed exit from lambda"]; - 282 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 283 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 284 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 285 [label="Access variable R|/x|"]; - 286 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 287 [label="Access variable R|/y|"]; - 288 [label="Smart cast: R|/y|"]; - 289 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 290 [label="Exit block"]; - } - 291 [label="Exit function completedCallNoContract" style="filled" fillcolor=red]; - } + 271 -> {272}; 272 -> {273}; 273 -> {274}; - 274 -> {275 276 292}; - 274 -> {292} [style=dashed]; - 275 -> {276} [color=green]; - 275 -> {277} [color=red]; + 274 -> {275}; + 275 -> {276}; 276 -> {277}; - 277 -> {278}; + + subgraph cluster_54 { + color=red + 278 [label="Enter function incompleteCallExactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_55 { + color=blue + 279 [label="Enter block"]; + 280 [label="Postponed enter to lambda"]; + subgraph cluster_56 { + color=blue + 281 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_57 { + color=blue + 282 [label="Enter block"]; + 283 [label="Access variable R|/x|"]; + 284 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 285 [label="Access variable R|/y|"]; + 286 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 287 [label="Access variable R|/x|"]; + 288 [label="Smart cast: R|/x|"]; + 289 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 290 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 291 [label="Exit block"]; + } + 292 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 293 [label="Postponed exit from lambda"]; + 294 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 295 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 296 [label="Postponed enter to lambda"]; + subgraph cluster_58 { + color=blue + 297 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_59 { + color=blue + 298 [label="Enter block"]; + 299 [label="Access variable R|/y|"]; + 300 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 301 [label="Access variable R|/x|"]; + 302 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 303 [label="Access variable R|/y|"]; + 304 [label="Smart cast: R|/y|"]; + 305 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 306 [label="Const: Int(1)"]; + 307 [label="Exit block"]; + } + 308 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 309 [label="Postponed exit from lambda"]; + 310 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 311 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 312 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 313 [label="Access variable R|/x|"]; + 314 [label="Smart cast: R|/x|"]; + 315 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 316 [label="Access variable R|/y|"]; + 317 [label="Smart cast: R|/y|"]; + 318 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 319 [label="Exit block"]; + } + 320 [label="Exit function incompleteCallExactlyOnce" style="filled" fillcolor=red]; + } 278 -> {279}; 279 -> {280}; - 280 -> {281 282 300}; - 280 -> {300} [style=dashed]; - 281 -> {282} [color=green]; - 281 -> {283} [color=red]; + 280 -> {281 294}; + 280 -> {293} [style=dotted]; + 280 -> {281} [style=dashed]; + 281 -> {282}; 282 -> {283}; 283 -> {284}; 284 -> {285}; @@ -739,13 +832,18 @@ digraph flowFromInplaceLambda_kt { 288 -> {289}; 289 -> {290}; 290 -> {291}; + 291 -> {292}; 292 -> {293}; - 293 -> {294}; + 293 -> {294} [color=green]; + 293 -> {311} [color=red]; 294 -> {295}; 295 -> {296}; - 296 -> {297}; + 296 -> {297 310}; + 296 -> {309} [style=dotted]; + 296 -> {297} [style=dashed]; 297 -> {298}; 298 -> {299}; + 299 -> {300}; 300 -> {301}; 301 -> {302}; 302 -> {303}; @@ -755,92 +853,90 @@ digraph flowFromInplaceLambda_kt { 306 -> {307}; 307 -> {308}; 308 -> {309}; - - subgraph cluster_54 { - color=red - 310 [label="Enter function incompleteCallExactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_55 { - color=blue - 311 [label="Enter block"]; - 312 [label="Postponed enter to lambda"]; - subgraph cluster_56 { - color=blue - 329 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_57 { - color=blue - 330 [label="Enter block"]; - 331 [label="Access variable R|/x|"]; - 332 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 333 [label="Access variable R|/y|"]; - 334 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 335 [label="Access variable R|/x|"]; - 336 [label="Smart cast: R|/x|"]; - 337 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 338 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 339 [label="Exit block"]; - } - 340 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 313 [label="Postponed exit from lambda"]; - 314 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 315 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 316 [label="Postponed enter to lambda"]; - subgraph cluster_58 { - color=blue - 341 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_59 { - color=blue - 342 [label="Enter block"]; - 343 [label="Access variable R|/y|"]; - 344 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 345 [label="Access variable R|/x|"]; - 346 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 347 [label="Access variable R|/y|"]; - 348 [label="Smart cast: R|/y|"]; - 349 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 350 [label="Const: Int(1)"]; - 351 [label="Exit block"]; - } - 352 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 317 [label="Postponed exit from lambda"]; - 318 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 319 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 320 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 321 [label="Access variable R|/x|"]; - 322 [label="Smart cast: R|/x|"]; - 323 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 324 [label="Access variable R|/y|"]; - 325 [label="Smart cast: R|/y|"]; - 326 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 327 [label="Exit block"]; - } - 328 [label="Exit function incompleteCallExactlyOnce" style="filled" fillcolor=red]; - } + 309 -> {310} [color=green]; + 309 -> {311} [color=red]; 310 -> {311}; 311 -> {312}; - 312 -> {314 329}; - 312 -> {313} [style=dotted]; - 312 -> {329} [style=dashed]; - 313 -> {314} [color=green]; - 313 -> {319} [color=red]; + 312 -> {313}; + 313 -> {314}; 314 -> {315}; 315 -> {316}; - 316 -> {318 341}; - 316 -> {317} [style=dotted]; - 316 -> {341} [style=dashed]; - 317 -> {318} [color=green]; - 317 -> {319} [color=red]; + 316 -> {317}; + 317 -> {318}; 318 -> {319}; 319 -> {320}; - 320 -> {321}; + + subgraph cluster_60 { + color=red + 321 [label="Enter function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; + subgraph cluster_61 { + color=blue + 322 [label="Enter block"]; + 323 [label="Postponed enter to lambda"]; + subgraph cluster_62 { + color=blue + 324 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_63 { + color=blue + 325 [label="Enter block"]; + 326 [label="Access variable R|/x|"]; + 327 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 328 [label="Access variable R|/y|"]; + 329 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 330 [label="Access variable R|/x|"]; + 331 [label="Smart cast: R|/x|"]; + 332 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 333 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 334 [label="Exit block"]; + } + 335 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 336 [label="Postponed exit from lambda"]; + 337 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 338 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 339 [label="Postponed enter to lambda"]; + subgraph cluster_64 { + color=blue + 340 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_65 { + color=blue + 341 [label="Enter block"]; + 342 [label="Access variable R|/y|"]; + 343 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 344 [label="Access variable R|/x|"]; + 345 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 346 [label="Access variable R|/y|"]; + 347 [label="Smart cast: R|/y|"]; + 348 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 349 [label="Const: Int(1)"]; + 350 [label="Exit block"]; + } + 351 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 352 [label="Postponed exit from lambda"]; + 353 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 354 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 355 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 356 [label="Access variable R|/x|"]; + 357 [label="Smart cast: R|/x|"]; + 358 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 359 [label="Access variable R|/y|"]; + 360 [label="Smart cast: R|/y|"]; + 361 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 362 [label="Exit block"]; + } + 363 [label="Exit function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; + } 321 -> {322}; 322 -> {323}; - 323 -> {324}; + 323 -> {324 337}; + 323 -> {336} [style=dotted]; + 323 -> {324} [style=dashed]; 324 -> {325}; 325 -> {326}; 326 -> {327}; 327 -> {328}; + 328 -> {329}; 329 -> {330}; 330 -> {331}; 331 -> {332}; @@ -848,11 +944,15 @@ digraph flowFromInplaceLambda_kt { 333 -> {334}; 334 -> {335}; 335 -> {336}; - 336 -> {337}; + 336 -> {323} [color=green style=dashed]; + 336 -> {337} [color=green]; + 336 -> {354} [color=red]; 337 -> {338}; 338 -> {339}; - 339 -> {340}; - 340 -> {313}; + 339 -> {340 353}; + 339 -> {352} [style=dotted]; + 339 -> {340} [style=dashed]; + 340 -> {341}; 341 -> {342}; 342 -> {343}; 343 -> {344}; @@ -864,95 +964,88 @@ digraph flowFromInplaceLambda_kt { 349 -> {350}; 350 -> {351}; 351 -> {352}; - 352 -> {317}; - - subgraph cluster_60 { - color=red - 353 [label="Enter function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; - subgraph cluster_61 { - color=blue - 354 [label="Enter block"]; - 355 [label="Postponed enter to lambda"]; - subgraph cluster_62 { - color=blue - 372 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_63 { - color=blue - 373 [label="Enter block"]; - 374 [label="Access variable R|/x|"]; - 375 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 376 [label="Access variable R|/y|"]; - 377 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 378 [label="Access variable R|/x|"]; - 379 [label="Smart cast: R|/x|"]; - 380 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 381 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 382 [label="Exit block"]; - } - 383 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 356 [label="Postponed exit from lambda"]; - 357 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 358 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 359 [label="Postponed enter to lambda"]; - subgraph cluster_64 { - color=blue - 384 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_65 { - color=blue - 385 [label="Enter block"]; - 386 [label="Access variable R|/y|"]; - 387 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 388 [label="Access variable R|/x|"]; - 389 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 390 [label="Access variable R|/y|"]; - 391 [label="Smart cast: R|/y|"]; - 392 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 393 [label="Const: Int(1)"]; - 394 [label="Exit block"]; - } - 395 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 360 [label="Postponed exit from lambda"]; - 361 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 362 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 363 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 364 [label="Access variable R|/x|"]; - 365 [label="Smart cast: R|/x|"]; - 366 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 367 [label="Access variable R|/y|"]; - 368 [label="Smart cast: R|/y|"]; - 369 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 370 [label="Exit block"]; - } - 371 [label="Exit function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; - } + 352 -> {339} [color=green style=dashed]; + 352 -> {353} [color=green]; + 352 -> {354} [color=red]; 353 -> {354}; 354 -> {355}; - 355 -> {357 372}; - 355 -> {356} [style=dotted]; - 355 -> {372} [style=dashed]; - 356 -> {355} [color=green style=dashed]; - 356 -> {357} [color=green]; - 356 -> {362} [color=red]; + 355 -> {356}; + 356 -> {357}; 357 -> {358}; 358 -> {359}; - 359 -> {361 384}; - 359 -> {360} [style=dotted]; - 359 -> {384} [style=dashed]; - 360 -> {359} [color=green style=dashed]; - 360 -> {361} [color=green]; - 360 -> {362} [color=red]; + 359 -> {360}; + 360 -> {361}; 361 -> {362}; 362 -> {363}; - 363 -> {364}; + + subgraph cluster_66 { + color=red + 364 [label="Enter function incompleteCallAtMostOnce" style="filled" fillcolor=red]; + subgraph cluster_67 { + color=blue + 365 [label="Enter block"]; + 366 [label="Postponed enter to lambda"]; + subgraph cluster_68 { + color=blue + 367 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_69 { + color=blue + 368 [label="Enter block"]; + 369 [label="Access variable R|/x|"]; + 370 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 371 [label="Access variable R|/y|"]; + 372 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 373 [label="Access variable R|/x|"]; + 374 [label="Smart cast: R|/x|"]; + 375 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 376 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 377 [label="Exit block"]; + } + 378 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 379 [label="Postponed exit from lambda"]; + 380 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 381 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 382 [label="Postponed enter to lambda"]; + subgraph cluster_70 { + color=blue + 383 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_71 { + color=blue + 384 [label="Enter block"]; + 385 [label="Access variable R|/y|"]; + 386 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 387 [label="Access variable R|/x|"]; + 388 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 389 [label="Access variable R|/y|"]; + 390 [label="Smart cast: R|/y|"]; + 391 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 392 [label="Const: Int(1)"]; + 393 [label="Exit block"]; + } + 394 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 395 [label="Postponed exit from lambda"]; + 396 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 397 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 398 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 399 [label="Access variable R|/x|"]; + 400 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 401 [label="Access variable R|/y|"]; + 402 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 403 [label="Exit block"]; + } + 404 [label="Exit function incompleteCallAtMostOnce" style="filled" fillcolor=red]; + } 364 -> {365}; 365 -> {366}; - 366 -> {367}; + 366 -> {367 379 380}; + 366 -> {367} [style=dashed]; 367 -> {368}; 368 -> {369}; 369 -> {370}; 370 -> {371}; + 371 -> {372}; 372 -> {373}; 373 -> {374}; 374 -> {375}; @@ -960,11 +1053,13 @@ digraph flowFromInplaceLambda_kt { 376 -> {377}; 377 -> {378}; 378 -> {379}; - 379 -> {380}; + 379 -> {380} [color=green]; + 379 -> {397} [color=red]; 380 -> {381}; 381 -> {382}; - 382 -> {383}; - 383 -> {356}; + 382 -> {383 395 396}; + 382 -> {383} [style=dashed]; + 383 -> {384}; 384 -> {385}; 385 -> {386}; 386 -> {387}; @@ -976,87 +1071,85 @@ digraph flowFromInplaceLambda_kt { 392 -> {393}; 393 -> {394}; 394 -> {395}; - 395 -> {360}; - - subgraph cluster_66 { - color=red - 396 [label="Enter function incompleteCallAtMostOnce" style="filled" fillcolor=red]; - subgraph cluster_67 { - color=blue - 397 [label="Enter block"]; - 398 [label="Postponed enter to lambda"]; - subgraph cluster_68 { - color=blue - 413 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_69 { - color=blue - 414 [label="Enter block"]; - 415 [label="Access variable R|/x|"]; - 416 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 417 [label="Access variable R|/y|"]; - 418 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 419 [label="Access variable R|/x|"]; - 420 [label="Smart cast: R|/x|"]; - 421 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 422 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 423 [label="Exit block"]; - } - 424 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 399 [label="Postponed exit from lambda"]; - 400 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 401 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 402 [label="Postponed enter to lambda"]; - subgraph cluster_70 { - color=blue - 425 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_71 { - color=blue - 426 [label="Enter block"]; - 427 [label="Access variable R|/y|"]; - 428 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 429 [label="Access variable R|/x|"]; - 430 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 431 [label="Access variable R|/y|"]; - 432 [label="Smart cast: R|/y|"]; - 433 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 434 [label="Const: Int(1)"]; - 435 [label="Exit block"]; - } - 436 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 403 [label="Postponed exit from lambda"]; - 404 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 405 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 406 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 407 [label="Access variable R|/x|"]; - 408 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 409 [label="Access variable R|/y|"]; - 410 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 411 [label="Exit block"]; - } - 412 [label="Exit function incompleteCallAtMostOnce" style="filled" fillcolor=red]; - } + 395 -> {396} [color=green]; + 395 -> {397} [color=red]; 396 -> {397}; 397 -> {398}; - 398 -> {399 400 413}; - 398 -> {413} [style=dashed]; - 399 -> {400} [color=green]; - 399 -> {405} [color=red]; + 398 -> {399}; + 399 -> {400}; 400 -> {401}; 401 -> {402}; - 402 -> {403 404 425}; - 402 -> {425} [style=dashed]; - 403 -> {404} [color=green]; - 403 -> {405} [color=red]; - 404 -> {405}; + 402 -> {403}; + 403 -> {404}; + + subgraph cluster_72 { + color=red + 405 [label="Enter function incompleteCallUnknown" style="filled" fillcolor=red]; + subgraph cluster_73 { + color=blue + 406 [label="Enter block"]; + 407 [label="Postponed enter to lambda"]; + subgraph cluster_74 { + color=blue + 408 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_75 { + color=blue + 409 [label="Enter block"]; + 410 [label="Access variable R|/x|"]; + 411 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 412 [label="Access variable R|/y|"]; + 413 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 414 [label="Access variable R|/x|"]; + 415 [label="Smart cast: R|/x|"]; + 416 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 417 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 418 [label="Exit block"]; + } + 419 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 420 [label="Postponed exit from lambda"]; + 421 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 422 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 423 [label="Postponed enter to lambda"]; + subgraph cluster_76 { + color=blue + 424 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_77 { + color=blue + 425 [label="Enter block"]; + 426 [label="Access variable R|/y|"]; + 427 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 428 [label="Access variable R|/x|"]; + 429 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 430 [label="Access variable R|/y|"]; + 431 [label="Smart cast: R|/y|"]; + 432 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 433 [label="Const: Int(1)"]; + 434 [label="Exit block"]; + } + 435 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 436 [label="Postponed exit from lambda"]; + 437 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 438 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 439 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 440 [label="Access variable R|/x|"]; + 441 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 442 [label="Access variable R|/y|"]; + 443 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 444 [label="Exit block"]; + } + 445 [label="Exit function incompleteCallUnknown" style="filled" fillcolor=red]; + } 405 -> {406}; 406 -> {407}; - 407 -> {408}; + 407 -> {408 420 421}; + 407 -> {408} [style=dashed]; 408 -> {409}; 409 -> {410}; 410 -> {411}; 411 -> {412}; + 412 -> {413}; 413 -> {414}; 414 -> {415}; 415 -> {416}; @@ -1064,11 +1157,14 @@ digraph flowFromInplaceLambda_kt { 417 -> {418}; 418 -> {419}; 419 -> {420}; - 420 -> {421}; + 420 -> {407} [color=green style=dashed]; + 420 -> {421} [color=green]; + 420 -> {438} [color=red]; 421 -> {422}; 422 -> {423}; - 423 -> {424}; - 424 -> {399}; + 423 -> {424 436 437}; + 423 -> {424} [style=dashed]; + 424 -> {425}; 425 -> {426}; 426 -> {427}; 427 -> {428}; @@ -1080,101 +1176,99 @@ digraph flowFromInplaceLambda_kt { 433 -> {434}; 434 -> {435}; 435 -> {436}; - 436 -> {403}; - - subgraph cluster_72 { - color=red - 437 [label="Enter function incompleteCallUnknown" style="filled" fillcolor=red]; - subgraph cluster_73 { - color=blue - 438 [label="Enter block"]; - 439 [label="Postponed enter to lambda"]; - subgraph cluster_74 { - color=blue - 454 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_75 { - color=blue - 455 [label="Enter block"]; - 456 [label="Access variable R|/x|"]; - 457 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 458 [label="Access variable R|/y|"]; - 459 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 460 [label="Access variable R|/x|"]; - 461 [label="Smart cast: R|/x|"]; - 462 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 463 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 464 [label="Exit block"]; - } - 465 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 440 [label="Postponed exit from lambda"]; - 441 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 442 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 443 [label="Postponed enter to lambda"]; - subgraph cluster_76 { - color=blue - 466 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_77 { - color=blue - 467 [label="Enter block"]; - 468 [label="Access variable R|/y|"]; - 469 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 470 [label="Access variable R|/x|"]; - 471 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 472 [label="Access variable R|/y|"]; - 473 [label="Smart cast: R|/y|"]; - 474 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 475 [label="Const: Int(1)"]; - 476 [label="Exit block"]; - } - 477 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 444 [label="Postponed exit from lambda"]; - 445 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 446 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 447 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 448 [label="Access variable R|/x|"]; - 449 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 450 [label="Access variable R|/y|"]; - 451 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 452 [label="Exit block"]; - } - 453 [label="Exit function incompleteCallUnknown" style="filled" fillcolor=red]; - } + 436 -> {423} [color=green style=dashed]; + 436 -> {437} [color=green]; + 436 -> {438} [color=red]; 437 -> {438}; 438 -> {439}; - 439 -> {440 441 454}; - 439 -> {454} [style=dashed]; - 440 -> {439} [color=green style=dashed]; - 440 -> {441} [color=green]; - 440 -> {446} [color=red]; + 439 -> {440}; + 440 -> {441}; 441 -> {442}; 442 -> {443}; - 443 -> {444 445 466}; - 443 -> {466} [style=dashed]; - 444 -> {443} [color=green style=dashed]; - 444 -> {445} [color=green]; - 444 -> {446} [color=red]; - 445 -> {446}; + 443 -> {444}; + 444 -> {445}; + + subgraph cluster_78 { + color=red + 446 [label="Enter function incompleteCallNoContract" style="filled" fillcolor=red]; + subgraph cluster_79 { + color=blue + 447 [label="Enter block"]; + 448 [label="Postponed enter to lambda"]; + subgraph cluster_80 { + color=blue + 449 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_81 { + color=blue + 450 [label="Enter block"]; + 451 [label="Access variable R|/x|"]; + 452 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 453 [label="Access variable R|/y|"]; + 454 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 455 [label="Access variable R|/x|"]; + 456 [label="Smart cast: R|/x|"]; + 457 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 458 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 459 [label="Exit block"]; + } + 460 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 461 [label="Postponed exit from lambda"]; + 462 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 463 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 464 [label="Postponed enter to lambda"]; + subgraph cluster_82 { + color=blue + 465 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_83 { + color=blue + 466 [label="Enter block"]; + 467 [label="Access variable R|/y|"]; + 468 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 469 [label="Access variable R|/x|"]; + 470 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 471 [label="Access variable R|/y|"]; + 472 [label="Smart cast: R|/y|"]; + 473 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 474 [label="Const: Int(1)"]; + 475 [label="Exit block"]; + } + 476 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 477 [label="Postponed exit from lambda"]; + 478 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 479 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 480 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 481 [label="Access variable R|/x|"]; + 482 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 483 [label="Access variable R|/y|"]; + 484 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 485 [label="Exit block"]; + } + 486 [label="Exit function incompleteCallNoContract" style="filled" fillcolor=red]; + } 446 -> {447}; 447 -> {448}; - 448 -> {449}; + 448 -> {449 461 462}; + 448 -> {449} [style=dashed]; 449 -> {450}; 450 -> {451}; 451 -> {452}; 452 -> {453}; + 453 -> {454}; 454 -> {455}; 455 -> {456}; 456 -> {457}; 457 -> {458}; 458 -> {459}; 459 -> {460}; - 460 -> {461}; - 461 -> {462}; + 461 -> {462} [color=green]; + 461 -> {479} [color=red]; 462 -> {463}; 463 -> {464}; - 464 -> {465}; - 465 -> {440}; + 464 -> {465 477 478}; + 464 -> {465} [style=dashed]; + 465 -> {466}; 466 -> {467}; 467 -> {468}; 468 -> {469}; @@ -1185,249 +1279,155 @@ digraph flowFromInplaceLambda_kt { 473 -> {474}; 474 -> {475}; 475 -> {476}; - 476 -> {477}; - 477 -> {444}; - - subgraph cluster_78 { - color=red - 478 [label="Enter function incompleteCallNoContract" style="filled" fillcolor=red]; - subgraph cluster_79 { - color=blue - 479 [label="Enter block"]; - 480 [label="Postponed enter to lambda"]; - subgraph cluster_80 { - color=blue - 495 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_81 { - color=blue - 496 [label="Enter block"]; - 497 [label="Access variable R|/x|"]; - 498 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 499 [label="Access variable R|/y|"]; - 500 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 501 [label="Access variable R|/x|"]; - 502 [label="Smart cast: R|/x|"]; - 503 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 504 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 505 [label="Exit block"]; - } - 506 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 481 [label="Postponed exit from lambda"]; - 482 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 483 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 484 [label="Postponed enter to lambda"]; - subgraph cluster_82 { - color=blue - 507 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_83 { - color=blue - 508 [label="Enter block"]; - 509 [label="Access variable R|/y|"]; - 510 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 511 [label="Access variable R|/x|"]; - 512 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 513 [label="Access variable R|/y|"]; - 514 [label="Smart cast: R|/y|"]; - 515 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 516 [label="Const: Int(1)"]; - 517 [label="Exit block"]; - } - 518 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 485 [label="Postponed exit from lambda"]; - 486 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 487 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 488 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 489 [label="Access variable R|/x|"]; - 490 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 491 [label="Access variable R|/y|"]; - 492 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 493 [label="Exit block"]; - } - 494 [label="Exit function incompleteCallNoContract" style="filled" fillcolor=red]; - } + 477 -> {478} [color=green]; + 477 -> {479} [color=red]; 478 -> {479}; 479 -> {480}; - 480 -> {481 482 495}; - 480 -> {495} [style=dashed]; - 481 -> {482} [color=green]; - 481 -> {487} [color=red]; + 480 -> {481}; + 481 -> {482}; 482 -> {483}; 483 -> {484}; - 484 -> {485 486 507}; - 484 -> {507} [style=dashed]; - 485 -> {486} [color=green]; - 485 -> {487} [color=red]; - 486 -> {487}; + 484 -> {485}; + 485 -> {486}; + + subgraph cluster_84 { + color=red + 487 [label="Enter function expectedType" style="filled" fillcolor=red]; + subgraph cluster_85 { + color=blue + 488 [label="Enter block"]; + 489 [label="Postponed enter to lambda"]; + subgraph cluster_86 { + color=blue + 490 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_87 { + color=blue + 491 [label="Enter block"]; + 492 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 493 [label="Exit block"]; + } + 494 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 495 [label="Postponed exit from lambda"]; + 496 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 497 [label="Postponed enter to lambda"]; + subgraph cluster_88 { + color=blue + 498 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_89 { + color=blue + 499 [label="Enter block"]; + 500 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 501 [label="Exit block"]; + } + 502 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 503 [label="Postponed exit from lambda"]; + 504 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 505 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 506 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 507 [label="Access variable R|/x|"]; + 508 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 509 [label="Exit block"]; + } + 510 [label="Exit function expectedType" style="filled" fillcolor=red]; + } 487 -> {488}; 488 -> {489}; - 489 -> {490}; + 489 -> {490 496}; + 489 -> {495} [style=dotted]; + 489 -> {490} [style=dashed]; 490 -> {491}; 491 -> {492}; 492 -> {493}; 493 -> {494}; - 495 -> {496}; + 494 -> {495}; + 495 -> {496} [color=green]; + 495 -> {505} [color=red]; 496 -> {497}; - 497 -> {498}; + 497 -> {498 504}; + 497 -> {503} [style=dotted]; + 497 -> {498} [style=dashed]; 498 -> {499}; 499 -> {500}; 500 -> {501}; 501 -> {502}; 502 -> {503}; - 503 -> {504}; + 503 -> {504} [color=green]; + 503 -> {505} [color=red]; 504 -> {505}; 505 -> {506}; + 506 -> {507}; 507 -> {508}; 508 -> {509}; 509 -> {510}; - 510 -> {511}; + + subgraph cluster_90 { + color=red + 511 [label="Enter function expectedTypeNested" style="filled" fillcolor=red]; + subgraph cluster_91 { + color=blue + 512 [label="Enter block"]; + 513 [label="Postponed enter to lambda"]; + subgraph cluster_92 { + color=blue + 514 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_93 { + color=blue + 515 [label="Enter block"]; + 516 [label="Postponed enter to lambda"]; + subgraph cluster_94 { + color=blue + 517 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_95 { + color=blue + 518 [label="Enter block"]; + 519 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 520 [label="Exit block"]; + } + 521 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 522 [label="Postponed exit from lambda"]; + 523 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 524 [label="Exit block"]; + } + 525 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 526 [label="Postponed exit from lambda"]; + 527 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 528 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 529 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 530 [label="Access variable R|/x|"]; + 531 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 532 [label="Exit block"]; + } + 533 [label="Exit function expectedTypeNested" style="filled" fillcolor=red]; + } 511 -> {512}; 512 -> {513}; - 513 -> {514}; + 513 -> {514 526 527}; + 513 -> {514} [style=dashed]; 514 -> {515}; 515 -> {516}; - 516 -> {517}; + 516 -> {517 523}; + 516 -> {522} [style=dotted]; + 516 -> {517} [style=dashed]; 517 -> {518}; - - subgraph cluster_84 { - color=red - 519 [label="Enter function expectedType" style="filled" fillcolor=red]; - subgraph cluster_85 { - color=blue - 520 [label="Enter block"]; - 521 [label="Postponed enter to lambda"]; - subgraph cluster_86 { - color=blue - 533 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_87 { - color=blue - 534 [label="Enter block"]; - 535 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 536 [label="Exit block"]; - } - 537 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 522 [label="Postponed exit from lambda"]; - 523 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 524 [label="Postponed enter to lambda"]; - subgraph cluster_88 { - color=blue - 538 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_89 { - color=blue - 539 [label="Enter block"]; - 540 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 541 [label="Exit block"]; - } - 542 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 525 [label="Postponed exit from lambda"]; - 526 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 527 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 528 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 529 [label="Access variable R|/x|"]; - 530 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 531 [label="Exit block"]; - } - 532 [label="Exit function expectedType" style="filled" fillcolor=red]; - } + 518 -> {519}; 519 -> {520}; 520 -> {521}; - 521 -> {523 533}; - 521 -> {522} [style=dotted]; - 521 -> {533} [style=dashed]; + 521 -> {522}; 522 -> {523} [color=green]; - 522 -> {527} [color=red]; + 522 -> {528} [color=red]; 523 -> {524}; - 524 -> {526 538}; - 524 -> {525} [style=dotted]; - 524 -> {538} [style=dashed]; - 525 -> {526} [color=green]; - 525 -> {527} [color=red]; - 526 -> {527}; + 524 -> {525}; + 526 -> {527} [color=green]; + 526 -> {528} [color=red]; 527 -> {528}; 528 -> {529}; 529 -> {530}; 530 -> {531}; 531 -> {532}; - 533 -> {534}; - 534 -> {535}; - 535 -> {536}; - 536 -> {537}; - 537 -> {522}; - 538 -> {539}; - 539 -> {540}; - 540 -> {541}; - 541 -> {542}; - 542 -> {525}; - - subgraph cluster_90 { - color=red - 543 [label="Enter function expectedTypeNested" style="filled" fillcolor=red]; - subgraph cluster_91 { - color=blue - 544 [label="Enter block"]; - 545 [label="Postponed enter to lambda"]; - subgraph cluster_92 { - color=blue - 554 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_93 { - color=blue - 555 [label="Enter block"]; - 556 [label="Postponed enter to lambda"]; - subgraph cluster_94 { - color=blue - 561 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_95 { - color=blue - 562 [label="Enter block"]; - 563 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 564 [label="Exit block"]; - } - 565 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 557 [label="Postponed exit from lambda"]; - 558 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 559 [label="Exit block"]; - } - 560 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 546 [label="Postponed exit from lambda"]; - 547 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 548 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 549 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 550 [label="Access variable R|/x|"]; - 551 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 552 [label="Exit block"]; - } - 553 [label="Exit function expectedTypeNested" style="filled" fillcolor=red]; - } - 543 -> {544}; - 544 -> {545}; - 545 -> {546 547 554}; - 545 -> {554} [style=dashed]; - 546 -> {547} [color=green]; - 546 -> {548} [color=red]; - 547 -> {548}; - 548 -> {549}; - 549 -> {550}; - 550 -> {551}; - 551 -> {552}; - 552 -> {553}; - 554 -> {555}; - 555 -> {556}; - 556 -> {558 561}; - 556 -> {557} [style=dotted]; - 556 -> {561} [style=dashed]; - 557 -> {558} [color=green]; - 557 -> {548} [color=red]; - 558 -> {559}; - 559 -> {560}; - 561 -> {562}; - 562 -> {563}; - 563 -> {564}; - 564 -> {565}; - 565 -> {557}; + 532 -> {533}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot index 5f61e3000f4..3119117d194 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot @@ -89,80 +89,80 @@ digraph flowFromInplaceLambda2_kt { 27 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue - 41 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 28 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 42 [label="Enter block"]; - 43 [label="Access variable R|/x|"]; - 44 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 45 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 46 [label="Exit block"]; + 29 [label="Enter block"]; + 30 [label="Access variable R|/x|"]; + 31 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 32 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 33 [label="Exit block"]; } - 47 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 34 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 28 [label="Postponed exit from lambda"]; - 29 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 30 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 31 [label="Const: Int(1)"]; - 32 [label="Postponed enter to lambda"]; + 35 [label="Postponed exit from lambda"]; + 36 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 37 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 38 [label="Const: Int(1)"]; + 39 [label="Postponed enter to lambda"]; subgraph cluster_12 { color=blue - 48 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 40 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 49 [label="Enter block"]; - 50 [label="Access variable R|/x|"]; - 51 [label="Access variable R|kotlin/String.length#|"]; - 52 [label="Const: Int(123)"]; - 53 [label="Exit block"]; + 41 [label="Enter block"]; + 42 [label="Access variable R|/x|"]; + 43 [label="Access variable R|kotlin/String.length#|"]; + 44 [label="Const: Int(123)"]; + 45 [label="Exit block"]; } - 54 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 46 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 33 [label="Postponed exit from lambda"]; - 34 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 35 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 36 [label="Access variable R|/x|"]; - 37 [label="Smart cast: R|/x|"]; - 38 [label="Access variable R|kotlin/String.length|"]; - 39 [label="Exit block"]; + 47 [label="Postponed exit from lambda"]; + 48 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 49 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 50 [label="Access variable R|/x|"]; + 51 [label="Smart cast: R|/x|"]; + 52 [label="Access variable R|kotlin/String.length|"]; + 53 [label="Exit block"]; } - 40 [label="Exit function test1" style="filled" fillcolor=red]; + 54 [label="Exit function test1" style="filled" fillcolor=red]; } 25 -> {26}; 26 -> {27}; - 27 -> {29 41}; - 27 -> {28} [style=dotted]; - 27 -> {41} [style=dashed]; - 28 -> {29} [color=green]; - 28 -> {35} [color=red]; + 27 -> {28 36}; + 27 -> {35} [style=dotted]; + 27 -> {28} [style=dashed]; + 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {34 48}; - 32 -> {33} [style=dotted]; - 32 -> {48} [style=dashed]; - 33 -> {34} [color=green]; - 33 -> {35} [color=red]; + 32 -> {33}; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {36} [color=green]; + 35 -> {49} [color=red]; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40}; + 39 -> {40 48}; + 39 -> {47} [style=dotted]; + 39 -> {40} [style=dashed]; + 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {28}; + 47 -> {48} [color=green]; + 47 -> {49} [color=red]; 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {33}; subgraph cluster_14 { color=red @@ -173,82 +173,82 @@ digraph flowFromInplaceLambda2_kt { 57 [label="Postponed enter to lambda"]; subgraph cluster_16 { color=blue - 72 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 58 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 73 [label="Enter block"]; - 74 [label="Access variable R|/x|"]; - 75 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 76 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 77 [label="Exit block"]; + 59 [label="Enter block"]; + 60 [label="Access variable R|/x|"]; + 61 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 62 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 63 [label="Exit block"]; } - 78 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 64 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 58 [label="Postponed exit from lambda"]; - 59 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 60 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 61 [label="Const: Int(1)"]; - 62 [label="Function call: R|/someCompletedCall|(...)" style="filled" fillcolor=yellow]; - 63 [label="Postponed enter to lambda"]; + 65 [label="Postponed exit from lambda"]; + 66 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 67 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 68 [label="Const: Int(1)"]; + 69 [label="Function call: R|/someCompletedCall|(...)" style="filled" fillcolor=yellow]; + 70 [label="Postponed enter to lambda"]; subgraph cluster_18 { color=blue - 79 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 71 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 80 [label="Enter block"]; - 81 [label="Access variable R|/x|"]; - 82 [label="Access variable R|kotlin/String.length#|"]; - 83 [label="Const: Int(123)"]; - 84 [label="Exit block"]; + 72 [label="Enter block"]; + 73 [label="Access variable R|/x|"]; + 74 [label="Access variable R|kotlin/String.length#|"]; + 75 [label="Const: Int(123)"]; + 76 [label="Exit block"]; } - 85 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 77 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 64 [label="Postponed exit from lambda"]; - 65 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 66 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 67 [label="Access variable R|/x|"]; - 68 [label="Smart cast: R|/x|"]; - 69 [label="Access variable R|kotlin/String.length|"]; - 70 [label="Exit block"]; + 78 [label="Postponed exit from lambda"]; + 79 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 80 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 81 [label="Access variable R|/x|"]; + 82 [label="Smart cast: R|/x|"]; + 83 [label="Access variable R|kotlin/String.length|"]; + 84 [label="Exit block"]; } - 71 [label="Exit function test2" style="filled" fillcolor=red]; + 85 [label="Exit function test2" style="filled" fillcolor=red]; } 55 -> {56}; 56 -> {57}; - 57 -> {59 72}; - 57 -> {58} [style=dotted]; - 57 -> {72} [style=dashed]; - 58 -> {59} [color=green]; - 58 -> {66} [color=red]; + 57 -> {58 66}; + 57 -> {65} [style=dotted]; + 57 -> {58} [style=dashed]; + 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {65 79}; - 63 -> {64} [style=dotted]; - 63 -> {79} [style=dashed]; - 64 -> {65} [color=green]; - 64 -> {66} [color=red]; - 65 -> {66}; + 63 -> {64}; + 64 -> {65}; + 65 -> {66} [color=green]; + 65 -> {80} [color=red]; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; + 70 -> {71 79}; + 70 -> {78} [style=dotted]; + 70 -> {71} [style=dashed]; + 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; - 78 -> {58}; + 78 -> {79} [color=green]; + 78 -> {80} [color=red]; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; - 85 -> {64}; subgraph cluster_20 { color=red @@ -259,127 +259,127 @@ digraph flowFromInplaceLambda2_kt { 88 [label="Postponed enter to lambda"]; subgraph cluster_22 { color=blue - 118 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 89 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 119 [label="Enter block"]; - 120 [label="Access variable R|/x|"]; - 121 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 122 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 123 [label="Exit block"]; + 90 [label="Enter block"]; + 91 [label="Access variable R|/x|"]; + 92 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 93 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 94 [label="Exit block"]; } - 124 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 95 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 89 [label="Postponed exit from lambda"]; - 90 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 91 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 96 [label="Postponed exit from lambda"]; + 97 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 98 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; subgraph cluster_24 { color=blue - 92 [label="Enter when"]; + 99 [label="Enter when"]; subgraph cluster_25 { color=blue - 93 [label="Enter when branch condition "]; - 94 [label="Const: Boolean(true)"]; - 95 [label="Exit when branch condition"]; + 100 [label="Enter when branch condition "]; + 101 [label="Const: Boolean(true)"]; + 102 [label="Exit when branch condition"]; } subgraph cluster_26 { color=blue - 96 [label="Enter when branch condition else"]; - 97 [label="Exit when branch condition"]; + 103 [label="Enter when branch condition else"]; + 104 [label="Exit when branch condition"]; } - 98 [label="Enter when branch result"]; + 105 [label="Enter when branch result"]; subgraph cluster_27 { color=blue - 99 [label="Enter block"]; - 100 [label="Const: Int(2)"]; - 101 [label="Exit block"]; + 106 [label="Enter block"]; + 107 [label="Const: Int(2)"]; + 108 [label="Exit block"]; } - 102 [label="Exit when branch result"]; - 103 [label="Enter when branch result"]; + 109 [label="Exit when branch result"]; + 110 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 104 [label="Enter block"]; - 105 [label="Const: Int(1)"]; - 106 [label="Exit block"]; + 111 [label="Enter block"]; + 112 [label="Const: Int(1)"]; + 113 [label="Exit block"]; } - 107 [label="Exit when branch result"]; - 108 [label="Exit when"]; + 114 [label="Exit when branch result"]; + 115 [label="Exit when"]; } - 109 [label="Postponed enter to lambda"]; + 116 [label="Postponed enter to lambda"]; subgraph cluster_29 { color=blue - 125 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 117 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_30 { color=blue - 126 [label="Enter block"]; - 127 [label="Access variable R|/x|"]; - 128 [label="Access variable R|kotlin/String.length#|"]; - 129 [label="Const: Int(123)"]; - 130 [label="Exit block"]; + 118 [label="Enter block"]; + 119 [label="Access variable R|/x|"]; + 120 [label="Access variable R|kotlin/String.length#|"]; + 121 [label="Const: Int(123)"]; + 122 [label="Exit block"]; } - 131 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 123 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 110 [label="Postponed exit from lambda"]; - 111 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 112 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 113 [label="Access variable R|/x|"]; - 114 [label="Smart cast: R|/x|"]; - 115 [label="Access variable R|kotlin/String.length|"]; - 116 [label="Exit block"]; + 124 [label="Postponed exit from lambda"]; + 125 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 126 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 127 [label="Access variable R|/x|"]; + 128 [label="Smart cast: R|/x|"]; + 129 [label="Access variable R|kotlin/String.length|"]; + 130 [label="Exit block"]; } - 117 [label="Exit function test3" style="filled" fillcolor=red]; + 131 [label="Exit function test3" style="filled" fillcolor=red]; } 86 -> {87}; 87 -> {88}; - 88 -> {90 118}; - 88 -> {89} [style=dotted]; - 88 -> {118} [style=dashed]; - 89 -> {90} [color=green]; - 89 -> {112} [color=red]; + 88 -> {89 97}; + 88 -> {96} [style=dotted]; + 88 -> {89} [style=dashed]; + 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; - 95 -> {96 103}; - 96 -> {97}; + 95 -> {96}; + 96 -> {97} [color=green]; + 96 -> {126} [color=red]; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; 101 -> {102}; - 102 -> {108}; + 102 -> {103 110}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {111 125}; - 109 -> {110} [style=dotted]; - 109 -> {125} [style=dashed]; - 110 -> {111} [color=green]; - 110 -> {112} [color=red]; + 109 -> {115}; + 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; - 116 -> {117}; + 116 -> {117 125}; + 116 -> {124} [style=dotted]; + 116 -> {117} [style=dashed]; + 117 -> {118}; 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; - 124 -> {89}; + 124 -> {125} [color=green]; + 124 -> {126} [color=red]; 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; - 131 -> {110}; subgraph cluster_31 { color=red @@ -426,76 +426,76 @@ digraph flowFromInplaceLambda2_kt { 153 [label="Postponed enter to lambda"]; subgraph cluster_40 { color=blue - 180 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 154 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_41 { color=blue - 181 [label="Enter block"]; - 182 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 183 [label="Exit block"]; + 155 [label="Enter block"]; + 156 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 157 [label="Exit block"]; } - 184 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 158 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 154 [label="Postponed exit from lambda"]; - 155 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 156 [label="Exit block"]; + 159 [label="Postponed exit from lambda"]; + 160 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 161 [label="Exit block"]; } - 157 [label="Exit when branch result"]; - 158 [label="Enter when branch result"]; + 162 [label="Exit when branch result"]; + 163 [label="Enter when branch result"]; subgraph cluster_42 { color=blue - 159 [label="Enter block"]; - 160 [label="Postponed enter to lambda"]; + 164 [label="Enter block"]; + 165 [label="Postponed enter to lambda"]; subgraph cluster_43 { color=blue - 185 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 166 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_44 { color=blue - 186 [label="Enter block"]; - 187 [label="Const: Null(null)"]; - 188 [label="Assignment: R|/p|"]; - 189 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 190 [label="Exit block"]; + 167 [label="Enter block"]; + 168 [label="Const: Null(null)"]; + 169 [label="Assignment: R|/p|"]; + 170 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 171 [label="Exit block"]; } - 191 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 172 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 161 [label="Postponed exit from lambda"]; - 162 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 163 [label="Exit block"]; + 173 [label="Postponed exit from lambda"]; + 174 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 175 [label="Exit block"]; } - 164 [label="Exit when branch result"]; - 165 [label="Exit when"]; + 176 [label="Exit when branch result"]; + 177 [label="Exit when"]; } - 166 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 167 [label="Const: Int(1)"]; - 168 [label="Postponed enter to lambda"]; + 178 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 179 [label="Const: Int(1)"]; + 180 [label="Postponed enter to lambda"]; subgraph cluster_45 { color=blue - 192 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 181 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_46 { color=blue - 193 [label="Enter block"]; - 194 [label="Access variable R|/p|"]; - 195 [label="Smart cast: R|/p|"]; - 196 [label="Access variable R|kotlin/String.length#|"]; - 197 [label="Const: Int(123)"]; - 198 [label="Exit block"]; + 182 [label="Enter block"]; + 183 [label="Access variable R|/p|"]; + 184 [label="Smart cast: R|/p|"]; + 185 [label="Access variable R|kotlin/String.length#|"]; + 186 [label="Const: Int(123)"]; + 187 [label="Exit block"]; } - 199 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 188 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 169 [label="Postponed exit from lambda"]; - 170 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 171 [label="Merge postponed lambda exits"]; - 172 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 173 [label="Access variable R|/p|"]; - 174 [label="Access variable R|kotlin/String.length#|"]; - 175 [label="Exit block"]; + 189 [label="Postponed exit from lambda"]; + 190 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 191 [label="Merge postponed lambda exits"]; + 192 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 193 [label="Access variable R|/p|"]; + 194 [label="Access variable R|kotlin/String.length#|"]; + 195 [label="Exit block"]; } - 176 [label="Exit when branch result"]; - 177 [label="Exit when"]; + 196 [label="Exit when branch result"]; + 197 [label="Exit when"]; } - 178 [label="Exit block"]; + 198 [label="Exit block"]; } - 179 [label="Exit function test4" style="filled" fillcolor=red]; + 199 [label="Exit function test4" style="filled" fillcolor=red]; } 132 -> {133}; 133 -> {134}; @@ -507,64 +507,65 @@ digraph flowFromInplaceLambda2_kt { 139 -> {140}; 140 -> {141}; 141 -> {142 143}; - 142 -> {177}; + 142 -> {197}; 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; 147 -> {148}; - 148 -> {149 158}; + 148 -> {149 163}; 149 -> {150}; 150 -> {151}; 151 -> {152}; 152 -> {153}; - 153 -> {155 180}; - 153 -> {154} [style=dotted]; - 153 -> {180} [style=dashed]; - 154 -> {155} [color=green]; - 154 -> {171} [color=red]; + 153 -> {154 160}; + 153 -> {159} [style=dotted]; + 153 -> {154} [style=dashed]; + 154 -> {155}; 155 -> {156}; 156 -> {157}; - 157 -> {165}; + 157 -> {158}; 158 -> {159}; - 159 -> {160}; - 160 -> {162 185}; - 160 -> {161} [style=dotted]; - 160 -> {185} [style=dashed]; - 161 -> {162} [color=green]; - 161 -> {171} [color=red]; - 162 -> {163}; + 159 -> {160} [color=green]; + 159 -> {191} [color=red]; + 160 -> {161}; + 161 -> {162}; + 162 -> {177}; 163 -> {164}; 164 -> {165}; - 165 -> {166 171}; + 165 -> {166 174}; + 165 -> {173} [style=dotted]; + 165 -> {166} [style=dashed]; 166 -> {167}; 167 -> {168}; - 168 -> {170 192}; - 168 -> {169} [style=dotted]; - 168 -> {192} [style=dashed]; - 169 -> {170} [color=green]; - 169 -> {172} [color=red]; - 170 -> {172}; - 171 -> {172} [color=red]; + 168 -> {169}; + 169 -> {170}; + 170 -> {171}; + 171 -> {172}; 172 -> {173}; - 173 -> {174}; + 173 -> {174} [color=green]; + 173 -> {191} [color=red]; 174 -> {175}; 175 -> {176}; 176 -> {177}; - 177 -> {178}; + 177 -> {178 191}; 178 -> {179}; - 180 -> {181}; + 179 -> {180}; + 180 -> {181 190}; + 180 -> {189} [style=dotted]; + 180 -> {181} [style=dashed]; 181 -> {182}; 182 -> {183}; 183 -> {184}; - 184 -> {154}; + 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; - 189 -> {190}; - 190 -> {191}; - 191 -> {161}; + 189 -> {190} [color=green]; + 189 -> {192} [color=red]; + 190 -> {192}; + 191 -> {192} [color=red]; 192 -> {193}; 193 -> {194}; 194 -> {195}; @@ -572,7 +573,6 @@ digraph flowFromInplaceLambda2_kt { 196 -> {197}; 197 -> {198}; 198 -> {199}; - 199 -> {169}; subgraph cluster_47 { color=red @@ -585,78 +585,78 @@ digraph flowFromInplaceLambda2_kt { 204 [label="Postponed enter to lambda"]; subgraph cluster_49 { color=blue - 218 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 205 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_50 { color=blue - 219 [label="Enter block"]; - 220 [label="Access variable R|/x|"]; - 221 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 222 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 223 [label="Exit block"]; + 206 [label="Enter block"]; + 207 [label="Access variable R|/x|"]; + 208 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 209 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 210 [label="Exit block"]; } - 224 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 211 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 205 [label="Postponed exit from lambda"]; - 206 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 207 [label="Exit safe call"]; - 208 [label="Const: Int(1)"]; - 209 [label="Postponed enter to lambda"]; + 212 [label="Postponed exit from lambda"]; + 213 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 214 [label="Exit safe call"]; + 215 [label="Const: Int(1)"]; + 216 [label="Postponed enter to lambda"]; subgraph cluster_51 { color=blue - 225 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 217 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_52 { color=blue - 226 [label="Enter block"]; - 227 [label="Const: String()"]; - 228 [label="Exit block"]; + 218 [label="Enter block"]; + 219 [label="Const: String()"]; + 220 [label="Exit block"]; } - 229 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 221 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 210 [label="Postponed exit from lambda"]; - 211 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 212 [label="Merge postponed lambda exits"]; - 213 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 214 [label="Access variable R|/x|"]; - 215 [label="Access variable R|kotlin/String.length#|"]; - 216 [label="Exit block"]; + 222 [label="Postponed exit from lambda"]; + 223 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 224 [label="Merge postponed lambda exits"]; + 225 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 226 [label="Access variable R|/x|"]; + 227 [label="Access variable R|kotlin/String.length#|"]; + 228 [label="Exit block"]; } - 217 [label="Exit function test5" style="filled" fillcolor=red]; + 229 [label="Exit function test5" style="filled" fillcolor=red]; } 200 -> {201}; 201 -> {202}; - 202 -> {203 207}; + 202 -> {203 214}; 203 -> {204}; - 204 -> {206 218}; - 204 -> {205} [style=dotted]; - 204 -> {218} [style=dashed]; - 205 -> {206} [color=green]; - 205 -> {212} [color=red]; + 204 -> {205 213}; + 204 -> {212} [style=dotted]; + 204 -> {205} [style=dashed]; + 205 -> {206}; 206 -> {207}; - 207 -> {208 212}; + 207 -> {208}; 208 -> {209}; - 209 -> {211 225}; - 209 -> {210} [style=dotted]; - 209 -> {225} [style=dashed]; - 210 -> {211} [color=green]; - 210 -> {213} [color=red]; - 211 -> {213}; - 212 -> {213} [color=red]; + 209 -> {210}; + 210 -> {211}; + 211 -> {212}; + 212 -> {213} [color=green]; + 212 -> {224} [color=red]; 213 -> {214}; - 214 -> {215}; + 214 -> {215 224}; 215 -> {216}; - 216 -> {217}; + 216 -> {217 223}; + 216 -> {222} [style=dotted]; + 216 -> {217} [style=dashed]; + 217 -> {218}; 218 -> {219}; 219 -> {220}; 220 -> {221}; 221 -> {222}; - 222 -> {223}; - 223 -> {224}; - 224 -> {205}; + 222 -> {223} [color=green]; + 222 -> {225} [color=red]; + 223 -> {225}; + 224 -> {225} [color=red]; 225 -> {226}; 226 -> {227}; 227 -> {228}; 228 -> {229}; - 229 -> {210}; subgraph cluster_53 { color=red @@ -685,136 +685,136 @@ digraph flowFromInplaceLambda2_kt { 240 [label="Postponed enter to lambda"]; subgraph cluster_59 { color=blue - 264 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 241 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_60 { color=blue - 265 [label="Enter block"]; - 266 [label="Access variable R|/x|"]; - 267 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 268 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 269 [label="Exit block"]; + 242 [label="Enter block"]; + 243 [label="Access variable R|/x|"]; + 244 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 245 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 246 [label="Exit block"]; } - 270 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 241 [label="Postponed exit from lambda"]; - 242 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 243 [label="Exit block"]; - } - 244 [label="Exit when branch result"]; - 245 [label="Enter when branch result"]; - subgraph cluster_61 { - color=blue - 246 [label="Enter block"]; - 247 [label="Postponed enter to lambda"]; - subgraph cluster_62 { - color=blue - 271 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_63 { - color=blue - 272 [label="Enter block"]; - 273 [label="Access variable R|/x|"]; - 274 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 275 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 276 [label="Exit block"]; - } - 277 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 247 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } 248 [label="Postponed exit from lambda"]; 249 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; 250 [label="Exit block"]; } 251 [label="Exit when branch result"]; - 252 [label="Exit when"]; + 252 [label="Enter when branch result"]; + subgraph cluster_61 { + color=blue + 253 [label="Enter block"]; + 254 [label="Postponed enter to lambda"]; + subgraph cluster_62 { + color=blue + 255 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_63 { + color=blue + 256 [label="Enter block"]; + 257 [label="Access variable R|/x|"]; + 258 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 259 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 260 [label="Exit block"]; + } + 261 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 262 [label="Postponed exit from lambda"]; + 263 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 264 [label="Exit block"]; + } + 265 [label="Exit when branch result"]; + 266 [label="Exit when"]; } - 253 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 254 [label="Const: Int(1)"]; - 255 [label="Postponed enter to lambda"]; + 267 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 268 [label="Const: Int(1)"]; + 269 [label="Postponed enter to lambda"]; subgraph cluster_64 { color=blue - 278 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 270 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_65 { color=blue - 279 [label="Enter block"]; - 280 [label="Access variable R|/x|"]; - 281 [label="Access variable R|kotlin/String.length#|"]; - 282 [label="Const: Int(123)"]; - 283 [label="Exit block"]; + 271 [label="Enter block"]; + 272 [label="Access variable R|/x|"]; + 273 [label="Access variable R|kotlin/String.length#|"]; + 274 [label="Const: Int(123)"]; + 275 [label="Exit block"]; } - 284 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 276 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 256 [label="Postponed exit from lambda"]; - 257 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 258 [label="Merge postponed lambda exits"]; - 259 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 260 [label="Access variable R|/x|"]; - 261 [label="Access variable R|kotlin/String.length#|"]; - 262 [label="Exit block"]; + 277 [label="Postponed exit from lambda"]; + 278 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 279 [label="Merge postponed lambda exits"]; + 280 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 281 [label="Access variable R|/x|"]; + 282 [label="Access variable R|kotlin/String.length#|"]; + 283 [label="Exit block"]; } - 263 [label="Exit function test6" style="filled" fillcolor=red]; + 284 [label="Exit function test6" style="filled" fillcolor=red]; } 230 -> {231}; 231 -> {232}; 232 -> {233}; 233 -> {234}; 234 -> {235}; - 235 -> {236 245}; + 235 -> {236 252}; 236 -> {237}; 237 -> {238}; 238 -> {239}; 239 -> {240}; - 240 -> {242 264}; - 240 -> {241} [style=dotted]; - 240 -> {264} [style=dashed]; - 241 -> {242} [color=green]; - 241 -> {258} [color=red]; + 240 -> {241 249}; + 240 -> {248} [style=dotted]; + 240 -> {241} [style=dashed]; + 241 -> {242}; 242 -> {243}; 243 -> {244}; - 244 -> {252}; + 244 -> {245}; 245 -> {246}; 246 -> {247}; - 247 -> {249 271}; - 247 -> {248} [style=dotted]; - 247 -> {271} [style=dashed]; + 247 -> {248}; 248 -> {249} [color=green]; - 248 -> {258} [color=red]; + 248 -> {279} [color=red]; 249 -> {250}; 250 -> {251}; - 251 -> {252}; - 252 -> {253 258}; + 251 -> {266}; + 252 -> {253}; 253 -> {254}; - 254 -> {255}; - 255 -> {257 278}; - 255 -> {256} [style=dotted]; - 255 -> {278} [style=dashed]; - 256 -> {257} [color=green]; - 256 -> {259} [color=red]; - 257 -> {259}; - 258 -> {259} [color=red]; + 254 -> {255 263}; + 254 -> {262} [style=dotted]; + 254 -> {255} [style=dashed]; + 255 -> {256}; + 256 -> {257}; + 257 -> {258}; + 258 -> {259}; 259 -> {260}; 260 -> {261}; 261 -> {262}; - 262 -> {263}; + 262 -> {263} [color=green]; + 262 -> {279} [color=red]; + 263 -> {264}; 264 -> {265}; 265 -> {266}; - 266 -> {267}; + 266 -> {267 279}; 267 -> {268}; 268 -> {269}; - 269 -> {270}; - 270 -> {241}; + 269 -> {270 278}; + 269 -> {277} [style=dotted]; + 269 -> {270} [style=dashed]; + 270 -> {271}; 271 -> {272}; 272 -> {273}; 273 -> {274}; 274 -> {275}; 275 -> {276}; 276 -> {277}; - 277 -> {248}; - 278 -> {279}; - 279 -> {280}; + 277 -> {278} [color=green]; + 277 -> {280} [color=red]; + 278 -> {280}; + 279 -> {280} [color=red]; 280 -> {281}; 281 -> {282}; 282 -> {283}; 283 -> {284}; - 284 -> {256}; subgraph cluster_66 { color=red @@ -843,50 +843,50 @@ digraph flowFromInplaceLambda2_kt { 298 [label="Postponed enter to lambda"]; subgraph cluster_71 { color=blue - 315 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 299 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_72 { color=blue - 316 [label="Enter block"]; - 317 [label="Const: Null(null)"]; - 318 [label="Assignment: R|/p|"]; - 319 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 320 [label="Exit block"]; + 300 [label="Enter block"]; + 301 [label="Const: Null(null)"]; + 302 [label="Assignment: R|/p|"]; + 303 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 304 [label="Exit block"]; } - 321 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 305 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 299 [label="Postponed exit from lambda"]; - 300 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 301 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 302 [label="Const: Int(1)"]; - 303 [label="Postponed enter to lambda"]; + 306 [label="Postponed exit from lambda"]; + 307 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 308 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 309 [label="Const: Int(1)"]; + 310 [label="Postponed enter to lambda"]; subgraph cluster_73 { color=blue - 322 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 311 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_74 { color=blue - 323 [label="Enter block"]; - 324 [label="Access variable R|/p|"]; - 325 [label="Smart cast: R|/p|"]; - 326 [label="Access variable R|kotlin/String.length#|"]; - 327 [label="Const: Int(123)"]; - 328 [label="Exit block"]; + 312 [label="Enter block"]; + 313 [label="Access variable R|/p|"]; + 314 [label="Smart cast: R|/p|"]; + 315 [label="Access variable R|kotlin/String.length#|"]; + 316 [label="Const: Int(123)"]; + 317 [label="Exit block"]; } - 329 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 318 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 304 [label="Postponed exit from lambda"]; - 305 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 306 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 307 [label="Access variable R|/p|"]; - 308 [label="Smart cast: R|/p|"]; - 309 [label="Access variable R|kotlin/String.length#|"]; - 310 [label="Exit block"]; + 319 [label="Postponed exit from lambda"]; + 320 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 321 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 322 [label="Access variable R|/p|"]; + 323 [label="Smart cast: R|/p|"]; + 324 [label="Access variable R|kotlin/String.length#|"]; + 325 [label="Exit block"]; } - 311 [label="Exit when branch result"]; - 312 [label="Exit when"]; + 326 [label="Exit when branch result"]; + 327 [label="Exit when"]; } - 313 [label="Exit block"]; + 328 [label="Exit block"]; } - 314 [label="Exit function test7" style="filled" fillcolor=red]; + 329 [label="Exit function test7" style="filled" fillcolor=red]; } 285 -> {286}; 286 -> {287}; @@ -898,38 +898,39 @@ digraph flowFromInplaceLambda2_kt { 292 -> {293}; 293 -> {294}; 294 -> {295 296}; - 295 -> {312}; + 295 -> {327}; 296 -> {297}; 297 -> {298}; - 298 -> {300 315}; - 298 -> {299} [style=dotted]; - 298 -> {315} [style=dashed]; - 299 -> {300} [color=green]; - 299 -> {306} [color=red]; + 298 -> {299 307}; + 298 -> {306} [style=dotted]; + 298 -> {299} [style=dashed]; + 299 -> {300}; 300 -> {301}; 301 -> {302}; 302 -> {303}; - 303 -> {305 322}; - 303 -> {304} [style=dotted]; - 303 -> {322} [style=dashed]; - 304 -> {305} [color=green]; - 304 -> {306} [color=red]; + 303 -> {304}; + 304 -> {305}; 305 -> {306}; - 306 -> {307}; + 306 -> {307} [color=green]; + 306 -> {321} [color=red]; 307 -> {308}; 308 -> {309}; 309 -> {310}; - 310 -> {311}; + 310 -> {311 320}; + 310 -> {319} [style=dotted]; + 310 -> {311} [style=dashed]; 311 -> {312}; 312 -> {313}; 313 -> {314}; + 314 -> {315}; 315 -> {316}; 316 -> {317}; 317 -> {318}; 318 -> {319}; - 319 -> {320}; + 319 -> {320} [color=green]; + 319 -> {321} [color=red]; 320 -> {321}; - 321 -> {299}; + 321 -> {322}; 322 -> {323}; 323 -> {324}; 324 -> {325}; @@ -937,6 +938,5 @@ digraph flowFromInplaceLambda2_kt { 326 -> {327}; 327 -> {328}; 328 -> {329}; - 329 -> {304}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot index c3b0acb1c18..b8309fc2705 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot @@ -28,243 +28,314 @@ digraph flowFromInplaceLambda3_kt { subgraph cluster_3 { color=red - 15 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; + 7 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 16 [label="Enter block"]; + 8 [label="Enter block"]; subgraph cluster_5 { color=blue - 17 [label="Enter block"]; - 18 [label="Exit block"]; + 9 [label="Enter block"]; + 10 [label="Exit block"]; } - 19 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; + 11 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 12 [label="Exit block"]; } - 21 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; + 13 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; } + 7 -> {8}; + 8 -> {9}; + 9 -> {10}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; + + subgraph cluster_6 { + color=red + 14 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 15 [label="Enter block"]; + subgraph cluster_8 { + color=blue + 16 [label="Enter block"]; + 17 [label="Exit block"]; + } + 18 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 19 [label="Exit block"]; + } + 20 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; + } + 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21}; - subgraph cluster_6 { + subgraph cluster_9 { color=red - 30 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_7 { + 21 [label="Enter function atMostOnce" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 31 [label="Enter block"]; - subgraph cluster_8 { + 22 [label="Enter block"]; + subgraph cluster_11 { color=blue - 32 [label="Enter block"]; - 33 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Exit block"]; } - 34 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 35 [label="Exit block"]; + 25 [label="Exit block"]; } - 36 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; + 26 [label="Exit function atMostOnce" style="filled" fillcolor=red]; } + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; + 25 -> {26}; + + subgraph cluster_12 { + color=red + 27 [label="Enter function test1" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 28 [label="Enter block"]; + 29 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 30 [label="Const: String()"]; + 31 [label="Assignment: R|/x|"]; + 32 [label="Access variable R|/x|"]; + 33 [label="Smart cast: R|/x|"]; + 34 [label="Access variable R|kotlin/String.length|"]; + 35 [label="Postponed enter to lambda"]; + subgraph cluster_14 { + color=blue + 36 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 37 [label="Enter block"]; + 38 [label="Const: Int(1)"]; + 39 [label="Assignment: R|/x|"]; + 40 [label="Exit block"]; + } + 41 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 42 [label="Postponed exit from lambda"]; + 43 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 44 [label="Access variable R|/x|"]; + 45 [label="Smart cast: R|/x|"]; + 46 [label="Access variable #"]; + 47 [label="Access variable R|/x|"]; + 48 [label="Smart cast: R|/x|"]; + 49 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 50 [label="Exit block"]; + } + 51 [label="Exit function test1" style="filled" fillcolor=red]; + } + 27 -> {28}; + 28 -> {29}; + 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36}; - - subgraph cluster_9 { - color=red - 45 [label="Enter function atMostOnce" style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 46 [label="Enter block"]; - subgraph cluster_11 { - color=blue - 47 [label="Enter block"]; - 48 [label="Exit block"]; - } - 49 [label="Exit block"]; - } - 50 [label="Exit function atMostOnce" style="filled" fillcolor=red]; - } + 35 -> {36 42 43}; + 35 -> {36} [style=dashed]; + 36 -> {37}; + 37 -> {38}; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; + 41 -> {42}; + 42 -> {43}; + 42 -> {35} [color=green style=dashed]; + 43 -> {44}; + 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; + 50 -> {51}; - subgraph cluster_12 { + subgraph cluster_16 { color=red - 59 [label="Enter function test1" style="filled" fillcolor=red]; - subgraph cluster_13 { + 52 [label="Enter function test1m" style="filled" fillcolor=red]; + subgraph cluster_17 { color=blue - 60 [label="Enter block"]; - 61 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 62 [label="Const: String()"]; - 63 [label="Assignment: R|/x|"]; - 64 [label="Access variable R|/x|"]; - 65 [label="Smart cast: R|/x|"]; - 66 [label="Access variable R|kotlin/String.length|"]; - 67 [label="Postponed enter to lambda"]; - subgraph cluster_14 { + 53 [label="Enter block"]; + 54 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 55 [label="Const: String()"]; + 56 [label="Assignment: R|/x|"]; + 57 [label="Access variable R|/x|"]; + 58 [label="Smart cast: R|/x|"]; + 59 [label="Access variable R|kotlin/String.length|"]; + 60 [label="Postponed enter to lambda"]; + subgraph cluster_18 { color=blue - 78 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_15 { + 61 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_19 { color=blue - 79 [label="Enter block"]; - 80 [label="Const: Int(1)"]; - 81 [label="Assignment: R|/x|"]; - 82 [label="Exit block"]; + 62 [label="Enter block"]; + 63 [label="Const: String()"]; + 64 [label="Assignment: R|/x|"]; + 65 [label="Exit block"]; } - 83 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 66 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 68 [label="Postponed exit from lambda"]; - 69 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 70 [label="Access variable R|/x|"]; - 71 [label="Smart cast: R|/x|"]; - 72 [label="Access variable #"]; - 73 [label="Access variable R|/x|"]; - 74 [label="Smart cast: R|/x|"]; - 75 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 76 [label="Exit block"]; + 67 [label="Postponed exit from lambda"]; + 68 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 69 [label="Access variable R|/x|"]; + 70 [label="Smart cast: R|/x|"]; + 71 [label="Access variable R|kotlin/String.length|"]; + 72 [label="Exit block"]; } - 77 [label="Exit function test1" style="filled" fillcolor=red]; + 73 [label="Exit function test1m" style="filled" fillcolor=red]; } + 52 -> {53}; + 53 -> {54}; + 54 -> {55}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; 59 -> {60}; - 60 -> {61}; + 60 -> {61 67 68}; + 60 -> {61} [style=dashed]; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {68 69 78}; - 67 -> {78} [style=dashed]; + 67 -> {68}; + 67 -> {60} [color=green style=dashed]; 68 -> {69}; - 68 -> {67} [color=green style=dashed]; 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {74}; + + subgraph cluster_20 { + color=red + 74 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 75 [label="Enter block"]; + 76 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 77 [label="Const: String()"]; + 78 [label="Assignment: R|/x|"]; + 79 [label="Access variable R|/x|"]; + 80 [label="Smart cast: R|/x|"]; + 81 [label="Access variable R|kotlin/String.length|"]; + 82 [label="Postponed enter to lambda"]; + subgraph cluster_22 { + color=blue + 83 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_23 { + color=blue + 84 [label="Enter block"]; + 85 [label="Const: Int(1)"]; + 86 [label="Assignment: R|/x|"]; + 87 [label="Exit block"]; + } + 88 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 89 [label="Postponed exit from lambda"]; + 90 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 91 [label="Access variable R|/x|"]; + 92 [label="Smart cast: R|/x|"]; + 93 [label="Access variable #"]; + 94 [label="Access variable R|/x|"]; + 95 [label="Smart cast: R|/x|"]; + 96 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 97 [label="Exit block"]; + } + 98 [label="Exit function test2" style="filled" fillcolor=red]; + } 74 -> {75}; 75 -> {76}; 76 -> {77}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {83}; - 83 -> {68}; - - subgraph cluster_16 { - color=red - 84 [label="Enter function test1m" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 85 [label="Enter block"]; - 86 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 87 [label="Const: String()"]; - 88 [label="Assignment: R|/x|"]; - 89 [label="Access variable R|/x|"]; - 90 [label="Smart cast: R|/x|"]; - 91 [label="Access variable R|kotlin/String.length|"]; - 92 [label="Postponed enter to lambda"]; - subgraph cluster_18 { - color=blue - 100 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 101 [label="Enter block"]; - 102 [label="Const: String()"]; - 103 [label="Assignment: R|/x|"]; - 104 [label="Exit block"]; - } - 105 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 93 [label="Postponed exit from lambda"]; - 94 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 95 [label="Access variable R|/x|"]; - 96 [label="Smart cast: R|/x|"]; - 97 [label="Access variable R|kotlin/String.length|"]; - 98 [label="Exit block"]; - } - 99 [label="Exit function test1m" style="filled" fillcolor=red]; - } + 82 -> {83 90}; + 82 -> {89} [style=dotted]; + 82 -> {83} [style=dashed]; + 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; + 89 -> {82} [color=green style=dashed]; 90 -> {91}; 91 -> {92}; - 92 -> {93 94 100}; - 92 -> {100} [style=dashed]; + 92 -> {93}; 93 -> {94}; - 93 -> {92} [color=green style=dashed]; 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {99}; + + subgraph cluster_24 { + color=red + 99 [label="Enter function test3" style="filled" fillcolor=red]; + subgraph cluster_25 { + color=blue + 100 [label="Enter block"]; + 101 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 102 [label="Const: String()"]; + 103 [label="Assignment: R|/x|"]; + 104 [label="Access variable R|/x|"]; + 105 [label="Smart cast: R|/x|"]; + 106 [label="Access variable R|kotlin/String.length|"]; + 107 [label="Postponed enter to lambda"]; + subgraph cluster_26 { + color=blue + 108 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_27 { + color=blue + 109 [label="Enter block"]; + 110 [label="Const: Int(1)"]; + 111 [label="Assignment: R|/x|"]; + 112 [label="Exit block"]; + } + 113 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 114 [label="Postponed exit from lambda"]; + 115 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 116 [label="Access variable R|/x|"]; + 117 [label="Smart cast: R|/x|"]; + 118 [label="Access variable #"]; + 119 [label="Access variable R|/x|"]; + 120 [label="Smart cast: R|/x|"]; + 121 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 122 [label="Exit block"]; + } + 123 [label="Exit function test3" style="filled" fillcolor=red]; + } + 99 -> {100}; 100 -> {101}; 101 -> {102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; - 105 -> {93}; - - subgraph cluster_20 { - color=red - 106 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 107 [label="Enter block"]; - 108 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 109 [label="Const: String()"]; - 110 [label="Assignment: R|/x|"]; - 111 [label="Access variable R|/x|"]; - 112 [label="Smart cast: R|/x|"]; - 113 [label="Access variable R|kotlin/String.length|"]; - 114 [label="Postponed enter to lambda"]; - subgraph cluster_22 { - color=blue - 125 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 126 [label="Enter block"]; - 127 [label="Const: Int(1)"]; - 128 [label="Assignment: R|/x|"]; - 129 [label="Exit block"]; - } - 130 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 115 [label="Postponed exit from lambda"]; - 116 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 117 [label="Access variable R|/x|"]; - 118 [label="Smart cast: R|/x|"]; - 119 [label="Access variable #"]; - 120 [label="Access variable R|/x|"]; - 121 [label="Smart cast: R|/x|"]; - 122 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 123 [label="Exit block"]; - } - 124 [label="Exit function test2" style="filled" fillcolor=red]; - } + 105 -> {106}; 106 -> {107}; - 107 -> {108}; + 107 -> {108 115}; + 107 -> {114} [style=dotted]; + 107 -> {108} [style=dashed]; 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; - 114 -> {116 125}; - 114 -> {115} [style=dotted]; - 114 -> {125} [style=dashed]; + 114 -> {115}; 115 -> {116}; - 115 -> {114} [color=green style=dashed]; 116 -> {117}; 117 -> {118}; 118 -> {119}; @@ -272,62 +343,61 @@ digraph flowFromInplaceLambda3_kt { 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124}; + + subgraph cluster_28 { + color=red + 124 [label="Enter function test4" style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 125 [label="Enter block"]; + 126 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 127 [label="Const: String()"]; + 128 [label="Assignment: R|/x|"]; + 129 [label="Access variable R|/x|"]; + 130 [label="Smart cast: R|/x|"]; + 131 [label="Access variable R|kotlin/String.length|"]; + 132 [label="Postponed enter to lambda"]; + subgraph cluster_30 { + color=blue + 133 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 134 [label="Enter block"]; + 135 [label="Const: Int(1)"]; + 136 [label="Assignment: R|/x|"]; + 137 [label="Exit block"]; + } + 138 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 139 [label="Postponed exit from lambda"]; + 140 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 141 [label="Access variable R|/x|"]; + 142 [label="Smart cast: R|/x|"]; + 143 [label="Access variable #"]; + 144 [label="Access variable R|/x|"]; + 145 [label="Smart cast: R|/x|"]; + 146 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 147 [label="Exit block"]; + } + 148 [label="Exit function test4" style="filled" fillcolor=red]; + } + 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; 129 -> {130}; - 130 -> {115}; - - subgraph cluster_24 { - color=red - 131 [label="Enter function test3" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 132 [label="Enter block"]; - 133 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 134 [label="Const: String()"]; - 135 [label="Assignment: R|/x|"]; - 136 [label="Access variable R|/x|"]; - 137 [label="Smart cast: R|/x|"]; - 138 [label="Access variable R|kotlin/String.length|"]; - 139 [label="Postponed enter to lambda"]; - subgraph cluster_26 { - color=blue - 150 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 151 [label="Enter block"]; - 152 [label="Const: Int(1)"]; - 153 [label="Assignment: R|/x|"]; - 154 [label="Exit block"]; - } - 155 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 140 [label="Postponed exit from lambda"]; - 141 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 142 [label="Access variable R|/x|"]; - 143 [label="Smart cast: R|/x|"]; - 144 [label="Access variable #"]; - 145 [label="Access variable R|/x|"]; - 146 [label="Smart cast: R|/x|"]; - 147 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 148 [label="Exit block"]; - } - 149 [label="Exit function test3" style="filled" fillcolor=red]; - } + 130 -> {131}; 131 -> {132}; - 132 -> {133}; + 132 -> {133 139 140}; + 132 -> {133} [style=dashed]; 133 -> {134}; 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; 138 -> {139}; - 139 -> {141 150}; - 139 -> {140} [style=dotted]; - 139 -> {150} [style=dashed]; + 139 -> {140}; 140 -> {141}; 141 -> {142}; 142 -> {143}; @@ -336,75 +406,5 @@ digraph flowFromInplaceLambda3_kt { 145 -> {146}; 146 -> {147}; 147 -> {148}; - 148 -> {149}; - 150 -> {151}; - 151 -> {152}; - 152 -> {153}; - 153 -> {154}; - 154 -> {155}; - 155 -> {140}; - - subgraph cluster_28 { - color=red - 156 [label="Enter function test4" style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 157 [label="Enter block"]; - 158 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 159 [label="Const: String()"]; - 160 [label="Assignment: R|/x|"]; - 161 [label="Access variable R|/x|"]; - 162 [label="Smart cast: R|/x|"]; - 163 [label="Access variable R|kotlin/String.length|"]; - 164 [label="Postponed enter to lambda"]; - subgraph cluster_30 { - color=blue - 175 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 176 [label="Enter block"]; - 177 [label="Const: Int(1)"]; - 178 [label="Assignment: R|/x|"]; - 179 [label="Exit block"]; - } - 180 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 165 [label="Postponed exit from lambda"]; - 166 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 167 [label="Access variable R|/x|"]; - 168 [label="Smart cast: R|/x|"]; - 169 [label="Access variable #"]; - 170 [label="Access variable R|/x|"]; - 171 [label="Smart cast: R|/x|"]; - 172 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 173 [label="Exit block"]; - } - 174 [label="Exit function test4" style="filled" fillcolor=red]; - } - 156 -> {157}; - 157 -> {158}; - 158 -> {159}; - 159 -> {160}; - 160 -> {161}; - 161 -> {162}; - 162 -> {163}; - 163 -> {164}; - 164 -> {165 166 175}; - 164 -> {175} [style=dashed]; - 165 -> {166}; - 166 -> {167}; - 167 -> {168}; - 168 -> {169}; - 169 -> {170}; - 170 -> {171}; - 171 -> {172}; - 172 -> {173}; - 173 -> {174}; - 175 -> {176}; - 176 -> {177}; - 177 -> {178}; - 178 -> {179}; - 179 -> {180}; - 180 -> {165}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot index 11d663523dd..bbbf8ce5349 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot @@ -51,73 +51,87 @@ digraph flowFromTwoInplaceLambdas_kt { subgraph cluster_5 { color=red - 27 [label="Enter function test1" style="filled" fillcolor=red]; + 15 [label="Enter function test1" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 28 [label="Enter block"]; - 29 [label="Access variable R|/x|"]; - 30 [label="Variable declaration: lvar p: R|kotlin/String?|"]; + 16 [label="Enter block"]; + 17 [label="Access variable R|/x|"]; + 18 [label="Variable declaration: lvar p: R|kotlin/String?|"]; subgraph cluster_7 { color=blue - 31 [label="Enter when"]; + 19 [label="Enter when"]; subgraph cluster_8 { color=blue - 32 [label="Enter when branch condition "]; - 33 [label="Access variable R|/p|"]; - 34 [label="Const: Null(null)"]; - 35 [label="Equality operator !="]; - 36 [label="Exit when branch condition"]; + 20 [label="Enter when branch condition "]; + 21 [label="Access variable R|/p|"]; + 22 [label="Const: Null(null)"]; + 23 [label="Equality operator !="]; + 24 [label="Exit when branch condition"]; } - 37 [label="Synthetic else branch"]; - 38 [label="Enter when branch result"]; + 25 [label="Synthetic else branch"]; + 26 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 39 [label="Enter block"]; - 40 [label="Postponed enter to lambda"]; + 27 [label="Enter block"]; + 28 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue - 59 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 29 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 60 [label="Enter block"]; - 61 [label="Access variable R|/p|"]; - 62 [label="Smart cast: R|/p|"]; - 63 [label="Access variable R|kotlin/String.length#|"]; - 64 [label="Const: Int(123)"]; - 65 [label="Exit block"]; + 30 [label="Enter block"]; + 31 [label="Access variable R|/p|"]; + 32 [label="Smart cast: R|/p|"]; + 33 [label="Access variable R|kotlin/String.length#|"]; + 34 [label="Const: Int(123)"]; + 35 [label="Exit block"]; } - 66 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 36 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } subgraph cluster_12 { color=blue - 52 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 37 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 53 [label="Enter block"]; - 54 [label="Const: Null(null)"]; - 55 [label="Assignment: R|/p|"]; - 56 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 57 [label="Exit block"]; + 38 [label="Enter block"]; + 39 [label="Const: Null(null)"]; + 40 [label="Assignment: R|/p|"]; + 41 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 42 [label="Exit block"]; } - 58 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 43 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 41 [label="Postponed exit from lambda"]; - 42 [label="Postponed exit from lambda"]; - 43 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 44 [label="Access variable R|/p|"]; - 45 [label="Smart cast: R|/p|"]; - 46 [label="Access variable R|kotlin/String.length#|"]; - 47 [label="Exit block"]; + 44 [label="Postponed exit from lambda"]; + 45 [label="Postponed exit from lambda"]; + 46 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 47 [label="Access variable R|/p|"]; + 48 [label="Smart cast: R|/p|"]; + 49 [label="Access variable R|kotlin/String.length#|"]; + 50 [label="Exit block"]; } - 48 [label="Exit when branch result"]; - 49 [label="Exit when"]; + 51 [label="Exit when branch result"]; + 52 [label="Exit when"]; } - 50 [label="Exit block"]; + 53 [label="Exit block"]; } - 51 [label="Exit function test1" style="filled" fillcolor=red]; + 54 [label="Exit function test1" style="filled" fillcolor=red]; } + 15 -> {16}; + 16 -> {17}; + 17 -> {18}; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25 26}; + 25 -> {52}; + 26 -> {27}; 27 -> {28}; - 28 -> {29}; + 28 -> {29 37 46}; + 28 -> {44 45} [style=dotted]; + 28 -> {29 37} [style=dashed]; 29 -> {30}; 30 -> {31}; 31 -> {32}; @@ -125,108 +139,108 @@ digraph flowFromTwoInplaceLambdas_kt { 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37 38}; - 37 -> {49}; + 36 -> {44}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {43 52 59}; - 40 -> {41 42} [style=dotted]; - 40 -> {52 59} [style=dashed]; - 41 -> {43}; + 40 -> {41}; + 41 -> {42}; 42 -> {43}; - 43 -> {44}; - 44 -> {45}; + 43 -> {45}; + 44 -> {46}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; + 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {55}; + + subgraph cluster_14 { + color=red + 55 [label="Enter function test1_tail" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 56 [label="Enter block"]; + 57 [label="Access variable R|/x|"]; + 58 [label="Variable declaration: lvar p: R|kotlin/String?|"]; + subgraph cluster_16 { + color=blue + 59 [label="Enter when"]; + subgraph cluster_17 { + color=blue + 60 [label="Enter when branch condition "]; + 61 [label="Access variable R|/p|"]; + 62 [label="Const: Null(null)"]; + 63 [label="Equality operator !="]; + 64 [label="Exit when branch condition"]; + } + 65 [label="Synthetic else branch"]; + 66 [label="Enter when branch result"]; + subgraph cluster_18 { + color=blue + 67 [label="Enter block"]; + 68 [label="Postponed enter to lambda"]; + subgraph cluster_19 { + color=blue + 69 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 70 [label="Enter block"]; + 71 [label="Access variable R|/p|"]; + 72 [label="Smart cast: R|/p|"]; + 73 [label="Access variable R|kotlin/String.length#|"]; + 74 [label="Const: Int(123)"]; + 75 [label="Exit block"]; + } + 76 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + subgraph cluster_21 { + color=blue + 77 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 78 [label="Enter block"]; + 79 [label="Const: Null(null)"]; + 80 [label="Assignment: R|/p|"]; + 81 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 82 [label="Exit block"]; + } + 83 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 84 [label="Postponed exit from lambda"]; + 85 [label="Postponed exit from lambda"]; + 86 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 87 [label="Access variable R|/p|"]; + 88 [label="Smart cast: R|/p|"]; + 89 [label="Access variable R|kotlin/String.length#|"]; + 90 [label="Exit block"]; + } + 91 [label="Exit when branch result"]; + 92 [label="Exit when"]; + } + 93 [label="Exit block"]; + } + 94 [label="Exit function test1_tail" style="filled" fillcolor=red]; + } 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {42}; + 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {65}; - 65 -> {66}; - 66 -> {41}; - - subgraph cluster_14 { - color=red - 67 [label="Enter function test1_tail" style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 68 [label="Enter block"]; - 69 [label="Access variable R|/x|"]; - 70 [label="Variable declaration: lvar p: R|kotlin/String?|"]; - subgraph cluster_16 { - color=blue - 71 [label="Enter when"]; - subgraph cluster_17 { - color=blue - 72 [label="Enter when branch condition "]; - 73 [label="Access variable R|/p|"]; - 74 [label="Const: Null(null)"]; - 75 [label="Equality operator !="]; - 76 [label="Exit when branch condition"]; - } - 77 [label="Synthetic else branch"]; - 78 [label="Enter when branch result"]; - subgraph cluster_18 { - color=blue - 79 [label="Enter block"]; - 80 [label="Postponed enter to lambda"]; - subgraph cluster_19 { - color=blue - 99 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_20 { - color=blue - 100 [label="Enter block"]; - 101 [label="Access variable R|/p|"]; - 102 [label="Smart cast: R|/p|"]; - 103 [label="Access variable R|kotlin/String.length#|"]; - 104 [label="Const: Int(123)"]; - 105 [label="Exit block"]; - } - 106 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - subgraph cluster_21 { - color=blue - 92 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 93 [label="Enter block"]; - 94 [label="Const: Null(null)"]; - 95 [label="Assignment: R|/p|"]; - 96 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 97 [label="Exit block"]; - } - 98 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 81 [label="Postponed exit from lambda"]; - 82 [label="Postponed exit from lambda"]; - 83 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 84 [label="Access variable R|/p|"]; - 85 [label="Smart cast: R|/p|"]; - 86 [label="Access variable R|kotlin/String.length#|"]; - 87 [label="Exit block"]; - } - 88 [label="Exit when branch result"]; - 89 [label="Exit when"]; - } - 90 [label="Exit block"]; - } - 91 [label="Exit function test1_tail" style="filled" fillcolor=red]; - } + 64 -> {65 66}; + 65 -> {92}; + 66 -> {67}; 67 -> {68}; - 68 -> {69}; + 68 -> {69 77 86}; + 68 -> {84 85} [style=dotted]; + 68 -> {69 77} [style=dashed]; 69 -> {70}; 70 -> {71}; 71 -> {72}; @@ -234,304 +248,303 @@ digraph flowFromTwoInplaceLambdas_kt { 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {77 78}; - 77 -> {89}; + 76 -> {84}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {83 92 99}; - 80 -> {81 82} [style=dotted]; - 80 -> {92 99} [style=dashed]; - 81 -> {83}; + 80 -> {81}; + 81 -> {82}; 82 -> {83}; - 83 -> {84}; - 84 -> {85}; + 83 -> {85}; + 84 -> {86}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; + 91 -> {92}; 92 -> {93}; 93 -> {94}; - 94 -> {95}; + + subgraph cluster_23 { + color=red + 95 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 96 [label="Enter block"]; + 97 [label="Access variable R|/x|"]; + 98 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; + 99 [label="Access variable R|/p|"]; + 100 [label="Access variable #"]; + 101 [label="Postponed enter to lambda"]; + subgraph cluster_25 { + color=blue + 102 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 103 [label="Enter block"]; + 104 [label="Access variable R|/p|"]; + 105 [label="Type operator: (R|/p| as R|kotlin/String|)"]; + 106 [label="Const: Int(123)"]; + 107 [label="Exit block"]; + } + 108 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + subgraph cluster_27 { + color=blue + 109 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 110 [label="Enter block"]; + 111 [label="Const: Null(null)"]; + 112 [label="Assignment: R|/p|"]; + 113 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 114 [label="Exit block"]; + } + 115 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 116 [label="Postponed exit from lambda"]; + 117 [label="Postponed exit from lambda"]; + 118 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 119 [label="Access variable R|/p|"]; + 120 [label="Smart cast: R|/p|"]; + 121 [label="Access variable #"]; + 122 [label="Access variable R|/p|"]; + 123 [label="Smart cast: R|/p|"]; + 124 [label="Enter safe call"]; + 125 [label="Access variable #"]; + 126 [label="Exit safe call"]; + 127 [label="Exit block"]; + } + 128 [label="Exit function test2" style="filled" fillcolor=red]; + } 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {82}; + 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {102}; + 101 -> {102 109 118}; + 101 -> {116 117} [style=dotted]; + 101 -> {102 109} [style=dashed]; 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; - 106 -> {81}; - - subgraph cluster_23 { - color=red - 107 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 108 [label="Enter block"]; - 109 [label="Access variable R|/x|"]; - 110 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; - 111 [label="Access variable R|/p|"]; - 112 [label="Access variable #"]; - 113 [label="Postponed enter to lambda"]; - subgraph cluster_25 { - color=blue - 134 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_26 { - color=blue - 135 [label="Enter block"]; - 136 [label="Access variable R|/p|"]; - 137 [label="Type operator: (R|/p| as R|kotlin/String|)"]; - 138 [label="Const: Int(123)"]; - 139 [label="Exit block"]; - } - 140 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - subgraph cluster_27 { - color=blue - 127 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 128 [label="Enter block"]; - 129 [label="Const: Null(null)"]; - 130 [label="Assignment: R|/p|"]; - 131 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 132 [label="Exit block"]; - } - 133 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 114 [label="Postponed exit from lambda"]; - 115 [label="Postponed exit from lambda"]; - 116 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 117 [label="Access variable R|/p|"]; - 118 [label="Smart cast: R|/p|"]; - 119 [label="Access variable #"]; - 120 [label="Access variable R|/p|"]; - 121 [label="Smart cast: R|/p|"]; - 122 [label="Enter safe call"]; - 123 [label="Access variable #"]; - 124 [label="Exit safe call"]; - 125 [label="Exit block"]; - } - 126 [label="Exit function test2" style="filled" fillcolor=red]; - } + 106 -> {107}; 107 -> {108}; - 108 -> {109}; + 108 -> {116}; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; - 113 -> {116 127 134}; - 113 -> {114 115} [style=dotted]; - 113 -> {127 134} [style=dashed]; - 114 -> {116}; - 115 -> {116}; - 116 -> {117}; + 113 -> {114}; + 114 -> {115}; + 115 -> {117}; + 116 -> {118}; 117 -> {118}; 118 -> {119}; 119 -> {120}; 120 -> {121}; - 121 -> {122 124}; + 121 -> {122}; 122 -> {123}; - 123 -> {124}; + 123 -> {124 126}; 124 -> {125}; 125 -> {126}; + 126 -> {127}; 127 -> {128}; - 128 -> {129}; + + subgraph cluster_29 { + color=red + 129 [label="Enter function test3" style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 130 [label="Enter block"]; + 131 [label="Access variable R|/x|"]; + 132 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; + 133 [label="Access variable R|/p|"]; + 134 [label="Access variable #"]; + 135 [label="Postponed enter to lambda"]; + subgraph cluster_31 { + color=blue + 136 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 137 [label="Enter block"]; + 138 [label="Const: String()"]; + 139 [label="Assignment: R|/p|"]; + 140 [label="Const: Int(123)"]; + 141 [label="Exit block"]; + } + 142 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + subgraph cluster_33 { + color=blue + 143 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 144 [label="Enter block"]; + 145 [label="Const: Null(null)"]; + 146 [label="Assignment: R|/p|"]; + 147 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 148 [label="Exit block"]; + } + 149 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 150 [label="Postponed exit from lambda"]; + 151 [label="Postponed exit from lambda"]; + 152 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 153 [label="Access variable R|/p|"]; + 154 [label="Smart cast: R|/p|"]; + 155 [label="Access variable R|kotlin/String.length#|"]; + 156 [label="Access variable R|/p|"]; + 157 [label="Smart cast: R|/p|"]; + 158 [label="Enter safe call"]; + 159 [label="Access variable R|kotlin/String.length|"]; + 160 [label="Exit safe call"]; + 161 [label="Exit block"]; + } + 162 [label="Exit function test3" style="filled" fillcolor=red]; + } 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {115}; + 133 -> {134}; 134 -> {135}; - 135 -> {136}; + 135 -> {136 143 152}; + 135 -> {150 151} [style=dotted]; + 135 -> {136 143} [style=dashed]; 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; - 140 -> {114}; - - subgraph cluster_29 { - color=red - 141 [label="Enter function test3" style="filled" fillcolor=red]; - subgraph cluster_30 { - color=blue - 142 [label="Enter block"]; - 143 [label="Access variable R|/x|"]; - 144 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; - 145 [label="Access variable R|/p|"]; - 146 [label="Access variable #"]; - 147 [label="Postponed enter to lambda"]; - subgraph cluster_31 { - color=blue - 168 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 169 [label="Enter block"]; - 170 [label="Const: String()"]; - 171 [label="Assignment: R|/p|"]; - 172 [label="Const: Int(123)"]; - 173 [label="Exit block"]; - } - 174 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - subgraph cluster_33 { - color=blue - 161 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_34 { - color=blue - 162 [label="Enter block"]; - 163 [label="Const: Null(null)"]; - 164 [label="Assignment: R|/p|"]; - 165 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 166 [label="Exit block"]; - } - 167 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 148 [label="Postponed exit from lambda"]; - 149 [label="Postponed exit from lambda"]; - 150 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 151 [label="Access variable R|/p|"]; - 152 [label="Smart cast: R|/p|"]; - 153 [label="Access variable R|kotlin/String.length#|"]; - 154 [label="Access variable R|/p|"]; - 155 [label="Smart cast: R|/p|"]; - 156 [label="Enter safe call"]; - 157 [label="Access variable R|kotlin/String.length|"]; - 158 [label="Exit safe call"]; - 159 [label="Exit block"]; - } - 160 [label="Exit function test3" style="filled" fillcolor=red]; - } + 140 -> {141}; 141 -> {142}; - 142 -> {143}; + 142 -> {150}; 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; - 147 -> {150 161 168}; - 147 -> {148 149} [style=dotted]; - 147 -> {161 168} [style=dashed]; - 148 -> {150}; - 149 -> {150}; - 150 -> {151}; + 147 -> {148}; + 148 -> {149}; + 149 -> {151}; + 150 -> {152}; 151 -> {152}; 152 -> {153}; 153 -> {154}; 154 -> {155}; - 155 -> {156 158}; + 155 -> {156}; 156 -> {157}; - 157 -> {158}; + 157 -> {158 160}; 158 -> {159}; 159 -> {160}; + 160 -> {161}; 161 -> {162}; - 162 -> {163}; - 163 -> {164}; - 164 -> {165}; - 165 -> {166}; - 166 -> {167}; - 167 -> {149}; + + subgraph cluster_35 { + color=red + 163 [label="Enter class I1" style="filled" fillcolor=red]; + 164 [label="Exit class I1" style="filled" fillcolor=red]; + } + 163 -> {164} [color=green]; + + subgraph cluster_36 { + color=red + 165 [label="Enter class I2" style="filled" fillcolor=red]; + 166 [label="Exit class I2" style="filled" fillcolor=red]; + } + 165 -> {166} [color=green]; + + subgraph cluster_37 { + color=red + 167 [label="Enter function test4" style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 168 [label="Enter block"]; + 169 [label="Access variable R|/x|"]; + 170 [label="Access variable #"]; + 171 [label="Access variable R|/x|"]; + 172 [label="Access variable #"]; + 173 [label="Postponed enter to lambda"]; + subgraph cluster_39 { + color=blue + 174 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_40 { + color=blue + 175 [label="Enter block"]; + 176 [label="Access variable R|/x|"]; + 177 [label="Type operator: (R|/x| as R|I2|)"]; + 178 [label="Access variable R|/x|"]; + 179 [label="Smart cast: R|/x|"]; + 180 [label="Access variable #"]; + 181 [label="Const: Int(123)"]; + 182 [label="Exit block"]; + } + 183 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + subgraph cluster_41 { + color=blue + 184 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_42 { + color=blue + 185 [label="Enter block"]; + 186 [label="Access variable R|/x|"]; + 187 [label="Type operator: (R|/x| as R|I1|)"]; + 188 [label="Access variable R|/x|"]; + 189 [label="Smart cast: R|/x|"]; + 190 [label="Access variable #"]; + 191 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 192 [label="Exit block"]; + } + 193 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 194 [label="Postponed exit from lambda"]; + 195 [label="Postponed exit from lambda"]; + 196 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 197 [label="Access variable R|/x|"]; + 198 [label="Smart cast: R|/x|"]; + 199 [label="Access variable R|/I1.x|"]; + 200 [label="Access variable R|/x|"]; + 201 [label="Smart cast: R|/x|"]; + 202 [label="Access variable R|/I2.y|"]; + 203 [label="Exit block"]; + } + 204 [label="Exit function test4" style="filled" fillcolor=red]; + } + 167 -> {168}; 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; 172 -> {173}; - 173 -> {174}; - 174 -> {148}; - - subgraph cluster_35 { - color=red - 175 [label="Enter class I1" style="filled" fillcolor=red]; - 176 [label="Exit class I1" style="filled" fillcolor=red]; - } - 175 -> {176} [color=green]; - - subgraph cluster_36 { - color=red - 177 [label="Enter class I2" style="filled" fillcolor=red]; - 178 [label="Exit class I2" style="filled" fillcolor=red]; - } - 177 -> {178} [color=green]; - - subgraph cluster_37 { - color=red - 179 [label="Enter function test4" style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 180 [label="Enter block"]; - 181 [label="Access variable R|/x|"]; - 182 [label="Access variable #"]; - 183 [label="Access variable R|/x|"]; - 184 [label="Access variable #"]; - 185 [label="Postponed enter to lambda"]; - subgraph cluster_39 { - color=blue - 207 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_40 { - color=blue - 208 [label="Enter block"]; - 209 [label="Access variable R|/x|"]; - 210 [label="Type operator: (R|/x| as R|I2|)"]; - 211 [label="Access variable R|/x|"]; - 212 [label="Smart cast: R|/x|"]; - 213 [label="Access variable #"]; - 214 [label="Const: Int(123)"]; - 215 [label="Exit block"]; - } - 216 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - subgraph cluster_41 { - color=blue - 197 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_42 { - color=blue - 198 [label="Enter block"]; - 199 [label="Access variable R|/x|"]; - 200 [label="Type operator: (R|/x| as R|I1|)"]; - 201 [label="Access variable R|/x|"]; - 202 [label="Smart cast: R|/x|"]; - 203 [label="Access variable #"]; - 204 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 205 [label="Exit block"]; - } - 206 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 186 [label="Postponed exit from lambda"]; - 187 [label="Postponed exit from lambda"]; - 188 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 189 [label="Access variable R|/x|"]; - 190 [label="Smart cast: R|/x|"]; - 191 [label="Access variable R|/I1.x|"]; - 192 [label="Access variable R|/x|"]; - 193 [label="Smart cast: R|/x|"]; - 194 [label="Access variable R|/I2.y|"]; - 195 [label="Exit block"]; - } - 196 [label="Exit function test4" style="filled" fillcolor=red]; - } + 173 -> {174 184 196}; + 173 -> {194 195} [style=dotted]; + 173 -> {174 184} [style=dashed]; + 174 -> {175}; + 175 -> {176}; + 176 -> {177}; + 177 -> {178}; + 178 -> {179}; 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; - 183 -> {184}; + 183 -> {194}; 184 -> {185}; - 185 -> {188 197 207}; - 185 -> {186 187} [style=dotted]; - 185 -> {197 207} [style=dashed]; - 186 -> {188}; + 185 -> {186}; + 186 -> {187}; 187 -> {188}; 188 -> {189}; 189 -> {190}; 190 -> {191}; 191 -> {192}; 192 -> {193}; - 193 -> {194}; - 194 -> {195}; + 193 -> {195}; + 194 -> {196}; 195 -> {196}; + 196 -> {197}; 197 -> {198}; 198 -> {199}; 199 -> {200}; @@ -539,211 +552,198 @@ digraph flowFromTwoInplaceLambdas_kt { 201 -> {202}; 202 -> {203}; 203 -> {204}; - 204 -> {205}; + + subgraph cluster_43 { + color=red + 205 [label="Enter function test5" style="filled" fillcolor=red]; + subgraph cluster_44 { + color=blue + 206 [label="Enter block"]; + 207 [label="Access variable R|/x|"]; + 208 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; + 209 [label="Access variable R|/p|"]; + 210 [label="Access variable #"]; + 211 [label="Postponed enter to lambda"]; + subgraph cluster_45 { + color=blue + 212 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_46 { + color=blue + 213 [label="Enter block"]; + 214 [label="Access variable R|/q|"]; + 215 [label="Assignment: R|/p|"]; + 216 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 217 [label="Exit block"]; + } + 218 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + subgraph cluster_47 { + color=blue + 219 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_48 { + color=blue + 220 [label="Enter block"]; + 221 [label="Access variable R|/p|"]; + 222 [label="Type operator: (R|/p| as R|kotlin/Int|)"]; + 223 [label="Const: Int(123)"]; + 224 [label="Exit block"]; + } + 225 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 226 [label="Postponed exit from lambda"]; + 227 [label="Postponed exit from lambda"]; + 228 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 229 [label="Access variable R|/p|"]; + 230 [label="Smart cast: R|/p|"]; + 231 [label="Access variable R|kotlin/String.length#|"]; + 232 [label="Access variable R|/p|"]; + 233 [label="Smart cast: R|/p|"]; + 234 [label="Enter safe call"]; + 235 [label="Access variable R|kotlin/String.length|"]; + 236 [label="Exit safe call"]; + 237 [label="Exit block"]; + } + 238 [label="Exit function test5" style="filled" fillcolor=red]; + } 205 -> {206}; - 206 -> {187}; + 206 -> {207}; 207 -> {208}; 208 -> {209}; 209 -> {210}; 210 -> {211}; - 211 -> {212}; + 211 -> {212 219 228}; + 211 -> {226 227} [style=dotted]; + 211 -> {212 219} [style=dashed]; 212 -> {213}; 213 -> {214}; 214 -> {215}; 215 -> {216}; - 216 -> {186}; - - subgraph cluster_43 { - color=red - 217 [label="Enter function test5" style="filled" fillcolor=red]; - subgraph cluster_44 { - color=blue - 218 [label="Enter block"]; - 219 [label="Access variable R|/x|"]; - 220 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; - 221 [label="Access variable R|/p|"]; - 222 [label="Access variable #"]; - 223 [label="Postponed enter to lambda"]; - subgraph cluster_45 { - color=blue - 244 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_46 { - color=blue - 245 [label="Enter block"]; - 246 [label="Access variable R|/q|"]; - 247 [label="Assignment: R|/p|"]; - 248 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 249 [label="Exit block"]; - } - 250 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - subgraph cluster_47 { - color=blue - 237 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_48 { - color=blue - 238 [label="Enter block"]; - 239 [label="Access variable R|/p|"]; - 240 [label="Type operator: (R|/p| as R|kotlin/Int|)"]; - 241 [label="Const: Int(123)"]; - 242 [label="Exit block"]; - } - 243 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 224 [label="Postponed exit from lambda"]; - 225 [label="Postponed exit from lambda"]; - 226 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 227 [label="Access variable R|/p|"]; - 228 [label="Smart cast: R|/p|"]; - 229 [label="Access variable R|kotlin/String.length#|"]; - 230 [label="Access variable R|/p|"]; - 231 [label="Smart cast: R|/p|"]; - 232 [label="Enter safe call"]; - 233 [label="Access variable R|kotlin/String.length|"]; - 234 [label="Exit safe call"]; - 235 [label="Exit block"]; - } - 236 [label="Exit function test5" style="filled" fillcolor=red]; - } + 216 -> {217}; 217 -> {218}; - 218 -> {219}; + 218 -> {226}; 219 -> {220}; 220 -> {221}; 221 -> {222}; 222 -> {223}; - 223 -> {226 237 244}; - 223 -> {224 225} [style=dotted]; - 223 -> {237 244} [style=dashed]; - 224 -> {226}; - 225 -> {226}; - 226 -> {227}; + 223 -> {224}; + 224 -> {225}; + 225 -> {227}; + 226 -> {228}; 227 -> {228}; 228 -> {229}; 229 -> {230}; 230 -> {231}; - 231 -> {232 234}; + 231 -> {232}; 232 -> {233}; - 233 -> {234}; + 233 -> {234 236}; 234 -> {235}; 235 -> {236}; + 236 -> {237}; 237 -> {238}; - 238 -> {239}; + + subgraph cluster_49 { + color=red + 239 [label="Enter function test6" style="filled" fillcolor=red]; + subgraph cluster_50 { + color=blue + 240 [label="Enter block"]; + 241 [label="Variable declaration: lval x: R|kotlin/String|"]; + 242 [label="Postponed enter to lambda"]; + subgraph cluster_51 { + color=blue + 243 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_52 { + color=blue + 244 [label="Enter block"]; + 245 [label="Access variable R|/x|"]; + 246 [label="Access variable R|kotlin/String.length|"]; + 247 [label="Exit block"]; + } + 248 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + subgraph cluster_53 { + color=blue + 249 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_54 { + color=blue + 250 [label="Enter block"]; + 251 [label="Const: String()"]; + 252 [label="Assignment: R|/x|"]; + 253 [label="Access variable R|/x|"]; + 254 [label="Access variable R|kotlin/String.length|"]; + 255 [label="Exit block"]; + } + 256 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 257 [label="Postponed exit from lambda"]; + 258 [label="Postponed exit from lambda"]; + 259 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 260 [label="Access variable R|/x|"]; + 261 [label="Access variable R|kotlin/String.length|"]; + 262 [label="Exit block"]; + } + 263 [label="Exit function test6" style="filled" fillcolor=red]; + } 239 -> {240}; 240 -> {241}; 241 -> {242}; - 242 -> {243}; - 243 -> {225}; + 242 -> {243 249 259}; + 242 -> {257 258} [style=dotted]; + 242 -> {243 249} [style=dashed]; + 243 -> {244}; 244 -> {245}; 245 -> {246}; 246 -> {247}; 247 -> {248}; - 248 -> {249}; + 248 -> {257}; 249 -> {250}; - 250 -> {224}; - - subgraph cluster_49 { - color=red - 251 [label="Enter function test6" style="filled" fillcolor=red]; - subgraph cluster_50 { - color=blue - 252 [label="Enter block"]; - 253 [label="Variable declaration: lval x: R|kotlin/String|"]; - 254 [label="Postponed enter to lambda"]; - subgraph cluster_51 { - color=blue - 270 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_52 { - color=blue - 271 [label="Enter block"]; - 272 [label="Access variable R|/x|"]; - 273 [label="Access variable R|kotlin/String.length|"]; - 274 [label="Exit block"]; - } - 275 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - subgraph cluster_53 { - color=blue - 262 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_54 { - color=blue - 263 [label="Enter block"]; - 264 [label="Const: String()"]; - 265 [label="Assignment: R|/x|"]; - 266 [label="Access variable R|/x|"]; - 267 [label="Access variable R|kotlin/String.length|"]; - 268 [label="Exit block"]; - } - 269 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 255 [label="Postponed exit from lambda"]; - 256 [label="Postponed exit from lambda"]; - 257 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 258 [label="Access variable R|/x|"]; - 259 [label="Access variable R|kotlin/String.length|"]; - 260 [label="Exit block"]; - } - 261 [label="Exit function test6" style="filled" fillcolor=red]; - } + 250 -> {251}; 251 -> {252}; 252 -> {253}; 253 -> {254}; - 254 -> {257 262 270}; - 254 -> {255 256} [style=dotted]; - 254 -> {262 270} [style=dashed]; - 255 -> {257}; - 256 -> {257}; - 257 -> {258}; + 254 -> {255}; + 255 -> {256}; + 256 -> {258}; + 257 -> {259}; 258 -> {259}; 259 -> {260}; 260 -> {261}; + 261 -> {262}; 262 -> {263}; - 263 -> {264}; - 264 -> {265}; - 265 -> {266}; - 266 -> {267}; - 267 -> {268}; - 268 -> {269}; - 269 -> {256}; - 270 -> {271}; - 271 -> {272}; - 272 -> {273}; - 273 -> {274}; - 274 -> {275}; - 275 -> {255}; subgraph cluster_55 { color=red - 276 [label="Enter function test7" style="filled" fillcolor=red]; + 264 [label="Enter function test7" style="filled" fillcolor=red]; subgraph cluster_56 { color=blue - 277 [label="Enter block"]; - 278 [label="Const: String()"]; - 279 [label="Variable declaration: lval x: R|kotlin/Any?|"]; - 280 [label="Variable declaration: lval y: R|kotlin/Any?|"]; - 281 [label="Postponed enter to lambda"]; + 265 [label="Enter block"]; + 266 [label="Const: String()"]; + 267 [label="Variable declaration: lval x: R|kotlin/Any?|"]; + 268 [label="Variable declaration: lval y: R|kotlin/Any?|"]; + 269 [label="Postponed enter to lambda"]; subgraph cluster_57 { color=blue - 307 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 270 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_58 { color=blue - 308 [label="Enter block"]; - 309 [label="Jump: ^@run2 Unit"]; - 310 [label="Stub" style="filled" fillcolor=gray]; - 311 [label="Exit block" style="filled" fillcolor=gray]; + 271 [label="Enter block"]; + 272 [label="Jump: ^@run2 Unit"]; + 273 [label="Stub" style="filled" fillcolor=gray]; + 274 [label="Exit block" style="filled" fillcolor=gray]; } - 312 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 275 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } subgraph cluster_59 { color=blue - 301 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 276 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_60 { color=blue - 302 [label="Enter block"]; - 303 [label="Access variable R|/x|"]; - 304 [label="Assignment: R|/y|"]; - 305 [label="Exit block"]; + 277 [label="Enter block"]; + 278 [label="Access variable R|/x|"]; + 279 [label="Assignment: R|/y|"]; + 280 [label="Exit block"]; } - 306 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 281 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } 282 [label="Postponed exit from lambda"]; 283 [label="Postponed exit from lambda"]; @@ -775,14 +775,27 @@ digraph flowFromTwoInplaceLambdas_kt { } 300 [label="Exit function test7" style="filled" fillcolor=red]; } + 264 -> {265}; + 265 -> {266}; + 266 -> {267}; + 267 -> {268}; + 268 -> {269}; + 269 -> {270 276 284}; + 269 -> {282 283} [style=dotted]; + 269 -> {270 276} [style=dashed]; + 270 -> {271}; + 271 -> {272}; + 272 -> {275}; + 272 -> {273} [style=dotted]; + 273 -> {274} [style=dotted]; + 274 -> {275} [style=dotted]; + 275 -> {282}; 276 -> {277}; 277 -> {278}; 278 -> {279}; 279 -> {280}; 280 -> {281}; - 281 -> {284 301 307}; - 281 -> {282 283} [style=dotted]; - 281 -> {301 307} [style=dashed]; + 281 -> {283}; 282 -> {284}; 283 -> {284}; 284 -> {285}; @@ -801,18 +814,5 @@ digraph flowFromTwoInplaceLambdas_kt { 297 -> {298}; 298 -> {299}; 299 -> {300}; - 301 -> {302}; - 302 -> {303}; - 303 -> {304}; - 304 -> {305}; - 305 -> {306}; - 306 -> {283}; - 307 -> {308}; - 308 -> {309}; - 309 -> {312}; - 309 -> {310} [style=dotted]; - 310 -> {311} [style=dotted]; - 311 -> {312} [style=dotted]; - 312 -> {282}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot index 226d54ed336..41a48037944 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot @@ -5,90 +5,90 @@ digraph initBlock_kt { subgraph cluster_0 { color=red - 9 [label="Enter class Foo" style="filled" fillcolor=red]; - 10 [label="Part of class initialization"]; + 0 [label="Enter class Foo" style="filled" fillcolor=red]; + 1 [label="Part of class initialization"]; subgraph cluster_1 { color=blue - 3 [label="Enter init block" style="filled" fillcolor=red]; + 2 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_2 { color=blue - 4 [label="Enter block"]; - 5 [label="Const: Int(1)"]; - 6 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 7 [label="Exit block"]; + 3 [label="Enter block"]; + 4 [label="Const: Int(1)"]; + 5 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 6 [label="Exit block"]; } - 8 [label="Exit init block" style="filled" fillcolor=red]; + 7 [label="Exit init block" style="filled" fillcolor=red]; } - 11 [label="Exit class Foo" style="filled" fillcolor=red]; + 8 [label="Exit class Foo" style="filled" fillcolor=red]; } subgraph cluster_3 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 9 [label="Enter function " style="filled" fillcolor=red]; + 10 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 11 [label="Exit function " style="filled" fillcolor=red]; } - 9 -> {10} [color=green]; - 10 -> {3} [color=green]; - 10 -> {11} [style=dotted]; - 10 -> {3} [style=dashed]; - 11 -> {0} [color=green]; - 11 -> {0} [style=dashed]; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {8} [style=dotted]; + 1 -> {2} [style=dashed]; + 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8}; - 8 -> {11} [color=green]; - 0 -> {1}; - 1 -> {2}; + 7 -> {8} [color=green]; + 8 -> {9} [color=green]; + 8 -> {9} [style=dashed]; + 9 -> {10}; + 10 -> {11}; subgraph cluster_4 { color=red - 26 [label="Enter class Bar" style="filled" fillcolor=red]; - 27 [label="Part of class initialization"]; + 12 [label="Enter class Bar" style="filled" fillcolor=red]; + 13 [label="Part of class initialization"]; subgraph cluster_5 { color=blue - 15 [label="Enter init block" style="filled" fillcolor=red]; + 14 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_6 { 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|()" style="filled" fillcolor=yellow]; - 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|()" style="filled" fillcolor=yellow]; + 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]; } - 25 [label="Exit init block" style="filled" fillcolor=gray]; + 24 [label="Exit init block" style="filled" fillcolor=gray]; } - 28 [label="Exit class Bar" style="filled" fillcolor=gray]; + 25 [label="Exit class Bar" style="filled" fillcolor=gray]; } subgraph cluster_7 { color=blue - 12 [label="Enter function " style="filled" fillcolor=gray]; - 13 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 14 [label="Exit function " style="filled" fillcolor=red]; + 26 [label="Enter function " style="filled" fillcolor=gray]; + 27 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 28 [label="Exit function " style="filled" fillcolor=red]; } - 26 -> {27} [color=green]; - 27 -> {15} [color=green]; - 27 -> {28} [style=dotted]; - 27 -> {15} [style=dashed]; - 28 -> {12} [style=dotted]; - 28 -> {12} [style=dashed]; + 12 -> {13} [color=green]; + 13 -> {14} [color=green]; + 13 -> {25} [style=dotted]; + 13 -> {14} [style=dashed]; + 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20}; + 19 -> {20} [style=dotted]; 20 -> {21} [style=dotted]; 21 -> {22} [style=dotted]; 22 -> {23} [style=dotted]; 23 -> {24} [style=dotted]; 24 -> {25} [style=dotted]; - 25 -> {28} [style=dotted]; - 12 -> {13}; - 13 -> {14}; + 25 -> {26} [style=dotted]; + 25 -> {26} [style=dashed]; + 26 -> {27}; + 27 -> {28}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot index 59371e10aeb..46e7b876fa1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot @@ -19,75 +19,75 @@ digraph initBlockAndInPlaceLambda_kt { subgraph cluster_2 { color=red - 26 [label="Enter class C" style="filled" fillcolor=red]; - 27 [label="Part of class initialization"]; + 4 [label="Enter class C" style="filled" fillcolor=red]; + 5 [label="Part of class initialization"]; subgraph cluster_3 { color=blue - 7 [label="Enter init block" style="filled" fillcolor=red]; + 6 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 8 [label="Enter block"]; - 9 [label="Access variable R|/a|"]; - 10 [label="Access variable R|/A.b|"]; - 11 [label="Enter safe call"]; - 12 [label="Postponed enter to lambda"]; + 7 [label="Enter block"]; + 8 [label="Access variable R|/a|"]; + 9 [label="Access variable R|/A.b|"]; + 10 [label="Enter safe call"]; + 11 [label="Postponed enter to lambda"]; subgraph cluster_5 { color=blue - 19 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 12 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 20 [label="Enter block"]; - 21 [label="Access variable R|/a|"]; - 22 [label="Access variable R|/it|"]; - 23 [label="Function call: R|/C.C|(...)" style="filled" fillcolor=yellow]; - 24 [label="Exit block"]; + 13 [label="Enter block"]; + 14 [label="Access variable R|/a|"]; + 15 [label="Access variable R|/it|"]; + 16 [label="Function call: R|/C.C|(...)" style="filled" fillcolor=yellow]; + 17 [label="Exit block"]; } - 25 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 18 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 13 [label="Postponed exit from lambda"]; - 14 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 15 [label="Exit safe call"]; - 16 [label="Variable declaration: lval c: R|C?|"]; - 17 [label="Exit block"]; + 19 [label="Postponed exit from lambda"]; + 20 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 21 [label="Exit safe call"]; + 22 [label="Variable declaration: lval c: R|C?|"]; + 23 [label="Exit block"]; } - 18 [label="Exit init block" style="filled" fillcolor=red]; + 24 [label="Exit init block" style="filled" fillcolor=red]; } - 28 [label="Exit class C" style="filled" fillcolor=red]; + 25 [label="Exit class C" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 4 [label="Enter function " style="filled" fillcolor=red]; - 5 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 6 [label="Exit function " style="filled" fillcolor=red]; + 26 [label="Enter function " style="filled" fillcolor=red]; + 27 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 28 [label="Exit function " style="filled" fillcolor=red]; } - 26 -> {27} [color=green]; - 27 -> {7} [color=green]; - 27 -> {28} [style=dotted]; - 27 -> {7} [style=dashed]; - 28 -> {4} [color=green]; - 28 -> {4} [style=dashed]; + 4 -> {5} [color=green]; + 5 -> {6} [color=green]; + 5 -> {25} [style=dotted]; + 5 -> {6} [style=dashed]; + 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {10}; - 10 -> {11 15}; - 11 -> {12}; - 12 -> {14 19}; - 12 -> {13} [style=dotted]; - 12 -> {19} [style=dashed]; + 9 -> {10 21}; + 10 -> {11}; + 11 -> {12 20}; + 11 -> {19} [style=dotted]; + 11 -> {12} [style=dashed]; + 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {28} [color=green]; + 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25}; - 25 -> {13}; - 4 -> {5}; - 5 -> {6}; + 24 -> {25} [color=green]; + 25 -> {26} [color=green]; + 25 -> {26} [style=dashed]; + 26 -> {27}; + 27 -> {28}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot index 877bff81b19..9cc7fcdbe9e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot @@ -5,64 +5,64 @@ digraph innerClassInAnonymousObject_kt { subgraph cluster_0 { color=red - 14 [label="Enter property" style="filled" fillcolor=red]; - 15 [label="Enter anonymous object"]; + 0 [label="Enter property" style="filled" fillcolor=red]; + 1 [label="Enter anonymous object"]; subgraph cluster_1 { color=blue - 12 [label="Enter class " style="filled" fillcolor=red]; - 13 [label="Exit class " style="filled" fillcolor=red]; + 2 [label="Enter class " style="filled" fillcolor=red]; + 3 [label="Exit class " style="filled" fillcolor=red]; } - 16 [label="Exit anonymous object"]; - 17 [label="Exit anonymous object expression"]; - 18 [label="Exit property" style="filled" fillcolor=red]; + 4 [label="Exit anonymous object"]; + 5 [label="Exit anonymous object expression"]; + 6 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_2 { color=blue - 10 [label="Enter class Nested" style="filled" fillcolor=red]; - 11 [label="Exit class Nested" style="filled" fillcolor=red]; + 7 [label="Enter class Nested" style="filled" fillcolor=red]; + 8 [label="Exit class Nested" style="filled" fillcolor=red]; } subgraph cluster_3 { color=blue - 6 [label="Enter function foo" style="filled" fillcolor=red]; + 9 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 7 [label="Enter block"]; - 8 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Exit block"]; } - 9 [label="Exit function foo" style="filled" fillcolor=red]; + 12 [label="Exit function foo" style="filled" fillcolor=red]; } subgraph cluster_5 { color=blue - 3 [label="Enter function " style="filled" fillcolor=red]; - 4 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 5 [label="Exit function " style="filled" fillcolor=red]; + 13 [label="Enter function " style="filled" fillcolor=red]; + 14 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 15 [label="Exit function " style="filled" fillcolor=red]; } subgraph cluster_6 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 16 [label="Enter function " style="filled" fillcolor=red]; + 17 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 18 [label="Exit function " style="filled" fillcolor=red]; } - 14 -> {15}; - 15 -> {12}; - 15 -> {16} [color=red]; - 15 -> {12} [style=dashed]; - 16 -> {17}; - 17 -> {18}; - 12 -> {13} [color=green]; - 12 -> {0 10} [color=red]; - 13 -> {0 10 16} [color=green]; - 13 -> {0 10} [style=dashed]; 0 -> {1}; 1 -> {2}; - 10 -> {11} [color=green]; - 10 -> {3 6} [color=red]; - 11 -> {3 6} [color=green]; - 11 -> {3 6} [style=dashed]; - 3 -> {4}; + 1 -> {4} [color=red]; + 1 -> {2} [style=dashed]; + 2 -> {3} [color=green]; + 2 -> {7 16} [color=red]; + 3 -> {4 7 16} [color=green]; + 3 -> {7 16} [style=dashed]; 4 -> {5}; - 6 -> {7}; - 7 -> {8}; - 8 -> {9}; + 5 -> {6}; + 7 -> {8} [color=green]; + 7 -> {9 13} [color=red]; + 8 -> {9 13} [color=green]; + 8 -> {9 13} [style=dashed]; + 9 -> {10}; + 10 -> {11}; + 11 -> {12}; + 13 -> {14}; + 14 -> {15}; + 16 -> {17}; + 17 -> {18}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot index bcc9b4919fd..f147376c5d1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot @@ -62,26 +62,26 @@ digraph inplaceLambdaInControlFlowExpressions_kt { 24 [label="Postponed enter to lambda"]; subgraph cluster_9 { color=blue - 33 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 25 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 34 [label="Enter block"]; - 35 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 36 [label="Exit block"]; + 26 [label="Enter block"]; + 27 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; } - 37 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 29 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 25 [label="Postponed exit from lambda"]; - 26 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; + 30 [label="Postponed exit from lambda"]; + 31 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 28 [label="Exit when branch result"]; - 29 [label="Exit when"]; + 33 [label="Exit when branch result"]; + 34 [label="Exit when"]; } - 30 [label="Variable declaration: lval x: R|kotlin/String|"]; - 31 [label="Exit block"]; + 35 [label="Variable declaration: lval x: R|kotlin/String|"]; + 36 [label="Exit block"]; } - 32 [label="Exit function test_1" style="filled" fillcolor=red]; + 37 [label="Exit function test_1" style="filled" fillcolor=red]; } 9 -> {10}; 10 -> {11}; @@ -95,25 +95,25 @@ digraph inplaceLambdaInControlFlowExpressions_kt { 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {29}; + 21 -> {34}; 22 -> {23}; 23 -> {24}; - 24 -> {26 33}; - 24 -> {25} [style=dotted]; - 24 -> {33} [style=dashed]; - 25 -> {26} [color=green]; - 25 -> {29} [color=red]; + 24 -> {25 31}; + 24 -> {30} [style=dotted]; + 24 -> {25} [style=dashed]; + 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {31} [color=green]; + 30 -> {34} [color=red]; 31 -> {32}; + 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {25}; subgraph cluster_11 { color=red @@ -133,67 +133,67 @@ digraph inplaceLambdaInControlFlowExpressions_kt { 43 [label="Postponed enter to lambda"]; subgraph cluster_16 { color=blue - 58 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 44 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 59 [label="Enter block"]; - 60 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 61 [label="Exit block"]; + 45 [label="Enter block"]; + 46 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 47 [label="Exit block"]; } - 62 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 48 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 44 [label="Postponed exit from lambda"]; - 45 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 46 [label="Exit block"]; + 49 [label="Postponed exit from lambda"]; + 50 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 51 [label="Exit block"]; } - 47 [label="Try main block exit"]; + 52 [label="Try main block exit"]; } subgraph cluster_18 { color=blue - 48 [label="Catch enter"]; - 49 [label="Variable declaration: e: R|kotlin/Exception|"]; + 53 [label="Catch enter"]; + 54 [label="Variable declaration: e: R|kotlin/Exception|"]; subgraph cluster_19 { color=blue - 50 [label="Enter block"]; - 51 [label="Const: String()"]; - 52 [label="Exit block"]; + 55 [label="Enter block"]; + 56 [label="Const: String()"]; + 57 [label="Exit block"]; } - 53 [label="Catch exit"]; + 58 [label="Catch exit"]; } - 54 [label="Try expression exit"]; + 59 [label="Try expression exit"]; } - 55 [label="Variable declaration: lval x: R|kotlin/String|"]; - 56 [label="Exit block"]; + 60 [label="Variable declaration: lval x: R|kotlin/String|"]; + 61 [label="Exit block"]; } - 57 [label="Exit function test_2" style="filled" fillcolor=red]; + 62 [label="Exit function test_2" style="filled" fillcolor=red]; } 38 -> {39}; 39 -> {40}; - 40 -> {41 48}; + 40 -> {41 53}; 41 -> {42}; 42 -> {43}; - 43 -> {45 58}; - 43 -> {44} [style=dotted]; - 43 -> {58} [style=dashed]; - 44 -> {45} [color=green]; - 44 -> {54} [color=red]; + 43 -> {44 50}; + 43 -> {49} [style=dotted]; + 43 -> {44} [style=dashed]; + 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48 54}; + 47 -> {48}; 48 -> {49}; - 49 -> {50}; + 49 -> {50} [color=green]; + 49 -> {59} [color=red]; 50 -> {51}; 51 -> {52}; - 52 -> {53}; + 52 -> {53 59}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; + 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {44}; subgraph cluster_20 { color=red @@ -204,38 +204,38 @@ digraph inplaceLambdaInControlFlowExpressions_kt { 65 [label="Postponed enter to lambda"]; subgraph cluster_22 { color=blue - 72 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 66 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 73 [label="Enter block"]; - 74 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 75 [label="Exit block"]; + 67 [label="Enter block"]; + 68 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 69 [label="Exit block"]; } - 76 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 70 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 66 [label="Postponed exit from lambda"]; - 67 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 68 [label="Check not null: R|kotlin/run|(...)!!" style="filled" fillcolor=yellow]; - 69 [label="Variable declaration: lval x: R|kotlin/String|"]; - 70 [label="Exit block"]; + 71 [label="Postponed exit from lambda"]; + 72 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 73 [label="Check not null: R|kotlin/run|(...)!!" style="filled" fillcolor=yellow]; + 74 [label="Variable declaration: lval x: R|kotlin/String|"]; + 75 [label="Exit block"]; } - 71 [label="Exit function test_3" style="filled" fillcolor=red]; + 76 [label="Exit function test_3" style="filled" fillcolor=red]; } 63 -> {64}; 64 -> {65}; - 65 -> {67 72}; - 65 -> {66} [style=dotted]; - 65 -> {72} [style=dashed]; - 66 -> {67} [color=green]; - 66 -> {68} [color=red]; + 65 -> {66 72}; + 65 -> {71} [style=dotted]; + 65 -> {66} [style=dashed]; + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; + 71 -> {72} [color=green]; + 71 -> {73} [color=red]; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {66}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot index 8dcece1862c..a00c661b982 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot @@ -189,19 +189,19 @@ digraph jumps_kt { 68 [label="Access variable R|/x|"]; 69 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; 70 [label="Jump: break@@@[Boolean(true)] "]; - 77 [label="Stub" style="filled" fillcolor=gray]; - 78 [label="Exit block" style="filled" fillcolor=gray]; + 71 [label="Stub" style="filled" fillcolor=gray]; + 72 [label="Exit block" style="filled" fillcolor=gray]; } - 79 [label="Exit loop block" style="filled" fillcolor=gray]; + 73 [label="Exit loop block" style="filled" fillcolor=gray]; } - 71 [label="Exit whileloop"]; + 74 [label="Exit whileloop"]; } - 72 [label="Access variable R|/x|"]; - 73 [label="Smart cast: R|/x|"]; - 74 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 75 [label="Exit block"]; + 75 [label="Access variable R|/x|"]; + 76 [label="Smart cast: R|/x|"]; + 77 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 78 [label="Exit block"]; } - 76 [label="Exit function test_3" style="filled" fillcolor=red]; + 79 [label="Exit function test_3" style="filled" fillcolor=red]; } 60 -> {61}; 61 -> {62}; @@ -209,21 +209,21 @@ digraph jumps_kt { 63 -> {64}; 64 -> {65}; 65 -> {66}; - 65 -> {71} [style=dotted]; + 65 -> {74} [style=dotted]; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; - 70 -> {77} [style=dotted]; - 71 -> {72}; - 72 -> {73}; - 73 -> {74}; + 70 -> {74}; + 70 -> {71} [style=dotted]; + 71 -> {72} [style=dotted]; + 72 -> {73} [style=dotted]; + 73 -> {63} [color=green style=dotted]; 74 -> {75}; 75 -> {76}; - 77 -> {78} [style=dotted]; - 78 -> {79} [style=dotted]; - 79 -> {63} [color=green style=dotted]; + 76 -> {77}; + 77 -> {78}; + 78 -> {79}; subgraph cluster_20 { color=red @@ -388,36 +388,36 @@ digraph jumps_kt { 132 [label="Postponed enter to lambda"]; subgraph cluster_39 { color=blue - 137 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 133 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_40 { color=blue - 138 [label="Enter block"]; - 139 [label="Jump: ^@run Unit"]; - 140 [label="Stub" style="filled" fillcolor=gray]; - 141 [label="Exit block" style="filled" fillcolor=gray]; + 134 [label="Enter block"]; + 135 [label="Jump: ^@run Unit"]; + 136 [label="Stub" style="filled" fillcolor=gray]; + 137 [label="Exit block" style="filled" fillcolor=gray]; } - 142 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 138 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 133 [label="Postponed exit from lambda"]; - 134 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; - 135 [label="Exit block"]; + 139 [label="Postponed exit from lambda"]; + 140 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; + 141 [label="Exit block"]; } - 136 [label="Exit function test_6" style="filled" fillcolor=red]; + 142 [label="Exit function test_6" style="filled" fillcolor=red]; } 130 -> {131}; 131 -> {132}; - 132 -> {133 134 137}; - 132 -> {137} [style=dashed]; + 132 -> {133 139 140}; + 132 -> {133} [style=dashed]; 133 -> {134}; - 133 -> {132} [color=green style=dashed]; 134 -> {135}; - 135 -> {136}; - 137 -> {138}; + 135 -> {138}; + 135 -> {136} [style=dotted]; + 136 -> {137} [style=dotted]; + 137 -> {138} [style=dotted]; 138 -> {139}; - 139 -> {142}; - 139 -> {140} [style=dotted]; - 140 -> {141} [style=dotted]; - 141 -> {142} [style=dotted]; - 142 -> {133}; + 139 -> {140}; + 139 -> {132} [color=green style=dashed]; + 140 -> {141}; + 141 -> {142}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot index 9ba5a5c2e8f..425712e5358 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot @@ -5,58 +5,58 @@ digraph lambdaAsReturnOfLambda_kt { subgraph cluster_0 { color=red - 13 [label="Enter property" style="filled" fillcolor=red]; - 14 [label="Postponed enter to lambda"]; + 0 [label="Enter property" style="filled" fillcolor=red]; + 1 [label="Postponed enter to lambda"]; subgraph cluster_1 { color=blue - 0 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 2 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - 2 [label="Exit anonymous function expression"]; + 3 [label="Enter block"]; + 4 [label="Exit anonymous function expression"]; subgraph cluster_3 { color=blue - 7 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 5 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 8 [label="Enter block"]; - 9 [label="Access variable R|/foo|"]; - 10 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 11 [label="Exit block"]; + 6 [label="Enter block"]; + 7 [label="Access variable R|/foo|"]; + 8 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 9 [label="Exit block"]; } - 12 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 10 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 3 [label="Jump: ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { + 11 [label="Jump: ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { R|/bar|(R|/foo|) } "]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Exit block" style="filled" fillcolor=gray]; + 12 [label="Stub" style="filled" fillcolor=gray]; + 13 [label="Exit block" style="filled" fillcolor=gray]; } - 6 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 14 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } 15 [label="Postponed exit from lambda"]; 16 [label="Function call: R|/run| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; 17 [label="Exit property" style="filled" fillcolor=red]; } - 13 -> {14}; - 14 -> {0 15 16}; - 14 -> {0} [style=dashed]; - 15 -> {16}; - 16 -> {17}; 0 -> {1}; - 1 -> {2}; - 2 -> {3 7}; - 2 -> {7} [style=dashed]; - 3 -> {6}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; - 5 -> {6} [style=dotted]; + 1 -> {2 15 16}; + 1 -> {2} [style=dashed]; + 2 -> {3}; + 3 -> {4}; + 4 -> {5 11}; + 4 -> {5} [style=dashed]; + 5 -> {6}; + 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {11}; - 11 -> {12}; + 11 -> {14}; + 11 -> {12} [style=dotted]; + 12 -> {13} [style=dotted]; + 13 -> {14} [style=dotted]; + 15 -> {16}; + 16 -> {17}; subgraph cluster_5 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot index d2e543e2471..a37407c0e48 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot @@ -33,20 +33,20 @@ digraph lambdaReturningObject_kt { subgraph cluster_4 { color=red - 11 [label="Enter class IrStarProjectionImpl" style="filled" fillcolor=red]; - 12 [label="Exit class IrStarProjectionImpl" style="filled" fillcolor=red]; + 8 [label="Enter class IrStarProjectionImpl" style="filled" fillcolor=red]; + 9 [label="Exit class IrStarProjectionImpl" style="filled" fillcolor=red]; } subgraph cluster_5 { color=blue - 8 [label="Enter function " style="filled" fillcolor=red]; - 9 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 10 [label="Exit function " style="filled" fillcolor=red]; + 10 [label="Enter function " style="filled" fillcolor=red]; + 11 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 12 [label="Exit function " style="filled" fillcolor=red]; } - 11 -> {12} [color=green]; - 12 -> {8} [color=green]; - 12 -> {8} [style=dashed]; - 8 -> {9}; - 9 -> {10}; + 8 -> {9} [color=green]; + 9 -> {10} [color=green]; + 9 -> {10} [style=dashed]; + 10 -> {11}; + 11 -> {12}; subgraph cluster_6 { color=red @@ -79,32 +79,32 @@ digraph lambdaReturningObject_kt { 23 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue - 29 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 24 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 30 [label="Enter block"]; - 31 [label="Access qualifier /IrStarProjectionImpl"]; - 32 [label="Exit block"]; + 25 [label="Enter block"]; + 26 [label="Access qualifier /IrStarProjectionImpl"]; + 27 [label="Exit block"]; } - 33 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 28 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 24 [label="Postponed exit from lambda"]; - 25 [label="Function call: R|/MyOut|(...)" style="filled" fillcolor=yellow]; - 26 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; + 29 [label="Postponed exit from lambda"]; + 30 [label="Function call: R|/MyOut|(...)" style="filled" fillcolor=yellow]; + 31 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 28 [label="Exit function foo" style="filled" fillcolor=red]; + 33 [label="Exit function foo" style="filled" fillcolor=red]; } 21 -> {22}; 22 -> {23}; - 23 -> {24 25 29}; - 23 -> {29} [style=dashed]; - 24 -> {25} [color=green]; - 24 -> {26} [color=red]; + 23 -> {24 29 30}; + 23 -> {24} [style=dashed]; + 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 29 -> {30}; + 29 -> {30} [color=green]; + 29 -> {31} [color=red]; 30 -> {31}; 31 -> {32}; 32 -> {33}; diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot index 80c00b77c7f..d180f967d42 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot @@ -43,27 +43,27 @@ digraph lambdas_kt { 15 [label="Postponed enter to lambda"]; subgraph cluster_7 { color=blue - 23 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 16 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 24 [label="Enter block"]; - 25 [label="Access variable R|/x|"]; - 26 [label="Smart cast: R|/x|"]; - 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Access variable R|/x|"]; + 19 [label="Smart cast: R|/x|"]; + 20 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 21 [label="Exit block"]; } - 29 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 22 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 16 [label="Postponed exit from lambda"]; - 17 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; - 18 [label="Exit block"]; + 23 [label="Postponed exit from lambda"]; + 24 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; + 25 [label="Exit block"]; } - 19 [label="Exit when branch result"]; - 20 [label="Exit when"]; + 26 [label="Exit when branch result"]; + 27 [label="Exit when"]; } - 21 [label="Exit block"]; + 28 [label="Exit block"]; } - 22 [label="Exit function test_1" style="filled" fillcolor=red]; + 29 [label="Exit function test_1" style="filled" fillcolor=red]; } 5 -> {6}; 6 -> {7}; @@ -72,25 +72,25 @@ digraph lambdas_kt { 9 -> {10}; 10 -> {11}; 11 -> {12 13}; - 12 -> {20}; + 12 -> {27}; 13 -> {14}; 14 -> {15}; - 15 -> {16 17 23}; - 15 -> {23} [style=dashed]; + 15 -> {16 23 24}; + 15 -> {16} [style=dashed]; 16 -> {17}; - 16 -> {15} [color=green style=dashed]; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; + 22 -> {23}; 23 -> {24}; + 23 -> {15} [color=green style=dashed]; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {16}; subgraph cluster_9 { color=red @@ -193,47 +193,47 @@ digraph lambdas_kt { 64 [label="Postponed enter to lambda"]; subgraph cluster_20 { color=blue - 71 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 65 [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]; + 66 [label="Enter block"]; + 67 [label="Const: Int(1)"]; + 68 [label="Jump: ^test_3 Int(1)"]; + 69 [label="Stub" style="filled" fillcolor=gray]; + 70 [label="Exit block" style="filled" fillcolor=gray]; } - 77 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; + 71 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; } - 65 [label="Postponed exit from lambda"]; - 66 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; - 67 [label="Jump: ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { + 72 [label="Postponed exit from lambda"]; + 73 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; + 74 [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]; + 75 [label="Stub" style="filled" fillcolor=gray]; + 76 [label="Exit block" style="filled" fillcolor=gray]; } - 70 [label="Exit function test_3" style="filled" fillcolor=red]; + 77 [label="Exit function test_3" style="filled" fillcolor=red]; } 62 -> {63}; 63 -> {64}; - 64 -> {65 66 71}; - 64 -> {71} [style=dashed]; + 64 -> {65 72 73}; + 64 -> {65} [style=dashed]; 65 -> {66}; - 65 -> {64} [color=green style=dashed]; 66 -> {67}; - 67 -> {70}; - 67 -> {68} [style=dotted]; + 67 -> {68}; + 68 -> {77}; 68 -> {69} [style=dotted]; 69 -> {70} [style=dotted]; - 71 -> {72}; + 70 -> {71} [style=dotted]; + 71 -> {72} [style=dotted]; 72 -> {73}; + 72 -> {64} [color=green style=dashed]; 73 -> {74}; - 74 -> {70}; + 74 -> {77}; 74 -> {75} [style=dotted]; 75 -> {76} [style=dotted]; 76 -> {77} [style=dotted]; - 77 -> {65} [style=dotted]; subgraph cluster_22 { color=red @@ -244,46 +244,46 @@ digraph lambdas_kt { 80 [label="Postponed enter to lambda"]; subgraph cluster_24 { color=blue - 87 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 81 [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]; + 82 [label="Enter block"]; + 83 [label="Const: Int(1)"]; + 84 [label="Jump: ^test_4 Int(1)"]; + 85 [label="Stub" style="filled" fillcolor=gray]; + 86 [label="Exit block" style="filled" fillcolor=gray]; } - 93 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; + 87 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; } - 81 [label="Postponed exit from lambda"]; - 82 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; - 83 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { + 88 [label="Postponed exit from lambda"]; + 89 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; + 90 [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]; + 91 [label="Stub" style="filled" fillcolor=gray]; + 92 [label="Exit block" style="filled" fillcolor=gray]; } - 86 [label="Exit function test_4" style="filled" fillcolor=red]; + 93 [label="Exit function test_4" style="filled" fillcolor=red]; } 78 -> {79}; 79 -> {80}; - 80 -> {81 82 87}; - 80 -> {87} [style=dashed]; + 80 -> {81 88 89}; + 80 -> {81} [style=dashed]; 81 -> {82}; - 81 -> {80} [color=green style=dashed]; 82 -> {83}; - 83 -> {86}; - 83 -> {84} [style=dotted]; + 83 -> {84}; + 84 -> {93}; 84 -> {85} [style=dotted]; 85 -> {86} [style=dotted]; - 87 -> {88}; + 86 -> {87} [style=dotted]; + 87 -> {88} [style=dotted]; 88 -> {89}; + 88 -> {80} [color=green style=dashed]; 89 -> {90}; - 90 -> {86}; + 90 -> {93}; 90 -> {91} [style=dotted]; 91 -> {92} [style=dotted]; 92 -> {93} [style=dotted]; - 93 -> {81} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot index d5f8c0394ec..8baf008fe8d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot @@ -56,124 +56,124 @@ digraph localClassesWithImplicit_kt { 23 [label="Enter anonymous object"]; subgraph cluster_7 { color=blue - 97 [label="Enter class " style="filled" fillcolor=red]; - 98 [label="Exit class " style="filled" fillcolor=red]; + 24 [label="Enter class " style="filled" fillcolor=red]; + 25 [label="Exit class " style="filled" fillcolor=red]; } - 24 [label="Exit anonymous object"]; - 25 [label="Exit anonymous object expression"]; - 26 [label="Variable declaration: lval x: R||"]; - 27 [label="Exit block"]; + 26 [label="Exit anonymous object"]; + 27 [label="Exit anonymous object expression"]; + 28 [label="Variable declaration: lval x: R||"]; + 29 [label="Exit block"]; } - 28 [label="Exit function test" style="filled" fillcolor=red]; + 30 [label="Exit function test" style="filled" fillcolor=red]; } subgraph cluster_8 { color=blue - 158 [label="Enter function baz" style="filled" fillcolor=red]; + 31 [label="Enter function baz" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 159 [label="Enter block"]; - 160 [label="Const: Int(1)"]; - 161 [label="Jump: ^baz Int(1)"]; - 162 [label="Stub" style="filled" fillcolor=gray]; - 163 [label="Exit block" style="filled" fillcolor=gray]; + 32 [label="Enter block"]; + 33 [label="Const: Int(1)"]; + 34 [label="Jump: ^baz Int(1)"]; + 35 [label="Stub" style="filled" fillcolor=gray]; + 36 [label="Exit block" style="filled" fillcolor=gray]; } - 164 [label="Exit function baz" style="filled" fillcolor=red]; + 37 [label="Exit function baz" style="filled" fillcolor=red]; } subgraph cluster_10 { color=blue - 139 [label="Enter function bar" style="filled" fillcolor=red]; + 38 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 140 [label="Enter block"]; - 141 [label="Postponed enter to lambda"]; + 39 [label="Enter block"]; + 40 [label="Postponed enter to lambda"]; subgraph cluster_12 { color=blue - 148 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 41 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 149 [label="Enter block"]; - 150 [label="Access variable R|/a|"]; - 151 [label="Smart cast: R|/a|"]; - 152 [label="Access variable R|kotlin/String.length|"]; - 153 [label="Access variable R|/b|"]; - 154 [label="Access variable #"]; - 155 [label="Function call: this@R|/|.R|/.baz|()" style="filled" fillcolor=yellow]; - 156 [label="Exit block"]; + 42 [label="Enter block"]; + 43 [label="Access variable R|/a|"]; + 44 [label="Smart cast: R|/a|"]; + 45 [label="Access variable R|kotlin/String.length|"]; + 46 [label="Access variable R|/b|"]; + 47 [label="Access variable #"]; + 48 [label="Function call: this@R|/|.R|/.baz|()" style="filled" fillcolor=yellow]; + 49 [label="Exit block"]; } - 157 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 50 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 142 [label="Postponed exit from lambda"]; - 143 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 144 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 51 [label="Postponed exit from lambda"]; + 52 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 53 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| R|/b|.# ^ this@R|/|.R|/.baz|() } )"]; - 145 [label="Stub" style="filled" fillcolor=gray]; - 146 [label="Exit block" style="filled" fillcolor=gray]; + 54 [label="Stub" style="filled" fillcolor=gray]; + 55 [label="Exit block" style="filled" fillcolor=gray]; } - 147 [label="Exit function bar" style="filled" fillcolor=red]; + 56 [label="Exit function bar" style="filled" fillcolor=red]; } subgraph cluster_14 { color=blue - 102 [label="Enter function foo" style="filled" fillcolor=red]; + 57 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 103 [label="Enter block"]; - 104 [label="Postponed enter to lambda"]; + 58 [label="Enter block"]; + 59 [label="Postponed enter to lambda"]; subgraph cluster_16 { color=blue - 111 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 60 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 112 [label="Enter block"]; - 113 [label="Access variable R|/a|"]; - 114 [label="Smart cast: R|/a|"]; - 115 [label="Access variable R|kotlin/String.length|"]; + 61 [label="Enter block"]; + 62 [label="Access variable R|/a|"]; + 63 [label="Smart cast: R|/a|"]; + 64 [label="Access variable R|kotlin/String.length|"]; subgraph cluster_18 { color=blue - 116 [label="Enter when"]; + 65 [label="Enter when"]; subgraph cluster_19 { color=blue - 117 [label="Enter when branch condition "]; - 118 [label="Access variable R|/b|"]; - 119 [label="Type operator: (R|/b| is R|kotlin/String|)"]; - 120 [label="Exit when branch condition"]; + 66 [label="Enter when branch condition "]; + 67 [label="Access variable R|/b|"]; + 68 [label="Type operator: (R|/b| is R|kotlin/String|)"]; + 69 [label="Exit when branch condition"]; } subgraph cluster_20 { color=blue - 121 [label="Enter when branch condition else"]; - 122 [label="Exit when branch condition"]; + 70 [label="Enter when branch condition else"]; + 71 [label="Exit when branch condition"]; } - 123 [label="Enter when branch result"]; + 72 [label="Enter when branch result"]; subgraph cluster_21 { color=blue - 124 [label="Enter block"]; - 125 [label="Const: Int(1)"]; - 126 [label="Exit block"]; + 73 [label="Enter block"]; + 74 [label="Const: Int(1)"]; + 75 [label="Exit block"]; } - 127 [label="Exit when branch result"]; - 128 [label="Enter when branch result"]; + 76 [label="Exit when branch result"]; + 77 [label="Enter when branch result"]; subgraph cluster_22 { color=blue - 129 [label="Enter block"]; - 130 [label="Access variable R|/b|"]; - 131 [label="Smart cast: R|/b|"]; - 132 [label="Access variable R|kotlin/String.length|"]; - 133 [label="Function call: this@R|/|.R|/.bar|()" style="filled" fillcolor=yellow]; - 134 [label="Exit block"]; + 78 [label="Enter block"]; + 79 [label="Access variable R|/b|"]; + 80 [label="Smart cast: R|/b|"]; + 81 [label="Access variable R|kotlin/String.length|"]; + 82 [label="Function call: this@R|/|.R|/.bar|()" style="filled" fillcolor=yellow]; + 83 [label="Exit block"]; } - 135 [label="Exit when branch result"]; - 136 [label="Exit when"]; + 84 [label="Exit when branch result"]; + 85 [label="Exit when"]; } - 137 [label="Exit block"]; + 86 [label="Exit block"]; } - 138 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 87 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 105 [label="Postponed exit from lambda"]; - 106 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 107 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 88 [label="Postponed exit from lambda"]; + 89 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 90 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -187,130 +187,130 @@ digraph localClassesWithImplicit_kt { } )"]; - 108 [label="Stub" style="filled" fillcolor=gray]; - 109 [label="Exit block" style="filled" fillcolor=gray]; + 91 [label="Stub" style="filled" fillcolor=gray]; + 92 [label="Exit block" style="filled" fillcolor=gray]; } - 110 [label="Exit function foo" style="filled" fillcolor=red]; + 93 [label="Exit function foo" style="filled" fillcolor=red]; } subgraph cluster_23 { color=blue - 99 [label="Enter function " style="filled" fillcolor=red]; - 100 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 101 [label="Exit function " style="filled" fillcolor=red]; + 94 [label="Enter function " style="filled" fillcolor=red]; + 95 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 96 [label="Exit function " style="filled" fillcolor=red]; } subgraph cluster_24 { color=blue - 29 [label="Enter class A" style="filled" fillcolor=red]; - 30 [label="Exit class A" style="filled" fillcolor=red]; + 97 [label="Enter class A" style="filled" fillcolor=red]; + 98 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_25 { color=blue - 90 [label="Enter function baz" style="filled" fillcolor=red]; + 99 [label="Enter function baz" style="filled" fillcolor=red]; subgraph cluster_26 { color=blue - 91 [label="Enter block"]; - 92 [label="Const: Int(1)"]; - 93 [label="Jump: ^baz Int(1)"]; - 94 [label="Stub" style="filled" fillcolor=gray]; - 95 [label="Exit block" style="filled" fillcolor=gray]; + 100 [label="Enter block"]; + 101 [label="Const: Int(1)"]; + 102 [label="Jump: ^baz Int(1)"]; + 103 [label="Stub" style="filled" fillcolor=gray]; + 104 [label="Exit block" style="filled" fillcolor=gray]; } - 96 [label="Exit function baz" style="filled" fillcolor=red]; + 105 [label="Exit function baz" style="filled" fillcolor=red]; } subgraph cluster_27 { color=blue - 71 [label="Enter function bar" style="filled" fillcolor=red]; + 106 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_28 { color=blue - 72 [label="Enter block"]; - 73 [label="Postponed enter to lambda"]; + 107 [label="Enter block"]; + 108 [label="Postponed enter to lambda"]; subgraph cluster_29 { color=blue - 80 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 109 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_30 { color=blue - 81 [label="Enter block"]; - 82 [label="Access variable R|/b|"]; - 83 [label="Access variable #"]; - 84 [label="Access variable R|/a|"]; - 85 [label="Smart cast: R|/a|"]; - 86 [label="Access variable R|kotlin/String.length|"]; - 87 [label="Function call: this@R|/A|.R|/baz|()" style="filled" fillcolor=yellow]; - 88 [label="Exit block"]; + 110 [label="Enter block"]; + 111 [label="Access variable R|/b|"]; + 112 [label="Access variable #"]; + 113 [label="Access variable R|/a|"]; + 114 [label="Smart cast: R|/a|"]; + 115 [label="Access variable R|kotlin/String.length|"]; + 116 [label="Function call: this@R|/A|.R|/baz|()" style="filled" fillcolor=yellow]; + 117 [label="Exit block"]; } - 89 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 118 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 74 [label="Postponed exit from lambda"]; - 75 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 76 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 119 [label="Postponed exit from lambda"]; + 120 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 121 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/b|.# R|/a|.R|kotlin/String.length| ^ this@R|/A|.R|/baz|() } )"]; - 77 [label="Stub" style="filled" fillcolor=gray]; - 78 [label="Exit block" style="filled" fillcolor=gray]; + 122 [label="Stub" style="filled" fillcolor=gray]; + 123 [label="Exit block" style="filled" fillcolor=gray]; } - 79 [label="Exit function bar" style="filled" fillcolor=red]; + 124 [label="Exit function bar" style="filled" fillcolor=red]; } subgraph cluster_31 { color=blue - 34 [label="Enter function foo" style="filled" fillcolor=red]; + 125 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_32 { color=blue - 35 [label="Enter block"]; - 36 [label="Postponed enter to lambda"]; + 126 [label="Enter block"]; + 127 [label="Postponed enter to lambda"]; subgraph cluster_33 { color=blue - 43 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 128 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_34 { color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/a|"]; - 46 [label="Smart cast: R|/a|"]; - 47 [label="Access variable R|kotlin/String.length|"]; + 129 [label="Enter block"]; + 130 [label="Access variable R|/a|"]; + 131 [label="Smart cast: R|/a|"]; + 132 [label="Access variable R|kotlin/String.length|"]; subgraph cluster_35 { color=blue - 48 [label="Enter when"]; + 133 [label="Enter when"]; subgraph cluster_36 { color=blue - 49 [label="Enter when branch condition "]; - 50 [label="Access variable R|/b|"]; - 51 [label="Type operator: (R|/b| is R|kotlin/String|)"]; - 52 [label="Exit when branch condition"]; + 134 [label="Enter when branch condition "]; + 135 [label="Access variable R|/b|"]; + 136 [label="Type operator: (R|/b| is R|kotlin/String|)"]; + 137 [label="Exit when branch condition"]; } subgraph cluster_37 { color=blue - 53 [label="Enter when branch condition else"]; - 54 [label="Exit when branch condition"]; + 138 [label="Enter when branch condition else"]; + 139 [label="Exit when branch condition"]; } - 55 [label="Enter when branch result"]; + 140 [label="Enter when branch result"]; subgraph cluster_38 { color=blue - 56 [label="Enter block"]; - 57 [label="Const: Int(1)"]; - 58 [label="Exit block"]; + 141 [label="Enter block"]; + 142 [label="Const: Int(1)"]; + 143 [label="Exit block"]; } - 59 [label="Exit when branch result"]; - 60 [label="Enter when branch result"]; + 144 [label="Exit when branch result"]; + 145 [label="Enter when branch result"]; subgraph cluster_39 { color=blue - 61 [label="Enter block"]; - 62 [label="Access variable R|/b|"]; - 63 [label="Smart cast: R|/b|"]; - 64 [label="Access variable R|kotlin/String.length|"]; - 65 [label="Function call: this@R|/A|.R|/bar|()" style="filled" fillcolor=yellow]; - 66 [label="Exit block"]; + 146 [label="Enter block"]; + 147 [label="Access variable R|/b|"]; + 148 [label="Smart cast: R|/b|"]; + 149 [label="Access variable R|kotlin/String.length|"]; + 150 [label="Function call: this@R|/A|.R|/bar|()" style="filled" fillcolor=yellow]; + 151 [label="Exit block"]; } - 67 [label="Exit when branch result"]; - 68 [label="Exit when"]; + 152 [label="Exit when branch result"]; + 153 [label="Exit when"]; } - 69 [label="Exit block"]; + 154 [label="Exit block"]; } - 70 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 155 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 37 [label="Postponed exit from lambda"]; - 38 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 39 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 156 [label="Postponed exit from lambda"]; + 157 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 158 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -324,16 +324,16 @@ digraph localClassesWithImplicit_kt { } )"]; - 40 [label="Stub" style="filled" fillcolor=gray]; - 41 [label="Exit block" style="filled" fillcolor=gray]; + 159 [label="Stub" style="filled" fillcolor=gray]; + 160 [label="Exit block" style="filled" fillcolor=gray]; } - 42 [label="Exit function foo" style="filled" fillcolor=red]; + 161 [label="Exit function foo" style="filled" fillcolor=red]; } subgraph cluster_40 { color=blue - 31 [label="Enter function " style="filled" fillcolor=red]; - 32 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 33 [label="Exit function " style="filled" fillcolor=red]; + 162 [label="Enter function " style="filled" fillcolor=red]; + 163 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 164 [label="Exit function " style="filled" fillcolor=red]; } 7 -> {8}; 8 -> {9}; @@ -345,38 +345,38 @@ digraph localClassesWithImplicit_kt { 14 -> {21}; 15 -> {16}; 16 -> {17}; - 17 -> {28}; + 17 -> {30}; 17 -> {18} [style=dotted]; 18 -> {19} [style=dotted]; 19 -> {20} [style=dotted]; 20 -> {21} [style=dotted]; 21 -> {22}; - 22 -> {23 29}; - 22 -> {29} [style=dashed]; - 23 -> {97}; - 23 -> {24} [color=red]; - 23 -> {97} [style=dashed]; - 24 -> {25}; - 25 -> {26}; + 22 -> {23 97}; + 22 -> {97} [style=dashed]; + 23 -> {24}; + 23 -> {26} [color=red]; + 23 -> {24} [style=dashed]; + 24 -> {25} [color=green]; + 24 -> {31 38 57 94} [color=red]; + 25 -> {26 31 38 57 94} [color=green]; + 25 -> {31 38 57 94} [style=dashed]; 26 -> {27}; 27 -> {28}; - 29 -> {30} [color=green]; - 29 -> {31 34 71 90} [color=red]; - 30 -> {31 34 71 90} [color=green]; - 30 -> {31 34 71 90} [style=dashed]; + 28 -> {29}; + 29 -> {30}; 31 -> {32}; 32 -> {33}; - 34 -> {35}; - 35 -> {36}; - 36 -> {37 38 43}; - 36 -> {43} [style=dashed]; - 37 -> {38}; - 37 -> {36} [color=green style=dashed]; + 33 -> {34}; + 34 -> {37}; + 34 -> {35} [style=dotted]; + 35 -> {36} [style=dotted]; + 36 -> {37} [style=dotted]; 38 -> {39}; - 39 -> {42}; - 39 -> {40} [style=dotted]; - 40 -> {41} [style=dotted]; - 41 -> {42} [style=dotted]; + 39 -> {40}; + 40 -> {41 51 52}; + 40 -> {41} [style=dashed]; + 41 -> {42}; + 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; @@ -386,14 +386,16 @@ digraph localClassesWithImplicit_kt { 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {53 60}; - 53 -> {54}; - 54 -> {55}; - 55 -> {56}; - 56 -> {57}; + 51 -> {40} [color=green style=dashed]; + 52 -> {53}; + 53 -> {56}; + 53 -> {54} [style=dotted]; + 54 -> {55} [style=dotted]; + 55 -> {56} [style=dotted]; 57 -> {58}; 58 -> {59}; - 59 -> {68}; + 59 -> {60 88 89}; + 59 -> {60} [style=dashed]; 60 -> {61}; 61 -> {62}; 62 -> {63}; @@ -403,19 +405,17 @@ digraph localClassesWithImplicit_kt { 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {70}; - 70 -> {37}; + 69 -> {70 77}; + 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {74 75 80}; - 73 -> {80} [style=dashed]; + 73 -> {74}; 74 -> {75}; - 74 -> {73} [color=green style=dashed]; 75 -> {76}; - 76 -> {79}; - 76 -> {77} [style=dotted]; - 77 -> {78} [style=dotted]; - 78 -> {79} [style=dotted]; + 76 -> {85}; + 77 -> {78}; + 78 -> {79}; + 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; @@ -425,31 +425,31 @@ digraph localClassesWithImplicit_kt { 86 -> {87}; 87 -> {88}; 88 -> {89}; - 89 -> {74}; - 90 -> {91}; - 91 -> {92}; - 92 -> {93}; - 93 -> {96}; - 93 -> {94} [style=dotted]; - 94 -> {95} [style=dotted]; - 95 -> {96} [style=dotted]; + 88 -> {59} [color=green style=dashed]; + 89 -> {90}; + 90 -> {93}; + 90 -> {91} [style=dotted]; + 91 -> {92} [style=dotted]; + 92 -> {93} [style=dotted]; + 94 -> {95}; + 95 -> {96}; 97 -> {98} [color=green]; - 97 -> {99 102 139 158} [color=red]; - 98 -> {24 99 102 139 158} [color=green]; - 98 -> {99 102 139 158} [style=dashed]; + 97 -> {99 106 125 162} [color=red]; + 98 -> {99 106 125 162} [color=green]; + 98 -> {99 106 125 162} [style=dashed]; 99 -> {100}; 100 -> {101}; - 102 -> {103}; - 103 -> {104}; - 104 -> {105 106 111}; - 104 -> {111} [style=dashed]; - 105 -> {106}; - 105 -> {104} [color=green style=dashed]; + 101 -> {102}; + 102 -> {105}; + 102 -> {103} [style=dotted]; + 103 -> {104} [style=dotted]; + 104 -> {105} [style=dotted]; 106 -> {107}; - 107 -> {110}; - 107 -> {108} [style=dotted]; - 108 -> {109} [style=dotted]; - 109 -> {110} [style=dotted]; + 107 -> {108}; + 108 -> {109 119 120}; + 108 -> {109} [style=dashed]; + 109 -> {110}; + 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; @@ -459,14 +459,16 @@ digraph localClassesWithImplicit_kt { 117 -> {118}; 118 -> {119}; 119 -> {120}; - 120 -> {121 128}; - 121 -> {122}; - 122 -> {123}; - 123 -> {124}; - 124 -> {125}; + 119 -> {108} [color=green style=dashed]; + 120 -> {121}; + 121 -> {124}; + 121 -> {122} [style=dotted]; + 122 -> {123} [style=dotted]; + 123 -> {124} [style=dotted]; 125 -> {126}; 126 -> {127}; - 127 -> {136}; + 127 -> {128 156 157}; + 127 -> {128} [style=dashed]; 128 -> {129}; 129 -> {130}; 130 -> {131}; @@ -476,19 +478,17 @@ digraph localClassesWithImplicit_kt { 134 -> {135}; 135 -> {136}; 136 -> {137}; - 137 -> {138}; - 138 -> {105}; + 137 -> {138 145}; + 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {142 143 148}; - 141 -> {148} [style=dashed]; + 141 -> {142}; 142 -> {143}; - 142 -> {141} [color=green style=dashed]; 143 -> {144}; - 144 -> {147}; - 144 -> {145} [style=dotted]; - 145 -> {146} [style=dotted]; - 146 -> {147} [style=dotted]; + 144 -> {153}; + 145 -> {146}; + 146 -> {147}; + 147 -> {148}; 148 -> {149}; 149 -> {150}; 150 -> {151}; @@ -498,13 +498,13 @@ digraph localClassesWithImplicit_kt { 154 -> {155}; 155 -> {156}; 156 -> {157}; - 157 -> {142}; - 158 -> {159}; - 159 -> {160}; - 160 -> {161}; - 161 -> {164}; - 161 -> {162} [style=dotted]; - 162 -> {163} [style=dotted]; - 163 -> {164} [style=dotted]; + 156 -> {127} [color=green style=dashed]; + 157 -> {158}; + 158 -> {161}; + 158 -> {159} [style=dotted]; + 159 -> {160} [style=dotted]; + 160 -> {161} [style=dotted]; + 162 -> {163}; + 163 -> {164}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot index 85f8c3ce929..9609d333ea7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot @@ -276,22 +276,22 @@ digraph loops_kt { color=blue 94 [label="Enter block"]; 95 [label="Jump: break@@@[Boolean(true)] "]; - 100 [label="Stub" style="filled" fillcolor=gray]; - 101 [label="Exit block" style="filled" fillcolor=gray]; + 96 [label="Stub" style="filled" fillcolor=gray]; + 97 [label="Exit block" style="filled" fillcolor=gray]; } - 102 [label="Exit when branch result" style="filled" fillcolor=gray]; - 103 [label="Exit when"]; + 98 [label="Exit when branch result" style="filled" fillcolor=gray]; + 99 [label="Exit when"]; } - 104 [label="Exit block"]; + 100 [label="Exit block"]; } - 105 [label="Exit loop block"]; + 101 [label="Exit loop block"]; } - 96 [label="Exit whileloop"]; + 102 [label="Exit whileloop"]; } - 97 [label="Const: Int(1)"]; - 98 [label="Exit block"]; + 103 [label="Const: Int(1)"]; + 104 [label="Exit block"]; } - 99 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red]; + 105 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red]; } 80 -> {81}; 81 -> {82}; @@ -299,27 +299,27 @@ digraph loops_kt { 83 -> {84}; 84 -> {85}; 85 -> {86}; - 85 -> {96} [style=dotted]; + 85 -> {102} [style=dotted]; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92 93}; - 92 -> {103}; + 92 -> {99}; 93 -> {94}; 94 -> {95}; - 95 -> {96}; - 95 -> {100} [style=dotted]; - 96 -> {97}; - 97 -> {98}; - 98 -> {99}; - 100 -> {101} [style=dotted]; - 101 -> {102} [style=dotted]; - 102 -> {103} [style=dotted]; + 95 -> {102}; + 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; + 97 -> {98} [style=dotted]; + 98 -> {99} [style=dotted]; + 99 -> {100}; + 100 -> {101}; + 101 -> {83} [color=green style=dashed]; + 102 -> {103}; 103 -> {104}; 104 -> {105}; - 105 -> {83} [color=green style=dashed]; subgraph cluster_34 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot index c73bb38af45..608b9b80cd1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot @@ -5,107 +5,107 @@ digraph postponedLambdaInConstructor_kt { subgraph cluster_0 { color=red - 3 [label="Enter class A" style="filled" fillcolor=red]; - 4 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 2 [label="Enter function " style="filled" fillcolor=red]; + 3 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 4 [label="Exit function " style="filled" fillcolor=red]; } - 3 -> {4} [color=green]; - 4 -> {0} [color=green]; - 4 -> {0} [style=dashed]; - 0 -> {1}; - 1 -> {2}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; + 3 -> {4}; subgraph cluster_2 { color=red - 30 [label="Enter class B" style="filled" fillcolor=red]; - 31 [label="Part of class initialization"]; + 5 [label="Enter class B" style="filled" fillcolor=red]; + 6 [label="Part of class initialization"]; subgraph cluster_3 { color=blue - 22 [label="Enter property" style="filled" fillcolor=red]; - 23 [label="Access variable R|/s|"]; - 24 [label="Exit property" style="filled" fillcolor=red]; + 7 [label="Enter property" style="filled" fillcolor=red]; + 8 [label="Access variable R|/s|"]; + 9 [label="Exit property" style="filled" fillcolor=red]; } - 32 [label="Exit class B" style="filled" fillcolor=red]; + 10 [label="Exit class B" style="filled" fillcolor=red]; } subgraph cluster_4 { color=blue - 25 [label="Enter function foo" style="filled" fillcolor=red]; + 11 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 26 [label="Enter block"]; - 27 [label="Function call: this@R|/B|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; + 12 [label="Enter block"]; + 13 [label="Function call: this@R|/B|.R|/B.foo|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; } - 29 [label="Exit function foo" style="filled" fillcolor=red]; + 15 [label="Exit function foo" style="filled" fillcolor=red]; } subgraph cluster_6 { color=blue - 5 [label="Enter function " style="filled" fillcolor=red]; - 6 [label="Access variable R|/s|"]; - 7 [label="Postponed enter to lambda"]; + 16 [label="Enter function " style="filled" fillcolor=red]; + 17 [label="Access variable R|/s|"]; + 18 [label="Postponed enter to lambda"]; subgraph cluster_7 { color=blue - 12 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 19 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 13 [label="Enter block"]; - 14 [label="Exit anonymous function expression"]; + 20 [label="Enter block"]; + 21 [label="Exit anonymous function expression"]; subgraph cluster_9 { color=blue - 17 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 22 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 18 [label="Enter block"]; - 19 [label="Access variable R|/it|"]; - 20 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Access variable R|/it|"]; + 25 [label="Exit block"]; } - 21 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 26 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 15 [label="Exit block"]; + 27 [label="Exit block"]; } - 16 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 28 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 8 [label="Postponed exit from lambda"]; - 9 [label="Function call: R|/s|.R|kotlin/let| kotlin/String|>(...)" style="filled" fillcolor=yellow]; - 10 [label="Delegated constructor call: super(...)" style="filled" fillcolor=yellow]; - 11 [label="Exit function " style="filled" fillcolor=red]; + 29 [label="Postponed exit from lambda"]; + 30 [label="Function call: R|/s|.R|kotlin/let| kotlin/String|>(...)" style="filled" fillcolor=yellow]; + 31 [label="Delegated constructor call: super(...)" style="filled" fillcolor=yellow]; + 32 [label="Exit function " style="filled" fillcolor=red]; } - 30 -> {31} [color=green]; - 31 -> {22} [color=green]; - 31 -> {32} [style=dotted]; - 31 -> {22} [style=dashed]; - 32 -> {5 25} [color=green]; - 32 -> {5 25} [style=dashed]; - 22 -> {23}; - 23 -> {24}; - 24 -> {32} [color=green]; - 5 -> {6}; - 6 -> {7}; - 7 -> {9 12}; - 7 -> {8} [style=dotted]; - 7 -> {12} [style=dashed]; - 8 -> {9} [color=green]; - 8 -> {10} [color=red]; - 9 -> {10}; - 10 -> {11}; + 5 -> {6} [color=green]; + 6 -> {7} [color=green]; + 6 -> {10} [style=dotted]; + 6 -> {7} [style=dashed]; + 7 -> {8}; + 8 -> {9}; + 9 -> {10} [color=green]; + 10 -> {11 16} [color=green]; + 10 -> {11 16} [style=dashed]; + 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15 17}; - 14 -> {17} [style=dashed]; - 15 -> {16}; - 16 -> {8}; + 14 -> {15}; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; + 18 -> {19 30}; + 18 -> {29} [style=dotted]; + 18 -> {19} [style=dashed]; 19 -> {20}; 20 -> {21}; + 21 -> {22 27}; + 21 -> {22} [style=dashed]; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; 25 -> {26}; - 26 -> {27}; 27 -> {28}; 28 -> {29}; + 29 -> {30} [color=green]; + 29 -> {31} [color=red]; + 30 -> {31}; + 31 -> {32}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot index f8335db48da..f6daa8a81bf 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot @@ -5,20 +5,20 @@ digraph postponedLambdaInReturn_kt { subgraph cluster_0 { color=red - 3 [label="Enter class Lateinit" style="filled" fillcolor=red]; - 4 [label="Exit class Lateinit" style="filled" fillcolor=red]; + 0 [label="Enter class Lateinit" style="filled" fillcolor=red]; + 1 [label="Exit class Lateinit" style="filled" fillcolor=red]; } subgraph cluster_1 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 2 [label="Enter function " style="filled" fillcolor=red]; + 3 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 4 [label="Exit function " style="filled" fillcolor=red]; } - 3 -> {4} [color=green]; - 4 -> {0} [color=green]; - 4 -> {0} [style=dashed]; - 0 -> {1}; - 1 -> {2}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; + 3 -> {4}; subgraph cluster_2 { color=red @@ -56,441 +56,441 @@ digraph postponedLambdaInReturn_kt { subgraph cluster_5 { color=red - 25 [label="Enter property" style="filled" fillcolor=red]; - 26 [label="Const: Boolean(false)"]; - 27 [label="Exit property" style="filled" fillcolor=red]; + 17 [label="Enter property" style="filled" fillcolor=red]; + 18 [label="Const: Boolean(false)"]; + 19 [label="Exit property" style="filled" fillcolor=red]; } - 25 -> {26}; - 26 -> {27}; + 17 -> {18}; + 18 -> {19}; subgraph cluster_6 { color=red - 28 [label="Enter function test1" style="filled" fillcolor=red]; + 20 [label="Enter function test1" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 29 [label="Enter block"]; - 30 [label="Const: Null(null)"]; - 31 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 32 [label="Postponed enter to lambda"]; + 21 [label="Enter block"]; + 22 [label="Const: Null(null)"]; + 23 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + 24 [label="Postponed enter to lambda"]; subgraph cluster_8 { color=blue - 40 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 25 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 41 [label="Enter block"]; + 26 [label="Enter block"]; subgraph cluster_10 { color=blue - 42 [label="Enter when"]; + 27 [label="Enter when"]; subgraph cluster_11 { color=blue - 43 [label="Enter when branch condition "]; - 44 [label="Access variable R|/p|"]; - 45 [label="Exit when branch condition"]; + 28 [label="Enter when branch condition "]; + 29 [label="Access variable R|/p|"]; + 30 [label="Exit when branch condition"]; } subgraph cluster_12 { color=blue - 46 [label="Enter when branch condition else"]; - 47 [label="Exit when branch condition"]; + 31 [label="Enter when branch condition else"]; + 32 [label="Exit when branch condition"]; } - 48 [label="Enter when branch result"]; + 33 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 49 [label="Enter block"]; - 50 [label="Const: String()"]; - 51 [label="Jump: ^@run String()"]; - 52 [label="Stub" style="filled" fillcolor=gray]; - 53 [label="Exit block" style="filled" fillcolor=gray]; + 34 [label="Enter block"]; + 35 [label="Const: String()"]; + 36 [label="Jump: ^@run String()"]; + 37 [label="Stub" style="filled" fillcolor=gray]; + 38 [label="Exit block" style="filled" fillcolor=gray]; } - 54 [label="Exit when branch result" style="filled" fillcolor=gray]; - 55 [label="Enter when branch result"]; + 39 [label="Exit when branch result" style="filled" fillcolor=gray]; + 40 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 56 [label="Enter block"]; - 57 [label="Postponed enter to lambda"]; + 41 [label="Enter block"]; + 42 [label="Postponed enter to lambda"]; subgraph cluster_15 { color=blue - 67 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 43 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_16 { color=blue - 68 [label="Enter block"]; - 69 [label="Access variable R|/y|"]; - 70 [label="Type operator: (R|/y| as R|kotlin/String|)"]; - 71 [label="Const: String(...)"]; - 72 [label="Assignment: R|SubstitutionOverride|"]; - 73 [label="Exit block"]; + 44 [label="Enter block"]; + 45 [label="Access variable R|/y|"]; + 46 [label="Type operator: (R|/y| as R|kotlin/String|)"]; + 47 [label="Const: String(...)"]; + 48 [label="Assignment: R|SubstitutionOverride|"]; + 49 [label="Exit block"]; } - 74 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 50 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 58 [label="Postponed exit from lambda"]; - 59 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; - 60 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { + 51 [label="Postponed exit from lambda"]; + 52 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; + 53 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { (R|/y| as R|kotlin/String|) this@R|special/anonymous|.R|SubstitutionOverride| = String(...) } )"]; - 61 [label="Stub" style="filled" fillcolor=gray]; - 62 [label="Exit block" style="filled" fillcolor=gray]; + 54 [label="Stub" style="filled" fillcolor=gray]; + 55 [label="Exit block" style="filled" fillcolor=gray]; } - 63 [label="Exit when branch result" style="filled" fillcolor=gray]; - 64 [label="Exit when" style="filled" fillcolor=gray]; + 56 [label="Exit when branch result" style="filled" fillcolor=gray]; + 57 [label="Exit when" style="filled" fillcolor=gray]; } - 65 [label="Exit block" style="filled" fillcolor=gray]; + 58 [label="Exit block" style="filled" fillcolor=gray]; } - 66 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 59 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 33 [label="Postponed exit from lambda"]; - 34 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 35 [label="Variable declaration: lval x: R|kotlin/String|"]; - 36 [label="Access variable R|/y|"]; - 37 [label="Access variable R|kotlin/String.length#|"]; - 38 [label="Exit block"]; + 60 [label="Postponed exit from lambda"]; + 61 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 62 [label="Variable declaration: lval x: R|kotlin/String|"]; + 63 [label="Access variable R|/y|"]; + 64 [label="Access variable R|kotlin/String.length#|"]; + 65 [label="Exit block"]; } - 39 [label="Exit function test1" style="filled" fillcolor=red]; + 66 [label="Exit function test1" style="filled" fillcolor=red]; } + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25 61}; + 24 -> {60} [style=dotted]; + 24 -> {25} [style=dashed]; + 25 -> {26}; + 26 -> {27}; + 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {31 40}; 31 -> {32}; - 32 -> {34 40}; - 32 -> {33} [style=dotted]; - 32 -> {40} [style=dashed]; + 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37}; - 37 -> {38}; - 38 -> {39}; + 36 -> {59}; + 36 -> {37} [style=dotted]; + 37 -> {38} [style=dotted]; + 38 -> {39} [style=dotted]; + 39 -> {57} [style=dotted]; 40 -> {41}; 41 -> {42}; - 42 -> {43}; + 42 -> {43 52}; + 42 -> {51} [style=dotted]; + 42 -> {43} [style=dashed]; 43 -> {44}; 44 -> {45}; - 45 -> {46 55}; + 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {66}; - 51 -> {52} [style=dotted]; - 52 -> {53} [style=dotted]; + 51 -> {52} [color=green]; + 52 -> {53}; + 53 -> {59}; 53 -> {54} [style=dotted]; - 54 -> {64} [style=dotted]; - 55 -> {56}; - 56 -> {57}; - 57 -> {59 67}; + 54 -> {55} [style=dotted]; + 55 -> {56} [style=dotted]; + 56 -> {57} [style=dotted]; 57 -> {58} [style=dotted]; - 57 -> {67} [style=dashed]; - 58 -> {59} [color=green]; + 58 -> {59} [style=dotted]; 59 -> {60}; - 60 -> {66}; - 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; - 62 -> {63} [style=dotted]; - 63 -> {64} [style=dotted]; - 64 -> {65} [style=dotted]; - 65 -> {66} [style=dotted]; - 66 -> {33}; + 60 -> {61}; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; + 64 -> {65}; + 65 -> {66}; + + subgraph cluster_17 { + color=red + 67 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 68 [label="Enter block"]; + 69 [label="Postponed enter to lambda"]; + subgraph cluster_19 { + color=blue + 70 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 71 [label="Enter block"]; + subgraph cluster_21 { + color=blue + 72 [label="Enter while loop"]; + subgraph cluster_22 { + color=blue + 73 [label="Enter loop condition"]; + 74 [label="Const: Boolean(true)"]; + 75 [label="Exit loop condition"]; + } + subgraph cluster_23 { + color=blue + 76 [label="Enter loop block"]; + subgraph cluster_24 { + color=blue + 77 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 78 [label="Try expression enter"]; + subgraph cluster_26 { + color=blue + 79 [label="Try main block enter"]; + subgraph cluster_27 { + color=blue + 80 [label="Enter block"]; + 81 [label="Postponed enter to lambda"]; + subgraph cluster_28 { + color=blue + 82 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 83 [label="Enter block"]; + 84 [label="Const: String(...)"]; + 85 [label="Assignment: R|SubstitutionOverride|"]; + 86 [label="Exit block"]; + } + 87 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 88 [label="Postponed exit from lambda"]; + 89 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; + 90 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|SubstitutionOverride| = String(...) +} +)"]; + 91 [label="Stub" style="filled" fillcolor=gray]; + 92 [label="Exit block" style="filled" fillcolor=gray]; + } + 93 [label="Try main block exit" style="filled" fillcolor=gray]; + } + subgraph cluster_30 { + color=blue + 94 [label="Catch enter"]; + 95 [label="Variable declaration: e: R|kotlin/Throwable|"]; + subgraph cluster_31 { + color=blue + 96 [label="Enter block"]; + 97 [label="Exit block"]; + } + 98 [label="Catch exit"]; + } + 99 [label="Try expression exit"]; + } + 100 [label="Exit block"]; + } + 101 [label="Exit loop block"]; + } + 102 [label="Exit whileloop" style="filled" fillcolor=gray]; + } + 103 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + 104 [label="Throw: throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + 105 [label="Stub" style="filled" fillcolor=gray]; + 106 [label="Exit block" style="filled" fillcolor=gray]; + } + 107 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 108 [label="Postponed exit from lambda"]; + 109 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 110 [label="Variable declaration: lval x: R|kotlin/String|"]; + 111 [label="Access variable R|/x|"]; + 112 [label="Access variable R|kotlin/String.length|"]; + 113 [label="Exit block"]; + } + 114 [label="Exit function test2" style="filled" fillcolor=red]; + } 67 -> {68}; 68 -> {69}; - 69 -> {70}; + 69 -> {70 109}; + 69 -> {108} [style=dotted]; + 69 -> {70} [style=dashed]; 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; - 74 -> {58}; - - subgraph cluster_17 { - color=red - 75 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 76 [label="Enter block"]; - 77 [label="Postponed enter to lambda"]; - subgraph cluster_19 { - color=blue - 85 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_20 { - color=blue - 86 [label="Enter block"]; - subgraph cluster_21 { - color=blue - 87 [label="Enter while loop"]; - subgraph cluster_22 { - color=blue - 88 [label="Enter loop condition"]; - 89 [label="Const: Boolean(true)"]; - 90 [label="Exit loop condition"]; - } - subgraph cluster_23 { - color=blue - 91 [label="Enter loop block"]; - subgraph cluster_24 { - color=blue - 92 [label="Enter block"]; - subgraph cluster_25 { - color=blue - 93 [label="Try expression enter"]; - subgraph cluster_26 { - color=blue - 94 [label="Try main block enter"]; - subgraph cluster_27 { - color=blue - 95 [label="Enter block"]; - 96 [label="Postponed enter to lambda"]; - subgraph cluster_28 { - color=blue - 117 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 118 [label="Enter block"]; - 119 [label="Const: String(...)"]; - 120 [label="Assignment: R|SubstitutionOverride|"]; - 121 [label="Exit block"]; - } - 122 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 97 [label="Postponed exit from lambda"]; - 98 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; - 99 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { - this@R|special/anonymous|.R|SubstitutionOverride| = String(...) -} -)"]; - 100 [label="Stub" style="filled" fillcolor=gray]; - 101 [label="Exit block" style="filled" fillcolor=gray]; - } - 102 [label="Try main block exit" style="filled" fillcolor=gray]; - } - subgraph cluster_30 { - color=blue - 103 [label="Catch enter"]; - 104 [label="Variable declaration: e: R|kotlin/Throwable|"]; - subgraph cluster_31 { - color=blue - 105 [label="Enter block"]; - 106 [label="Exit block"]; - } - 107 [label="Catch exit"]; - } - 108 [label="Try expression exit"]; - } - 109 [label="Exit block"]; - } - 110 [label="Exit loop block"]; - } - 111 [label="Exit whileloop" style="filled" fillcolor=gray]; - } - 112 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; - 113 [label="Throw: throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; - 114 [label="Stub" style="filled" fillcolor=gray]; - 115 [label="Exit block" style="filled" fillcolor=gray]; - } - 116 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 78 [label="Postponed exit from lambda"]; - 79 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 80 [label="Variable declaration: lval x: R|kotlin/String|"]; - 81 [label="Access variable R|/x|"]; - 82 [label="Access variable R|kotlin/String.length|"]; - 83 [label="Exit block"]; - } - 84 [label="Exit function test2" style="filled" fillcolor=red]; - } + 74 -> {75}; 75 -> {76}; + 75 -> {102} [style=dotted]; 76 -> {77}; - 77 -> {79 85}; - 77 -> {78} [style=dotted]; - 77 -> {85} [style=dashed]; - 78 -> {79}; + 77 -> {78}; + 78 -> {79 94}; 79 -> {80}; 80 -> {81}; - 81 -> {82}; + 81 -> {82 89}; + 81 -> {88} [style=dotted]; + 81 -> {82} [style=dashed]; 82 -> {83}; 83 -> {84}; + 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {89}; + 88 -> {89} [color=green]; 89 -> {90}; - 90 -> {91}; - 90 -> {111} [style=dotted]; - 91 -> {92}; - 92 -> {93}; - 93 -> {94 103}; + 90 -> {107}; + 90 -> {91} [style=dotted]; + 91 -> {92} [style=dotted]; + 92 -> {93} [style=dotted]; + 93 -> {94 99} [style=dotted]; 94 -> {95}; 95 -> {96}; - 96 -> {98 117}; - 96 -> {97} [style=dotted]; - 96 -> {117} [style=dashed]; - 97 -> {98} [color=green]; + 96 -> {97}; + 97 -> {98}; 98 -> {99}; - 99 -> {116}; - 99 -> {100} [style=dotted]; - 100 -> {101} [style=dotted]; - 101 -> {102} [style=dotted]; - 102 -> {103 108} [style=dotted]; - 103 -> {104}; - 104 -> {105}; - 105 -> {106}; - 106 -> {107}; + 99 -> {100}; + 100 -> {101}; + 101 -> {73} [color=green style=dashed]; + 102 -> {103} [style=dotted]; + 103 -> {104} [style=dotted]; + 104 -> {105} [style=dotted]; + 105 -> {106} [style=dotted]; + 106 -> {107} [style=dotted]; 107 -> {108}; 108 -> {109}; 109 -> {110}; - 110 -> {88} [color=green style=dashed]; - 111 -> {112} [style=dotted]; - 112 -> {113} [style=dotted]; - 113 -> {114} [style=dotted]; - 114 -> {115} [style=dotted]; - 115 -> {116} [style=dotted]; - 116 -> {78}; - 117 -> {118}; - 118 -> {119}; - 119 -> {120}; - 120 -> {121}; - 121 -> {122}; - 122 -> {97}; + 110 -> {111}; + 111 -> {112}; + 112 -> {113}; + 113 -> {114}; subgraph cluster_32 { color=red - 123 [label="Enter function test3" style="filled" fillcolor=red]; + 115 [label="Enter function test3" style="filled" fillcolor=red]; subgraph cluster_33 { color=blue - 124 [label="Enter block"]; - 125 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 126 [label="Const: String()"]; - 127 [label="Assignment: R|/y|"]; - 128 [label="Postponed enter to lambda"]; + 116 [label="Enter block"]; + 117 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + 118 [label="Const: String()"]; + 119 [label="Assignment: R|/y|"]; + 120 [label="Postponed enter to lambda"]; subgraph cluster_34 { color=blue - 137 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 121 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_35 { color=blue - 138 [label="Enter block"]; + 122 [label="Enter block"]; subgraph cluster_36 { color=blue - 139 [label="Enter when"]; + 123 [label="Enter when"]; subgraph cluster_37 { color=blue - 140 [label="Enter when branch condition "]; - 141 [label="Access variable R|/p|"]; - 142 [label="Function call: R|/p|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 143 [label="Exit when branch condition"]; + 124 [label="Enter when branch condition "]; + 125 [label="Access variable R|/p|"]; + 126 [label="Function call: R|/p|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 127 [label="Exit when branch condition"]; } subgraph cluster_38 { color=blue - 144 [label="Enter when branch condition else"]; - 145 [label="Exit when branch condition"]; + 128 [label="Enter when branch condition else"]; + 129 [label="Exit when branch condition"]; } - 146 [label="Enter when branch result"]; + 130 [label="Enter when branch result"]; subgraph cluster_39 { color=blue - 147 [label="Enter block"]; - 148 [label="Const: String()"]; - 149 [label="Jump: ^@run String()"]; - 150 [label="Stub" style="filled" fillcolor=gray]; - 151 [label="Exit block" style="filled" fillcolor=gray]; + 131 [label="Enter block"]; + 132 [label="Const: String()"]; + 133 [label="Jump: ^@run String()"]; + 134 [label="Stub" style="filled" fillcolor=gray]; + 135 [label="Exit block" style="filled" fillcolor=gray]; } - 152 [label="Exit when branch result" style="filled" fillcolor=gray]; - 153 [label="Enter when branch result"]; + 136 [label="Exit when branch result" style="filled" fillcolor=gray]; + 137 [label="Enter when branch result"]; subgraph cluster_40 { color=blue - 154 [label="Enter block"]; - 155 [label="Postponed enter to lambda"]; + 138 [label="Enter block"]; + 139 [label="Postponed enter to lambda"]; subgraph cluster_41 { color=blue - 165 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 140 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_42 { color=blue - 166 [label="Enter block"]; - 167 [label="Const: Null(null)"]; - 168 [label="Assignment: R|/y|"]; - 169 [label="Const: String(...)"]; - 170 [label="Assignment: R|SubstitutionOverride|"]; - 171 [label="Exit block"]; + 141 [label="Enter block"]; + 142 [label="Const: Null(null)"]; + 143 [label="Assignment: R|/y|"]; + 144 [label="Const: String(...)"]; + 145 [label="Assignment: R|SubstitutionOverride|"]; + 146 [label="Exit block"]; } - 172 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 147 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 156 [label="Postponed exit from lambda"]; - 157 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; - 158 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { + 148 [label="Postponed exit from lambda"]; + 149 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; + 150 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { R|/y| = Null(null) this@R|special/anonymous|.R|SubstitutionOverride| = String(...) } )"]; - 159 [label="Stub" style="filled" fillcolor=gray]; - 160 [label="Exit block" style="filled" fillcolor=gray]; + 151 [label="Stub" style="filled" fillcolor=gray]; + 152 [label="Exit block" style="filled" fillcolor=gray]; } - 161 [label="Exit when branch result" style="filled" fillcolor=gray]; - 162 [label="Exit when" style="filled" fillcolor=gray]; + 153 [label="Exit when branch result" style="filled" fillcolor=gray]; + 154 [label="Exit when" style="filled" fillcolor=gray]; } - 163 [label="Exit block" style="filled" fillcolor=gray]; + 155 [label="Exit block" style="filled" fillcolor=gray]; } - 164 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 156 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 129 [label="Postponed exit from lambda"]; - 130 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 131 [label="Variable declaration: lval x: R|kotlin/String|"]; - 132 [label="Access variable R|/y|"]; - 133 [label="Smart cast: R|/y|"]; - 134 [label="Access variable R|kotlin/String.length|"]; - 135 [label="Exit block"]; + 157 [label="Postponed exit from lambda"]; + 158 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 159 [label="Variable declaration: lval x: R|kotlin/String|"]; + 160 [label="Access variable R|/y|"]; + 161 [label="Smart cast: R|/y|"]; + 162 [label="Access variable R|kotlin/String.length|"]; + 163 [label="Exit block"]; } - 136 [label="Exit function test3" style="filled" fillcolor=red]; + 164 [label="Exit function test3" style="filled" fillcolor=red]; } + 115 -> {116}; + 116 -> {117}; + 117 -> {118}; + 118 -> {119}; + 119 -> {120}; + 120 -> {121 158}; + 120 -> {157} [style=dotted]; + 120 -> {121} [style=dashed]; + 121 -> {122}; + 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {128}; - 128 -> {130 137}; - 128 -> {129} [style=dotted]; - 128 -> {137} [style=dashed]; + 127 -> {128 137}; + 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {134}; - 134 -> {135}; - 135 -> {136}; + 133 -> {156}; + 133 -> {134} [style=dotted]; + 134 -> {135} [style=dotted]; + 135 -> {136} [style=dotted]; + 136 -> {154} [style=dotted]; 137 -> {138}; 138 -> {139}; - 139 -> {140}; + 139 -> {140 149}; + 139 -> {148} [style=dotted]; + 139 -> {140} [style=dashed]; 140 -> {141}; 141 -> {142}; 142 -> {143}; - 143 -> {144 153}; + 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; 147 -> {148}; - 148 -> {149}; - 149 -> {164}; - 149 -> {150} [style=dotted]; + 148 -> {149} [color=green]; + 149 -> {150}; + 150 -> {156}; 150 -> {151} [style=dotted]; 151 -> {152} [style=dotted]; - 152 -> {162} [style=dotted]; - 153 -> {154}; - 154 -> {155}; - 155 -> {157 165}; + 152 -> {153} [style=dotted]; + 153 -> {154} [style=dotted]; + 154 -> {155} [style=dotted]; 155 -> {156} [style=dotted]; - 155 -> {165} [style=dashed]; - 156 -> {157} [color=green]; + 156 -> {157}; 157 -> {158}; - 158 -> {164}; - 158 -> {159} [style=dotted]; - 159 -> {160} [style=dotted]; - 160 -> {161} [style=dotted]; - 161 -> {162} [style=dotted]; - 162 -> {163} [style=dotted]; - 163 -> {164} [style=dotted]; - 164 -> {129}; - 165 -> {166}; - 166 -> {167}; - 167 -> {168}; - 168 -> {169}; - 169 -> {170}; - 170 -> {171}; - 171 -> {172}; - 172 -> {156}; + 158 -> {159}; + 159 -> {160}; + 160 -> {161}; + 161 -> {162}; + 162 -> {163}; + 163 -> {164}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot index d5ae31f9af9..f3ca84ffb63 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot @@ -28,31 +28,31 @@ digraph postponedLambdas_kt { 8 [label="Postponed enter to lambda"]; subgraph cluster_4 { color=blue - 13 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 9 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 14 [label="Enter block"]; - 15 [label="Const: String()"]; - 16 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Const: String()"]; + 12 [label="Exit block"]; } - 17 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 13 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 9 [label="Postponed exit from lambda"]; - 10 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 11 [label="Exit block"]; + 14 [label="Postponed exit from lambda"]; + 15 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 16 [label="Exit block"]; } - 12 [label="Exit function test" style="filled" fillcolor=red]; + 17 [label="Exit function test" style="filled" fillcolor=red]; } 4 -> {5}; 5 -> {6}; 6 -> {7}; 7 -> {8}; - 8 -> {9 10 13}; - 8 -> {13} [style=dashed]; + 8 -> {9 14 15}; + 8 -> {9} [style=dashed]; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 13 -> {14}; + 12 -> {13}; 14 -> {15}; 15 -> {16}; 16 -> {17}; diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot index 31d5247bc5c..c80d0f25c21 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot @@ -78,172 +78,172 @@ digraph propertiesAndInitBlocks_kt { subgraph cluster_8 { color=red - 58 [label="Enter function getter" style="filled" fillcolor=red]; + 24 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 59 [label="Enter block"]; - 60 [label="Exit local class "]; - 61 [label="Exit block"]; + 25 [label="Enter block"]; + 26 [label="Exit local class "]; + 27 [label="Exit block"]; } - 62 [label="Exit function getter" style="filled" fillcolor=red]; + 28 [label="Exit function getter" style="filled" fillcolor=red]; } subgraph cluster_10 { color=blue - 63 [label="Enter class GetterLocalClass" style="filled" fillcolor=red]; - 64 [label="Part of class initialization"]; + 29 [label="Enter class GetterLocalClass" style="filled" fillcolor=red]; + 30 [label="Part of class initialization"]; subgraph cluster_11 { color=blue - 66 [label="Enter init block" style="filled" fillcolor=red]; + 31 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 67 [label="Enter block"]; - 68 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 69 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 70 [label="Stub" style="filled" fillcolor=gray]; - 71 [label="Exit block" style="filled" fillcolor=gray]; + 32 [label="Enter block"]; + 33 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 34 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 35 [label="Stub" style="filled" fillcolor=gray]; + 36 [label="Exit block" style="filled" fillcolor=gray]; } - 72 [label="Exit init block" style="filled" fillcolor=gray]; + 37 [label="Exit init block" style="filled" fillcolor=gray]; } - 65 [label="Exit class GetterLocalClass" style="filled" fillcolor=gray]; + 38 [label="Exit class GetterLocalClass" style="filled" fillcolor=gray]; } subgraph cluster_13 { color=blue - 73 [label="Enter function " style="filled" fillcolor=gray]; - 74 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 75 [label="Exit function " style="filled" fillcolor=red]; + 39 [label="Enter function " style="filled" fillcolor=gray]; + 40 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 41 [label="Exit function " style="filled" fillcolor=red]; } - 58 -> {59}; - 59 -> {60}; - 60 -> {61 63}; - 60 -> {63} [style=dashed]; - 61 -> {62}; - 63 -> {64} [color=green]; - 63 -> {66 73} [color=red]; - 64 -> {66} [color=green]; - 64 -> {65} [style=dotted]; - 64 -> {66} [style=dashed]; - 65 -> {73} [style=dotted]; - 65 -> {73} [style=dashed]; - 66 -> {67}; - 67 -> {68}; - 68 -> {69}; - 69 -> {70} [style=dotted]; - 70 -> {71} [style=dotted]; - 71 -> {72} [style=dotted]; - 72 -> {65} [style=dotted]; - 73 -> {74}; - 74 -> {75}; + 24 -> {25}; + 25 -> {26}; + 26 -> {27 29}; + 26 -> {29} [style=dashed]; + 27 -> {28}; + 29 -> {30} [color=green]; + 29 -> {31 39} [color=red]; + 30 -> {31} [color=green]; + 30 -> {38} [style=dotted]; + 30 -> {31} [style=dashed]; + 31 -> {32}; + 32 -> {33}; + 33 -> {34}; + 34 -> {35} [style=dotted]; + 35 -> {36} [style=dotted]; + 36 -> {37} [style=dotted]; + 37 -> {38} [style=dotted]; + 38 -> {39} [style=dotted]; + 38 -> {39} [style=dashed]; + 39 -> {40}; + 40 -> {41}; subgraph cluster_14 { color=red - 76 [label="Enter property" style="filled" fillcolor=red]; - 77 [label="Postponed enter to lambda"]; + 42 [label="Enter property" style="filled" fillcolor=red]; + 43 [label="Postponed enter to lambda"]; subgraph cluster_15 { color=blue - 24 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 44 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_16 { color=blue - 25 [label="Enter block"]; - 26 [label="Local function declaration "]; - 27 [label="Exit local class "]; - 28 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 29 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 30 [label="Stub" style="filled" fillcolor=gray]; - 31 [label="Exit block" style="filled" fillcolor=gray]; + 45 [label="Enter block"]; + 46 [label="Local function declaration "]; + 47 [label="Exit local class "]; + 48 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 49 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 50 [label="Stub" style="filled" fillcolor=gray]; + 51 [label="Exit block" style="filled" fillcolor=gray]; } - 32 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; + 52 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; } subgraph cluster_17 { color=blue - 44 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red]; - 45 [label="Part of class initialization"]; + 53 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red]; + 54 [label="Part of class initialization"]; subgraph cluster_18 { color=blue - 47 [label="Enter init block" style="filled" fillcolor=red]; + 55 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 48 [label="Enter block"]; - 49 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 50 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 51 [label="Stub" style="filled" fillcolor=gray]; - 52 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 53 [label="Exit block" style="filled" fillcolor=gray]; + 56 [label="Enter block"]; + 57 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 58 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 59 [label="Stub" style="filled" fillcolor=gray]; + 60 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 61 [label="Exit block" style="filled" fillcolor=gray]; } - 54 [label="Exit init block" style="filled" fillcolor=gray]; + 62 [label="Exit init block" style="filled" fillcolor=gray]; } - 46 [label="Exit class InitializerLocalClass" style="filled" fillcolor=gray]; + 63 [label="Exit class InitializerLocalClass" style="filled" fillcolor=gray]; } subgraph cluster_20 { color=blue - 55 [label="Enter function " style="filled" fillcolor=gray]; - 56 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 57 [label="Exit function " style="filled" fillcolor=red]; + 64 [label="Enter function " style="filled" fillcolor=gray]; + 65 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 66 [label="Exit function " style="filled" fillcolor=red]; } subgraph cluster_21 { color=blue - 33 [label="Enter function foo" style="filled" fillcolor=red]; + 67 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_22 { color=blue - 34 [label="Enter block"]; - 35 [label="Const: Int(1)"]; - 36 [label="Const: Int(1)"]; - 37 [label="Function call: Int(1).R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; - 38 [label="Variable declaration: lval c: R|kotlin/Int|"]; - 39 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 40 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 41 [label="Stub" style="filled" fillcolor=gray]; - 42 [label="Exit block" style="filled" fillcolor=gray]; + 68 [label="Enter block"]; + 69 [label="Const: Int(1)"]; + 70 [label="Const: Int(1)"]; + 71 [label="Function call: Int(1).R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; + 72 [label="Variable declaration: lval c: R|kotlin/Int|"]; + 73 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 74 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 75 [label="Stub" style="filled" fillcolor=gray]; + 76 [label="Exit block" style="filled" fillcolor=gray]; } - 43 [label="Exit function foo" style="filled" fillcolor=gray]; + 77 [label="Exit function foo" style="filled" fillcolor=gray]; } 78 [label="Postponed exit from lambda"]; 79 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; 80 [label="Exit property" style="filled" fillcolor=red]; } - 76 -> {77}; - 77 -> {24 78 79}; - 77 -> {24} [style=dashed]; - 78 -> {79}; - 78 -> {77} [color=green style=dashed]; - 79 -> {80}; - 24 -> {25}; - 25 -> {26}; - 26 -> {27 33}; - 26 -> {33} [style=dashed]; - 27 -> {28 44}; - 27 -> {44} [style=dashed]; - 28 -> {29}; - 29 -> {30} [style=dotted]; - 30 -> {31} [style=dotted]; - 31 -> {32} [style=dotted]; - 32 -> {78} [style=dotted]; - 33 -> {34}; - 34 -> {35}; - 35 -> {36}; - 36 -> {37}; - 37 -> {38}; - 38 -> {39}; - 39 -> {40}; - 40 -> {41} [style=dotted]; - 41 -> {42} [style=dotted]; - 42 -> {43} [style=dotted]; - 44 -> {45} [color=green]; - 44 -> {47 55} [color=red]; - 45 -> {47} [color=green]; - 45 -> {46} [style=dotted]; - 45 -> {47} [style=dashed]; - 46 -> {55} [style=dotted]; - 46 -> {55} [style=dashed]; - 47 -> {48}; + 42 -> {43}; + 43 -> {44 78 79}; + 43 -> {44} [style=dashed]; + 44 -> {45}; + 45 -> {46}; + 46 -> {47 67}; + 46 -> {67} [style=dashed]; + 47 -> {48 53}; + 47 -> {53} [style=dashed]; 48 -> {49}; - 49 -> {50}; + 49 -> {50} [style=dotted]; 50 -> {51} [style=dotted]; 51 -> {52} [style=dotted]; - 52 -> {53} [style=dotted]; - 53 -> {54} [style=dotted]; - 54 -> {46} [style=dotted]; + 52 -> {78} [style=dotted]; + 53 -> {54} [color=green]; + 53 -> {55 64} [color=red]; + 54 -> {55} [color=green]; + 54 -> {63} [style=dotted]; + 54 -> {55} [style=dashed]; 55 -> {56}; 56 -> {57}; + 57 -> {58}; + 58 -> {59} [style=dotted]; + 59 -> {60} [style=dotted]; + 60 -> {61} [style=dotted]; + 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; + 63 -> {64} [style=dotted]; + 63 -> {64} [style=dashed]; + 64 -> {65}; + 65 -> {66}; + 67 -> {68}; + 68 -> {69}; + 69 -> {70}; + 70 -> {71}; + 71 -> {72}; + 72 -> {73}; + 73 -> {74}; + 74 -> {75} [style=dotted]; + 75 -> {76} [style=dotted]; + 76 -> {77} [style=dotted]; + 78 -> {79}; + 78 -> {43} [color=green style=dashed]; + 79 -> {80}; subgraph cluster_23 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot index c99bb0908a8..55575eddf3f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot @@ -12,37 +12,37 @@ digraph returnValuesFromLambda_kt { subgraph cluster_1 { color=red - 5 [label="Enter class B" style="filled" fillcolor=red]; - 6 [label="Exit class B" style="filled" fillcolor=red]; + 2 [label="Enter class B" style="filled" fillcolor=red]; + 3 [label="Exit class B" style="filled" fillcolor=red]; } subgraph cluster_2 { color=blue - 2 [label="Enter function " style="filled" fillcolor=red]; - 3 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 4 [label="Exit function " style="filled" fillcolor=red]; + 4 [label="Enter function " style="filled" fillcolor=red]; + 5 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 6 [label="Exit function " style="filled" fillcolor=red]; } - 5 -> {6} [color=green]; - 6 -> {2} [color=green]; - 6 -> {2} [style=dashed]; - 2 -> {3}; - 3 -> {4}; + 2 -> {3} [color=green]; + 3 -> {4} [color=green]; + 3 -> {4} [style=dashed]; + 4 -> {5}; + 5 -> {6}; subgraph cluster_3 { color=red - 10 [label="Enter class C" style="filled" fillcolor=red]; - 11 [label="Exit class C" style="filled" fillcolor=red]; + 7 [label="Enter class C" style="filled" fillcolor=red]; + 8 [label="Exit class C" style="filled" fillcolor=red]; } subgraph cluster_4 { color=blue - 7 [label="Enter function " style="filled" fillcolor=red]; - 8 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 9 [label="Exit function " style="filled" fillcolor=red]; + 9 [label="Enter function " style="filled" fillcolor=red]; + 10 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 11 [label="Exit function " style="filled" fillcolor=red]; } - 10 -> {11} [color=green]; - 11 -> {7} [color=green]; - 11 -> {7} [style=dashed]; - 7 -> {8}; - 8 -> {9}; + 7 -> {8} [color=green]; + 8 -> {9} [color=green]; + 8 -> {9} [style=dashed]; + 9 -> {10}; + 10 -> {11}; subgraph cluster_5 { color=red @@ -53,72 +53,72 @@ digraph returnValuesFromLambda_kt { 14 [label="Postponed enter to lambda"]; subgraph cluster_7 { color=blue - 20 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 15 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 21 [label="Enter block"]; + 16 [label="Enter block"]; subgraph cluster_9 { color=blue - 22 [label="Enter when"]; + 17 [label="Enter when"]; subgraph cluster_10 { color=blue - 23 [label="Enter when branch condition "]; - 24 [label="Access variable R|/b|"]; - 25 [label="Exit when branch condition"]; + 18 [label="Enter when branch condition "]; + 19 [label="Access variable R|/b|"]; + 20 [label="Exit when branch condition"]; } - 26 [label="Synthetic else branch"]; - 27 [label="Enter when branch result"]; + 21 [label="Synthetic else branch"]; + 22 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 28 [label="Enter block"]; - 29 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 30 [label="Jump: ^@run R|/B.B|()"]; - 31 [label="Stub" style="filled" fillcolor=gray]; - 32 [label="Exit block" style="filled" fillcolor=gray]; + 23 [label="Enter block"]; + 24 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 25 [label="Jump: ^@run R|/B.B|()"]; + 26 [label="Stub" style="filled" fillcolor=gray]; + 27 [label="Exit block" style="filled" fillcolor=gray]; } - 33 [label="Exit when branch result" style="filled" fillcolor=gray]; - 34 [label="Exit when"]; + 28 [label="Exit when branch result" style="filled" fillcolor=gray]; + 29 [label="Exit when"]; } - 35 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; - 36 [label="Exit block"]; + 30 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; + 31 [label="Exit block"]; } - 37 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 32 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 15 [label="Postponed exit from lambda"]; - 16 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 17 [label="Variable declaration: lval x: R|A|"]; - 18 [label="Exit block"]; + 33 [label="Postponed exit from lambda"]; + 34 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 35 [label="Variable declaration: lval x: R|A|"]; + 36 [label="Exit block"]; } - 19 [label="Exit function test_1" style="filled" fillcolor=red]; + 37 [label="Exit function test_1" style="filled" fillcolor=red]; } 12 -> {13}; 13 -> {14}; - 14 -> {16 20}; - 14 -> {15} [style=dotted]; - 14 -> {20} [style=dashed]; + 14 -> {15 34}; + 14 -> {33} [style=dotted]; + 14 -> {15} [style=dashed]; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 20 -> {21}; - 21 -> {22}; + 19 -> {20}; + 20 -> {21 22}; + 21 -> {29}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {26 27}; - 26 -> {34}; - 27 -> {28}; - 28 -> {29}; + 25 -> {32}; + 25 -> {26} [style=dotted]; + 26 -> {27} [style=dotted]; + 27 -> {28} [style=dotted]; + 28 -> {29} [style=dotted]; 29 -> {30}; - 30 -> {37}; - 30 -> {31} [style=dotted]; - 31 -> {32} [style=dotted]; - 32 -> {33} [style=dotted]; - 33 -> {34} [style=dotted]; + 30 -> {31}; + 31 -> {32}; + 32 -> {33}; + 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {15}; subgraph cluster_12 { color=red @@ -129,41 +129,41 @@ digraph returnValuesFromLambda_kt { 40 [label="Postponed enter to lambda"]; subgraph cluster_14 { color=blue - 46 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 41 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 47 [label="Enter block"]; - 48 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; - 49 [label="Jump: ^@run R|/C.C|()"]; - 50 [label="Stub" style="filled" fillcolor=gray]; - 51 [label="Exit block" style="filled" fillcolor=gray]; + 42 [label="Enter block"]; + 43 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; + 44 [label="Jump: ^@run R|/C.C|()"]; + 45 [label="Stub" style="filled" fillcolor=gray]; + 46 [label="Exit block" style="filled" fillcolor=gray]; } - 52 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 47 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 41 [label="Postponed exit from lambda"]; - 42 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 43 [label="Variable declaration: lval x: R|C|"]; - 44 [label="Exit block"]; + 48 [label="Postponed exit from lambda"]; + 49 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 50 [label="Variable declaration: lval x: R|C|"]; + 51 [label="Exit block"]; } - 45 [label="Exit function test_2" style="filled" fillcolor=red]; + 52 [label="Exit function test_2" style="filled" fillcolor=red]; } 38 -> {39}; 39 -> {40}; - 40 -> {42 46}; - 40 -> {41} [style=dotted]; - 40 -> {46} [style=dashed]; + 40 -> {41 49}; + 40 -> {48} [style=dotted]; + 40 -> {41} [style=dashed]; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45}; - 46 -> {47}; + 44 -> {47}; + 44 -> {45} [style=dotted]; + 45 -> {46} [style=dotted]; + 46 -> {47} [style=dotted]; 47 -> {48}; 48 -> {49}; - 49 -> {52}; - 49 -> {50} [style=dotted]; - 50 -> {51} [style=dotted]; - 51 -> {52} [style=dotted]; - 52 -> {41}; + 49 -> {50}; + 50 -> {51}; + 51 -> {52}; subgraph cluster_16 { color=red @@ -174,40 +174,40 @@ digraph returnValuesFromLambda_kt { 55 [label="Postponed enter to lambda"]; subgraph cluster_18 { color=blue - 62 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 56 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_19 { 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]; + 57 [label="Enter block"]; + 58 [label="Jump: ^test_3 Unit"]; + 59 [label="Stub" style="filled" fillcolor=gray]; + 60 [label="Exit block" style="filled" fillcolor=gray]; } - 67 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; + 61 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; } - 56 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 57 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=gray]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray]; - 60 [label="Exit block" style="filled" fillcolor=gray]; + 62 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 63 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=gray]; + 64 [label="Stub" style="filled" fillcolor=gray]; + 65 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray]; + 66 [label="Exit block" style="filled" fillcolor=gray]; } - 61 [label="Exit function test_3" style="filled" fillcolor=red]; + 67 [label="Exit function test_3" style="filled" fillcolor=red]; } 53 -> {54}; 54 -> {55}; - 55 -> {62}; - 55 -> {56 57} [style=dotted]; - 55 -> {62} [style=dashed]; - 56 -> {57} [style=dotted]; - 57 -> {58} [style=dotted]; + 55 -> {56}; + 55 -> {62 63} [style=dotted]; + 55 -> {56} [style=dashed]; + 56 -> {57}; + 57 -> {58}; + 58 -> {67}; 58 -> {59} [style=dotted]; 59 -> {60} [style=dotted]; 60 -> {61} [style=dotted]; - 62 -> {63}; - 63 -> {64}; - 64 -> {61}; + 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; + 63 -> {64} [style=dotted]; 64 -> {65} [style=dotted]; 65 -> {66} [style=dotted]; 66 -> {67} [style=dotted]; - 67 -> {56} [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 e6552ef4fd9..470d147f5b3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot @@ -5,8 +5,8 @@ digraph safeCalls_kt { subgraph cluster_0 { color=red - 4 [label="Enter class A" style="filled" fillcolor=red]; - 5 [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]; } subgraph cluster_1 { color=blue @@ -15,14 +15,14 @@ digraph safeCalls_kt { } subgraph cluster_2 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5} [color=green]; - 5 -> {0 2} [color=green]; - 5 -> {0 2} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2 4} [color=green]; + 1 -> {2 4} [style=dashed]; 2 -> {3}; + 4 -> {5}; subgraph cluster_3 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot index ddc705247b4..ace314275ae 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot @@ -239,26 +239,26 @@ digraph tryCatch_kt { color=blue 93 [label="Enter block"]; 94 [label="Jump: break@@@[Boolean(true)] "]; - 100 [label="Stub" style="filled" fillcolor=gray]; - 101 [label="Exit block" style="filled" fillcolor=gray]; + 95 [label="Stub" style="filled" fillcolor=gray]; + 96 [label="Exit block" style="filled" fillcolor=gray]; } - 102 [label="Catch exit" style="filled" fillcolor=gray]; + 97 [label="Catch exit" style="filled" fillcolor=gray]; } - 103 [label="Try expression exit"]; + 98 [label="Try expression exit"]; } - 104 [label="Const: Int(2)"]; - 105 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 106 [label="Exit block"]; + 99 [label="Const: Int(2)"]; + 100 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 101 [label="Exit block"]; } - 107 [label="Exit loop block"]; + 102 [label="Exit loop block"]; } - 95 [label="Exit whileloop"]; + 103 [label="Exit whileloop"]; } - 96 [label="Const: Int(3)"]; - 97 [label="Variable declaration: lval z: R|kotlin/Int|"]; - 98 [label="Exit block"]; + 104 [label="Const: Int(3)"]; + 105 [label="Variable declaration: lval z: R|kotlin/Int|"]; + 106 [label="Exit block"]; } - 99 [label="Exit function test_3" style="filled" fillcolor=red]; + 107 [label="Exit function test_3" style="filled" fillcolor=red]; } 44 -> {45}; 45 -> {46}; @@ -266,7 +266,7 @@ digraph tryCatch_kt { 47 -> {48}; 48 -> {49}; 49 -> {50}; - 49 -> {95} [style=dotted]; + 49 -> {103} [style=dotted]; 50 -> {51}; 51 -> {52}; 52 -> {53 84 91}; @@ -279,7 +279,7 @@ digraph tryCatch_kt { 59 -> {66}; 60 -> {61}; 61 -> {62}; - 62 -> {99}; + 62 -> {107}; 62 -> {63} [style=dotted]; 63 -> {64} [style=dotted]; 64 -> {65} [style=dotted]; @@ -295,14 +295,14 @@ digraph tryCatch_kt { 74 -> {81}; 75 -> {76}; 76 -> {77}; - 77 -> {95}; + 77 -> {103}; 77 -> {78} [style=dotted]; 78 -> {79} [style=dotted]; 79 -> {80} [style=dotted]; 80 -> {81} [style=dotted]; 81 -> {82}; 82 -> {83}; - 83 -> {84 91 103}; + 83 -> {84 91 98}; 84 -> {85}; 85 -> {86}; 86 -> {87}; @@ -310,23 +310,23 @@ digraph tryCatch_kt { 87 -> {88} [style=dotted]; 88 -> {89} [style=dotted]; 89 -> {90} [style=dotted]; - 90 -> {103} [style=dotted]; + 90 -> {98} [style=dotted]; 91 -> {92}; 92 -> {93}; 93 -> {94}; - 94 -> {95}; - 94 -> {100} [style=dotted]; - 95 -> {96}; - 96 -> {97}; - 97 -> {98}; + 94 -> {103}; + 94 -> {95} [style=dotted]; + 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; + 97 -> {98} [style=dotted]; 98 -> {99}; - 100 -> {101} [style=dotted]; - 101 -> {102} [style=dotted]; - 102 -> {103} [style=dotted]; + 99 -> {100}; + 100 -> {101}; + 101 -> {102}; + 102 -> {47} [color=green style=dashed]; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {47} [color=green style=dashed]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot b/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot index 663f9b8f441..abd814bcfd4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot @@ -13,44 +13,44 @@ digraph classCallInLambda_kt { 3 [label="Postponed enter to lambda"]; subgraph cluster_2 { color=blue - 10 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 4 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 11 [label="Enter block"]; - 12 [label="Access variable R|/it|"]; - 13 [label="::class call"]; - 14 [label="Exit block"]; + 5 [label="Enter block"]; + 6 [label="Access variable R|/it|"]; + 7 [label="::class call"]; + 8 [label="Exit block"]; } - 15 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 9 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 4 [label="Postponed exit from lambda"]; - 5 [label="Function call: R|/x|.R|kotlin/let||>(...)" style="filled" fillcolor=yellow]; - 6 [label="Jump: ^test R|/x|.R|kotlin/let||>( = let@fun (it: R|kotlin/String|): R|kotlin/reflect/KClass| { + 10 [label="Postponed exit from lambda"]; + 11 [label="Function call: R|/x|.R|kotlin/let||>(...)" style="filled" fillcolor=yellow]; + 12 [label="Jump: ^test R|/x|.R|kotlin/let||>( = let@fun (it: R|kotlin/String|): R|kotlin/reflect/KClass| { ^ (R|/it|) } )"]; - 7 [label="Stub" style="filled" fillcolor=gray]; - 8 [label="Exit block" style="filled" fillcolor=gray]; + 13 [label="Stub" style="filled" fillcolor=gray]; + 14 [label="Exit block" style="filled" fillcolor=gray]; } - 9 [label="Exit function test" style="filled" fillcolor=red]; + 15 [label="Exit function test" style="filled" fillcolor=red]; } 0 -> {1}; 1 -> {2}; 2 -> {3}; - 3 -> {5 10}; - 3 -> {4} [style=dotted]; - 3 -> {10} [style=dashed]; + 3 -> {4 11}; + 3 -> {10} [style=dotted]; + 3 -> {4} [style=dashed]; 4 -> {5}; 5 -> {6}; - 6 -> {9}; - 6 -> {7} [style=dotted]; - 7 -> {8} [style=dotted]; - 8 -> {9} [style=dotted]; + 6 -> {7}; + 7 -> {8}; + 8 -> {9}; + 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {13}; - 13 -> {14}; - 14 -> {15}; - 15 -> {4}; + 12 -> {15}; + 12 -> {13} [style=dotted]; + 13 -> {14} [style=dotted]; + 14 -> {15} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot index 30840c55324..7fbe6445401 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot @@ -5,37 +5,37 @@ digraph exhaustiveWhenAndDNNType_kt { subgraph cluster_0 { color=red - 3 [label="Enter class SomeEnum" style="filled" fillcolor=red]; - 4 [label="Exit class SomeEnum" style="filled" fillcolor=red]; + 0 [label="Enter class SomeEnum" style="filled" fillcolor=red]; + 1 [label="Exit class SomeEnum" style="filled" fillcolor=red]; } subgraph cluster_1 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 2 [label="Enter function " style="filled" fillcolor=red]; + 3 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; + 4 [label="Exit function " style="filled" fillcolor=red]; } - 3 -> {4} [color=green]; - 4 -> {0} [color=green]; - 4 -> {0} [style=dashed]; - 0 -> {1}; - 1 -> {2}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; + 3 -> {4}; subgraph cluster_2 { color=red - 8 [label="Enter class B" style="filled" fillcolor=red]; - 9 [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]; } subgraph cluster_3 { color=blue - 5 [label="Enter function " style="filled" fillcolor=red]; - 6 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 7 [label="Exit function " style="filled" fillcolor=red]; + 7 [label="Enter function " style="filled" fillcolor=red]; + 8 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 9 [label="Exit function " style="filled" fillcolor=red]; } - 8 -> {9} [color=green]; - 9 -> {5} [color=green]; - 9 -> {5} [style=dashed]; - 5 -> {6}; - 6 -> {7}; + 5 -> {6} [color=green]; + 6 -> {7} [color=green]; + 6 -> {7} [style=dashed]; + 7 -> {8}; + 8 -> {9}; subgraph cluster_4 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot b/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot index 99b34fe912b..bcc86909d2a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot +++ b/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot @@ -5,15 +5,15 @@ digraph secondaryConstructorCfg_kt { subgraph cluster_0 { color=red - 27 [label="Enter class B" style="filled" fillcolor=red]; - 28 [label="Part of class initialization"]; + 0 [label="Enter class B" style="filled" fillcolor=red]; + 1 [label="Part of class initialization"]; subgraph cluster_1 { color=blue - 3 [label="Enter property" style="filled" fillcolor=red]; - 4 [label="Access variable R|/p0|"]; - 5 [label="Exit property" style="filled" fillcolor=red]; + 2 [label="Enter property" style="filled" fillcolor=red]; + 3 [label="Access variable R|/p0|"]; + 4 [label="Exit property" style="filled" fillcolor=red]; } - 29 [label="Part of class initialization"]; + 5 [label="Part of class initialization"]; subgraph cluster_2 { color=blue 6 [label="Enter property" style="filled" fillcolor=red]; @@ -21,80 +21,80 @@ digraph secondaryConstructorCfg_kt { 8 [label="Access variable R|kotlin/String.length|"]; 9 [label="Exit property" style="filled" fillcolor=red]; } - 30 [label="Part of class initialization"]; + 10 [label="Part of class initialization"]; subgraph cluster_3 { color=blue - 18 [label="Enter init block" style="filled" fillcolor=red]; + 11 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 19 [label="Enter block"]; - 20 [label="Access variable R|/p0|"]; - 21 [label="Access variable R|kotlin/String.length|"]; - 22 [label="Assignment: R|/B.p1|"]; - 23 [label="Const: String()"]; - 24 [label="Assignment: R|/B.p3|"]; - 25 [label="Exit block"]; + 12 [label="Enter block"]; + 13 [label="Access variable R|/p0|"]; + 14 [label="Access variable R|kotlin/String.length|"]; + 15 [label="Assignment: R|/B.p1|"]; + 16 [label="Const: String()"]; + 17 [label="Assignment: R|/B.p3|"]; + 18 [label="Exit block"]; } - 26 [label="Exit init block" style="filled" fillcolor=red]; + 19 [label="Exit init block" style="filled" fillcolor=red]; } - 31 [label="Exit class B" style="filled" fillcolor=red]; + 20 [label="Exit class B" style="filled" fillcolor=red]; } subgraph cluster_5 { color=blue - 10 [label="Enter function " style="filled" fillcolor=red]; - 11 [label="Access variable R|/p0|"]; - 12 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; + 21 [label="Enter function " style="filled" fillcolor=red]; + 22 [label="Access variable R|/p0|"]; + 23 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; subgraph cluster_6 { color=blue - 13 [label="Enter block"]; - 14 [label="Access variable R|/p1|"]; - 15 [label="Assignment: R|/B.p3|"]; - 16 [label="Exit block"]; + 24 [label="Enter block"]; + 25 [label="Access variable R|/p1|"]; + 26 [label="Assignment: R|/B.p3|"]; + 27 [label="Exit block"]; } - 17 [label="Exit function " style="filled" fillcolor=red]; + 28 [label="Exit function " style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 29 [label="Enter function " style="filled" fillcolor=red]; + 30 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 31 [label="Exit function " style="filled" fillcolor=red]; } - 27 -> {28} [color=green]; - 28 -> {3} [color=green]; - 28 -> {29} [style=dotted]; - 28 -> {3} [style=dashed]; - 29 -> {6} [color=green]; - 29 -> {30} [style=dotted]; - 29 -> {6} [style=dashed]; - 30 -> {18} [color=green]; - 30 -> {31} [style=dotted]; - 30 -> {18} [style=dashed]; - 31 -> {0 10} [color=green]; - 31 -> {0 10} [style=dashed]; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {5} [style=dotted]; + 1 -> {2} [style=dashed]; + 2 -> {3}; 3 -> {4}; - 4 -> {5}; - 5 -> {29} [color=green]; + 4 -> {5} [color=green]; + 5 -> {6} [color=green]; + 5 -> {10} [style=dotted]; + 5 -> {6} [style=dashed]; 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {30} [color=green]; - 18 -> {19}; - 19 -> {20}; - 20 -> {21}; - 21 -> {22}; - 22 -> {23}; - 23 -> {24}; - 24 -> {25}; - 25 -> {26}; - 26 -> {31} [color=green]; - 0 -> {1}; - 1 -> {2}; - 10 -> {11}; + 9 -> {10} [color=green]; + 10 -> {11} [color=green]; + 10 -> {20} [style=dotted]; + 10 -> {11} [style=dashed]; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; + 17 -> {18}; + 18 -> {19}; + 19 -> {20} [color=green]; + 20 -> {21 29} [color=green]; + 20 -> {21 29} [style=dashed]; + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; + 25 -> {26}; + 26 -> {27}; + 27 -> {28}; + 29 -> {30}; + 30 -> {31}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot index 9bccd8da1e8..caa1bf1bb1e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot @@ -5,18 +5,18 @@ digraph bangbang_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red 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 8812d850c9e..33c32e2fea5 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot @@ -5,8 +5,8 @@ digraph booleanOperators_kt { subgraph cluster_0 { color=red - 4 [label="Enter class A" style="filled" fillcolor=red]; - 5 [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]; } subgraph cluster_1 { color=blue @@ -15,44 +15,44 @@ digraph booleanOperators_kt { } subgraph cluster_2 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5} [color=green]; - 5 -> {0 2} [color=green]; - 5 -> {0 2} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2 4} [color=green]; + 1 -> {2 4} [style=dashed]; 2 -> {3}; + 4 -> {5}; subgraph cluster_3 { color=red - 8 [label="Enter class B" style="filled" fillcolor=red]; - 9 [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]; } subgraph cluster_4 { color=blue - 6 [label="Enter function bar" style="filled" fillcolor=red]; - 7 [label="Exit function bar" style="filled" fillcolor=red]; + 8 [label="Enter function bar" style="filled" fillcolor=red]; + 9 [label="Exit function bar" style="filled" fillcolor=red]; } - 8 -> {9} [color=green]; - 9 -> {6} [color=green]; - 9 -> {6} [style=dashed]; - 6 -> {7}; + 6 -> {7} [color=green]; + 7 -> {8} [color=green]; + 7 -> {8} [style=dashed]; + 8 -> {9}; subgraph cluster_5 { color=red - 12 [label="Enter class C" style="filled" fillcolor=red]; - 13 [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]; } subgraph cluster_6 { color=blue - 10 [label="Enter function baz" style="filled" fillcolor=red]; - 11 [label="Exit function baz" style="filled" fillcolor=red]; + 12 [label="Enter function baz" style="filled" fillcolor=red]; + 13 [label="Exit function baz" style="filled" fillcolor=red]; } - 12 -> {13} [color=green]; - 13 -> {10} [color=green]; - 13 -> {10} [style=dashed]; - 10 -> {11}; + 10 -> {11} [color=green]; + 11 -> {12} [color=green]; + 11 -> {12} [style=dashed]; + 12 -> {13}; subgraph cluster_7 { color=red 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 f6b0eb21e91..b18df24ac9b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot @@ -5,18 +5,18 @@ digraph equalsToBoolean_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red 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 9265433d18d..4be05fbf9c2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot @@ -5,18 +5,18 @@ digraph jumpFromRhsOfOperator_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red 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 588fff036fb..6d8ac3c236d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot @@ -5,33 +5,33 @@ digraph boundSmartcasts_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red - 6 [label="Enter class B" style="filled" fillcolor=red]; - 7 [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]; } subgraph cluster_3 { color=blue - 4 [label="Enter function bar" style="filled" fillcolor=red]; - 5 [label="Exit function bar" style="filled" fillcolor=red]; + 6 [label="Enter function bar" style="filled" fillcolor=red]; + 7 [label="Exit function bar" style="filled" fillcolor=red]; } - 6 -> {7} [color=green]; - 7 -> {4} [color=green]; - 7 -> {4} [style=dashed]; - 4 -> {5}; + 4 -> {5} [color=green]; + 5 -> {6} [color=green]; + 5 -> {6} [style=dashed]; + 6 -> {7}; subgraph cluster_4 { color=red @@ -338,33 +338,33 @@ digraph boundSmartcasts_kt { subgraph cluster_27 { color=red - 131 [label="Enter class D" style="filled" fillcolor=red]; - 132 [label="Part of class initialization"]; + 125 [label="Enter class D" style="filled" fillcolor=red]; + 126 [label="Part of class initialization"]; subgraph cluster_28 { color=blue - 128 [label="Enter property" style="filled" fillcolor=red]; - 129 [label="Access variable R|/any|"]; - 130 [label="Exit property" style="filled" fillcolor=red]; + 127 [label="Enter property" style="filled" fillcolor=red]; + 128 [label="Access variable R|/any|"]; + 129 [label="Exit property" style="filled" fillcolor=red]; } - 133 [label="Exit class D" style="filled" fillcolor=red]; + 130 [label="Exit class D" style="filled" fillcolor=red]; } subgraph cluster_29 { color=blue - 125 [label="Enter function " style="filled" fillcolor=red]; - 126 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 127 [label="Exit function " style="filled" fillcolor=red]; + 131 [label="Enter function " style="filled" fillcolor=red]; + 132 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 133 [label="Exit function " style="filled" fillcolor=red]; } - 131 -> {132} [color=green]; - 132 -> {128} [color=green]; - 132 -> {133} [style=dotted]; - 132 -> {128} [style=dashed]; - 133 -> {125} [color=green]; - 133 -> {125} [style=dashed]; + 125 -> {126} [color=green]; + 126 -> {127} [color=green]; + 126 -> {130} [style=dotted]; + 126 -> {127} [style=dashed]; + 127 -> {128}; 128 -> {129}; - 129 -> {130}; - 130 -> {133} [color=green]; - 125 -> {126}; - 126 -> {127}; + 129 -> {130} [color=green]; + 130 -> {131} [color=green]; + 130 -> {131} [style=dashed]; + 131 -> {132}; + 132 -> {133}; subgraph cluster_30 { color=red 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 64aa675858b..5630fb4c58a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot @@ -5,33 +5,33 @@ digraph boundSmartcastsInBranches_kt { subgraph cluster_0 { color=red - 6 [label="Enter class A" style="filled" fillcolor=red]; - 7 [label="Part of class initialization"]; + 0 [label="Enter class A" style="filled" fillcolor=red]; + 1 [label="Part of class initialization"]; subgraph cluster_1 { color=blue - 3 [label="Enter property" style="filled" fillcolor=red]; - 4 [label="Const: String()"]; - 5 [label="Exit property" style="filled" fillcolor=red]; + 2 [label="Enter property" style="filled" fillcolor=red]; + 3 [label="Const: String()"]; + 4 [label="Exit property" style="filled" fillcolor=red]; } - 8 [label="Exit class A" style="filled" fillcolor=red]; + 5 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_2 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 6 [label="Enter function " style="filled" fillcolor=red]; + 7 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 8 [label="Exit function " style="filled" fillcolor=red]; } - 6 -> {7} [color=green]; - 7 -> {3} [color=green]; - 7 -> {8} [style=dotted]; - 7 -> {3} [style=dashed]; - 8 -> {0} [color=green]; - 8 -> {0} [style=dashed]; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {5} [style=dotted]; + 1 -> {2} [style=dashed]; + 2 -> {3}; 3 -> {4}; - 4 -> {5}; - 5 -> {8} [color=green]; - 0 -> {1}; - 1 -> {2}; + 4 -> {5} [color=green]; + 5 -> {6} [color=green]; + 5 -> {6} [style=dashed]; + 6 -> {7}; + 7 -> {8}; subgraph cluster_3 { color=red 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 79351a282f0..f840b54cc8c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot @@ -5,50 +5,50 @@ digraph functionCallBound_kt { subgraph cluster_0 { color=red - 3 [label="Enter class Base" style="filled" fillcolor=red]; - 4 [label="Exit class Base" style="filled" fillcolor=red]; + 0 [label="Enter class Base" style="filled" fillcolor=red]; + 1 [label="Exit class Base" style="filled" fillcolor=red]; } subgraph cluster_1 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 2 [label="Enter function " style="filled" fillcolor=red]; + 3 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 4 [label="Exit function " style="filled" fillcolor=red]; } - 3 -> {4} [color=green]; - 4 -> {0} [color=green]; - 4 -> {0} [style=dashed]; - 0 -> {1}; - 1 -> {2}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; + 3 -> {4}; subgraph cluster_2 { color=red - 11 [label="Enter class Sub" style="filled" fillcolor=red]; - 12 [label="Part of class initialization"]; + 5 [label="Enter class Sub" style="filled" fillcolor=red]; + 6 [label="Part of class initialization"]; subgraph cluster_3 { color=blue - 8 [label="Enter property" style="filled" fillcolor=red]; - 9 [label="Access variable R|/data|"]; - 10 [label="Exit property" style="filled" fillcolor=red]; + 7 [label="Enter property" style="filled" fillcolor=red]; + 8 [label="Access variable R|/data|"]; + 9 [label="Exit property" style="filled" fillcolor=red]; } - 13 [label="Exit class Sub" style="filled" fillcolor=red]; + 10 [label="Exit class Sub" style="filled" fillcolor=red]; } subgraph cluster_4 { color=blue - 5 [label="Enter function " style="filled" fillcolor=red]; - 6 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 7 [label="Exit function " style="filled" fillcolor=red]; + 11 [label="Enter function " style="filled" fillcolor=red]; + 12 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 13 [label="Exit function " style="filled" fillcolor=red]; } - 11 -> {12} [color=green]; - 12 -> {8} [color=green]; - 12 -> {13} [style=dotted]; - 12 -> {8} [style=dashed]; - 13 -> {5} [color=green]; - 13 -> {5} [style=dashed]; + 5 -> {6} [color=green]; + 6 -> {7} [color=green]; + 6 -> {10} [style=dotted]; + 6 -> {7} [style=dashed]; + 7 -> {8}; 8 -> {9}; - 9 -> {10}; - 10 -> {13} [color=green]; - 5 -> {6}; - 6 -> {7}; + 9 -> {10} [color=green]; + 10 -> {11} [color=green]; + 10 -> {11} [style=dashed]; + 11 -> {12}; + 12 -> {13}; subgraph cluster_5 { color=red 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 7b61a97a367..f3b467ae095 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot @@ -5,18 +5,18 @@ digraph elvis_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red 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 7c5d2a99262..ff884934705 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot @@ -154,48 +154,48 @@ digraph returns_kt { subgraph cluster_14 { color=red - 55 [label="Enter class A" style="filled" fillcolor=red]; - 56 [label="Exit class A" style="filled" fillcolor=red]; + 53 [label="Enter class A" style="filled" fillcolor=red]; + 54 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_15 { color=blue - 53 [label="Enter function foo" style="filled" fillcolor=red]; - 54 [label="Exit function foo" style="filled" fillcolor=red]; + 55 [label="Enter function foo" style="filled" fillcolor=red]; + 56 [label="Exit function foo" style="filled" fillcolor=red]; } - 55 -> {56} [color=green]; - 56 -> {53} [color=green]; - 56 -> {53} [style=dashed]; - 53 -> {54}; + 53 -> {54} [color=green]; + 54 -> {55} [color=green]; + 54 -> {55} [style=dashed]; + 55 -> {56}; subgraph cluster_16 { color=red - 59 [label="Enter class B" style="filled" fillcolor=red]; - 60 [label="Exit class B" style="filled" fillcolor=red]; + 57 [label="Enter class B" style="filled" fillcolor=red]; + 58 [label="Exit class B" style="filled" fillcolor=red]; } subgraph cluster_17 { color=blue - 57 [label="Enter function bar" style="filled" fillcolor=red]; - 58 [label="Exit function bar" style="filled" fillcolor=red]; + 59 [label="Enter function bar" style="filled" fillcolor=red]; + 60 [label="Exit function bar" style="filled" fillcolor=red]; } - 59 -> {60} [color=green]; - 60 -> {57} [color=green]; - 60 -> {57} [style=dashed]; - 57 -> {58}; + 57 -> {58} [color=green]; + 58 -> {59} [color=green]; + 58 -> {59} [style=dashed]; + 59 -> {60}; subgraph cluster_18 { color=red - 63 [label="Enter class C" style="filled" fillcolor=red]; - 64 [label="Exit class C" style="filled" fillcolor=red]; + 61 [label="Enter class C" style="filled" fillcolor=red]; + 62 [label="Exit class C" style="filled" fillcolor=red]; } subgraph cluster_19 { color=blue - 61 [label="Enter function baz" style="filled" fillcolor=red]; - 62 [label="Exit function baz" style="filled" fillcolor=red]; + 63 [label="Enter function baz" style="filled" fillcolor=red]; + 64 [label="Exit function baz" style="filled" fillcolor=red]; } - 63 -> {64} [color=green]; - 64 -> {61} [color=green]; - 64 -> {61} [style=dashed]; - 61 -> {62}; + 61 -> {62} [color=green]; + 62 -> {63} [color=green]; + 62 -> {63} [style=dashed]; + 63 -> {64}; subgraph cluster_20 { color=red @@ -471,22 +471,22 @@ digraph returns_kt { 175 [label="Postponed enter to lambda"]; subgraph cluster_42 { color=blue - 180 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 176 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_43 { color=blue - 181 [label="Enter block"]; - 182 [label="Access variable R|/s|"]; - 183 [label="Smart cast: R|/s|"]; - 184 [label="Access variable R|kotlin/String.length|"]; - 185 [label="Exit block"]; + 177 [label="Enter block"]; + 178 [label="Access variable R|/s|"]; + 179 [label="Smart cast: R|/s|"]; + 180 [label="Access variable R|kotlin/String.length|"]; + 181 [label="Exit block"]; } - 186 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 182 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 176 [label="Postponed exit from lambda"]; - 177 [label="Function call: R|/runHigherOrder|(...)" style="filled" fillcolor=yellow]; - 178 [label="Exit block"]; + 183 [label="Postponed exit from lambda"]; + 184 [label="Function call: R|/runHigherOrder|(...)" style="filled" fillcolor=yellow]; + 185 [label="Exit block"]; } - 179 [label="Exit function test_4" style="filled" fillcolor=red]; + 186 [label="Exit function test_4" style="filled" fillcolor=red]; } 159 -> {160}; 160 -> {161}; @@ -499,20 +499,20 @@ digraph returns_kt { 167 -> {168}; 168 -> {169 172}; 169 -> {170}; - 170 -> {179}; + 170 -> {186}; 170 -> {171} [style=dotted]; 171 -> {173} [style=dotted]; 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {176 177 180}; - 175 -> {180} [style=dashed]; + 175 -> {176 183 184}; + 175 -> {176} [style=dashed]; 176 -> {177}; 177 -> {178}; 178 -> {179}; + 179 -> {180}; 180 -> {181}; 181 -> {182}; - 182 -> {183}; 183 -> {184}; 184 -> {185}; 185 -> {186}; 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 5db7b9fd159..36b2001d37e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot @@ -5,18 +5,18 @@ digraph smartcastFromArgument_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red 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 686d0c9606c..eca6029621f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot @@ -5,33 +5,33 @@ digraph when_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red - 6 [label="Enter class B" style="filled" fillcolor=red]; - 7 [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]; } subgraph cluster_3 { color=blue - 4 [label="Enter function bar" style="filled" fillcolor=red]; - 5 [label="Exit function bar" style="filled" fillcolor=red]; + 6 [label="Enter function bar" style="filled" fillcolor=red]; + 7 [label="Exit function bar" style="filled" fillcolor=red]; } - 6 -> {7} [color=green]; - 7 -> {4} [color=green]; - 7 -> {4} [style=dashed]; - 4 -> {5}; + 4 -> {5} [color=green]; + 5 -> {6} [color=green]; + 5 -> {6} [style=dashed]; + 6 -> {7}; subgraph cluster_4 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot index ca72f7efd26..33a9c1f60db 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot @@ -5,18 +5,18 @@ digraph equalsAndIdentity_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot index 1797b8546a3..215d1bc426d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot @@ -71,30 +71,30 @@ digraph incorrectSmartcastToNothing_kt { 35 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue - 46 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 36 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 47 [label="Enter block"]; - 48 [label="Access variable R|/it|"]; - 49 [label="Const: String(main.kts.compiled.cache)"]; - 50 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; - 51 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Access variable R|/it|"]; + 39 [label="Const: String(main.kts.compiled.cache)"]; + 40 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; + 41 [label="Exit block"]; } - 52 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 42 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 36 [label="Postponed exit from lambda"]; - 37 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 38 [label="Exit safe call"]; - 39 [label="Exit block"]; + 43 [label="Postponed exit from lambda"]; + 44 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 45 [label="Exit safe call"]; + 46 [label="Exit block"]; } - 40 [label="Exit when branch result"]; - 41 [label="Merge postponed lambda exits"]; - 42 [label="Exit when"]; + 47 [label="Exit when branch result"]; + 48 [label="Merge postponed lambda exits"]; + 49 [label="Exit when"]; } - 43 [label="Variable declaration: lval cacheBaseDir: R|java/io/File?|"]; - 44 [label="Exit block"]; + 50 [label="Variable declaration: lval cacheBaseDir: R|java/io/File?|"]; + 51 [label="Exit block"]; } - 45 [label="Exit function test" style="filled" fillcolor=red]; + 52 [label="Exit function test" style="filled" fillcolor=red]; } 4 -> {5}; 5 -> {6}; @@ -117,35 +117,35 @@ digraph incorrectSmartcastToNothing_kt { 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {42}; + 25 -> {49}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {42}; + 30 -> {49}; 31 -> {32}; 32 -> {33}; - 33 -> {34 38}; + 33 -> {34 45}; 34 -> {35}; - 35 -> {37 46}; - 35 -> {36} [style=dotted]; - 35 -> {46} [style=dashed]; - 36 -> {37} [color=green]; - 36 -> {41} [color=red]; + 35 -> {36 44}; + 35 -> {43} [style=dotted]; + 35 -> {36} [style=dashed]; + 36 -> {37}; 37 -> {38}; - 38 -> {39 41}; + 38 -> {39}; 39 -> {40}; - 40 -> {42}; - 41 -> {42} [color=red]; + 40 -> {41}; + 41 -> {42}; 42 -> {43}; - 43 -> {44}; + 43 -> {44} [color=green]; + 43 -> {48} [color=red]; 44 -> {45}; + 45 -> {46 48}; 46 -> {47}; - 47 -> {48}; - 48 -> {49}; + 47 -> {49}; + 48 -> {49} [color=red]; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {36}; } 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 4d11e0de077..2d6a0c14eb8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot @@ -5,33 +5,33 @@ digraph inPlaceLambdas_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red - 6 [label="Enter class B" style="filled" fillcolor=red]; - 7 [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]; } subgraph cluster_3 { color=blue - 4 [label="Enter function bar" style="filled" fillcolor=red]; - 5 [label="Exit function bar" style="filled" fillcolor=red]; + 6 [label="Enter function bar" style="filled" fillcolor=red]; + 7 [label="Exit function bar" style="filled" fillcolor=red]; } - 6 -> {7} [color=green]; - 7 -> {4} [color=green]; - 7 -> {4} [style=dashed]; - 4 -> {5}; + 4 -> {5} [color=green]; + 5 -> {6} [color=green]; + 5 -> {6} [style=dashed]; + 6 -> {7}; subgraph cluster_4 { color=red @@ -57,27 +57,27 @@ digraph inPlaceLambdas_kt { 18 [label="Postponed enter to lambda"]; subgraph cluster_9 { color=blue - 26 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 19 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 27 [label="Enter block"]; - 28 [label="Access variable R|/x|"]; - 29 [label="Smart cast: R|/x|"]; - 30 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 31 [label="Exit block"]; + 20 [label="Enter block"]; + 21 [label="Access variable R|/x|"]; + 22 [label="Smart cast: R|/x|"]; + 23 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 24 [label="Exit block"]; } - 32 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 25 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 19 [label="Postponed exit from lambda"]; - 20 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 21 [label="Exit block"]; + 26 [label="Postponed exit from lambda"]; + 27 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; } - 22 [label="Exit when branch result"]; - 23 [label="Exit when"]; + 29 [label="Exit when branch result"]; + 30 [label="Exit when"]; } - 24 [label="Exit block"]; + 31 [label="Exit block"]; } - 25 [label="Exit function test_1" style="filled" fillcolor=red]; + 32 [label="Exit function test_1" style="filled" fillcolor=red]; } 8 -> {9}; 9 -> {10}; @@ -86,25 +86,25 @@ digraph inPlaceLambdas_kt { 12 -> {13}; 13 -> {14}; 14 -> {15 16}; - 15 -> {23}; + 15 -> {30}; 16 -> {17}; 17 -> {18}; - 18 -> {20 26}; - 18 -> {19} [style=dotted]; - 18 -> {26} [style=dashed]; + 18 -> {19 27}; + 18 -> {26} [style=dotted]; + 18 -> {19} [style=dashed]; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; + 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {19}; subgraph cluster_11 { color=red @@ -115,42 +115,42 @@ digraph inPlaceLambdas_kt { 35 [label="Postponed enter to lambda"]; subgraph cluster_13 { color=blue - 43 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 36 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/x|"]; - 46 [label="Type operator: (R|/x| as R|B|)"]; - 47 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Access variable R|/x|"]; + 39 [label="Type operator: (R|/x| as R|B|)"]; + 40 [label="Exit block"]; } - 48 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 41 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 36 [label="Postponed exit from lambda"]; - 37 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 38 [label="Access variable R|/x|"]; - 39 [label="Smart cast: R|/x|"]; - 40 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 41 [label="Exit block"]; + 42 [label="Postponed exit from lambda"]; + 43 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 44 [label="Access variable R|/x|"]; + 45 [label="Smart cast: R|/x|"]; + 46 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 47 [label="Exit block"]; } - 42 [label="Exit function test_2" style="filled" fillcolor=red]; + 48 [label="Exit function test_2" style="filled" fillcolor=red]; } 33 -> {34}; 34 -> {35}; - 35 -> {37 43}; - 35 -> {36} [style=dotted]; - 35 -> {43} [style=dashed]; + 35 -> {36 43}; + 35 -> {42} [style=dotted]; + 35 -> {36} [style=dashed]; 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; + 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {36}; subgraph cluster_15 { color=red @@ -176,33 +176,33 @@ digraph inPlaceLambdas_kt { 59 [label="Postponed enter to lambda"]; subgraph cluster_20 { color=blue - 70 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 60 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 71 [label="Enter block"]; - 72 [label="Access variable R|/x|"]; - 73 [label="Smart cast: R|/x|"]; - 74 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 75 [label="Access variable R|/x|"]; - 76 [label="Smart cast: R|/x|"]; - 77 [label="Type operator: (R|/x| as R|B|)"]; - 78 [label="Exit block"]; + 61 [label="Enter block"]; + 62 [label="Access variable R|/x|"]; + 63 [label="Smart cast: R|/x|"]; + 64 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 65 [label="Access variable R|/x|"]; + 66 [label="Smart cast: R|/x|"]; + 67 [label="Type operator: (R|/x| as R|B|)"]; + 68 [label="Exit block"]; } - 79 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 69 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 60 [label="Postponed exit from lambda"]; - 61 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 62 [label="Access variable R|/x|"]; - 63 [label="Smart cast: R|/x|"]; - 64 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 65 [label="Exit block"]; + 70 [label="Postponed exit from lambda"]; + 71 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 72 [label="Access variable R|/x|"]; + 73 [label="Smart cast: R|/x|"]; + 74 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 75 [label="Exit block"]; } - 66 [label="Exit when branch result"]; - 67 [label="Exit when"]; + 76 [label="Exit when branch result"]; + 77 [label="Exit when"]; } - 68 [label="Exit block"]; + 78 [label="Exit block"]; } - 69 [label="Exit function test_3" style="filled" fillcolor=red]; + 79 [label="Exit function test_3" style="filled" fillcolor=red]; } 49 -> {50}; 50 -> {51}; @@ -211,12 +211,12 @@ digraph inPlaceLambdas_kt { 53 -> {54}; 54 -> {55}; 55 -> {56 57}; - 56 -> {67}; + 56 -> {77}; 57 -> {58}; 58 -> {59}; - 59 -> {61 70}; - 59 -> {60} [style=dotted]; - 59 -> {70} [style=dashed]; + 59 -> {60 71}; + 59 -> {70} [style=dotted]; + 59 -> {60} [style=dashed]; 60 -> {61}; 61 -> {62}; 62 -> {63}; @@ -226,6 +226,7 @@ digraph inPlaceLambdas_kt { 66 -> {67}; 67 -> {68}; 68 -> {69}; + 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; @@ -235,6 +236,5 @@ digraph inPlaceLambdas_kt { 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {60}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot index 8685b5b3fad..b3c271c521e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot @@ -5,99 +5,99 @@ digraph lambdaInWhenBranch_kt { subgraph cluster_0 { color=red - 3 [label="Enter class Sealed" style="filled" fillcolor=red]; - 4 [label="Exit class Sealed" style="filled" fillcolor=red]; + 0 [label="Enter class Sealed" style="filled" fillcolor=red]; + 1 [label="Exit class Sealed" style="filled" fillcolor=red]; } subgraph cluster_1 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 2 [label="Enter function " style="filled" fillcolor=red]; + 3 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 4 [label="Exit function " style="filled" fillcolor=red]; } - 3 -> {4} [color=green]; - 4 -> {0} [color=green]; - 4 -> {0} [style=dashed]; - 0 -> {1}; - 1 -> {2}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; + 3 -> {4}; subgraph cluster_2 { color=red - 20 [label="Enter class SubClass1" style="filled" fillcolor=red]; - 21 [label="Part of class initialization"]; + 5 [label="Enter class SubClass1" style="filled" fillcolor=red]; + 6 [label="Part of class initialization"]; subgraph cluster_3 { color=blue - 8 [label="Enter property" style="filled" fillcolor=red]; - 9 [label="Access variable R|/t|"]; - 10 [label="Exit property" style="filled" fillcolor=red]; + 7 [label="Enter property" style="filled" fillcolor=red]; + 8 [label="Access variable R|/t|"]; + 9 [label="Exit property" style="filled" fillcolor=red]; } - 22 [label="Exit class SubClass1" style="filled" fillcolor=red]; + 10 [label="Exit class SubClass1" style="filled" fillcolor=red]; } subgraph cluster_4 { color=blue - 13 [label="Enter function copy" style="filled" fillcolor=red]; - 14 [label="Enter default value of t"]; + 11 [label="Enter function copy" style="filled" fillcolor=red]; + 12 [label="Enter default value of t"]; subgraph cluster_5 { color=blue - 17 [label="Enter default value of t" style="filled" fillcolor=red]; - 18 [label="Access variable R|/SubClass1.t|"]; - 19 [label="Exit default value of t" style="filled" fillcolor=red]; + 13 [label="Enter default value of t" style="filled" fillcolor=red]; + 14 [label="Access variable R|/SubClass1.t|"]; + 15 [label="Exit default value of t" style="filled" fillcolor=red]; } - 15 [label="Exit default value of t"]; - 16 [label="Exit function copy" style="filled" fillcolor=red]; + 16 [label="Exit default value of t"]; + 17 [label="Exit function copy" style="filled" fillcolor=red]; } subgraph cluster_6 { color=blue - 11 [label="Enter function component1" style="filled" fillcolor=red]; - 12 [label="Exit function component1" style="filled" fillcolor=red]; + 18 [label="Enter function component1" style="filled" fillcolor=red]; + 19 [label="Exit function component1" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 5 [label="Enter function " style="filled" fillcolor=red]; - 6 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 7 [label="Exit function " style="filled" fillcolor=red]; + 20 [label="Enter function " style="filled" fillcolor=red]; + 21 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 22 [label="Exit function " style="filled" fillcolor=red]; } - 20 -> {21} [color=green]; - 21 -> {8} [color=green]; - 21 -> {22} [style=dotted]; - 21 -> {8} [style=dashed]; - 22 -> {5 11 13} [color=green]; - 22 -> {5 11 13} [style=dashed]; + 5 -> {6} [color=green]; + 6 -> {7} [color=green]; + 6 -> {10} [style=dotted]; + 6 -> {7} [style=dashed]; + 7 -> {8}; 8 -> {9}; - 9 -> {10}; - 10 -> {22} [color=green]; - 5 -> {6}; - 6 -> {7}; + 9 -> {10} [color=green]; + 10 -> {11 18 20} [color=green]; + 10 -> {11 18 20} [style=dashed]; 11 -> {12}; + 12 -> {13 16}; + 12 -> {13} [style=dashed]; 13 -> {14}; - 14 -> {15 17}; - 14 -> {17} [style=dashed]; + 14 -> {15}; 15 -> {16}; - 17 -> {18}; + 16 -> {17}; 18 -> {19}; - 19 -> {15}; + 20 -> {21}; + 21 -> {22}; subgraph cluster_8 { color=red - 28 [label="Enter class SubClass2" style="filled" fillcolor=red]; - 29 [label="Exit class SubClass2" style="filled" fillcolor=red]; + 23 [label="Enter class SubClass2" style="filled" fillcolor=red]; + 24 [label="Exit class SubClass2" style="filled" fillcolor=red]; } subgraph cluster_9 { color=blue - 26 [label="Enter function copy" style="filled" fillcolor=red]; - 27 [label="Exit function copy" style="filled" fillcolor=red]; + 25 [label="Enter function copy" style="filled" fillcolor=red]; + 26 [label="Exit function copy" style="filled" fillcolor=red]; } subgraph cluster_10 { color=blue - 23 [label="Enter function " style="filled" fillcolor=red]; - 24 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 25 [label="Exit function " style="filled" fillcolor=red]; + 27 [label="Enter function " style="filled" fillcolor=red]; + 28 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 29 [label="Exit function " style="filled" fillcolor=red]; } - 28 -> {29} [color=green]; - 29 -> {23 26} [color=green]; - 29 -> {23 26} [style=dashed]; - 23 -> {24}; - 24 -> {25}; - 26 -> {27}; + 23 -> {24} [color=green]; + 24 -> {25 27} [color=green]; + 24 -> {25 27} [style=dashed]; + 25 -> {26}; + 27 -> {28}; + 28 -> {29}; subgraph cluster_11 { color=red @@ -139,66 +139,66 @@ digraph lambdaInWhenBranch_kt { 50 [label="Postponed enter to lambda"]; subgraph cluster_18 { color=blue - 84 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 51 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 85 [label="Enter block"]; - 86 [label="Access variable R|/it|"]; - 87 [label="Exit block"]; + 52 [label="Enter block"]; + 53 [label="Access variable R|/it|"]; + 54 [label="Exit block"]; } - 88 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 55 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 51 [label="Postponed exit from lambda"]; - 52 [label="Function call: String().R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 53 [label="Exit block"]; + 56 [label="Postponed exit from lambda"]; + 57 [label="Function call: String().R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 58 [label="Exit block"]; } - 54 [label="Exit when branch result"]; - 55 [label="Exit when"]; + 59 [label="Exit when branch result"]; + 60 [label="Exit when"]; } - 56 [label="Access variable R|/p|"]; - 57 [label="Access variable #"]; + 61 [label="Access variable R|/p|"]; + 62 [label="Access variable #"]; subgraph cluster_20 { color=blue - 58 [label="Enter when"]; - 59 [label="Access variable R|/p|"]; + 63 [label="Enter when"]; + 64 [label="Access variable R|/p|"]; subgraph cluster_21 { color=blue - 60 [label="Enter when branch condition "]; - 61 [label="Exit $subj"]; - 62 [label="Type operator: ($subj$ is R|SubClass1|)"]; - 63 [label="Exit when branch condition"]; + 65 [label="Enter when branch condition "]; + 66 [label="Exit $subj"]; + 67 [label="Type operator: ($subj$ is R|SubClass1|)"]; + 68 [label="Exit when branch condition"]; } subgraph cluster_22 { color=blue - 64 [label="Enter when branch condition "]; - 65 [label="Exit $subj"]; - 66 [label="Type operator: ($subj$ is R|SubClass2|)"]; - 67 [label="Exit when branch condition"]; + 69 [label="Enter when branch condition "]; + 70 [label="Exit $subj"]; + 71 [label="Type operator: ($subj$ is R|SubClass2|)"]; + 72 [label="Exit when branch condition"]; } - 68 [label="Enter when branch result"]; + 73 [label="Enter when branch result"]; subgraph cluster_23 { color=blue - 69 [label="Enter block"]; - 70 [label="Const: String(2)"]; - 71 [label="Exit block"]; + 74 [label="Enter block"]; + 75 [label="Const: String(2)"]; + 76 [label="Exit block"]; } - 72 [label="Exit when branch result"]; - 73 [label="Enter when branch result"]; + 77 [label="Exit when branch result"]; + 78 [label="Enter when branch result"]; subgraph cluster_24 { color=blue - 74 [label="Enter block"]; - 75 [label="Access variable R|/p|"]; - 76 [label="Smart cast: R|/p|"]; - 77 [label="Access variable R|/SubClass1.t|"]; - 78 [label="Exit block"]; + 79 [label="Enter block"]; + 80 [label="Access variable R|/p|"]; + 81 [label="Smart cast: R|/p|"]; + 82 [label="Access variable R|/SubClass1.t|"]; + 83 [label="Exit block"]; } - 79 [label="Exit when branch result"]; - 80 [label="Exit when"]; + 84 [label="Exit when branch result"]; + 85 [label="Exit when"]; } - 81 [label="Access variable R|kotlin/String.length|"]; - 82 [label="Exit block"]; + 86 [label="Access variable R|kotlin/String.length|"]; + 87 [label="Exit block"]; } - 83 [label="Exit function foo" style="filled" fillcolor=red]; + 88 [label="Exit function foo" style="filled" fillcolor=red]; } 30 -> {31}; 31 -> {32}; @@ -216,50 +216,50 @@ digraph lambdaInWhenBranch_kt { 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {55}; + 46 -> {60}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {52 84}; - 50 -> {51} [style=dotted]; - 50 -> {84} [style=dashed]; - 51 -> {52} [color=green]; - 51 -> {55} [color=red]; + 50 -> {51 57}; + 50 -> {56} [style=dotted]; + 50 -> {51} [style=dashed]; + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57}; + 56 -> {57} [color=green]; + 56 -> {60} [color=red]; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {64 73}; + 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - 68 -> {69}; + 68 -> {69 78}; 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {80}; + 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {78}; + 77 -> {85}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; + 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {51}; } 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 c0fa6636fb4..3f7e1ac5775 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot @@ -5,18 +5,18 @@ digraph dataFlowInfoFromWhileCondition_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red 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 075229d84e2..747ab14808b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot @@ -5,18 +5,18 @@ digraph endlessLoops_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red @@ -56,24 +56,24 @@ digraph endlessLoops_kt { color=blue 20 [label="Enter block"]; 21 [label="Jump: break@@@[Boolean(true)] "]; - 28 [label="Stub" style="filled" fillcolor=gray]; - 29 [label="Exit block" style="filled" fillcolor=gray]; + 22 [label="Stub" style="filled" fillcolor=gray]; + 23 [label="Exit block" style="filled" fillcolor=gray]; } - 30 [label="Exit when branch result" style="filled" fillcolor=gray]; - 31 [label="Exit when"]; + 24 [label="Exit when branch result" style="filled" fillcolor=gray]; + 25 [label="Exit when"]; } - 32 [label="Exit block"]; + 26 [label="Exit block"]; } - 33 [label="Exit loop block"]; + 27 [label="Exit loop block"]; } - 22 [label="Exit whileloop"]; + 28 [label="Exit whileloop"]; } - 23 [label="Access variable R|/x|"]; - 24 [label="Smart cast: R|/x|"]; - 25 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 26 [label="Exit block"]; + 29 [label="Access variable R|/x|"]; + 30 [label="Smart cast: R|/x|"]; + 31 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 27 [label="Exit function test_1" style="filled" fillcolor=red]; + 33 [label="Exit function test_1" style="filled" fillcolor=red]; } 4 -> {5}; 5 -> {6}; @@ -81,7 +81,7 @@ digraph endlessLoops_kt { 7 -> {8}; 8 -> {9}; 9 -> {10}; - 9 -> {22} [style=dotted]; + 9 -> {28} [style=dotted]; 10 -> {11}; 11 -> {12}; 12 -> {13}; @@ -90,22 +90,22 @@ digraph endlessLoops_kt { 15 -> {16}; 16 -> {17}; 17 -> {18 19}; - 18 -> {31}; + 18 -> {25}; 19 -> {20}; 20 -> {21}; - 21 -> {22}; - 21 -> {28} [style=dotted]; - 22 -> {23}; - 23 -> {24}; - 24 -> {25}; + 21 -> {28}; + 21 -> {22} [style=dotted]; + 22 -> {23} [style=dotted]; + 23 -> {24} [style=dotted]; + 24 -> {25} [style=dotted]; 25 -> {26}; 26 -> {27}; - 28 -> {29} [style=dotted]; - 29 -> {30} [style=dotted]; - 30 -> {31} [style=dotted]; + 27 -> {7} [color=green style=dashed]; + 28 -> {29}; + 29 -> {30}; + 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {7} [color=green style=dashed]; subgraph cluster_11 { color=red @@ -145,24 +145,24 @@ digraph endlessLoops_kt { 49 [label="Access variable R|/x|"]; 50 [label="Type operator: (R|/x| as R|A|)"]; 51 [label="Jump: break@@@[Boolean(true)] "]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; } - 60 [label="Exit when branch result" style="filled" fillcolor=gray]; - 61 [label="Exit when"]; + 54 [label="Exit when branch result" style="filled" fillcolor=gray]; + 55 [label="Exit when"]; } - 62 [label="Exit block"]; + 56 [label="Exit block"]; } - 63 [label="Exit loop block"]; + 57 [label="Exit loop block"]; } - 52 [label="Exit whileloop"]; + 58 [label="Exit whileloop"]; } - 53 [label="Access variable R|/x|"]; - 54 [label="Smart cast: R|/x|"]; - 55 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 56 [label="Exit block"]; + 59 [label="Access variable R|/x|"]; + 60 [label="Smart cast: R|/x|"]; + 61 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 62 [label="Exit block"]; } - 57 [label="Exit function test_2" style="filled" fillcolor=red]; + 63 [label="Exit function test_2" style="filled" fillcolor=red]; } 34 -> {35}; 35 -> {36}; @@ -170,31 +170,31 @@ digraph endlessLoops_kt { 37 -> {38}; 38 -> {39}; 39 -> {40}; - 39 -> {52} [style=dotted]; + 39 -> {58} [style=dotted]; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46 47}; - 46 -> {61}; + 46 -> {55}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52}; - 51 -> {58} [style=dotted]; - 52 -> {53}; - 53 -> {54}; - 54 -> {55}; + 51 -> {58}; + 51 -> {52} [style=dotted]; + 52 -> {53} [style=dotted]; + 53 -> {54} [style=dotted]; + 54 -> {55} [style=dotted]; 55 -> {56}; 56 -> {57}; - 58 -> {59} [style=dotted]; - 59 -> {60} [style=dotted]; - 60 -> {61} [style=dotted]; + 57 -> {37} [color=green style=dashed]; + 58 -> {59}; + 59 -> {60}; + 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {37} [color=green style=dashed]; subgraph cluster_20 { color=red @@ -255,24 +255,24 @@ digraph endlessLoops_kt { color=blue 92 [label="Enter block"]; 93 [label="Jump: break@@@[Boolean(true)] "]; - 100 [label="Stub" style="filled" fillcolor=gray]; - 101 [label="Exit block" style="filled" fillcolor=gray]; + 94 [label="Stub" style="filled" fillcolor=gray]; + 95 [label="Exit block" style="filled" fillcolor=gray]; } - 102 [label="Exit when branch result" style="filled" fillcolor=gray]; - 103 [label="Exit when"]; + 96 [label="Exit when branch result" style="filled" fillcolor=gray]; + 97 [label="Exit when"]; } - 104 [label="Exit block"]; + 98 [label="Exit block"]; } - 105 [label="Exit loop block"]; + 99 [label="Exit loop block"]; } - 94 [label="Exit whileloop"]; + 100 [label="Exit whileloop"]; } - 95 [label="Access variable R|/x|"]; - 96 [label="Smart cast: R|/x|"]; - 97 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 98 [label="Exit block"]; + 101 [label="Access variable R|/x|"]; + 102 [label="Smart cast: R|/x|"]; + 103 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 104 [label="Exit block"]; } - 99 [label="Exit function test_3" style="filled" fillcolor=red]; + 105 [label="Exit function test_3" style="filled" fillcolor=red]; } 64 -> {65}; 65 -> {66}; @@ -280,7 +280,7 @@ digraph endlessLoops_kt { 67 -> {68}; 68 -> {69}; 69 -> {70}; - 69 -> {94} [style=dotted]; + 69 -> {100} [style=dotted]; 70 -> {71}; 71 -> {72}; 72 -> {73}; @@ -292,7 +292,7 @@ digraph endlessLoops_kt { 78 -> {85}; 79 -> {80}; 80 -> {81}; - 81 -> {94}; + 81 -> {100}; 81 -> {82} [style=dotted]; 82 -> {83} [style=dotted]; 83 -> {84} [style=dotted]; @@ -302,22 +302,22 @@ digraph endlessLoops_kt { 87 -> {88}; 88 -> {89}; 89 -> {90 91}; - 90 -> {103}; + 90 -> {97}; 91 -> {92}; 92 -> {93}; - 93 -> {94}; - 93 -> {100} [style=dotted]; - 94 -> {95}; - 95 -> {96}; - 96 -> {97}; + 93 -> {100}; + 93 -> {94} [style=dotted]; + 94 -> {95} [style=dotted]; + 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; 97 -> {98}; 98 -> {99}; - 100 -> {101} [style=dotted]; - 101 -> {102} [style=dotted]; - 102 -> {103} [style=dotted]; + 99 -> {67} [color=green style=dashed]; + 100 -> {101}; + 101 -> {102}; + 102 -> {103}; 103 -> {104}; 104 -> {105}; - 105 -> {67} [color=green style=dashed]; subgraph cluster_32 { color=red @@ -364,18 +364,18 @@ digraph endlessLoops_kt { 127 [label="Exit when"]; } 128 [label="Jump: break@@@[Boolean(true)] "]; - 134 [label="Stub" style="filled" fillcolor=gray]; - 135 [label="Exit block" style="filled" fillcolor=gray]; + 129 [label="Stub" style="filled" fillcolor=gray]; + 130 [label="Exit block" style="filled" fillcolor=gray]; } - 136 [label="Exit loop block" style="filled" fillcolor=gray]; + 131 [label="Exit loop block" style="filled" fillcolor=gray]; } - 129 [label="Exit whileloop"]; + 132 [label="Exit whileloop"]; } - 130 [label="Access variable R|/x|"]; - 131 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 132 [label="Exit block"]; + 133 [label="Access variable R|/x|"]; + 134 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 135 [label="Exit block"]; } - 133 [label="Exit function test_4" style="filled" fillcolor=red]; + 136 [label="Exit function test_4" style="filled" fillcolor=red]; } 106 -> {107}; 107 -> {108}; @@ -383,7 +383,7 @@ digraph endlessLoops_kt { 109 -> {110}; 110 -> {111}; 111 -> {112}; - 111 -> {129} [style=dotted]; + 111 -> {132} [style=dotted]; 112 -> {113}; 113 -> {114}; 114 -> {115}; @@ -395,21 +395,21 @@ digraph endlessLoops_kt { 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {129}; + 123 -> {132}; 123 -> {124} [style=dotted]; 124 -> {125} [style=dotted]; 125 -> {126} [style=dotted]; 126 -> {127} [style=dotted]; 127 -> {128}; - 128 -> {129}; - 128 -> {134} [style=dotted]; - 129 -> {130}; - 130 -> {131}; - 131 -> {132}; + 128 -> {132}; + 128 -> {129} [style=dotted]; + 129 -> {130} [style=dotted]; + 130 -> {131} [style=dotted]; + 131 -> {109} [color=green style=dotted]; 132 -> {133}; - 134 -> {135} [style=dotted]; - 135 -> {136} [style=dotted]; - 136 -> {109} [color=green style=dotted]; + 133 -> {134}; + 134 -> {135}; + 135 -> {136}; subgraph cluster_41 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot index 514ba5c72b9..4d902307352 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot @@ -5,33 +5,33 @@ digraph multipleCasts_kt { subgraph cluster_0 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [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]; } subgraph cluster_1 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" style="filled" fillcolor=red]; + 3 [label="Exit function foo" style="filled" fillcolor=red]; } - 2 -> {3} [color=green]; - 3 -> {0} [color=green]; - 3 -> {0} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; subgraph cluster_2 { color=red - 6 [label="Enter class B" style="filled" fillcolor=red]; - 7 [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]; } subgraph cluster_3 { color=blue - 4 [label="Enter function foo" style="filled" fillcolor=red]; - 5 [label="Exit function foo" style="filled" fillcolor=red]; + 6 [label="Enter function foo" style="filled" fillcolor=red]; + 7 [label="Exit function foo" style="filled" fillcolor=red]; } - 6 -> {7} [color=green]; - 7 -> {4} [color=green]; - 7 -> {4} [style=dashed]; - 4 -> {5}; + 4 -> {5} [color=green]; + 5 -> {6} [color=green]; + 5 -> {6} [style=dashed]; + 6 -> {7}; subgraph cluster_4 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot index 78e75c75c8d..4ef1686b997 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot @@ -5,8 +5,8 @@ digraph nullability_kt { subgraph cluster_0 { color=red - 4 [label="Enter class A" style="filled" fillcolor=red]; - 5 [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]; } subgraph cluster_1 { color=blue @@ -15,56 +15,56 @@ digraph nullability_kt { } subgraph cluster_2 { color=blue - 0 [label="Enter function foo" style="filled" fillcolor=red]; - 1 [label="Exit function foo" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5} [color=green]; - 5 -> {0 2} [color=green]; - 5 -> {0 2} [style=dashed]; - 0 -> {1}; + 0 -> {1} [color=green]; + 1 -> {2 4} [color=green]; + 1 -> {2 4} [style=dashed]; 2 -> {3}; + 4 -> {5}; subgraph cluster_3 { color=red - 8 [label="Enter class MyData" style="filled" fillcolor=red]; - 9 [label="Exit class MyData" style="filled" fillcolor=red]; + 6 [label="Enter class MyData" style="filled" fillcolor=red]; + 7 [label="Exit class MyData" style="filled" fillcolor=red]; } subgraph cluster_4 { color=blue - 6 [label="Enter function fs" style="filled" fillcolor=red]; - 7 [label="Exit function fs" style="filled" fillcolor=red]; + 8 [label="Enter function fs" style="filled" fillcolor=red]; + 9 [label="Exit function fs" style="filled" fillcolor=red]; } - 8 -> {9} [color=green]; - 9 -> {6} [color=green]; - 9 -> {6} [style=dashed]; - 6 -> {7}; + 6 -> {7} [color=green]; + 7 -> {8} [color=green]; + 7 -> {8} [style=dashed]; + 8 -> {9}; subgraph cluster_5 { color=red - 12 [label="Enter class Q" style="filled" fillcolor=red]; - 13 [label="Exit class Q" style="filled" fillcolor=red]; + 10 [label="Enter class Q" style="filled" fillcolor=red]; + 11 [label="Exit class Q" style="filled" fillcolor=red]; } subgraph cluster_6 { color=blue - 10 [label="Enter function fdata" style="filled" fillcolor=red]; - 11 [label="Exit function fdata" style="filled" fillcolor=red]; + 12 [label="Enter function fdata" style="filled" fillcolor=red]; + 13 [label="Exit function fdata" style="filled" fillcolor=red]; } - 12 -> {13} [color=green]; - 13 -> {10} [color=green]; - 13 -> {10} [style=dashed]; - 10 -> {11}; + 10 -> {11} [color=green]; + 11 -> {12} [color=green]; + 11 -> {12} [style=dashed]; + 12 -> {13}; subgraph cluster_7 { color=red - 27 [label="Enter class QImpl" style="filled" fillcolor=red]; - 28 [label="Part of class initialization"]; + 14 [label="Enter class QImpl" style="filled" fillcolor=red]; + 15 [label="Part of class initialization"]; subgraph cluster_8 { color=blue - 17 [label="Enter property" style="filled" fillcolor=red]; - 18 [label="Access variable R|/data|"]; - 19 [label="Exit property" style="filled" fillcolor=red]; + 16 [label="Enter property" style="filled" fillcolor=red]; + 17 [label="Access variable R|/data|"]; + 18 [label="Exit property" style="filled" fillcolor=red]; } - 29 [label="Exit class QImpl" style="filled" fillcolor=red]; + 19 [label="Exit class QImpl" style="filled" fillcolor=red]; } subgraph cluster_9 { color=blue @@ -81,21 +81,19 @@ digraph nullability_kt { } subgraph cluster_11 { color=blue - 14 [label="Enter function " style="filled" fillcolor=red]; - 15 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 16 [label="Exit function " style="filled" fillcolor=red]; + 27 [label="Enter function " style="filled" fillcolor=red]; + 28 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 29 [label="Exit function " style="filled" fillcolor=red]; } - 27 -> {28} [color=green]; - 28 -> {17} [color=green]; - 28 -> {29} [style=dotted]; - 28 -> {17} [style=dashed]; - 29 -> {14 20} [color=green]; - 29 -> {14 20} [style=dashed]; + 14 -> {15} [color=green]; + 15 -> {16} [color=green]; + 15 -> {19} [style=dotted]; + 15 -> {16} [style=dashed]; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; - 19 -> {29} [color=green]; - 14 -> {15}; - 15 -> {16}; + 18 -> {19} [color=green]; + 19 -> {20 27} [color=green]; + 19 -> {20 27} [style=dashed]; 20 -> {21}; 21 -> {22}; 22 -> {23}; @@ -103,18 +101,20 @@ digraph nullability_kt { 23 -> {24} [style=dotted]; 24 -> {25} [style=dotted]; 25 -> {26} [style=dotted]; + 27 -> {28}; + 28 -> {29}; subgraph cluster_12 { color=red - 43 [label="Enter class QImplMutable" style="filled" fillcolor=red]; - 44 [label="Part of class initialization"]; + 30 [label="Enter class QImplMutable" style="filled" fillcolor=red]; + 31 [label="Part of class initialization"]; subgraph cluster_13 { color=blue - 33 [label="Enter property" style="filled" fillcolor=red]; - 34 [label="Access variable R|/data|"]; - 35 [label="Exit property" style="filled" fillcolor=red]; + 32 [label="Enter property" style="filled" fillcolor=red]; + 33 [label="Access variable R|/data|"]; + 34 [label="Exit property" style="filled" fillcolor=red]; } - 45 [label="Exit class QImplMutable" style="filled" fillcolor=red]; + 35 [label="Exit class QImplMutable" style="filled" fillcolor=red]; } subgraph cluster_14 { color=blue @@ -131,21 +131,19 @@ digraph nullability_kt { } subgraph cluster_16 { color=blue - 30 [label="Enter function " style="filled" fillcolor=red]; - 31 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 32 [label="Exit function " style="filled" fillcolor=red]; + 43 [label="Enter function " style="filled" fillcolor=red]; + 44 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 45 [label="Exit function " style="filled" fillcolor=red]; } - 43 -> {44} [color=green]; - 44 -> {33} [color=green]; - 44 -> {45} [style=dotted]; - 44 -> {33} [style=dashed]; - 45 -> {30 36} [color=green]; - 45 -> {30 36} [style=dashed]; + 30 -> {31} [color=green]; + 31 -> {32} [color=green]; + 31 -> {35} [style=dotted]; + 31 -> {32} [style=dashed]; + 32 -> {33}; 33 -> {34}; - 34 -> {35}; - 35 -> {45} [color=green]; - 30 -> {31}; - 31 -> {32}; + 34 -> {35} [color=green]; + 35 -> {36 43} [color=green]; + 35 -> {36 43} [style=dashed]; 36 -> {37}; 37 -> {38}; 38 -> {39}; @@ -153,63 +151,65 @@ digraph nullability_kt { 39 -> {40} [style=dotted]; 40 -> {41} [style=dotted]; 41 -> {42} [style=dotted]; + 43 -> {44}; + 44 -> {45}; subgraph cluster_17 { color=red - 63 [label="Enter class QImplWithCustomGetter" style="filled" fillcolor=red]; - 64 [label="Exit class QImplWithCustomGetter" style="filled" fillcolor=red]; + 46 [label="Enter class QImplWithCustomGetter" style="filled" fillcolor=red]; + 47 [label="Exit class QImplWithCustomGetter" style="filled" fillcolor=red]; } subgraph cluster_18 { color=blue - 56 [label="Enter function fdata" style="filled" fillcolor=red]; + 48 [label="Enter function fdata" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 57 [label="Enter block"]; - 58 [label="Const: Null(null)"]; - 59 [label="Jump: ^fdata Null(null)"]; - 60 [label="Stub" style="filled" fillcolor=gray]; - 61 [label="Exit block" style="filled" fillcolor=gray]; + 49 [label="Enter block"]; + 50 [label="Const: Null(null)"]; + 51 [label="Jump: ^fdata Null(null)"]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; } - 62 [label="Exit function fdata" style="filled" fillcolor=red]; + 54 [label="Exit function fdata" style="filled" fillcolor=red]; } subgraph cluster_20 { color=blue - 49 [label="Enter function getter" style="filled" fillcolor=red]; + 55 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 50 [label="Enter block"]; - 51 [label="Const: Null(null)"]; - 52 [label="Jump: ^ Null(null)"]; - 53 [label="Stub" style="filled" fillcolor=gray]; - 54 [label="Exit block" style="filled" fillcolor=gray]; + 56 [label="Enter block"]; + 57 [label="Const: Null(null)"]; + 58 [label="Jump: ^ Null(null)"]; + 59 [label="Stub" style="filled" fillcolor=gray]; + 60 [label="Exit block" style="filled" fillcolor=gray]; } - 55 [label="Exit function getter" style="filled" fillcolor=red]; + 61 [label="Exit function getter" style="filled" fillcolor=red]; } subgraph cluster_22 { color=blue - 46 [label="Enter function " style="filled" fillcolor=red]; - 47 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 48 [label="Exit function " style="filled" fillcolor=red]; + 62 [label="Enter function " style="filled" fillcolor=red]; + 63 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 64 [label="Exit function " style="filled" fillcolor=red]; } - 63 -> {64} [color=green]; - 64 -> {46 49 56} [color=green]; - 64 -> {46 49 56} [style=dashed]; - 46 -> {47}; - 47 -> {48}; + 46 -> {47} [color=green]; + 47 -> {48 55 62} [color=green]; + 47 -> {48 55 62} [style=dashed]; + 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52}; - 52 -> {55}; + 51 -> {54}; + 51 -> {52} [style=dotted]; 52 -> {53} [style=dotted]; 53 -> {54} [style=dotted]; - 54 -> {55} [style=dotted]; + 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {59}; - 59 -> {62}; + 58 -> {61}; + 58 -> {59} [style=dotted]; 59 -> {60} [style=dotted]; 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; + 62 -> {63}; + 63 -> {64}; subgraph cluster_23 { color=red 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 2bd30514fba..21373557a88 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot @@ -5,63 +5,63 @@ digraph implicitReceivers_kt { subgraph cluster_0 { color=red - 7 [label="Enter class A" style="filled" fillcolor=red]; - 8 [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]; } subgraph cluster_1 { color=blue - 3 [label="Enter function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" 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"]; } - 6 [label="Exit function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } subgraph cluster_3 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 6 [label="Enter function " style="filled" fillcolor=red]; + 7 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 8 [label="Exit function " style="filled" fillcolor=red]; } - 7 -> {8} [color=green]; - 8 -> {0 3} [color=green]; - 8 -> {0 3} [style=dashed]; - 0 -> {1}; - 1 -> {2}; + 0 -> {1} [color=green]; + 1 -> {2 6} [color=green]; + 1 -> {2 6} [style=dashed]; + 2 -> {3}; 3 -> {4}; 4 -> {5}; - 5 -> {6}; + 6 -> {7}; + 7 -> {8}; subgraph cluster_4 { color=red - 16 [label="Enter class B" style="filled" fillcolor=red]; - 17 [label="Exit class B" style="filled" fillcolor=red]; + 9 [label="Enter class B" style="filled" fillcolor=red]; + 10 [label="Exit class B" style="filled" fillcolor=red]; } subgraph cluster_5 { color=blue - 12 [label="Enter function bar" style="filled" fillcolor=red]; + 11 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 13 [label="Enter block"]; - 14 [label="Exit block"]; + 12 [label="Enter block"]; + 13 [label="Exit block"]; } - 15 [label="Exit function bar" style="filled" fillcolor=red]; + 14 [label="Exit function bar" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 9 [label="Enter function " style="filled" fillcolor=red]; - 10 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 11 [label="Exit function " style="filled" fillcolor=red]; + 15 [label="Enter function " style="filled" fillcolor=red]; + 16 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 17 [label="Exit function " style="filled" fillcolor=red]; } - 16 -> {17} [color=green]; - 17 -> {9 12} [color=green]; - 17 -> {9 12} [style=dashed]; - 9 -> {10}; - 10 -> {11}; + 9 -> {10} [color=green]; + 10 -> {11 15} [color=green]; + 10 -> {11 15} [style=dashed]; + 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15}; + 15 -> {16}; + 16 -> {17}; subgraph cluster_8 { color=red @@ -249,84 +249,84 @@ digraph implicitReceivers_kt { 85 [label="Postponed enter to lambda"]; subgraph cluster_26 { color=blue - 90 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 86 [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"]; + 87 [label="Enter block"]; + 88 [label="Access variable R|/b|"]; + 89 [label="Postponed enter to lambda"]; subgraph cluster_28 { color=blue - 98 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 90 [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"]; + 91 [label="Enter block"]; + 92 [label="Access variable R|/c|"]; + 93 [label="Postponed enter to lambda"]; subgraph cluster_30 { color=blue - 110 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 94 [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|"]; - 115 [label="Smart cast: this@R|special/anonymous|"]; - 116 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 117 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 118 [label="Exit block"]; + 95 [label="Enter block"]; + 96 [label="Access variable this@R|special/anonymous|"]; + 97 [label="Type operator: (this@R|special/anonymous| as R|A|)"]; + 98 [label="Access variable this@R|special/anonymous|"]; + 99 [label="Smart cast: this@R|special/anonymous|"]; + 100 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 101 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 102 [label="Exit block"]; } - 119 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 103 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 102 [label="Postponed exit from lambda"]; - 103 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 104 [label="Access variable this@R|special/anonymous|"]; - 105 [label="Smart cast: this@R|special/anonymous|"]; - 106 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 107 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 108 [label="Exit block"]; + 104 [label="Postponed exit from lambda"]; + 105 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 106 [label="Access variable this@R|special/anonymous|"]; + 107 [label="Smart cast: this@R|special/anonymous|"]; + 108 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 109 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 110 [label="Exit block"]; } - 109 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 111 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 94 [label="Postponed exit from lambda"]; - 95 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 96 [label="Exit block"]; + 112 [label="Postponed exit from lambda"]; + 113 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 114 [label="Exit block"]; } - 97 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 115 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 86 [label="Postponed exit from lambda"]; - 87 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 88 [label="Exit block"]; + 116 [label="Postponed exit from lambda"]; + 117 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 118 [label="Exit block"]; } - 89 [label="Exit function test_3" style="filled" fillcolor=red]; + 119 [label="Exit function test_3" style="filled" fillcolor=red]; } 82 -> {83}; 83 -> {84}; 84 -> {85}; - 85 -> {87 90}; - 85 -> {86} [style=dotted]; - 85 -> {90} [style=dashed]; + 85 -> {86 117}; + 85 -> {116} [style=dotted]; + 85 -> {86} [style=dashed]; 86 -> {87}; 87 -> {88}; 88 -> {89}; + 89 -> {90 113}; + 89 -> {112} [style=dotted]; + 89 -> {90} [style=dashed]; 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {95 98}; - 93 -> {94} [style=dotted]; - 93 -> {98} [style=dashed]; - 94 -> {95} [color=green]; - 94 -> {87} [color=red]; + 93 -> {94 105}; + 93 -> {104} [style=dotted]; + 93 -> {94} [style=dashed]; + 94 -> {95}; 95 -> {96}; 96 -> {97}; - 97 -> {86}; + 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {103 110}; - 101 -> {102} [style=dotted]; - 101 -> {110} [style=dashed]; + 101 -> {102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; @@ -334,17 +334,17 @@ digraph implicitReceivers_kt { 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {94}; + 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; + 112 -> {113} [color=green]; + 112 -> {117} [color=red]; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; 118 -> {119}; - 119 -> {102}; subgraph cluster_32 { color=red 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 d0710c41895..d5e986edaa7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot @@ -5,66 +5,66 @@ digraph assignSafeCall_kt { subgraph cluster_0 { color=red - 17 [label="Enter class A" style="filled" fillcolor=red]; - 18 [label="Part of class initialization"]; + 0 [label="Enter class A" style="filled" fillcolor=red]; + 1 [label="Part of class initialization"]; subgraph cluster_1 { color=blue - 10 [label="Enter property" style="filled" fillcolor=red]; - 11 [label="Const: Int(1)"]; - 12 [label="Exit property" style="filled" fillcolor=red]; + 2 [label="Enter property" style="filled" fillcolor=red]; + 3 [label="Const: Int(1)"]; + 4 [label="Exit property" style="filled" fillcolor=red]; } - 19 [label="Exit class A" style="filled" fillcolor=red]; + 5 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_2 { color=blue - 13 [label="Enter function bar" style="filled" fillcolor=red]; + 6 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 14 [label="Enter block"]; - 15 [label="Exit block"]; + 7 [label="Enter block"]; + 8 [label="Exit block"]; } - 16 [label="Exit function bar" style="filled" fillcolor=red]; + 9 [label="Exit function bar" style="filled" fillcolor=red]; } subgraph cluster_4 { color=blue - 3 [label="Enter function foo" style="filled" fillcolor=red]; + 10 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 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]; + 11 [label="Enter block"]; + 12 [label="Const: Int(1)"]; + 13 [label="Jump: ^foo Int(1)"]; + 14 [label="Stub" style="filled" fillcolor=gray]; + 15 [label="Exit block" style="filled" fillcolor=gray]; } - 9 [label="Exit function foo" style="filled" fillcolor=red]; + 16 [label="Exit function foo" style="filled" fillcolor=red]; } subgraph cluster_6 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 17 [label="Enter function " style="filled" fillcolor=red]; + 18 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 19 [label="Exit function " style="filled" fillcolor=red]; } - 17 -> {18} [color=green]; - 18 -> {10} [color=green]; - 18 -> {19} [style=dotted]; - 18 -> {10} [style=dashed]; - 19 -> {0 3 13} [color=green]; - 19 -> {0 3 13} [style=dashed]; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {5} [style=dotted]; + 1 -> {2} [style=dashed]; + 2 -> {3}; + 3 -> {4}; + 4 -> {5} [color=green]; + 5 -> {6 10 17} [color=green]; + 5 -> {6 10 17} [style=dashed]; + 6 -> {7}; + 7 -> {8}; + 8 -> {9}; 10 -> {11}; 11 -> {12}; - 12 -> {19} [color=green]; - 0 -> {1}; - 1 -> {2}; - 3 -> {4}; - 4 -> {5}; - 5 -> {6}; - 6 -> {9}; - 6 -> {7} [style=dotted]; - 7 -> {8} [style=dotted]; - 8 -> {9} [style=dotted]; - 13 -> {14}; - 14 -> {15}; - 15 -> {16}; + 12 -> {13}; + 13 -> {16}; + 13 -> {14} [style=dotted]; + 14 -> {15} [style=dotted]; + 15 -> {16} [style=dotted]; + 17 -> {18}; + 18 -> {19}; subgraph cluster_7 { color=red @@ -237,8 +237,8 @@ digraph assignSafeCall_kt { subgraph cluster_19 { color=red - 90 [label="Enter class B" style="filled" fillcolor=red]; - 91 [label="Exit class B" style="filled" fillcolor=red]; + 86 [label="Enter class B" style="filled" fillcolor=red]; + 87 [label="Exit class B" style="filled" fillcolor=red]; } subgraph cluster_20 { color=blue @@ -247,14 +247,14 @@ digraph assignSafeCall_kt { } subgraph cluster_21 { color=blue - 86 [label="Enter function foo" style="filled" fillcolor=red]; - 87 [label="Exit function foo" style="filled" fillcolor=red]; + 90 [label="Enter function foo" style="filled" fillcolor=red]; + 91 [label="Exit function foo" style="filled" fillcolor=red]; } - 90 -> {91} [color=green]; - 91 -> {86 88} [color=green]; - 91 -> {86 88} [style=dashed]; - 86 -> {87}; + 86 -> {87} [color=green]; + 87 -> {88 90} [color=green]; + 87 -> {88 90} [style=dashed]; 88 -> {89}; + 90 -> {91}; subgraph cluster_22 { color=red 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 721f916848c..e3ecaad9a75 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot @@ -76,30 +76,30 @@ digraph safeCalls_kt { subgraph cluster_6 { color=red - 32 [label="Enter class A" style="filled" fillcolor=red]; - 33 [label="Exit class A" style="filled" fillcolor=red]; + 26 [label="Enter class A" style="filled" fillcolor=red]; + 27 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 30 [label="Enter function id" style="filled" fillcolor=red]; - 31 [label="Exit function id" style="filled" fillcolor=red]; + 28 [label="Enter function id" style="filled" fillcolor=red]; + 29 [label="Exit function id" style="filled" fillcolor=red]; } subgraph cluster_8 { color=blue - 28 [label="Enter function bool" style="filled" fillcolor=red]; - 29 [label="Exit function bool" style="filled" fillcolor=red]; + 30 [label="Enter function bool" style="filled" fillcolor=red]; + 31 [label="Exit function bool" style="filled" fillcolor=red]; } subgraph cluster_9 { color=blue - 26 [label="Enter function bar" style="filled" fillcolor=red]; - 27 [label="Exit function bar" style="filled" fillcolor=red]; + 32 [label="Enter function bar" style="filled" fillcolor=red]; + 33 [label="Exit function bar" style="filled" fillcolor=red]; } - 32 -> {33} [color=green]; - 33 -> {26 28 30} [color=green]; - 33 -> {26 28 30} [style=dashed]; - 26 -> {27}; + 26 -> {27} [color=green]; + 27 -> {28 30 32} [color=green]; + 27 -> {28 30 32} [style=dashed]; 28 -> {29}; 30 -> {31}; + 32 -> {33}; subgraph cluster_10 { color=red @@ -150,52 +150,52 @@ digraph safeCalls_kt { 59 [label="Postponed enter to lambda"]; subgraph cluster_14 { color=blue - 69 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 60 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 70 [label="Enter block"]; - 71 [label="Access variable R|/x|"]; - 72 [label="Smart cast: R|/x|"]; - 73 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; - 74 [label="Exit block"]; + 61 [label="Enter block"]; + 62 [label="Access variable R|/x|"]; + 63 [label="Smart cast: R|/x|"]; + 64 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; + 65 [label="Exit block"]; } - 75 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 66 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 60 [label="Postponed exit from lambda"]; - 61 [label="Function call: $subj$.R|/let|(...)" style="filled" fillcolor=yellow]; - 62 [label="Exit safe call"]; - 63 [label="Exit safe call"]; - 64 [label="Exit safe call"]; - 65 [label="Access variable R|/x|"]; - 66 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 67 [label="Exit block"]; + 67 [label="Postponed exit from lambda"]; + 68 [label="Function call: $subj$.R|/let|(...)" style="filled" fillcolor=yellow]; + 69 [label="Exit safe call"]; + 70 [label="Exit safe call"]; + 71 [label="Exit safe call"]; + 72 [label="Access variable R|/x|"]; + 73 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 74 [label="Exit block"]; } - 68 [label="Exit function test_3" style="filled" fillcolor=red]; + 75 [label="Exit function test_3" style="filled" fillcolor=red]; } 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {49 62}; + 48 -> {49 69}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {53 62}; + 52 -> {53 69}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58 63}; + 57 -> {58 70}; 58 -> {59}; - 59 -> {60 61 69}; - 59 -> {69} [style=dashed]; + 59 -> {60 67 68}; + 59 -> {60} [style=dashed]; 60 -> {61}; - 61 -> {64}; + 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {67}; 67 -> {68}; + 68 -> {71}; 69 -> {70}; 70 -> {71}; 71 -> {72}; @@ -260,58 +260,58 @@ digraph safeCalls_kt { 97 [label="Postponed enter to lambda"]; subgraph cluster_22 { color=blue - 112 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 98 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_23 { color=blue - 113 [label="Enter block"]; - 114 [label="Jump: ^test_5 Unit"]; - 115 [label="Stub" style="filled" fillcolor=gray]; - 116 [label="Exit block" style="filled" fillcolor=gray]; + 99 [label="Enter block"]; + 100 [label="Jump: ^test_5 Unit"]; + 101 [label="Stub" style="filled" fillcolor=gray]; + 102 [label="Exit block" style="filled" fillcolor=gray]; } - 117 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; + 103 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; } - 98 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 99 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=gray]; - 100 [label="Stub" style="filled" fillcolor=gray]; - 101 [label="Enter safe call" style="filled" fillcolor=gray]; - 102 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 103 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; - 104 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=gray]; - 105 [label="Function call: $subj$.R|/boo|(...)" style="filled" fillcolor=gray]; - 106 [label="Exit safe call"]; - 107 [label="Exit safe call"]; - 108 [label="Access variable R|/x|"]; - 109 [label="Function call: R|/x|.R|/A.id#|()" style="filled" fillcolor=yellow]; - 110 [label="Exit block"]; + 104 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 105 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=gray]; + 106 [label="Stub" style="filled" fillcolor=gray]; + 107 [label="Enter safe call" style="filled" fillcolor=gray]; + 108 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 109 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; + 110 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=gray]; + 111 [label="Function call: $subj$.R|/boo|(...)" style="filled" fillcolor=gray]; + 112 [label="Exit safe call"]; + 113 [label="Exit safe call"]; + 114 [label="Access variable R|/x|"]; + 115 [label="Function call: R|/x|.R|/A.id#|()" style="filled" fillcolor=yellow]; + 116 [label="Exit block"]; } - 111 [label="Exit function test_5" style="filled" fillcolor=red]; + 117 [label="Exit function test_5" style="filled" fillcolor=red]; } 93 -> {94}; 94 -> {95}; - 95 -> {96 106}; + 95 -> {96 112}; 96 -> {97}; - 97 -> {112}; - 97 -> {98 99} [style=dotted]; - 97 -> {112} [style=dashed]; - 98 -> {99} [style=dotted]; - 99 -> {100} [style=dotted]; - 100 -> {101 106} [style=dotted]; + 97 -> {98}; + 97 -> {104 105} [style=dotted]; + 97 -> {98} [style=dashed]; + 98 -> {99}; + 99 -> {100}; + 100 -> {117}; + 100 -> {101} [style=dotted]; 101 -> {102} [style=dotted]; 102 -> {103} [style=dotted]; 103 -> {104} [style=dotted]; 104 -> {105} [style=dotted]; - 105 -> {107} [style=dotted]; - 106 -> {107}; - 107 -> {108}; - 108 -> {109}; - 109 -> {110}; - 110 -> {111}; + 105 -> {106} [style=dotted]; + 106 -> {107 112} [style=dotted]; + 107 -> {108} [style=dotted]; + 108 -> {109} [style=dotted]; + 109 -> {110} [style=dotted]; + 110 -> {111} [style=dotted]; + 111 -> {113} [style=dotted]; 112 -> {113}; 113 -> {114}; - 114 -> {111}; - 114 -> {115} [style=dotted]; - 115 -> {116} [style=dotted]; - 116 -> {117} [style=dotted]; - 117 -> {98} [style=dotted]; + 114 -> {115}; + 115 -> {116}; + 116 -> {117}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot index 3dea80ee5f7..7d052a73390 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot @@ -12,18 +12,18 @@ digraph smartCastInInit_kt { subgraph cluster_1 { color=red - 4 [label="Enter class S" style="filled" fillcolor=red]; - 5 [label="Exit class S" style="filled" fillcolor=red]; + 2 [label="Enter class S" style="filled" fillcolor=red]; + 3 [label="Exit class S" style="filled" fillcolor=red]; } subgraph cluster_2 { color=blue - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5} [color=green]; - 5 -> {2} [color=green]; - 5 -> {2} [style=dashed]; - 2 -> {3}; + 2 -> {3} [color=green]; + 3 -> {4} [color=green]; + 3 -> {4} [style=dashed]; + 4 -> {5}; subgraph cluster_3 { color=red @@ -49,37 +49,36 @@ digraph smartCastInInit_kt { subgraph cluster_5 { color=red - 26 [label="Enter class Main" style="filled" fillcolor=red]; - 27 [label="Part of class initialization"]; + 14 [label="Enter class Main" style="filled" fillcolor=red]; + 15 [label="Part of class initialization"]; subgraph cluster_6 { color=blue - 17 [label="Enter init block" style="filled" fillcolor=red]; + 16 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 18 [label="Enter block"]; - 19 [label="Function call: R|/s|()" style="filled" fillcolor=yellow]; - 20 [label="Assignment: R|/Main.x|"]; - 21 [label="Access variable R|/Main.x|"]; - 22 [label="Smart cast: this@R|/Main|.R|/Main.x|"]; - 23 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()" style="filled" fillcolor=yellow]; - 24 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Function call: R|/s|()" style="filled" fillcolor=yellow]; + 19 [label="Assignment: R|/Main.x|"]; + 20 [label="Access variable R|/Main.x|"]; + 21 [label="Smart cast: this@R|/Main|.R|/Main.x|"]; + 22 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()" style="filled" fillcolor=yellow]; + 23 [label="Exit block"]; } - 25 [label="Exit init block" style="filled" fillcolor=red]; + 24 [label="Exit init block" style="filled" fillcolor=red]; } - 28 [label="Exit class Main" style="filled" fillcolor=red]; + 25 [label="Exit class Main" style="filled" fillcolor=red]; } subgraph cluster_8 { color=blue - 14 [label="Enter function " style="filled" fillcolor=red]; - 15 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 16 [label="Exit function " style="filled" fillcolor=red]; + 26 [label="Enter function " style="filled" fillcolor=red]; + 27 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 28 [label="Exit function " style="filled" fillcolor=red]; } - 26 -> {27} [color=green]; - 27 -> {17} [color=green]; - 27 -> {28} [style=dotted]; - 27 -> {17} [style=dashed]; - 28 -> {14} [color=green]; - 28 -> {14} [style=dashed]; + 14 -> {15} [color=green]; + 15 -> {16} [color=green]; + 15 -> {25} [style=dotted]; + 15 -> {16} [style=dashed]; + 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; @@ -87,9 +86,10 @@ digraph smartCastInInit_kt { 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25}; - 25 -> {28} [color=green]; - 14 -> {15}; - 15 -> {16}; + 24 -> {25} [color=green]; + 25 -> {26} [color=green]; + 25 -> {26} [style=dashed]; + 26 -> {27}; + 27 -> {28}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot index dc44604c45c..4f2bbba9099 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot @@ -5,46 +5,46 @@ digraph smartcastInByClause_kt { subgraph cluster_0 { color=red - 9 [label="Enter class A" style="filled" fillcolor=red]; - 10 [label="Part of class initialization"]; + 0 [label="Enter class A" style="filled" fillcolor=red]; + 1 [label="Part of class initialization"]; subgraph cluster_1 { color=blue - 3 [label="Enter property" style="filled" fillcolor=red]; - 4 [label="Access variable R|/path|"]; - 5 [label="Exit property" style="filled" fillcolor=red]; + 2 [label="Enter property" style="filled" fillcolor=red]; + 3 [label="Access variable R|/path|"]; + 4 [label="Exit property" style="filled" fillcolor=red]; } - 11 [label="Part of class initialization"]; + 5 [label="Part of class initialization"]; subgraph cluster_2 { color=blue 6 [label="Enter property" style="filled" fillcolor=red]; 7 [label="Access variable R|/index|"]; 8 [label="Exit property" style="filled" fillcolor=red]; } - 12 [label="Exit class A" style="filled" fillcolor=red]; + 9 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_3 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 10 [label="Enter function " style="filled" fillcolor=red]; + 11 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 12 [label="Exit function " style="filled" fillcolor=red]; } - 9 -> {10} [color=green]; - 10 -> {3} [color=green]; - 10 -> {11} [style=dotted]; - 10 -> {3} [style=dashed]; - 11 -> {6} [color=green]; - 11 -> {12} [style=dotted]; - 11 -> {6} [style=dashed]; - 12 -> {0} [color=green]; - 12 -> {0} [style=dashed]; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {5} [style=dotted]; + 1 -> {2} [style=dashed]; + 2 -> {3}; 3 -> {4}; - 4 -> {5}; - 5 -> {11} [color=green]; + 4 -> {5} [color=green]; + 5 -> {6} [color=green]; + 5 -> {9} [style=dotted]; + 5 -> {6} [style=dashed]; 6 -> {7}; 7 -> {8}; - 8 -> {12} [color=green]; - 0 -> {1}; - 1 -> {2}; + 8 -> {9} [color=green]; + 9 -> {10} [color=green]; + 9 -> {10} [style=dashed]; + 10 -> {11}; + 11 -> {12}; subgraph cluster_4 { color=red @@ -55,33 +55,33 @@ digraph smartcastInByClause_kt { subgraph cluster_5 { color=red - 21 [label="Enter class Derived" style="filled" fillcolor=red]; - 22 [label="Part of class initialization"]; + 15 [label="Enter class Derived" style="filled" fillcolor=red]; + 16 [label="Part of class initialization"]; subgraph cluster_6 { color=blue - 18 [label="Enter property" style="filled" fillcolor=red]; - 19 [label="Access variable R|/index|"]; - 20 [label="Exit property" style="filled" fillcolor=red]; + 17 [label="Enter property" style="filled" fillcolor=red]; + 18 [label="Access variable R|/index|"]; + 19 [label="Exit property" style="filled" fillcolor=red]; } - 23 [label="Exit class Derived" style="filled" fillcolor=red]; + 20 [label="Exit class Derived" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 15 [label="Enter function " style="filled" fillcolor=red]; - 16 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 17 [label="Exit function " style="filled" fillcolor=red]; + 21 [label="Enter function " style="filled" fillcolor=red]; + 22 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 23 [label="Exit function " style="filled" fillcolor=red]; } - 21 -> {22} [color=green]; - 22 -> {18} [color=green]; - 22 -> {23} [style=dotted]; - 22 -> {18} [style=dashed]; - 23 -> {15} [color=green]; - 23 -> {15} [style=dashed]; + 15 -> {16} [color=green]; + 16 -> {17} [color=green]; + 16 -> {20} [style=dotted]; + 16 -> {17} [style=dashed]; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; - 20 -> {23} [color=green]; - 15 -> {16}; - 16 -> {17}; + 19 -> {20} [color=green]; + 20 -> {21} [color=green]; + 20 -> {21} [style=dashed]; + 21 -> {22}; + 22 -> {23}; subgraph cluster_8 { color=red @@ -108,31 +108,31 @@ digraph smartcastInByClause_kt { 42 [label="Enter anonymous object"]; subgraph cluster_10 { color=blue - 49 [label="Enter class " style="filled" fillcolor=red]; - 50 [label="Part of class initialization"]; + 43 [label="Enter class " style="filled" fillcolor=red]; + 44 [label="Part of class initialization"]; subgraph cluster_11 { color=blue - 53 [label="Enter field" style="filled" fillcolor=red]; - 54 [label="Access variable R|/a|"]; - 55 [label="Smart cast: R|/a|"]; - 56 [label="Access variable R|/A.index|"]; - 57 [label="Function call: R|/Derived.Derived|(...)" style="filled" fillcolor=yellow]; - 58 [label="Exit field" style="filled" fillcolor=red]; + 45 [label="Enter field" style="filled" fillcolor=red]; + 46 [label="Access variable R|/a|"]; + 47 [label="Smart cast: R|/a|"]; + 48 [label="Access variable R|/A.index|"]; + 49 [label="Function call: R|/Derived.Derived|(...)" style="filled" fillcolor=yellow]; + 50 [label="Exit field" style="filled" fillcolor=red]; } 51 [label="Part of class initialization"]; subgraph cluster_12 { color=blue - 59 [label="Enter property" style="filled" fillcolor=red]; - 60 [label="Access variable R|/a|"]; - 61 [label="Smart cast: R|/a|"]; - 62 [label="Access variable R|/A.index|"]; - 63 [label="Exit property" style="filled" fillcolor=red]; + 52 [label="Enter property" style="filled" fillcolor=red]; + 53 [label="Access variable R|/a|"]; + 54 [label="Smart cast: R|/a|"]; + 55 [label="Access variable R|/A.index|"]; + 56 [label="Exit property" style="filled" fillcolor=red]; } - 52 [label="Exit class " style="filled" fillcolor=red]; + 57 [label="Exit class " style="filled" fillcolor=red]; } - 43 [label="Exit anonymous object"]; - 44 [label="Exit anonymous object expression"]; - 45 [label="Jump: ^test object : R|Base| { + 58 [label="Exit anonymous object"]; + 59 [label="Exit anonymous object expression"]; + 60 [label="Jump: ^test object : R|Base| { private constructor(): R|| { super() } @@ -148,30 +148,30 @@ digraph smartcastInByClause_kt { } "]; - 46 [label="Stub" style="filled" fillcolor=gray]; - 47 [label="Exit block" style="filled" fillcolor=gray]; + 61 [label="Stub" style="filled" fillcolor=gray]; + 62 [label="Exit block" style="filled" fillcolor=gray]; } - 48 [label="Exit function test" style="filled" fillcolor=red]; + 63 [label="Exit function test" style="filled" fillcolor=red]; } subgraph cluster_13 { color=blue - 67 [label="Enter function foo" style="filled" fillcolor=red]; + 64 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 68 [label="Enter block"]; - 69 [label="Access variable R|/a|"]; - 70 [label="Smart cast: R|/a|"]; - 71 [label="Access variable R|/A.index|"]; - 72 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow]; - 73 [label="Exit block"]; + 65 [label="Enter block"]; + 66 [label="Access variable R|/a|"]; + 67 [label="Smart cast: R|/a|"]; + 68 [label="Access variable R|/A.index|"]; + 69 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow]; + 70 [label="Exit block"]; } - 74 [label="Exit function foo" style="filled" fillcolor=red]; + 71 [label="Exit function foo" style="filled" fillcolor=red]; } subgraph cluster_15 { color=blue - 64 [label="Enter function " style="filled" fillcolor=red]; - 65 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 66 [label="Exit function " style="filled" fillcolor=red]; + 72 [label="Enter function " style="filled" fillcolor=red]; + 73 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 74 [label="Exit function " style="filled" fillcolor=red]; } 24 -> {25}; 25 -> {26}; @@ -182,7 +182,7 @@ digraph smartcastInByClause_kt { 30 -> {31 35}; 31 -> {32}; 32 -> {33}; - 33 -> {48}; + 33 -> {63}; 33 -> {34} [style=dotted]; 34 -> {36} [style=dotted]; 35 -> {36}; @@ -192,43 +192,43 @@ digraph smartcastInByClause_kt { 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {49}; - 42 -> {43} [color=red]; - 42 -> {49} [style=dashed]; - 43 -> {44}; - 44 -> {45}; - 45 -> {48}; - 45 -> {46} [style=dotted]; - 46 -> {47} [style=dotted]; - 47 -> {48} [style=dotted]; - 49 -> {50} [color=green]; - 49 -> {53 59 64 67} [color=red]; - 50 -> {53} [color=green]; - 50 -> {51} [style=dotted]; - 50 -> {53} [style=dashed]; - 51 -> {59} [color=green]; - 51 -> {52} [style=dotted]; - 51 -> {59} [style=dashed]; - 52 -> {43 64 67} [color=green]; - 52 -> {64 67} [style=dashed]; + 42 -> {43}; + 42 -> {58} [color=red]; + 42 -> {43} [style=dashed]; + 43 -> {44} [color=green]; + 43 -> {45 52 64 72} [color=red]; + 44 -> {45} [color=green]; + 44 -> {51} [style=dotted]; + 44 -> {45} [style=dashed]; + 45 -> {46}; + 46 -> {47}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50}; + 50 -> {51} [color=green]; + 51 -> {52} [color=green]; + 51 -> {57} [style=dotted]; + 51 -> {52} [style=dashed]; + 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57}; - 57 -> {58}; - 58 -> {51} [color=green]; + 56 -> {57} [color=green]; + 57 -> {58 64 72} [color=green]; + 57 -> {64 72} [style=dashed]; + 58 -> {59}; 59 -> {60}; - 60 -> {61}; - 61 -> {62}; - 62 -> {63}; - 63 -> {52} [color=green]; + 60 -> {63}; + 60 -> {61} [style=dotted]; + 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; 64 -> {65}; 65 -> {66}; + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72}; 72 -> {73}; 73 -> {74}; diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot index 7cfb0baf60b..5fa1292d436 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot @@ -116,46 +116,46 @@ digraph smartcastToNothing_kt { subgraph cluster_10 { color=red - 48 [label="Enter class A" style="filled" fillcolor=red]; - 49 [label="Part of class initialization"]; + 39 [label="Enter class A" style="filled" fillcolor=red]; + 40 [label="Part of class initialization"]; subgraph cluster_11 { color=blue - 42 [label="Enter property" style="filled" fillcolor=red]; - 43 [label="Const: Int(1)"]; - 44 [label="Exit property" style="filled" fillcolor=red]; + 41 [label="Enter property" style="filled" fillcolor=red]; + 42 [label="Const: Int(1)"]; + 43 [label="Exit property" style="filled" fillcolor=red]; } - 50 [label="Part of class initialization"]; + 44 [label="Part of class initialization"]; subgraph cluster_12 { color=blue 45 [label="Enter property" style="filled" fillcolor=red]; 46 [label="Const: Boolean(true)"]; 47 [label="Exit property" style="filled" fillcolor=red]; } - 51 [label="Exit class A" style="filled" fillcolor=red]; + 48 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_13 { color=blue - 39 [label="Enter function " style="filled" fillcolor=red]; - 40 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 41 [label="Exit function " style="filled" fillcolor=red]; + 49 [label="Enter function " style="filled" fillcolor=red]; + 50 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 51 [label="Exit function " style="filled" fillcolor=red]; } - 48 -> {49} [color=green]; - 49 -> {42} [color=green]; - 49 -> {50} [style=dotted]; - 49 -> {42} [style=dashed]; - 50 -> {45} [color=green]; - 50 -> {51} [style=dotted]; - 50 -> {45} [style=dashed]; - 51 -> {39} [color=green]; - 51 -> {39} [style=dashed]; + 39 -> {40} [color=green]; + 40 -> {41} [color=green]; + 40 -> {44} [style=dotted]; + 40 -> {41} [style=dashed]; + 41 -> {42}; 42 -> {43}; - 43 -> {44}; - 44 -> {50} [color=green]; + 43 -> {44} [color=green]; + 44 -> {45} [color=green]; + 44 -> {48} [style=dotted]; + 44 -> {45} [style=dashed]; 45 -> {46}; 46 -> {47}; - 47 -> {51} [color=green]; - 39 -> {40}; - 40 -> {41}; + 47 -> {48} [color=green]; + 48 -> {49} [color=green]; + 48 -> {49} [style=dashed]; + 49 -> {50}; + 50 -> {51}; subgraph cluster_14 { color=red @@ -211,41 +211,41 @@ digraph smartcastToNothing_kt { color=blue 82 [label="Enter block" style="filled" fillcolor=gray]; 83 [label="Jump: break@@@[R|/|.R|SubstitutionOverride|()] " style="filled" fillcolor=gray]; - 94 [label="Stub" style="filled" fillcolor=gray]; - 95 [label="Exit block" style="filled" fillcolor=gray]; + 84 [label="Stub" style="filled" fillcolor=gray]; + 85 [label="Exit block" style="filled" fillcolor=gray]; } - 96 [label="Exit when branch result" style="filled" fillcolor=gray]; - 97 [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]; } - 98 [label="Exit block" style="filled" fillcolor=gray]; + 88 [label="Exit block" style="filled" fillcolor=gray]; } - 99 [label="Exit loop block" style="filled" fillcolor=gray]; + 89 [label="Exit loop block" style="filled" fillcolor=gray]; } - 84 [label="Exit whileloop"]; + 90 [label="Exit whileloop"]; } - 85 [label="Exit block"]; + 91 [label="Exit block"]; } - 86 [label="Access variable R|/s|"]; - 87 [label="Enter safe call"]; - 88 [label="Postponed enter to lambda"]; + 92 [label="Access variable R|/s|"]; + 93 [label="Enter safe call"]; + 94 [label="Postponed enter to lambda"]; subgraph cluster_24 { color=blue - 100 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 95 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 101 [label="Enter block"]; - 102 [label="Access variable R|/it|"]; - 103 [label="Access variable R|/A.a|"]; - 104 [label="Exit block"]; + 96 [label="Enter block"]; + 97 [label="Access variable R|/it|"]; + 98 [label="Access variable R|/A.a|"]; + 99 [label="Exit block"]; } - 105 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 100 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 89 [label="Postponed exit from lambda"]; - 90 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 91 [label="Exit safe call"]; - 92 [label="Exit block"]; + 101 [label="Postponed exit from lambda"]; + 102 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 103 [label="Exit safe call"]; + 104 [label="Exit block"]; } - 93 [label="Exit function test_0" style="filled" fillcolor=red]; + 105 [label="Exit function test_0" style="filled" fillcolor=red]; } 52 -> {53}; 53 -> {54}; @@ -259,7 +259,7 @@ digraph smartcastToNothing_kt { 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {65 84}; + 64 -> {65 90}; 65 -> {66}; 66 -> {67}; 67 -> {68}; @@ -275,33 +275,33 @@ digraph smartcastToNothing_kt { 77 -> {78} [style=dotted]; 78 -> {79} [style=dotted]; 79 -> {80 81} [style=dotted]; - 80 -> {97} [style=dotted]; + 80 -> {87} [style=dotted]; 81 -> {82} [style=dotted]; 82 -> {83} [style=dotted]; - 83 -> {84 94} [style=dotted]; - 84 -> {85}; - 85 -> {86}; - 86 -> {87 91}; - 87 -> {88}; - 88 -> {90 100}; + 83 -> {84 90} [style=dotted]; + 84 -> {85} [style=dotted]; + 85 -> {86} [style=dotted]; + 86 -> {87} [style=dotted]; + 87 -> {88} [style=dotted]; 88 -> {89} [style=dotted]; - 88 -> {100} [style=dashed]; - 89 -> {90}; + 89 -> {61} [color=green style=dotted]; 90 -> {91}; 91 -> {92}; - 92 -> {93}; - 94 -> {95} [style=dotted]; - 95 -> {96} [style=dotted]; - 96 -> {97} [style=dotted]; - 97 -> {98} [style=dotted]; - 98 -> {99} [style=dotted]; - 99 -> {61} [color=green style=dotted]; + 92 -> {93 103}; + 93 -> {94}; + 94 -> {95 102}; + 94 -> {101} [style=dotted]; + 94 -> {95} [style=dashed]; + 95 -> {96}; + 96 -> {97}; + 97 -> {98}; + 98 -> {99}; + 99 -> {100}; 100 -> {101}; 101 -> {102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; - 105 -> {89}; subgraph cluster_26 { 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 6b5d5f54d94..a76bb2bbad1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/stability/overridenOpenVal.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/stability/overridenOpenVal.dot @@ -5,93 +5,92 @@ digraph overridenOpenVal_kt { subgraph cluster_0 { color=red - 6 [label="Enter class A" style="filled" fillcolor=red]; - 7 [label="Part of class initialization"]; + 0 [label="Enter class A" style="filled" fillcolor=red]; + 1 [label="Part of class initialization"]; subgraph cluster_1 { color=blue - 3 [label="Enter property" style="filled" fillcolor=red]; - 4 [label="Access variable R|/x|"]; - 5 [label="Exit property" style="filled" fillcolor=red]; + 2 [label="Enter property" style="filled" fillcolor=red]; + 3 [label="Access variable R|/x|"]; + 4 [label="Exit property" style="filled" fillcolor=red]; } - 8 [label="Exit class A" style="filled" fillcolor=red]; + 5 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_2 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 6 [label="Enter function " style="filled" fillcolor=red]; + 7 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 8 [label="Exit function " style="filled" fillcolor=red]; } - 6 -> {7} [color=green]; - 7 -> {3} [color=green]; - 7 -> {8} [style=dotted]; - 7 -> {3} [style=dashed]; - 8 -> {0} [color=green]; - 8 -> {0} [style=dashed]; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {5} [style=dotted]; + 1 -> {2} [style=dashed]; + 2 -> {3}; 3 -> {4}; - 4 -> {5}; - 5 -> {8} [color=green]; - 0 -> {1}; - 1 -> {2}; + 4 -> {5} [color=green]; + 5 -> {6} [color=green]; + 5 -> {6} [style=dashed]; + 6 -> {7}; + 7 -> {8}; subgraph cluster_3 { color=red - 31 [label="Enter class B" style="filled" fillcolor=red]; - 32 [label="Exit class B" style="filled" fillcolor=red]; + 9 [label="Enter class B" style="filled" fillcolor=red]; + 10 [label="Exit class B" style="filled" fillcolor=red]; } subgraph cluster_4 { color=blue - 13 [label="Enter function test_1" style="filled" fillcolor=red]; + 11 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 14 [label="Enter block"]; + 12 [label="Enter block"]; subgraph cluster_6 { color=blue - 15 [label="Enter when"]; + 13 [label="Enter when"]; subgraph cluster_7 { color=blue - 16 [label="Enter when branch condition "]; - 17 [label="Access variable R|/A.x|"]; - 18 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"]; - 19 [label="Exit when branch condition"]; + 14 [label="Enter when branch condition "]; + 15 [label="Access variable R|/A.x|"]; + 16 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"]; + 17 [label="Exit when branch condition"]; } - 20 [label="Synthetic else branch"]; - 21 [label="Enter when branch result"]; + 18 [label="Synthetic else branch"]; + 19 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 22 [label="Enter block"]; - 23 [label="Access variable R|/A.x|"]; - 24 [label="Smart cast: this@R|/B|.R|/A.x|"]; - 25 [label="Access variable R|kotlin/String.length|"]; - 26 [label="Exit block"]; + 20 [label="Enter block"]; + 21 [label="Access variable R|/A.x|"]; + 22 [label="Smart cast: this@R|/B|.R|/A.x|"]; + 23 [label="Access variable R|kotlin/String.length|"]; + 24 [label="Exit block"]; } - 27 [label="Exit when branch result"]; - 28 [label="Exit when"]; + 25 [label="Exit when branch result"]; + 26 [label="Exit when"]; } - 29 [label="Exit block"]; + 27 [label="Exit block"]; } - 30 [label="Exit function test_1" style="filled" fillcolor=red]; + 28 [label="Exit function test_1" style="filled" fillcolor=red]; } subgraph cluster_9 { color=blue - 9 [label="Enter function " style="filled" fillcolor=red]; - 10 [label="Access variable R|/x|"]; - 11 [label="Delegated constructor call: super(...)" style="filled" fillcolor=yellow]; - 12 [label="Exit function " style="filled" fillcolor=red]; + 29 [label="Enter function " style="filled" fillcolor=red]; + 30 [label="Access variable R|/x|"]; + 31 [label="Delegated constructor call: super(...)" style="filled" fillcolor=yellow]; + 32 [label="Exit function " style="filled" fillcolor=red]; } - 31 -> {32} [color=green]; - 32 -> {9 13} [color=green]; - 32 -> {9 13} [style=dashed]; - 9 -> {10}; - 10 -> {11}; + 9 -> {10} [color=green]; + 10 -> {11 29} [color=green]; + 10 -> {11 29} [style=dashed]; 11 -> {12}; + 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {18}; - 18 -> {19}; - 19 -> {20 21}; - 20 -> {28}; + 17 -> {18 19}; + 18 -> {26}; + 19 -> {20}; + 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; @@ -99,8 +98,9 @@ digraph overridenOpenVal_kt { 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29}; 29 -> {30}; + 30 -> {31}; + 31 -> {32}; subgraph cluster_10 { color=red 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 938274b8b41..46f9cd32fbe 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot @@ -5,33 +5,33 @@ digraph delayedAssignment_kt { subgraph cluster_0 { color=red - 7 [label="Enter class A" style="filled" fillcolor=red]; - 8 [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]; } subgraph cluster_1 { color=blue - 3 [label="Enter function foo" style="filled" fillcolor=red]; + 2 [label="Enter function foo" 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"]; } - 6 [label="Exit function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } subgraph cluster_3 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 6 [label="Enter function " style="filled" fillcolor=red]; + 7 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 8 [label="Exit function " style="filled" fillcolor=red]; } - 7 -> {8} [color=green]; - 8 -> {0 3} [color=green]; - 8 -> {0 3} [style=dashed]; - 0 -> {1}; - 1 -> {2}; + 0 -> {1} [color=green]; + 1 -> {2 6} [color=green]; + 1 -> {2 6} [style=dashed]; + 2 -> {3}; 3 -> {4}; 4 -> {5}; - 5 -> {6}; + 6 -> {7}; + 7 -> {8}; subgraph cluster_4 { color=red diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot index 4064df6a592..7b2eb42cde7 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot @@ -29,86 +29,87 @@ digraph complexPostponedCfg_kt { 9 [label="Postponed enter to lambda"]; subgraph cluster_4 { color=blue - 18 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 10 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 19 [label="Enter block"]; - 20 [label="Postponed enter to lambda"]; + 11 [label="Enter block"]; + 12 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue - 25 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 13 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 26 [label="Enter block"]; - 27 [label="Access variable this@R|special/anonymous|"]; - 28 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 29 [label="Access variable R|/arguments|"]; - 30 [label="Function call: R|/arguments|.R|kotlin/collections/last|()" style="filled" fillcolor=yellow]; - 31 [label="Type operator: (R|/arguments|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; - 32 [label="Postponed enter to lambda"]; + 14 [label="Enter block"]; + 15 [label="Access variable this@R|special/anonymous|"]; + 16 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 17 [label="Access variable R|/arguments|"]; + 18 [label="Function call: R|/arguments|.R|kotlin/collections/last|()" style="filled" fillcolor=yellow]; + 19 [label="Type operator: (R|/arguments|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; + 20 [label="Postponed enter to lambda"]; subgraph cluster_8 { color=blue - 37 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 21 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 38 [label="Enter block"]; - 39 [label="Access variable this@R|special/anonymous|"]; - 40 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 41 [label="Access variable R|/explicitReceiver|"]; - 42 [label="Type operator: (R|/explicitReceiver| as R|FirFunctionCall|)"]; - 43 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 44 [label="Exit block"]; + 22 [label="Enter block"]; + 23 [label="Access variable this@R|special/anonymous|"]; + 24 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 25 [label="Access variable R|/explicitReceiver|"]; + 26 [label="Type operator: (R|/explicitReceiver| as R|FirFunctionCall|)"]; + 27 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; } - 45 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 29 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 33 [label="Postponed exit from lambda"]; - 34 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 35 [label="Exit block"]; + 30 [label="Postponed exit from lambda"]; + 31 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 36 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 33 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 21 [label="Postponed exit from lambda"]; - 22 [label="Function call: R|kotlin/collections/buildList|(...)" style="filled" fillcolor=yellow]; - 23 [label="Exit block"]; + 34 [label="Postponed exit from lambda"]; + 35 [label="Function call: R|kotlin/collections/buildList|(...)" style="filled" fillcolor=yellow]; + 36 [label="Exit block"]; } - 24 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 37 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 10 [label="Postponed exit from lambda"]; - 11 [label="Function call: R|kotlin/with||>(...)" style="filled" fillcolor=yellow]; - 12 [label="Variable declaration: lval firstCalls: R|kotlin/collections/List|"]; - 13 [label="Access variable R|/firstCalls|"]; - 14 [label="Jump: ^foo R|/firstCalls|"]; - 15 [label="Stub" style="filled" fillcolor=gray]; - 16 [label="Exit block" style="filled" fillcolor=gray]; + 38 [label="Postponed exit from lambda"]; + 39 [label="Function call: R|kotlin/with||>(...)" style="filled" fillcolor=yellow]; + 40 [label="Variable declaration: lval firstCalls: R|kotlin/collections/List|"]; + 41 [label="Access variable R|/firstCalls|"]; + 42 [label="Jump: ^foo R|/firstCalls|"]; + 43 [label="Stub" style="filled" fillcolor=gray]; + 44 [label="Exit block" style="filled" fillcolor=gray]; } - 17 [label="Exit function foo" style="filled" fillcolor=red]; + 45 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {11 18}; - 9 -> {10} [style=dotted]; - 9 -> {18} [style=dashed]; + 9 -> {10 39}; + 9 -> {38} [style=dotted]; + 9 -> {10} [style=dashed]; 10 -> {11}; 11 -> {12}; - 12 -> {13}; + 12 -> {13 35}; + 12 -> {34} [style=dotted]; + 12 -> {13} [style=dashed]; 13 -> {14}; - 14 -> {17}; - 14 -> {15} [style=dotted]; - 15 -> {16} [style=dotted]; - 16 -> {17} [style=dotted]; + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {22 25}; - 20 -> {21} [style=dotted]; - 20 -> {25} [style=dashed]; - 21 -> {22} [color=green]; - 21 -> {11} [color=red]; + 20 -> {21 31}; + 20 -> {30} [style=dotted]; + 20 -> {21} [style=dashed]; + 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {10}; + 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; @@ -116,21 +117,20 @@ digraph complexPostponedCfg_kt { 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {34 37}; - 32 -> {33} [style=dotted]; - 32 -> {37} [style=dashed]; + 32 -> {33}; 33 -> {34}; - 34 -> {35}; + 34 -> {35} [color=green]; + 34 -> {39} [color=red]; 35 -> {36}; - 36 -> {21}; + 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43}; - 43 -> {44}; - 44 -> {45}; - 45 -> {33}; + 42 -> {45}; + 42 -> {43} [style=dotted]; + 43 -> {44} [style=dotted]; + 44 -> {45} [style=dotted]; } 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 e97dc966869..84a04d1b2f9 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot @@ -13,41 +13,41 @@ digraph callsInPlace_kt { 3 [label="Postponed enter to lambda"]; subgraph cluster_2 { color=blue - 10 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 4 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 11 [label="Enter block"]; - 12 [label="Const: Int(1)"]; - 13 [label="Assignment: R|/x|"]; - 14 [label="Exit block"]; + 5 [label="Enter block"]; + 6 [label="Const: Int(1)"]; + 7 [label="Assignment: R|/x|"]; + 8 [label="Exit block"]; } - 15 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 9 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 4 [label="Postponed exit from lambda"]; - 5 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 6 [label="Access variable R|/x|"]; - 7 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 8 [label="Exit block"]; + 10 [label="Postponed exit from lambda"]; + 11 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 12 [label="Access variable R|/x|"]; + 13 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; } - 9 [label="Exit function test" style="filled" fillcolor=red]; + 15 [label="Exit function test" style="filled" fillcolor=red]; } 0 -> {1}; 1 -> {2}; 2 -> {3}; - 3 -> {5 10}; - 3 -> {4} [style=dotted]; - 3 -> {10} [style=dashed]; + 3 -> {4 11}; + 3 -> {10} [style=dotted]; + 3 -> {4} [style=dashed]; 4 -> {5}; 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; + 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {4}; subgraph cluster_4 { color=red @@ -59,35 +59,35 @@ digraph callsInPlace_kt { 19 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue - 24 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 20 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 25 [label="Enter block"]; - 26 [label="Const: String(test_2)"]; - 27 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Const: String(test_2)"]; + 23 [label="Exit block"]; } - 28 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 24 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 20 [label="Postponed exit from lambda"]; - 21 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; - 22 [label="Exit block"]; + 25 [label="Postponed exit from lambda"]; + 26 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; + 27 [label="Exit block"]; } - 23 [label="Exit function test_2" style="filled" fillcolor=red]; + 28 [label="Exit function test_2" style="filled" fillcolor=red]; } 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 21 24}; - 19 -> {24} [style=dashed]; + 19 -> {20 25 26}; + 19 -> {20} [style=dashed]; 20 -> {21}; - 20 -> {19} [color=green style=dashed]; 21 -> {22}; 22 -> {23}; + 23 -> {24}; 24 -> {25}; 25 -> {26}; + 25 -> {19} [color=green style=dashed]; 26 -> {27}; 27 -> {28}; - 28 -> {20}; subgraph cluster_8 { color=red @@ -99,35 +99,35 @@ digraph callsInPlace_kt { 32 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue - 37 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 33 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 38 [label="Enter block"]; - 39 [label="Const: String(test_3)"]; - 40 [label="Exit block"]; + 34 [label="Enter block"]; + 35 [label="Const: String(test_3)"]; + 36 [label="Exit block"]; } - 41 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 37 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 33 [label="Postponed exit from lambda"]; - 34 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; - 35 [label="Exit block"]; + 38 [label="Postponed exit from lambda"]; + 39 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; + 40 [label="Exit block"]; } - 36 [label="Exit function test_3" style="filled" fillcolor=red]; + 41 [label="Exit function test_3" style="filled" fillcolor=red]; } 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {33 34 37}; - 32 -> {37} [style=dashed]; + 32 -> {33 38 39}; + 32 -> {33} [style=dashed]; 33 -> {34}; - 33 -> {32} [color=green style=dashed]; 34 -> {35}; 35 -> {36}; + 36 -> {37}; 37 -> {38}; 38 -> {39}; + 38 -> {32} [color=green style=dashed]; 39 -> {40}; 40 -> {41}; - 41 -> {33}; subgraph cluster_12 { color=red @@ -139,34 +139,35 @@ digraph callsInPlace_kt { 45 [label="Postponed enter to lambda"]; subgraph cluster_14 { color=blue - 50 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 46 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 51 [label="Enter block"]; - 52 [label="Const: String(test_4)"]; - 53 [label="Access variable R|/it|"]; - 54 [label="Const: Int(0)"]; - 55 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; - 56 [label="Comparison >"]; - 57 [label="Exit block"]; + 47 [label="Enter block"]; + 48 [label="Const: String(test_4)"]; + 49 [label="Access variable R|/it|"]; + 50 [label="Const: Int(0)"]; + 51 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; + 52 [label="Comparison >"]; + 53 [label="Exit block"]; } - 58 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 54 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 46 [label="Postponed exit from lambda"]; - 47 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; - 48 [label="Exit block"]; + 55 [label="Postponed exit from lambda"]; + 56 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; + 57 [label="Exit block"]; } - 49 [label="Exit function test_4" style="filled" fillcolor=red]; + 58 [label="Exit function test_4" style="filled" fillcolor=red]; } 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {47 50}; - 45 -> {46} [style=dotted]; - 45 -> {50} [style=dashed]; + 45 -> {46 56}; + 45 -> {55} [style=dotted]; + 45 -> {46} [style=dashed]; 46 -> {47}; 47 -> {48}; 48 -> {49}; + 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; @@ -175,7 +176,6 @@ digraph callsInPlace_kt { 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {46}; subgraph cluster_16 { color=red @@ -187,34 +187,35 @@ digraph callsInPlace_kt { 62 [label="Postponed enter to lambda"]; subgraph cluster_18 { color=blue - 67 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 63 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 68 [label="Enter block"]; - 69 [label="Const: String(test_5)"]; - 70 [label="Access variable R|/it|"]; - 71 [label="Const: Int(0)"]; - 72 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; - 73 [label="Comparison >"]; - 74 [label="Exit block"]; + 64 [label="Enter block"]; + 65 [label="Const: String(test_5)"]; + 66 [label="Access variable R|/it|"]; + 67 [label="Const: Int(0)"]; + 68 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; + 69 [label="Comparison >"]; + 70 [label="Exit block"]; } - 75 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 71 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 63 [label="Postponed exit from lambda"]; - 64 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; - 65 [label="Exit block"]; + 72 [label="Postponed exit from lambda"]; + 73 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; + 74 [label="Exit block"]; } - 66 [label="Exit function test_5" style="filled" fillcolor=red]; + 75 [label="Exit function test_5" style="filled" fillcolor=red]; } 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {64 67}; - 62 -> {63} [style=dotted]; - 62 -> {67} [style=dashed]; + 62 -> {63 73}; + 62 -> {72} [style=dotted]; + 62 -> {63} [style=dashed]; 63 -> {64}; 64 -> {65}; 65 -> {66}; + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; @@ -223,7 +224,6 @@ digraph callsInPlace_kt { 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {63}; subgraph cluster_20 { color=red @@ -252,14 +252,14 @@ digraph callsInPlace_kt { 84 [label="Postponed enter to lambda"]; subgraph cluster_24 { color=blue - 95 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 85 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_25 { color=blue - 96 [label="Enter block"]; - 97 [label="Const: String(test_6_2)"]; - 98 [label="Exit block"]; + 86 [label="Enter block"]; + 87 [label="Const: String(test_6_2)"]; + 88 [label="Exit block"]; } - 99 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 89 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } subgraph cluster_26 { color=blue @@ -272,33 +272,33 @@ digraph callsInPlace_kt { } 94 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 85 [label="Postponed exit from lambda"]; - 86 [label="Postponed exit from lambda"]; - 87 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 88 [label="Exit block"]; + 95 [label="Postponed exit from lambda"]; + 96 [label="Postponed exit from lambda"]; + 97 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 98 [label="Exit block"]; } - 89 [label="Exit function test_6" style="filled" fillcolor=red]; + 99 [label="Exit function test_6" style="filled" fillcolor=red]; } 82 -> {83}; 83 -> {84}; - 84 -> {85 86 87 90 95}; - 84 -> {90 95} [style=dashed]; - 85 -> {87}; - 85 -> {84} [color=green style=dashed]; + 84 -> {85 90 95 96 97}; + 84 -> {85 90} [style=dashed]; + 85 -> {86}; 86 -> {87}; - 86 -> {84} [color=green style=dashed]; 87 -> {88}; 88 -> {89}; + 89 -> {95}; 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; - 94 -> {86}; - 95 -> {96}; + 94 -> {96}; + 95 -> {97}; + 95 -> {84} [color=green style=dashed]; 96 -> {97}; + 96 -> {84} [color=green style=dashed]; 97 -> {98}; 98 -> {99}; - 99 -> {85}; subgraph cluster_28 { color=red @@ -309,14 +309,14 @@ digraph callsInPlace_kt { 102 [label="Postponed enter to lambda"]; subgraph cluster_30 { color=blue - 113 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 103 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_31 { color=blue - 114 [label="Enter block"]; - 115 [label="Const: String(test_7_1)"]; - 116 [label="Exit block"]; + 104 [label="Enter block"]; + 105 [label="Const: String(test_7_1)"]; + 106 [label="Exit block"]; } - 117 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 107 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } subgraph cluster_32 { color=blue @@ -329,33 +329,33 @@ digraph callsInPlace_kt { } 112 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 103 [label="Postponed exit from lambda"]; - 104 [label="Postponed exit from lambda"]; - 105 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 106 [label="Exit block"]; + 113 [label="Postponed exit from lambda"]; + 114 [label="Postponed exit from lambda"]; + 115 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 116 [label="Exit block"]; } - 107 [label="Exit function test_7" style="filled" fillcolor=red]; + 117 [label="Exit function test_7" style="filled" fillcolor=red]; } 100 -> {101}; 101 -> {102}; - 102 -> {103 104 105 108 113}; - 102 -> {108 113} [style=dashed]; - 103 -> {105}; - 103 -> {102} [color=green style=dashed]; + 102 -> {103 108 113 114 115}; + 102 -> {103 108} [style=dashed]; + 103 -> {104}; 104 -> {105}; - 104 -> {102} [color=green style=dashed]; 105 -> {106}; 106 -> {107}; + 107 -> {113}; 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {104}; - 113 -> {114}; + 112 -> {114}; + 113 -> {115}; + 113 -> {102} [color=green style=dashed]; 114 -> {115}; + 114 -> {102} [color=green style=dashed]; 115 -> {116}; 116 -> {117}; - 117 -> {103}; subgraph cluster_34 { color=red @@ -382,29 +382,29 @@ digraph callsInPlace_kt { 125 [label="Postponed enter to lambda"]; subgraph cluster_38 { color=blue - 130 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 126 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_39 { color=blue - 131 [label="Enter block"]; - 132 [label="Const: String(test_8)"]; - 133 [label="Exit block"]; + 127 [label="Enter block"]; + 128 [label="Const: String(test_8)"]; + 129 [label="Exit block"]; } - 134 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 130 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 126 [label="Postponed exit from lambda"]; - 127 [label="Function call: R|/myDummyRun|(...)" style="filled" fillcolor=yellow]; - 128 [label="Exit block"]; + 131 [label="Postponed exit from lambda"]; + 132 [label="Function call: R|/myDummyRun|(...)" style="filled" fillcolor=yellow]; + 133 [label="Exit block"]; } - 129 [label="Exit function test_8" style="filled" fillcolor=red]; + 134 [label="Exit function test_8" style="filled" fillcolor=red]; } 123 -> {124}; 124 -> {125}; - 125 -> {126 127 130}; - 125 -> {130} [style=dashed]; + 125 -> {126 131 132}; + 125 -> {126} [style=dashed]; 126 -> {127}; 127 -> {128}; 128 -> {129}; - 130 -> {131}; + 129 -> {130}; 131 -> {132}; 132 -> {133}; 133 -> {134}; diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot index e2a5a8db021..d9a9f51571d 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot @@ -17,93 +17,93 @@ digraph inAnonymousObject_kt { 4 [label="Enter anonymous object"]; subgraph cluster_3 { color=blue - 13 [label="Enter class " style="filled" fillcolor=red]; - 14 [label="Part of class initialization"]; + 5 [label="Enter class " style="filled" fillcolor=red]; + 6 [label="Part of class initialization"]; subgraph cluster_4 { color=blue - 17 [label="Enter property" style="filled" fillcolor=red]; - 18 [label="Access variable R|/a|"]; - 19 [label="Exit property" style="filled" fillcolor=red]; + 7 [label="Enter property" style="filled" fillcolor=red]; + 8 [label="Access variable R|/a|"]; + 9 [label="Exit property" style="filled" fillcolor=red]; } - 15 [label="Part of class initialization"]; + 10 [label="Part of class initialization"]; subgraph cluster_5 { color=blue - 20 [label="Enter init block" style="filled" fillcolor=red]; + 11 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/b|"]; - 23 [label="Assignment: R|/.leaked|"]; - 24 [label="Exit block"]; + 12 [label="Enter block"]; + 13 [label="Access variable R|/b|"]; + 14 [label="Assignment: R|/.leaked|"]; + 15 [label="Exit block"]; } - 25 [label="Exit init block" style="filled" fillcolor=red]; + 16 [label="Exit init block" style="filled" fillcolor=red]; } - 16 [label="Exit class " style="filled" fillcolor=red]; + 17 [label="Exit class " style="filled" fillcolor=red]; } - 5 [label="Exit anonymous object"]; - 6 [label="Exit anonymous object expression"]; - 7 [label="Variable declaration: lval obj: R||"]; - 8 [label="Access variable R|/obj|"]; - 9 [label="Function call: R|/obj|.R|/.run|()" style="filled" fillcolor=yellow]; - 10 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 11 [label="Exit block"]; + 18 [label="Exit anonymous object"]; + 19 [label="Exit anonymous object expression"]; + 20 [label="Variable declaration: lval obj: R||"]; + 21 [label="Access variable R|/obj|"]; + 22 [label="Function call: R|/obj|.R|/.run|()" style="filled" fillcolor=yellow]; + 23 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 24 [label="Exit block"]; } - 12 [label="Exit function foo" style="filled" fillcolor=red]; + 25 [label="Exit function foo" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 29 [label="Enter function run" style="filled" fillcolor=red]; + 26 [label="Enter function run" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 30 [label="Enter block"]; - 31 [label="Function call: R|/c|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; + 27 [label="Enter block"]; + 28 [label="Function call: R|/c|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 29 [label="Exit block"]; } - 33 [label="Exit function run" style="filled" fillcolor=red]; + 30 [label="Exit function run" style="filled" fillcolor=red]; } subgraph cluster_9 { color=blue - 26 [label="Enter function " style="filled" fillcolor=red]; - 27 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 28 [label="Exit function " style="filled" fillcolor=red]; + 31 [label="Enter function " style="filled" fillcolor=red]; + 32 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 33 [label="Exit function " style="filled" fillcolor=red]; } 0 -> {1}; 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {13}; - 4 -> {5} [color=red]; - 4 -> {13} [style=dashed]; - 5 -> {6}; - 6 -> {7}; + 4 -> {5}; + 4 -> {18} [color=red]; + 4 -> {5} [style=dashed]; + 5 -> {6} [color=green]; + 5 -> {7 11 26 31} [color=red]; + 6 -> {7} [color=green]; + 6 -> {10} [style=dotted]; + 6 -> {7} [style=dashed]; 7 -> {8}; 8 -> {9}; - 9 -> {10}; - 10 -> {11}; + 9 -> {10} [color=green]; + 10 -> {11} [color=green]; + 10 -> {17} [style=dotted]; + 10 -> {11} [style=dashed]; 11 -> {12}; - 13 -> {14} [color=green]; - 13 -> {17 20 26 29} [color=red]; - 14 -> {17} [color=green]; - 14 -> {15} [style=dotted]; - 14 -> {17} [style=dashed]; - 15 -> {20} [color=green]; - 15 -> {16} [style=dotted]; - 15 -> {20} [style=dashed]; - 16 -> {5 26 29} [color=green]; - 16 -> {26 29} [style=dashed]; - 17 -> {18}; + 12 -> {13}; + 13 -> {14}; + 14 -> {15}; + 15 -> {16}; + 16 -> {17} [color=green]; + 17 -> {18 26 31} [color=green]; + 17 -> {26 31} [style=dashed]; 18 -> {19}; - 19 -> {15} [color=green]; + 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {16} [color=green]; 26 -> {27}; 27 -> {28}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; 31 -> {32}; 32 -> {33}; diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot index ab2319a7e57..e0d670c8b24 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot @@ -28,47 +28,47 @@ digraph inLocalClass_kt { 11 [label="Part of class initialization"]; subgraph cluster_4 { color=blue - 14 [label="Enter property" style="filled" fillcolor=red]; - 15 [label="Access variable R|/a|"]; - 16 [label="Exit property" style="filled" fillcolor=red]; + 12 [label="Enter property" style="filled" fillcolor=red]; + 13 [label="Access variable R|/a|"]; + 14 [label="Exit property" style="filled" fillcolor=red]; } - 12 [label="Part of class initialization"]; + 15 [label="Part of class initialization"]; subgraph cluster_5 { color=blue - 17 [label="Enter init block" style="filled" fillcolor=red]; + 16 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 18 [label="Enter block"]; - 19 [label="Access variable R|/c|"]; - 20 [label="Assignment: R|/leaked|"]; - 21 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Access variable R|/c|"]; + 19 [label="Assignment: R|/leaked|"]; + 20 [label="Exit block"]; } - 22 [label="Exit init block" style="filled" fillcolor=red]; + 21 [label="Exit init block" style="filled" fillcolor=red]; } - 13 [label="Exit class LocalClass" style="filled" fillcolor=red]; + 22 [label="Exit class LocalClass" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 29 [label="Enter function run" style="filled" fillcolor=red]; + 23 [label="Enter function run" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 30 [label="Enter block"]; - 31 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; + 24 [label="Enter block"]; + 25 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 26 [label="Exit block"]; } - 33 [label="Exit function run" style="filled" fillcolor=red]; + 27 [label="Exit function run" style="filled" fillcolor=red]; } subgraph cluster_9 { color=blue - 23 [label="Enter function " style="filled" fillcolor=red]; - 24 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 28 [label="Enter function " style="filled" fillcolor=red]; + 29 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; subgraph cluster_10 { color=blue - 25 [label="Enter block"]; - 26 [label="Function call: R|/b|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; + 30 [label="Enter block"]; + 31 [label="Function call: R|/b|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 28 [label="Exit function " style="filled" fillcolor=red]; + 33 [label="Exit function " style="filled" fillcolor=red]; } 0 -> {1}; 1 -> {2}; @@ -81,29 +81,29 @@ digraph inLocalClass_kt { 7 -> {8}; 8 -> {9}; 10 -> {11} [color=green]; - 10 -> {14 17 23 29} [color=red]; - 11 -> {14} [color=green]; - 11 -> {12} [style=dotted]; - 11 -> {14} [style=dashed]; - 12 -> {17} [color=green]; - 12 -> {13} [style=dotted]; - 12 -> {17} [style=dashed]; - 13 -> {23 29} [color=green]; - 13 -> {23 29} [style=dashed]; - 14 -> {15}; - 15 -> {16}; - 16 -> {12} [color=green]; + 10 -> {12 16 23 28} [color=red]; + 11 -> {12} [color=green]; + 11 -> {15} [style=dotted]; + 11 -> {12} [style=dashed]; + 12 -> {13}; + 13 -> {14}; + 14 -> {15} [color=green]; + 15 -> {16} [color=green]; + 15 -> {22} [style=dotted]; + 15 -> {16} [style=dashed]; + 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22}; - 22 -> {13} [color=green]; + 21 -> {22} [color=green]; + 22 -> {23 28} [color=green]; + 22 -> {23 28} [style=dashed]; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {28}; + 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; 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 59e01965ac5..9241c12104c 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 @@ -28,119 +28,119 @@ digraph atLeastOnce_kt { subgraph cluster_3 { color=red - 15 [label="Enter function myRun" style="filled" fillcolor=red]; + 7 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 16 [label="Enter block"]; + 8 [label="Enter block"]; subgraph cluster_5 { color=blue - 17 [label="Enter block"]; - 18 [label="Exit block"]; + 9 [label="Enter block"]; + 10 [label="Exit block"]; } - 19 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; + 11 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 12 [label="Exit block"]; } - 21 [label="Exit function myRun" style="filled" fillcolor=red]; + 13 [label="Exit function myRun" style="filled" fillcolor=red]; } - 15 -> {16}; - 16 -> {17}; - 17 -> {18}; - 18 -> {19}; - 19 -> {20}; - 20 -> {21}; + 7 -> {8}; + 8 -> {9}; + 9 -> {10}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; subgraph cluster_6 { color=red - 30 [label="Enter function test_1" style="filled" fillcolor=red]; + 14 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_7 { + color=blue + 15 [label="Enter block"]; + 16 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 17 [label="Postponed enter to lambda"]; + subgraph cluster_8 { + color=blue + 18 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 19 [label="Enter block"]; + 20 [label="Const: Int(1)"]; + 21 [label="Assignment: R|/x|"]; + 22 [label="Exit block"]; + } + 23 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 24 [label="Postponed exit from lambda"]; + 25 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + 26 [label="Access variable R|/x|"]; + 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; + } + 29 [label="Exit function test_1" style="filled" fillcolor=red]; + } + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18 25}; + 17 -> {24} [style=dotted]; + 17 -> {18} [style=dashed]; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; + 24 -> {17} [color=green style=dashed]; + 25 -> {26}; + 26 -> {27}; + 27 -> {28}; + 28 -> {29}; + + subgraph cluster_10 { + color=red + 30 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue 31 [label="Enter block"]; 32 [label="Variable declaration: lval x: R|kotlin/Int|"]; 33 [label="Postponed enter to lambda"]; - subgraph cluster_8 { + subgraph cluster_12 { color=blue - 40 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_9 { + 34 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_13 { color=blue - 41 [label="Enter block"]; - 42 [label="Const: Int(1)"]; - 43 [label="Assignment: R|/x|"]; - 44 [label="Exit block"]; + 35 [label="Enter block"]; + 36 [label="Const: Int(1)"]; + 37 [label="Assignment: R|/x|"]; + 38 [label="Exit block"]; } - 45 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 39 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 34 [label="Postponed exit from lambda"]; - 35 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 36 [label="Access variable R|/x|"]; - 37 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; + 40 [label="Postponed exit from lambda"]; + 41 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 42 [label="Access variable R|/x|"]; + 43 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 44 [label="Exit block"]; } - 39 [label="Exit function test_1" style="filled" fillcolor=red]; + 45 [label="Exit function test_2" style="filled" fillcolor=red]; } 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {35 40}; - 33 -> {34} [style=dotted]; - 33 -> {40} [style=dashed]; + 33 -> {34 41}; + 33 -> {40} [style=dotted]; + 33 -> {34} [style=dashed]; 34 -> {35}; - 34 -> {33} [color=green style=dashed]; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; + 39 -> {40}; 40 -> {41}; + 40 -> {33} [color=green style=dashed]; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {34}; - - subgraph cluster_10 { - color=red - 46 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 47 [label="Enter block"]; - 48 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 49 [label="Postponed enter to lambda"]; - subgraph cluster_12 { - color=blue - 56 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 57 [label="Enter block"]; - 58 [label="Const: Int(1)"]; - 59 [label="Assignment: R|/x|"]; - 60 [label="Exit block"]; - } - 61 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 50 [label="Postponed exit from lambda"]; - 51 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 52 [label="Access variable R|/x|"]; - 53 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 54 [label="Exit block"]; - } - 55 [label="Exit function test_2" style="filled" fillcolor=red]; - } - 46 -> {47}; - 47 -> {48}; - 48 -> {49}; - 49 -> {51 56}; - 49 -> {50} [style=dotted]; - 49 -> {56} [style=dashed]; - 50 -> {51}; - 50 -> {49} [color=green style=dashed]; - 51 -> {52}; - 52 -> {53}; - 53 -> {54}; - 54 -> {55}; - 56 -> {57}; - 57 -> {58}; - 58 -> {59}; - 59 -> {60}; - 60 -> {61}; - 61 -> {50}; } 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 f6517406cb7..26385496d2c 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 @@ -28,115 +28,115 @@ digraph atMostOnce_kt { subgraph cluster_3 { color=red - 15 [label="Enter function myRun" style="filled" fillcolor=red]; + 7 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 16 [label="Enter block"]; + 8 [label="Enter block"]; subgraph cluster_5 { color=blue - 17 [label="Enter block"]; - 18 [label="Exit block"]; + 9 [label="Enter block"]; + 10 [label="Exit block"]; } - 19 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; + 11 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 12 [label="Exit block"]; } - 21 [label="Exit function myRun" style="filled" fillcolor=red]; + 13 [label="Exit function myRun" style="filled" fillcolor=red]; } - 15 -> {16}; - 16 -> {17}; - 17 -> {18}; - 18 -> {19}; - 19 -> {20}; - 20 -> {21}; + 7 -> {8}; + 8 -> {9}; + 9 -> {10}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; subgraph cluster_6 { color=red - 30 [label="Enter function test_1" style="filled" fillcolor=red]; + 14 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_7 { + color=blue + 15 [label="Enter block"]; + 16 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 17 [label="Postponed enter to lambda"]; + subgraph cluster_8 { + color=blue + 18 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 19 [label="Enter block"]; + 20 [label="Const: Int(1)"]; + 21 [label="Assignment: R|/x|"]; + 22 [label="Exit block"]; + } + 23 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 24 [label="Postponed exit from lambda"]; + 25 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + 26 [label="Access variable R|/x|"]; + 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; + } + 29 [label="Exit function test_1" style="filled" fillcolor=red]; + } + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18 24 25}; + 17 -> {18} [style=dashed]; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; + 25 -> {26}; + 26 -> {27}; + 27 -> {28}; + 28 -> {29}; + + subgraph cluster_10 { + color=red + 30 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue 31 [label="Enter block"]; 32 [label="Variable declaration: lval x: R|kotlin/Int|"]; 33 [label="Postponed enter to lambda"]; - subgraph cluster_8 { + subgraph cluster_12 { color=blue - 40 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_9 { + 34 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_13 { color=blue - 41 [label="Enter block"]; - 42 [label="Const: Int(1)"]; - 43 [label="Assignment: R|/x|"]; - 44 [label="Exit block"]; + 35 [label="Enter block"]; + 36 [label="Const: Int(1)"]; + 37 [label="Assignment: R|/x|"]; + 38 [label="Exit block"]; } - 45 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 39 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 34 [label="Postponed exit from lambda"]; - 35 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 36 [label="Access variable R|/x|"]; - 37 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; + 40 [label="Postponed exit from lambda"]; + 41 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 42 [label="Access variable R|/x|"]; + 43 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 44 [label="Exit block"]; } - 39 [label="Exit function test_1" style="filled" fillcolor=red]; + 45 [label="Exit function test_2" style="filled" fillcolor=red]; } 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {34 35 40}; - 33 -> {40} [style=dashed]; + 33 -> {34 40 41}; + 33 -> {34} [style=dashed]; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; + 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {34}; - - subgraph cluster_10 { - color=red - 46 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 47 [label="Enter block"]; - 48 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 49 [label="Postponed enter to lambda"]; - subgraph cluster_12 { - color=blue - 56 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 57 [label="Enter block"]; - 58 [label="Const: Int(1)"]; - 59 [label="Assignment: R|/x|"]; - 60 [label="Exit block"]; - } - 61 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 50 [label="Postponed exit from lambda"]; - 51 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 52 [label="Access variable R|/x|"]; - 53 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 54 [label="Exit block"]; - } - 55 [label="Exit function test_2" style="filled" fillcolor=red]; - } - 46 -> {47}; - 47 -> {48}; - 48 -> {49}; - 49 -> {50 51 56}; - 49 -> {56} [style=dashed]; - 50 -> {51}; - 51 -> {52}; - 52 -> {53}; - 53 -> {54}; - 54 -> {55}; - 56 -> {57}; - 57 -> {58}; - 58 -> {59}; - 59 -> {60}; - 60 -> {61}; - 61 -> {50}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot index 26978cf8516..f0d74bfd262 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot @@ -30,50 +30,100 @@ digraph contractsUsage_kt { subgraph cluster_3 { color=red - 16 [label="Enter function baz" style="filled" fillcolor=red]; + 8 [label="Enter function baz" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 17 [label="Enter block"]; + 9 [label="Enter block"]; subgraph cluster_5 { color=blue - 18 [label="Enter block"]; - 19 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Exit block"]; } subgraph cluster_6 { color=blue - 20 [label="Enter when"]; + 12 [label="Enter when"]; subgraph cluster_7 { color=blue - 21 [label="Enter when branch condition "]; - 22 [label="Const: Boolean(true)"]; - 23 [label="Exit when branch condition"]; + 13 [label="Enter when branch condition "]; + 14 [label="Const: Boolean(true)"]; + 15 [label="Exit when branch condition"]; } - 24 [label="Synthetic else branch"]; - 25 [label="Enter when branch result"]; + 16 [label="Synthetic else branch"]; + 17 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 26 [label="Enter block"]; - 27 [label="Access variable this@R|/baz|"]; - 28 [label="Function call: this@R|/baz|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 29 [label="Exit block"]; + 18 [label="Enter block"]; + 19 [label="Access variable this@R|/baz|"]; + 20 [label="Function call: this@R|/baz|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 21 [label="Exit block"]; } - 30 [label="Exit when branch result"]; - 31 [label="Exit when"]; + 22 [label="Exit when branch result"]; + 23 [label="Exit when"]; } - 32 [label="Exit block"]; + 24 [label="Exit block"]; } - 33 [label="Exit function baz" style="filled" fillcolor=red]; + 25 [label="Exit function baz" style="filled" fillcolor=red]; } - 16 -> {17}; + 8 -> {9}; + 9 -> {10}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; + 13 -> {14}; + 14 -> {15}; + 15 -> {16 17}; + 16 -> {23}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {24 25}; - 24 -> {31}; - 25 -> {26}; + 23 -> {24}; + 24 -> {25}; + + subgraph cluster_9 { + color=red + 26 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 27 [label="Enter block"]; + subgraph cluster_11 { + color=blue + 28 [label="Enter block"]; + 29 [label="Exit block"]; + } + subgraph cluster_12 { + color=blue + 30 [label="Enter when"]; + subgraph cluster_13 { + color=blue + 31 [label="Enter when branch condition "]; + 32 [label="Const: Boolean(true)"]; + 33 [label="Exit when branch condition"]; + } + 34 [label="Synthetic else branch"]; + 35 [label="Enter when branch result"]; + subgraph cluster_14 { + color=blue + 36 [label="Enter block"]; + 37 [label="Access variable R|/x|"]; + 38 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 39 [label="Access variable R|/y|"]; + 40 [label="Function call: R|/y|.R|/baz|()" style="filled" fillcolor=yellow]; + 41 [label="Jump: ^foo Unit"]; + 42 [label="Stub" style="filled" fillcolor=gray]; + 43 [label="Exit block" style="filled" fillcolor=gray]; + } + 44 [label="Exit when branch result" style="filled" fillcolor=gray]; + 45 [label="Exit when"]; + } + 46 [label="Access variable R|/x|"]; + 47 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 48 [label="Exit block"]; + } + 49 [label="Exit function foo" style="filled" fillcolor=red]; + } 26 -> {27}; 27 -> {28}; 28 -> {29}; @@ -81,72 +131,22 @@ digraph contractsUsage_kt { 30 -> {31}; 31 -> {32}; 32 -> {33}; - - subgraph cluster_9 { - color=red - 42 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 43 [label="Enter block"]; - subgraph cluster_11 { - color=blue - 44 [label="Enter block"]; - 45 [label="Exit block"]; - } - subgraph cluster_12 { - color=blue - 46 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 47 [label="Enter when branch condition "]; - 48 [label="Const: Boolean(true)"]; - 49 [label="Exit when branch condition"]; - } - 50 [label="Synthetic else branch"]; - 51 [label="Enter when branch result"]; - subgraph cluster_14 { - color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/x|"]; - 54 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 55 [label="Access variable R|/y|"]; - 56 [label="Function call: R|/y|.R|/baz|()" style="filled" fillcolor=yellow]; - 57 [label="Jump: ^foo Unit"]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; - } - 60 [label="Exit when branch result" style="filled" fillcolor=gray]; - 61 [label="Exit when"]; - } - 62 [label="Access variable R|/x|"]; - 63 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 64 [label="Exit block"]; - } - 65 [label="Exit function foo" style="filled" fillcolor=red]; - } - 42 -> {43}; - 43 -> {44}; - 44 -> {45}; + 33 -> {34 35}; + 34 -> {45}; + 35 -> {36}; + 36 -> {37}; + 37 -> {38}; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; + 41 -> {49}; + 41 -> {42} [style=dotted]; + 42 -> {43} [style=dotted]; + 43 -> {44} [style=dotted]; + 44 -> {45} [style=dotted]; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {50 51}; - 50 -> {61}; - 51 -> {52}; - 52 -> {53}; - 53 -> {54}; - 54 -> {55}; - 55 -> {56}; - 56 -> {57}; - 57 -> {65}; - 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; - 59 -> {60} [style=dotted]; - 60 -> {61} [style=dotted]; - 61 -> {62}; - 62 -> {63}; - 63 -> {64}; - 64 -> {65}; } 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 669f9c9f1a3..a94af9bb951 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 @@ -28,117 +28,117 @@ digraph exactlyOnce_kt { subgraph cluster_3 { color=red - 15 [label="Enter function myRun" style="filled" fillcolor=red]; + 7 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 16 [label="Enter block"]; + 8 [label="Enter block"]; subgraph cluster_5 { color=blue - 17 [label="Enter block"]; - 18 [label="Exit block"]; + 9 [label="Enter block"]; + 10 [label="Exit block"]; } - 19 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; + 11 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 12 [label="Exit block"]; } - 21 [label="Exit function myRun" style="filled" fillcolor=red]; + 13 [label="Exit function myRun" style="filled" fillcolor=red]; } - 15 -> {16}; - 16 -> {17}; - 17 -> {18}; - 18 -> {19}; - 19 -> {20}; - 20 -> {21}; + 7 -> {8}; + 8 -> {9}; + 9 -> {10}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; subgraph cluster_6 { color=red - 30 [label="Enter function test_1" style="filled" fillcolor=red]; + 14 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_7 { + color=blue + 15 [label="Enter block"]; + 16 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 17 [label="Postponed enter to lambda"]; + subgraph cluster_8 { + color=blue + 18 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 19 [label="Enter block"]; + 20 [label="Const: Int(1)"]; + 21 [label="Assignment: R|/x|"]; + 22 [label="Exit block"]; + } + 23 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 24 [label="Postponed exit from lambda"]; + 25 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + 26 [label="Access variable R|/x|"]; + 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; + } + 29 [label="Exit function test_1" style="filled" fillcolor=red]; + } + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18 25}; + 17 -> {24} [style=dotted]; + 17 -> {18} [style=dashed]; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; + 25 -> {26}; + 26 -> {27}; + 27 -> {28}; + 28 -> {29}; + + subgraph cluster_10 { + color=red + 30 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue 31 [label="Enter block"]; 32 [label="Variable declaration: lval x: R|kotlin/Int|"]; 33 [label="Postponed enter to lambda"]; - subgraph cluster_8 { + subgraph cluster_12 { color=blue - 40 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_9 { + 34 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_13 { color=blue - 41 [label="Enter block"]; - 42 [label="Const: Int(1)"]; - 43 [label="Assignment: R|/x|"]; - 44 [label="Exit block"]; + 35 [label="Enter block"]; + 36 [label="Const: Int(1)"]; + 37 [label="Assignment: R|/x|"]; + 38 [label="Exit block"]; } - 45 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 39 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 34 [label="Postponed exit from lambda"]; - 35 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 36 [label="Access variable R|/x|"]; - 37 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; + 40 [label="Postponed exit from lambda"]; + 41 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 42 [label="Access variable R|/x|"]; + 43 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 44 [label="Exit block"]; } - 39 [label="Exit function test_1" style="filled" fillcolor=red]; + 45 [label="Exit function test_2" style="filled" fillcolor=red]; } 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {35 40}; - 33 -> {34} [style=dotted]; - 33 -> {40} [style=dashed]; + 33 -> {34 41}; + 33 -> {40} [style=dotted]; + 33 -> {34} [style=dashed]; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; + 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {34}; - - subgraph cluster_10 { - color=red - 46 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 47 [label="Enter block"]; - 48 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 49 [label="Postponed enter to lambda"]; - subgraph cluster_12 { - color=blue - 56 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 57 [label="Enter block"]; - 58 [label="Const: Int(1)"]; - 59 [label="Assignment: R|/x|"]; - 60 [label="Exit block"]; - } - 61 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 50 [label="Postponed exit from lambda"]; - 51 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 52 [label="Access variable R|/x|"]; - 53 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 54 [label="Exit block"]; - } - 55 [label="Exit function test_2" style="filled" fillcolor=red]; - } - 46 -> {47}; - 47 -> {48}; - 48 -> {49}; - 49 -> {51 56}; - 49 -> {50} [style=dotted]; - 49 -> {56} [style=dashed]; - 50 -> {51}; - 51 -> {52}; - 52 -> {53}; - 53 -> {54}; - 54 -> {55}; - 56 -> {57}; - 57 -> {58}; - 58 -> {59}; - 59 -> {60}; - 60 -> {61}; - 61 -> {50}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot index 1faae7a6357..cdb6bdf2afc 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot @@ -68,149 +68,157 @@ digraph flow_kt { subgraph cluster_6 { color=red - 30 [label="Enter function foo" style="filled" fillcolor=red]; + 22 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 31 [label="Enter block"]; + 23 [label="Enter block"]; subgraph cluster_8 { color=blue - 32 [label="Enter block"]; - 33 [label="Exit block"]; + 24 [label="Enter block"]; + 25 [label="Exit block"]; } subgraph cluster_9 { color=blue - 34 [label="Enter when"]; + 26 [label="Enter when"]; subgraph cluster_10 { color=blue - 35 [label="Enter when branch condition "]; - 36 [label="Const: Boolean(true)"]; - 37 [label="Exit when branch condition"]; + 27 [label="Enter when branch condition "]; + 28 [label="Const: Boolean(true)"]; + 29 [label="Exit when branch condition"]; } subgraph cluster_11 { color=blue - 38 [label="Enter when branch condition else"]; - 39 [label="Exit when branch condition"]; + 30 [label="Enter when branch condition else"]; + 31 [label="Exit when branch condition"]; } - 40 [label="Enter when branch result"]; + 32 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 41 [label="Enter block"]; + 33 [label="Enter block"]; subgraph cluster_13 { color=blue - 42 [label="Enter when"]; + 34 [label="Enter when"]; subgraph cluster_14 { color=blue - 43 [label="Enter when branch condition "]; - 44 [label="Const: Boolean(false)"]; - 45 [label="Exit when branch condition"]; + 35 [label="Enter when branch condition "]; + 36 [label="Const: Boolean(false)"]; + 37 [label="Exit when branch condition"]; } subgraph cluster_15 { color=blue - 46 [label="Enter when branch condition else"]; - 47 [label="Exit when branch condition"]; + 38 [label="Enter when branch condition else"]; + 39 [label="Exit when branch condition"]; } - 48 [label="Enter when branch result"]; + 40 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 49 [label="Enter block"]; - 50 [label="Access variable R|/y|"]; - 51 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 52 [label="Access variable R|/z|"]; - 53 [label="Function call: R|/z|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 54 [label="Jump: ^foo Unit"]; - 55 [label="Stub" style="filled" fillcolor=gray]; - 56 [label="Exit block" style="filled" fillcolor=gray]; + 41 [label="Enter block"]; + 42 [label="Access variable R|/y|"]; + 43 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 44 [label="Access variable R|/z|"]; + 45 [label="Function call: R|/z|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 46 [label="Jump: ^foo Unit"]; + 47 [label="Stub" style="filled" fillcolor=gray]; + 48 [label="Exit block" style="filled" fillcolor=gray]; } - 57 [label="Exit when branch result" style="filled" fillcolor=gray]; - 58 [label="Enter when branch result"]; + 49 [label="Exit when branch result" style="filled" fillcolor=gray]; + 50 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 59 [label="Enter block"]; - 60 [label="Access variable R|/y|"]; - 61 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 62 [label="Exit block"]; + 51 [label="Enter block"]; + 52 [label="Access variable R|/y|"]; + 53 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 54 [label="Exit block"]; } - 63 [label="Exit when branch result"]; - 64 [label="Exit when"]; + 55 [label="Exit when branch result"]; + 56 [label="Exit when"]; } - 65 [label="Exit block"]; + 57 [label="Exit block"]; } - 66 [label="Exit when branch result"]; - 67 [label="Enter when branch result"]; + 58 [label="Exit when branch result"]; + 59 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 68 [label="Enter block"]; + 60 [label="Enter block"]; subgraph cluster_19 { color=blue - 69 [label="Enter block"]; - 70 [label="Const: Int(0)"]; - 71 [label="Const: Int(0)"]; - 72 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)" style="filled" fillcolor=yellow]; - 73 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()" style="filled" fillcolor=yellow]; - 74 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; + 61 [label="Enter block"]; + 62 [label="Const: Int(0)"]; + 63 [label="Const: Int(0)"]; + 64 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)" style="filled" fillcolor=yellow]; + 65 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()" style="filled" fillcolor=yellow]; + 66 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; subgraph cluster_20 { color=blue - 75 [label="Enter while loop"]; + 67 [label="Enter while loop"]; subgraph cluster_21 { color=blue - 76 [label="Enter loop condition"]; - 77 [label="Access variable R|/|"]; - 78 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 79 [label="Exit loop condition"]; + 68 [label="Enter loop condition"]; + 69 [label="Access variable R|/|"]; + 70 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 71 [label="Exit loop condition"]; } subgraph cluster_22 { color=blue - 80 [label="Enter loop block"]; + 72 [label="Enter loop block"]; subgraph cluster_23 { color=blue - 81 [label="Enter block"]; - 82 [label="Access variable R|/|"]; - 83 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()" style="filled" fillcolor=yellow]; - 84 [label="Variable declaration: lval i: R|kotlin/Int|"]; - 85 [label="Access variable R|/x|"]; - 86 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 87 [label="Exit block"]; + 73 [label="Enter block"]; + 74 [label="Access variable R|/|"]; + 75 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()" style="filled" fillcolor=yellow]; + 76 [label="Variable declaration: lval i: R|kotlin/Int|"]; + 77 [label="Access variable R|/x|"]; + 78 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 79 [label="Exit block"]; } - 88 [label="Exit loop block"]; + 80 [label="Exit loop block"]; } - 89 [label="Exit whileloop"]; + 81 [label="Exit whileloop"]; } - 90 [label="Exit block"]; + 82 [label="Exit block"]; } - 91 [label="Access variable R|/y|"]; - 92 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 93 [label="Exit block"]; + 83 [label="Access variable R|/y|"]; + 84 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 85 [label="Exit block"]; } - 94 [label="Exit when branch result"]; - 95 [label="Exit when"]; + 86 [label="Exit when branch result"]; + 87 [label="Exit when"]; } subgraph cluster_24 { color=blue - 96 [label="Enter do-while loop"]; + 88 [label="Enter do-while loop"]; subgraph cluster_25 { color=blue - 97 [label="Enter loop block"]; + 89 [label="Enter loop block"]; subgraph cluster_26 { color=blue - 98 [label="Enter block"]; - 99 [label="Access variable R|/z|"]; - 100 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 101 [label="Exit block"]; + 90 [label="Enter block"]; + 91 [label="Access variable R|/z|"]; + 92 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 93 [label="Exit block"]; } - 102 [label="Exit loop block"]; + 94 [label="Exit loop block"]; } subgraph cluster_27 { color=blue - 103 [label="Enter loop condition"]; - 104 [label="Const: Boolean(true)"]; - 105 [label="Exit loop condition"]; + 95 [label="Enter loop condition"]; + 96 [label="Const: Boolean(true)"]; + 97 [label="Exit loop condition"]; } - 106 [label="Exit do-whileloop" style="filled" fillcolor=gray]; + 98 [label="Exit do-whileloop" style="filled" fillcolor=gray]; } - 107 [label="Exit block" style="filled" fillcolor=gray]; + 99 [label="Exit block" style="filled" fillcolor=gray]; } - 108 [label="Exit function foo" style="filled" fillcolor=red]; + 100 [label="Exit function foo" style="filled" fillcolor=red]; } + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; + 25 -> {26}; + 26 -> {27}; + 27 -> {28}; + 28 -> {29}; + 29 -> {30 59}; 30 -> {31}; 31 -> {32}; 32 -> {33}; @@ -218,7 +226,7 @@ digraph flow_kt { 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38 67}; + 37 -> {38 50}; 38 -> {39}; 39 -> {40}; 40 -> {41}; @@ -226,21 +234,21 @@ digraph flow_kt { 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {46 58}; - 46 -> {47}; - 47 -> {48}; - 48 -> {49}; - 49 -> {50}; + 45 -> {46}; + 46 -> {100}; + 46 -> {47} [style=dotted]; + 47 -> {48} [style=dotted]; + 48 -> {49} [style=dotted]; + 49 -> {56} [style=dotted]; 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {108}; - 54 -> {55} [style=dotted]; - 55 -> {56} [style=dotted]; - 56 -> {57} [style=dotted]; - 57 -> {64} [style=dotted]; - 58 -> {59}; + 54 -> {55}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {87}; 59 -> {60}; 60 -> {61}; 61 -> {62}; @@ -248,12 +256,12 @@ digraph flow_kt { 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {95}; + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {72 81}; 72 -> {73}; 73 -> {74}; 74 -> {75}; @@ -261,8 +269,8 @@ digraph flow_kt { 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {80 89}; - 80 -> {81}; + 79 -> {80}; + 80 -> {68} [color=green style=dashed]; 81 -> {82}; 82 -> {83}; 83 -> {84}; @@ -270,7 +278,7 @@ digraph flow_kt { 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {76} [color=green style=dashed]; + 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; @@ -279,17 +287,9 @@ digraph flow_kt { 94 -> {95}; 95 -> {96}; 96 -> {97}; - 97 -> {98}; - 98 -> {99}; - 99 -> {100}; - 100 -> {101}; - 101 -> {102}; - 102 -> {103}; - 103 -> {104}; - 104 -> {105}; - 105 -> {97} [color=green style=dashed]; - 105 -> {106} [style=dotted]; - 106 -> {107} [style=dotted]; - 107 -> {108} [style=dotted]; + 97 -> {89} [color=green style=dashed]; + 97 -> {98} [style=dotted]; + 98 -> {99} [style=dotted]; + 99 -> {100} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot index 23a4c19d7c7..d8a07585131 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot @@ -57,48 +57,48 @@ digraph inPlaceLambda_kt { subgraph cluster_6 { color=red - 25 [label="Enter function foo" style="filled" fillcolor=red]; + 17 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_7 { color=blue - 26 [label="Enter block"]; + 18 [label="Enter block"]; subgraph cluster_8 { color=blue - 27 [label="Enter block"]; - 28 [label="Exit block"]; + 19 [label="Enter block"]; + 20 [label="Exit block"]; } - 29 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 30 [label="Postponed enter to lambda"]; + 21 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 22 [label="Postponed enter to lambda"]; subgraph cluster_9 { color=blue - 35 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 23 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 36 [label="Enter block"]; - 37 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; + 24 [label="Enter block"]; + 25 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 26 [label="Exit block"]; } - 39 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 27 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 31 [label="Postponed exit from lambda"]; - 32 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 33 [label="Exit block"]; + 28 [label="Postponed exit from lambda"]; + 29 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; } - 34 [label="Exit function foo" style="filled" fillcolor=red]; + 31 [label="Exit function foo" style="filled" fillcolor=red]; } + 17 -> {18}; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23 28 29}; + 22 -> {23} [style=dashed]; + 23 -> {24}; + 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31 32 35}; - 30 -> {35} [style=dashed]; - 31 -> {32}; - 32 -> {33}; - 33 -> {34}; - 35 -> {36}; - 36 -> {37}; - 37 -> {38}; - 38 -> {39}; - 39 -> {31}; + 30 -> {31}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot index a90db7f48f8..e9bb0735bbd 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot @@ -30,62 +30,62 @@ digraph simple_kt { subgraph cluster_3 { color=red - 16 [label="Enter function foo" style="filled" fillcolor=red]; + 8 [label="Enter function foo" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 17 [label="Enter block"]; + 9 [label="Enter block"]; subgraph cluster_5 { color=blue - 18 [label="Enter block"]; - 19 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Exit block"]; } - 20 [label="Access variable R|/x|"]; - 21 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 12 [label="Access variable R|/x|"]; + 13 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; subgraph cluster_6 { color=blue - 22 [label="Enter when"]; + 14 [label="Enter when"]; subgraph cluster_7 { color=blue - 23 [label="Enter when branch condition "]; - 24 [label="Const: Boolean(true)"]; - 25 [label="Exit when branch condition"]; + 15 [label="Enter when branch condition "]; + 16 [label="Const: Boolean(true)"]; + 17 [label="Exit when branch condition"]; } - 26 [label="Synthetic else branch"]; - 27 [label="Enter when branch result"]; + 18 [label="Synthetic else branch"]; + 19 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 28 [label="Enter block"]; - 29 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; + 20 [label="Enter block"]; + 21 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 22 [label="Exit block"]; } - 31 [label="Exit when branch result"]; - 32 [label="Exit when"]; + 23 [label="Exit when branch result"]; + 24 [label="Exit when"]; } - 33 [label="Access variable R|/z|"]; - 34 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 35 [label="Exit block"]; + 25 [label="Access variable R|/z|"]; + 26 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 27 [label="Exit block"]; } - 36 [label="Exit function foo" style="filled" fillcolor=red]; + 28 [label="Exit function foo" style="filled" fillcolor=red]; } + 8 -> {9}; + 9 -> {10}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; + 13 -> {14}; + 14 -> {15}; + 15 -> {16}; 16 -> {17}; - 17 -> {18}; - 18 -> {19}; + 17 -> {18 19}; + 18 -> {24}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {26 27}; - 26 -> {32}; + 25 -> {26}; + 26 -> {27}; 27 -> {28}; - 28 -> {29}; - 29 -> {30}; - 30 -> {31}; - 31 -> {32}; - 32 -> {33}; - 33 -> {34}; - 34 -> {35}; - 35 -> {36}; } 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 d18645ddc12..28cd3a724c0 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 @@ -28,117 +28,117 @@ digraph unknown_kt { subgraph cluster_3 { color=red - 15 [label="Enter function myRun" style="filled" fillcolor=red]; + 7 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 16 [label="Enter block"]; + 8 [label="Enter block"]; subgraph cluster_5 { color=blue - 17 [label="Enter block"]; - 18 [label="Exit block"]; + 9 [label="Enter block"]; + 10 [label="Exit block"]; } - 19 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; + 11 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 12 [label="Exit block"]; } - 21 [label="Exit function myRun" style="filled" fillcolor=red]; + 13 [label="Exit function myRun" style="filled" fillcolor=red]; } - 15 -> {16}; - 16 -> {17}; - 17 -> {18}; - 18 -> {19}; - 19 -> {20}; - 20 -> {21}; + 7 -> {8}; + 8 -> {9}; + 9 -> {10}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; subgraph cluster_6 { color=red - 30 [label="Enter function test_1" style="filled" fillcolor=red]; + 14 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_7 { + color=blue + 15 [label="Enter block"]; + 16 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 17 [label="Postponed enter to lambda"]; + subgraph cluster_8 { + color=blue + 18 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 19 [label="Enter block"]; + 20 [label="Const: Int(1)"]; + 21 [label="Assignment: R|/x|"]; + 22 [label="Exit block"]; + } + 23 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + } + 24 [label="Postponed exit from lambda"]; + 25 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + 26 [label="Access variable R|/x|"]; + 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; + } + 29 [label="Exit function test_1" style="filled" fillcolor=red]; + } + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18 24 25}; + 17 -> {18} [style=dashed]; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; + 24 -> {17} [color=green style=dashed]; + 25 -> {26}; + 26 -> {27}; + 27 -> {28}; + 28 -> {29}; + + subgraph cluster_10 { + color=red + 30 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue 31 [label="Enter block"]; 32 [label="Variable declaration: lval x: R|kotlin/Int|"]; 33 [label="Postponed enter to lambda"]; - subgraph cluster_8 { + subgraph cluster_12 { color=blue - 40 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_9 { + 34 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + subgraph cluster_13 { color=blue - 41 [label="Enter block"]; - 42 [label="Const: Int(1)"]; - 43 [label="Assignment: R|/x|"]; - 44 [label="Exit block"]; + 35 [label="Enter block"]; + 36 [label="Const: Int(1)"]; + 37 [label="Assignment: R|/x|"]; + 38 [label="Exit block"]; } - 45 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 39 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 34 [label="Postponed exit from lambda"]; - 35 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 36 [label="Access variable R|/x|"]; - 37 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; + 40 [label="Postponed exit from lambda"]; + 41 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 42 [label="Access variable R|/x|"]; + 43 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 44 [label="Exit block"]; } - 39 [label="Exit function test_1" style="filled" fillcolor=red]; + 45 [label="Exit function test_2" style="filled" fillcolor=red]; } 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {34 35 40}; - 33 -> {40} [style=dashed]; + 33 -> {34 40 41}; + 33 -> {34} [style=dashed]; 34 -> {35}; - 34 -> {33} [color=green style=dashed]; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; + 39 -> {40}; 40 -> {41}; + 40 -> {33} [color=green style=dashed]; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {34}; - - subgraph cluster_10 { - color=red - 46 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 47 [label="Enter block"]; - 48 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 49 [label="Postponed enter to lambda"]; - subgraph cluster_12 { - color=blue - 56 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 57 [label="Enter block"]; - 58 [label="Const: Int(1)"]; - 59 [label="Assignment: R|/x|"]; - 60 [label="Exit block"]; - } - 61 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; - } - 50 [label="Postponed exit from lambda"]; - 51 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 52 [label="Access variable R|/x|"]; - 53 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 54 [label="Exit block"]; - } - 55 [label="Exit function test_2" style="filled" fillcolor=red]; - } - 46 -> {47}; - 47 -> {48}; - 48 -> {49}; - 49 -> {50 51 56}; - 49 -> {56} [style=dashed]; - 50 -> {51}; - 50 -> {49} [color=green style=dashed]; - 51 -> {52}; - 52 -> {53}; - 53 -> {54}; - 54 -> {55}; - 56 -> {57}; - 57 -> {58}; - 58 -> {59}; - 59 -> {60}; - 60 -> {61}; - 61 -> {50}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot index 609f0eae9c9..fefd8af2a9d 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot @@ -5,20 +5,20 @@ digraph delegateWithAnonymousObject_kt { subgraph cluster_0 { color=red - 3 [label="Enter class DelegateProvider" style="filled" fillcolor=red]; - 4 [label="Exit class DelegateProvider" style="filled" fillcolor=red]; + 0 [label="Enter class DelegateProvider" style="filled" fillcolor=red]; + 1 [label="Exit class DelegateProvider" style="filled" fillcolor=red]; } subgraph cluster_1 { color=blue - 0 [label="Enter function " style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 2 [label="Exit function " style="filled" fillcolor=red]; + 2 [label="Enter function " style="filled" fillcolor=red]; + 3 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 4 [label="Exit function " style="filled" fillcolor=red]; } - 3 -> {4} [color=green]; - 4 -> {0} [color=green]; - 4 -> {0} [style=dashed]; - 0 -> {1}; - 1 -> {2}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; + 3 -> {4}; subgraph cluster_2 { color=red @@ -46,168 +46,159 @@ digraph delegateWithAnonymousObject_kt { subgraph cluster_4 { color=red - 21 [label="Enter class IssueListView" style="filled" fillcolor=red]; - 22 [label="Exit class IssueListView" style="filled" fillcolor=red]; + 14 [label="Enter class IssueListView" style="filled" fillcolor=red]; + 15 [label="Exit class IssueListView" style="filled" fillcolor=red]; } subgraph cluster_5 { color=blue - 17 [label="Enter function updateFrom" style="filled" fillcolor=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"]; } - 20 [label="Exit function updateFrom" style="filled" fillcolor=red]; + 19 [label="Exit function updateFrom" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 14 [label="Enter function " style="filled" fillcolor=red]; - 15 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; - 16 [label="Exit function " style="filled" fillcolor=red]; + 20 [label="Enter function " style="filled" fillcolor=red]; + 21 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; + 22 [label="Exit function " style="filled" fillcolor=red]; } - 21 -> {22} [color=green]; - 22 -> {14 17} [color=green]; - 22 -> {14 17} [style=dashed]; - 14 -> {15}; - 15 -> {16}; + 14 -> {15} [color=green]; + 15 -> {16 20} [color=green]; + 15 -> {16 20} [style=dashed]; + 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20}; + 20 -> {21}; + 21 -> {22}; subgraph cluster_8 { color=red - 79 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red]; - 80 [label="Part of class initialization"]; + 23 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red]; + 24 [label="Part of class initialization"]; subgraph cluster_9 { color=blue - 71 [label="Enter property" style="filled" fillcolor=red]; - 72 [label="Postponed enter to lambda"]; + 25 [label="Enter property" style="filled" fillcolor=red]; + 26 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue - 26 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 27 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 27 [label="Enter block"]; - 28 [label="Enter anonymous object"]; + 28 [label="Enter block"]; + 29 [label="Enter anonymous object"]; subgraph cluster_12 { color=blue - 33 [label="Enter class " style="filled" fillcolor=red]; - 34 [label="Exit class " style="filled" fillcolor=red]; + 30 [label="Enter class " style="filled" fillcolor=red]; + 31 [label="Exit class " style="filled" fillcolor=red]; } - 29 [label="Exit anonymous object"]; - 30 [label="Exit anonymous object expression"]; - 31 [label="Exit block"]; + 32 [label="Exit anonymous object"]; + 33 [label="Exit anonymous object expression"]; + 34 [label="Exit block"]; } - 32 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 35 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } subgraph cluster_13 { color=blue - 45 [label="Enter function setValue" style="filled" fillcolor=red]; + 36 [label="Enter function setValue" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 46 [label="Enter block"]; - 47 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; - 48 [label="Access variable R|/value|"]; - 49 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)" style="filled" fillcolor=yellow]; - 50 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|/value|)"]; - 51 [label="Stub" style="filled" fillcolor=gray]; - 52 [label="Exit block" style="filled" fillcolor=gray]; - } - 53 [label="Exit function setValue" style="filled" fillcolor=red]; - } - subgraph cluster_15 { - color=blue - 38 [label="Enter function getValue" style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 39 [label="Enter block"]; - 40 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; - 41 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"]; + 37 [label="Enter block"]; + 38 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; + 39 [label="Access variable R|/value|"]; + 40 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)" style="filled" fillcolor=yellow]; + 41 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|/value|)"]; 42 [label="Stub" style="filled" fillcolor=gray]; 43 [label="Exit block" style="filled" fillcolor=gray]; } - 44 [label="Exit function getValue" style="filled" fillcolor=red]; + 44 [label="Exit function setValue" style="filled" fillcolor=red]; + } + subgraph cluster_15 { + color=blue + 45 [label="Enter function getValue" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 46 [label="Enter block"]; + 47 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; + 48 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"]; + 49 [label="Stub" style="filled" fillcolor=gray]; + 50 [label="Exit block" style="filled" fillcolor=gray]; + } + 51 [label="Exit function getValue" style="filled" fillcolor=red]; } subgraph cluster_17 { color=blue - 35 [label="Enter function " style="filled" fillcolor=red]; - 36 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 37 [label="Exit function " style="filled" fillcolor=red]; + 52 [label="Enter function " style="filled" fillcolor=red]; + 53 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 54 [label="Exit function " style="filled" fillcolor=red]; } - 73 [label="Postponed exit from lambda"]; - 74 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)" style="filled" fillcolor=yellow]; - 75 [label="Access variable this@R|/IssuesListUserProfile|"]; - 76 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...).#(...)" style="filled" fillcolor=yellow]; - 77 [label="Exit property delegate" style="filled" fillcolor=yellow]; - 78 [label="Exit property" style="filled" fillcolor=red]; + 55 [label="Postponed exit from lambda"]; + 56 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)" style="filled" fillcolor=yellow]; + 57 [label="Access variable this@R|/IssuesListUserProfile|"]; + 58 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...).#(...)" style="filled" fillcolor=yellow]; + 59 [label="Exit property delegate" style="filled" fillcolor=yellow]; + 60 [label="Exit property" style="filled" fillcolor=red]; } - 81 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red]; + 61 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red]; } subgraph cluster_18 { color=blue - 63 [label="Enter function setter" style="filled" fillcolor=red]; + 62 [label="Enter function setter" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 64 [label="Enter block"]; - 65 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; - 66 [label="Access variable this@R|/IssuesListUserProfile|"]; - 67 [label="Access variable R|/issueListView|"]; - 68 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 69 [label="Exit block"]; + 63 [label="Enter block"]; + 64 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; + 65 [label="Access variable this@R|/IssuesListUserProfile|"]; + 66 [label="Access variable R|/issueListView|"]; + 67 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 68 [label="Exit block"]; } - 70 [label="Exit function setter" style="filled" fillcolor=red]; + 69 [label="Exit function setter" style="filled" fillcolor=red]; } subgraph cluster_20 { color=blue - 54 [label="Enter function getter" style="filled" fillcolor=red]; + 70 [label="Enter function getter" style="filled" fillcolor=red]; subgraph cluster_21 { color=blue - 55 [label="Enter block"]; - 56 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; - 57 [label="Access variable this@R|/IssuesListUserProfile|"]; - 58 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 59 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; - 60 [label="Stub" style="filled" fillcolor=gray]; - 61 [label="Exit block" style="filled" fillcolor=gray]; + 71 [label="Enter block"]; + 72 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; + 73 [label="Access variable this@R|/IssuesListUserProfile|"]; + 74 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 75 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; + 76 [label="Stub" style="filled" fillcolor=gray]; + 77 [label="Exit block" style="filled" fillcolor=gray]; } - 62 [label="Exit function getter" style="filled" fillcolor=red]; + 78 [label="Exit function getter" style="filled" fillcolor=red]; } subgraph cluster_22 { color=blue - 23 [label="Enter function " style="filled" fillcolor=red]; - 24 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; - 25 [label="Exit function " style="filled" fillcolor=red]; + 79 [label="Enter function " style="filled" fillcolor=red]; + 80 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; + 81 [label="Exit function " style="filled" fillcolor=red]; } - 79 -> {80} [color=green]; - 80 -> {71} [color=green]; - 80 -> {81} [style=dotted]; - 80 -> {71} [style=dashed]; - 81 -> {23 54 63} [color=green]; - 81 -> {23 54 63} [style=dashed]; - 71 -> {72}; - 72 -> {26 73 74}; - 72 -> {26} [style=dashed]; - 73 -> {74} [color=green]; - 73 -> {77} [color=red]; - 74 -> {75}; - 75 -> {76}; - 76 -> {77}; - 77 -> {78}; - 78 -> {81} [color=green]; - 26 -> {27}; + 23 -> {24} [color=green]; + 24 -> {25} [color=green]; + 24 -> {61} [style=dotted]; + 24 -> {25} [style=dashed]; + 25 -> {26}; + 26 -> {27 55 56}; + 26 -> {27} [style=dashed]; 27 -> {28}; - 28 -> {33}; - 28 -> {29} [color=red]; - 28 -> {33} [style=dashed]; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; - 31 -> {32}; - 33 -> {34} [color=green]; - 33 -> {35 38 45} [color=red]; - 34 -> {29 35 38 45} [color=green]; - 34 -> {35 38 45} [style=dashed]; - 35 -> {36}; + 29 -> {32} [color=red]; + 29 -> {30} [style=dashed]; + 30 -> {31} [color=green]; + 30 -> {36 45 52} [color=red]; + 31 -> {32 36 45 52} [color=green]; + 31 -> {36 45 52} [style=dashed]; + 32 -> {33}; + 33 -> {34}; + 34 -> {35}; 36 -> {37}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; @@ -218,29 +209,38 @@ digraph delegateWithAnonymousObject_kt { 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {49}; - 49 -> {50}; - 50 -> {53}; + 48 -> {51}; + 48 -> {49} [style=dotted]; + 49 -> {50} [style=dotted]; 50 -> {51} [style=dotted]; - 51 -> {52} [style=dotted]; - 52 -> {53} [style=dotted]; - 23 -> {24}; - 24 -> {25}; - 54 -> {55}; - 55 -> {56}; + 52 -> {53}; + 53 -> {54}; + 55 -> {56} [color=green]; + 55 -> {59} [color=red]; 56 -> {57}; 57 -> {58}; 58 -> {59}; - 59 -> {62}; - 59 -> {60} [style=dotted]; - 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; + 59 -> {60}; + 60 -> {61} [color=green]; + 61 -> {62 70 79} [color=green]; + 61 -> {62 70 79} [style=dashed]; + 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {70}; + 70 -> {71}; + 71 -> {72}; + 72 -> {73}; + 73 -> {74}; + 74 -> {75}; + 75 -> {78}; + 75 -> {76} [style=dotted]; + 76 -> {77} [style=dotted]; + 77 -> {78} [style=dotted]; + 79 -> {80}; + 80 -> {81}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot index df3ee2a98d1..9c17a4593dc 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot @@ -17,20 +17,20 @@ digraph plusAssignWithLambdaInRhs_kt { 7 [label="Postponed enter to lambda" style="filled" fillcolor=gray]; subgraph cluster_2 { color=blue - 12 [label="Enter function anonymousFunction" style="filled" fillcolor=gray]; + 8 [label="Enter function anonymousFunction" style="filled" fillcolor=gray]; subgraph cluster_3 { color=blue - 13 [label="Enter block" style="filled" fillcolor=gray]; - 14 [label="Access variable R|/it|" style="filled" fillcolor=gray]; - 15 [label="Exit block" style="filled" fillcolor=gray]; + 9 [label="Enter block" style="filled" fillcolor=gray]; + 10 [label="Access variable R|/it|" style="filled" fillcolor=gray]; + 11 [label="Exit block" style="filled" fillcolor=gray]; } - 16 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; + 12 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; } - 8 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 9 [label="Function call: R|/list|.R|kotlin/collections/plusAssign| kotlin/String|>(...)" style="filled" fillcolor=gray]; - 10 [label="Exit block" style="filled" fillcolor=gray]; + 13 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 14 [label="Function call: R|/list|.R|kotlin/collections/plusAssign| kotlin/String|>(...)" style="filled" fillcolor=gray]; + 15 [label="Exit block" style="filled" fillcolor=gray]; } - 11 [label="Exit function test" style="filled" fillcolor=gray]; + 16 [label="Exit function test" style="filled" fillcolor=gray]; } 0 -> {1}; 1 -> {2}; @@ -39,45 +39,45 @@ digraph plusAssignWithLambdaInRhs_kt { 4 -> {5} [style=dotted]; 5 -> {6} [style=dotted]; 6 -> {7} [style=dotted]; - 7 -> {8 9 12} [style=dotted]; - 7 -> {12} [style=dashed]; + 7 -> {8 13 14} [style=dotted]; + 7 -> {8} [style=dashed]; 8 -> {9} [style=dotted]; 9 -> {10} [style=dotted]; 10 -> {11} [style=dotted]; - 12 -> {13} [style=dotted]; + 11 -> {12} [style=dotted]; 13 -> {14} [style=dotted]; 14 -> {15} [style=dotted]; 15 -> {16} [style=dotted]; subgraph cluster_4 { color=red - 23 [label="Enter class A" style="filled" fillcolor=red]; - 24 [label="Part of class initialization"]; + 17 [label="Enter class A" style="filled" fillcolor=red]; + 18 [label="Part of class initialization"]; subgraph cluster_5 { color=blue - 20 [label="Enter property" style="filled" fillcolor=red]; - 21 [label="Access variable R|/executor|"]; - 22 [label="Exit property" style="filled" fillcolor=red]; + 19 [label="Enter property" style="filled" fillcolor=red]; + 20 [label="Access variable R|/executor|"]; + 21 [label="Exit property" style="filled" fillcolor=red]; } - 25 [label="Exit class A" style="filled" fillcolor=red]; + 22 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_6 { color=blue - 17 [label="Enter function " style="filled" fillcolor=red]; - 18 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 19 [label="Exit function " style="filled" fillcolor=red]; + 23 [label="Enter function " style="filled" fillcolor=red]; + 24 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 25 [label="Exit function " style="filled" fillcolor=red]; } - 23 -> {24} [color=green]; - 24 -> {20} [color=green]; - 24 -> {25} [style=dotted]; - 24 -> {20} [style=dashed]; - 25 -> {17} [color=green]; - 25 -> {17} [style=dashed]; + 17 -> {18} [color=green]; + 18 -> {19} [color=green]; + 18 -> {22} [style=dotted]; + 18 -> {19} [style=dashed]; + 19 -> {20}; 20 -> {21}; - 21 -> {22}; - 22 -> {25} [color=green]; - 17 -> {18}; - 18 -> {19}; + 21 -> {22} [color=green]; + 22 -> {23} [color=green]; + 22 -> {23} [style=dashed]; + 23 -> {24}; + 24 -> {25}; subgraph cluster_7 { color=red @@ -90,23 +90,23 @@ digraph plusAssignWithLambdaInRhs_kt { 30 [label="Postponed enter to lambda"]; subgraph cluster_9 { color=blue - 37 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 31 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 38 [label="Enter block"]; - 39 [label="Access variable R|/queue|"]; - 40 [label="Postponed enter to lambda"]; + 32 [label="Enter block"]; + 33 [label="Access variable R|/queue|"]; + 34 [label="Postponed enter to lambda"]; subgraph cluster_11 { color=blue - 45 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 35 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 46 [label="Enter block"]; - 47 [label="Function call: R|/computation|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 48 [label="Function call: R|/resolve|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 49 [label="Exit block"]; + 36 [label="Enter block"]; + 37 [label="Function call: R|/computation|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 38 [label="Function call: R|/resolve|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 39 [label="Exit block"]; } - 50 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 40 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } 41 [label="Postponed exit from lambda"]; 42 [label="Function call: R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; @@ -114,44 +114,44 @@ digraph plusAssignWithLambdaInRhs_kt { } 44 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 31 [label="Postponed exit from lambda"]; - 32 [label="Function call: R|/A.A|(...)" style="filled" fillcolor=yellow]; - 33 [label="Jump: ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { + 45 [label="Postponed exit from lambda"]; + 46 [label="Function call: R|/A.A|(...)" style="filled" fillcolor=yellow]; + 47 [label="Jump: ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(A@fun (): R|kotlin/Unit| { R|/resolve|.R|SubstitutionOverride|(R|/computation|.R|SubstitutionOverride|()) } ) } )"]; - 34 [label="Stub" style="filled" fillcolor=gray]; - 35 [label="Exit block" style="filled" fillcolor=gray]; + 48 [label="Stub" style="filled" fillcolor=gray]; + 49 [label="Exit block" style="filled" fillcolor=gray]; } - 36 [label="Exit function postpone" style="filled" fillcolor=red]; + 50 [label="Exit function postpone" style="filled" fillcolor=red]; } 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31 32 37}; - 30 -> {37} [style=dashed]; + 30 -> {31 45 46}; + 30 -> {31} [style=dashed]; 31 -> {32}; 32 -> {33}; - 33 -> {36}; - 33 -> {34} [style=dotted]; - 34 -> {35} [style=dotted]; - 35 -> {36} [style=dotted]; + 33 -> {34}; + 34 -> {35 41 42}; + 34 -> {35} [style=dashed]; + 35 -> {36}; + 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {41 42 45}; - 40 -> {45} [style=dashed]; 41 -> {42}; 42 -> {43}; 43 -> {44}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; - 48 -> {49}; - 49 -> {50}; + 47 -> {50}; + 47 -> {48} [style=dotted]; + 48 -> {49} [style=dotted]; + 49 -> {50} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot index 133862d1af8..33012c4331a 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot @@ -57,34 +57,34 @@ digraph tryWithLambdaInside_kt { 17 [label="Postponed enter to lambda"]; subgraph cluster_9 { color=blue - 31 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 18 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 32 [label="Enter block"]; - 33 [label="Access variable R|/it|"]; - 34 [label="Exit block"]; + 19 [label="Enter block"]; + 20 [label="Access variable R|/it|"]; + 21 [label="Exit block"]; } - 35 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 22 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 18 [label="Postponed exit from lambda"]; - 19 [label="Function call: R|/list|.R|kotlin/collections/filter|(...)" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; + 23 [label="Postponed exit from lambda"]; + 24 [label="Function call: R|/list|.R|kotlin/collections/filter|(...)" style="filled" fillcolor=yellow]; + 25 [label="Exit block"]; } - 21 [label="Try main block exit"]; + 26 [label="Try main block exit"]; } subgraph cluster_11 { color=blue - 22 [label="Enter finally"]; + 27 [label="Enter finally"]; subgraph cluster_12 { color=blue - 23 [label="Enter block"]; - 24 [label="Exit block"]; + 28 [label="Enter block"]; + 29 [label="Exit block"]; } - 25 [label="Exit finally"]; + 30 [label="Exit finally"]; } - 26 [label="Try expression exit"]; + 31 [label="Try expression exit"]; } - 27 [label="Jump: ^testInPlace try { + 32 [label="Jump: ^testInPlace try { R|/list|.R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } @@ -93,39 +93,39 @@ digraph tryWithLambdaInside_kt { finally { } "]; - 28 [label="Stub" style="filled" fillcolor=gray]; - 29 [label="Exit block" style="filled" fillcolor=gray]; + 33 [label="Stub" style="filled" fillcolor=gray]; + 34 [label="Exit block" style="filled" fillcolor=gray]; } - 30 [label="Exit function testInPlace" style="filled" fillcolor=red]; + 35 [label="Exit function testInPlace" style="filled" fillcolor=red]; } 11 -> {12}; 12 -> {13}; 13 -> {14}; - 13 -> {22} [label="onUncaughtException"]; + 13 -> {27} [label="onUncaughtException"]; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {18 19 31}; - 17 -> {31} [style=dashed]; + 17 -> {18 23 24}; + 17 -> {18} [style=dashed]; 18 -> {19}; - 18 -> {17} [color=green style=dashed]; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; + 23 -> {17} [color=green style=dashed]; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {30}; - 27 -> {28} [style=dotted]; - 28 -> {29} [style=dotted]; - 29 -> {30} [style=dotted]; + 27 -> {28}; + 28 -> {29}; + 29 -> {30}; + 30 -> {31}; 31 -> {32}; - 32 -> {33}; - 33 -> {34}; - 34 -> {35}; - 35 -> {18}; + 32 -> {35}; + 32 -> {33} [style=dotted]; + 33 -> {34} [style=dotted]; + 34 -> {35} [style=dotted]; subgraph cluster_13 { color=red @@ -146,34 +146,34 @@ finally { 42 [label="Postponed enter to lambda"]; subgraph cluster_18 { color=blue - 56 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; + 43 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 57 [label="Enter block"]; - 58 [label="Access variable R|/it|"]; - 59 [label="Exit block"]; + 44 [label="Enter block"]; + 45 [label="Access variable R|/it|"]; + 46 [label="Exit block"]; } - 60 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; + 47 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } - 43 [label="Postponed exit from lambda"]; - 44 [label="Function call: R|/list|.R|/notInPlaceFilter|(...)" style="filled" fillcolor=yellow]; - 45 [label="Exit block"]; + 48 [label="Postponed exit from lambda"]; + 49 [label="Function call: R|/list|.R|/notInPlaceFilter|(...)" style="filled" fillcolor=yellow]; + 50 [label="Exit block"]; } - 46 [label="Try main block exit"]; + 51 [label="Try main block exit"]; } subgraph cluster_20 { color=blue - 47 [label="Enter finally"]; + 52 [label="Enter finally"]; subgraph cluster_21 { color=blue - 48 [label="Enter block"]; - 49 [label="Exit block"]; + 53 [label="Enter block"]; + 54 [label="Exit block"]; } - 50 [label="Exit finally"]; + 55 [label="Exit finally"]; } - 51 [label="Try expression exit"]; + 56 [label="Try expression exit"]; } - 52 [label="Jump: ^testNotInPlace try { + 57 [label="Jump: ^testNotInPlace try { R|/list|.R|/notInPlaceFilter|( = notInPlaceFilter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } @@ -182,36 +182,36 @@ finally { finally { } "]; - 53 [label="Stub" style="filled" fillcolor=gray]; - 54 [label="Exit block" style="filled" fillcolor=gray]; + 58 [label="Stub" style="filled" fillcolor=gray]; + 59 [label="Exit block" style="filled" fillcolor=gray]; } - 55 [label="Exit function testNotInPlace" style="filled" fillcolor=red]; + 60 [label="Exit function testNotInPlace" style="filled" fillcolor=red]; } 36 -> {37}; 37 -> {38}; 38 -> {39}; - 38 -> {47} [label="onUncaughtException"]; + 38 -> {52} [label="onUncaughtException"]; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43 44 56}; - 42 -> {56} [style=dashed]; + 42 -> {43 48 49}; + 42 -> {43} [style=dashed]; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {55}; - 52 -> {53} [style=dotted]; - 53 -> {54} [style=dotted]; - 54 -> {55} [style=dotted]; + 52 -> {53}; + 53 -> {54}; + 54 -> {55}; + 55 -> {56}; 56 -> {57}; - 57 -> {58}; - 58 -> {59}; - 59 -> {60}; + 57 -> {60}; + 57 -> {58} [style=dotted]; + 58 -> {59} [style=dotted]; + 59 -> {60} [style=dotted]; } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt index 6a7ca508a69..0184cbd58ad 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt @@ -32,10 +32,6 @@ class FirControlFlowGraphRenderVisitor( private var nodeCounter = 0 private var clusterCounter = 0 - private val indices = mutableMapOf, Int>() - - private val topLevelGraphs = mutableSetOf() - private val allGraphs = mutableSetOf() override fun visitFile(file: FirFile) { var name = file.name.replace(".", "_") @@ -50,28 +46,14 @@ class FirControlFlowGraphRenderVisitor( .println("edge [penwidth=2]") .println() visitElement(file) - - for (topLevelGraph in topLevelGraphs) { - printer.renderNodes(topLevelGraph) - printer.renderEdges(topLevelGraph) - printer.println() - } - printer .popIndent() .println("}") } - private fun ControlFlowGraph.collectNodes() { - for (node in nodes) { - indices[node] = nodeCounter++ - } - } - - private fun Printer.renderNodes(graph: ControlFlowGraph) { + private fun Printer.renderNodes(nodes: Map, Int>) { var color = RED - val sortedNodes = graph.sortedNodes() - for (node in sortedNodes) { + for ((node, index) in nodes) { if (node is EnterNodeMarker) { enterCluster(color) color = BLUE @@ -94,7 +76,7 @@ class FirControlFlowGraphRenderVisitor( attributes += "style=\"filled\"" attributes += "fillcolor=$it" } - println(indices.getValue(node), attributes.joinToString(separator = " ", prefix = " [", postfix = "];")) + println(index, attributes.joinToString(separator = " ", prefix = " [", postfix = "];")) if (node is ExitNodeMarker) { exitCluster() } @@ -116,26 +98,23 @@ class FirControlFlowGraphRenderVisitor( label.label?.let { "label=\"$it\"" } ).ifEmpty { null }?.joinToString(prefix = "[", separator = " ", postfix = "]") - private fun Printer.renderEdges(graph: ControlFlowGraph) { - for (node in graph.nodes) { + private fun Printer.renderEdges(nodes: Map, Int>) { + for ((node, index) in nodes) { for ((style, group) in node.followingNodes.groupBy { node.edgeTo(it).style }.entries.sortedBy { it.key }) { - val mappedGroup = group.map { indices.getValue(it) }.sorted() - print(indices.getValue(node), EDGE, mappedGroup.joinToString(prefix = "{", postfix = "}", separator = " ")) + val mappedGroup = group.map { nodes.getValue(it) }.sorted() + print(index, EDGE, mappedGroup.joinToString(prefix = "{", postfix = "}", separator = " ")) style?.let { printWithNoIndent(" $it") } printlnWithNoIndent(";") } if (node is CFGNodeWithSubgraphs<*>) { - val subNodes = node.subGraphs.mapNotNull { indices[it.enterNode] }.sorted() + val subNodes = node.subGraphs.mapNotNull { nodes[it.enterNode] }.sorted() if (subNodes.isNotEmpty()) { - print(indices.getValue(node), EDGE, subNodes.joinToString(prefix = "{", postfix = "}", separator = " ")) + print(index, EDGE, subNodes.joinToString(prefix = "{", postfix = "}", separator = " ")) printlnWithNoIndent(" [style=dashed];") } } } - for (subGraph in graph.subGraphs) { - renderEdges(subGraph) - } } override fun visitElement(element: FirElement) { @@ -144,19 +123,15 @@ class FirControlFlowGraphRenderVisitor( override fun visitControlFlowGraphReference(controlFlowGraphReference: FirControlFlowGraphReference) { val controlFlowGraph = (controlFlowGraphReference as? FirControlFlowGraphReferenceImpl)?.controlFlowGraph ?: return - initializeNodes(controlFlowGraph) - } + if (controlFlowGraph.isSubGraph) return - private fun initializeNodes(graph: ControlFlowGraph) { - if (graph in allGraphs) return - graph.collectNodes() - if (!graph.isSubGraph) { - topLevelGraphs += graph - } - allGraphs += graph - for (subGraph in graph.subGraphs) { - initializeNodes(subGraph) - } + // TODO: nodes are already in a topological order, but grouping nodes into clusters requires something more. + // But what exactly? And is there a way to do `renderNodes` differently so that any topological order is ok? + val nodes = DFS.topologicalOrder(listOf(controlFlowGraph.enterNode)) { it.followingNodes } + .associateWithTo(linkedMapOf()) { nodeCounter++ } + printer.renderNodes(nodes) + printer.renderEdges(nodes) + printer.println() } private fun Printer.enterCluster(color: String) { @@ -170,29 +145,3 @@ class FirControlFlowGraphRenderVisitor( println("}") } } - -private fun ControlFlowGraph.sortedNodes(): List> { - val nodesToSort = nodes.filterTo(mutableListOf()) { it != enterNode } - val graphs = mutableSetOf(this) - forEachSubGraph { - nodesToSort += it.nodes - graphs += it - } - - val topologicalOrder = DFS.topologicalOrder(nodesToSort) { - val result = if (it !is WhenBranchConditionExitNode || it.followingNodes.size < 2) { - it.followingNodes - } else { - it.followingNodes.sortedBy { node -> if (node is BlockEnterNode) 1 else 0 } - }.filter { node -> node.owner in graphs } - result - } - return listOf(enterNode) + topologicalOrder -} - -private fun ControlFlowGraph.forEachSubGraph(block: (ControlFlowGraph) -> Unit) { - for (subGraph in subGraphs) { - block(subGraph) - subGraph.forEachSubGraph(block) - } -} diff --git a/compiler/testData/codegen/box/smartCasts/kt44814.dot b/compiler/testData/codegen/box/smartCasts/kt44814.dot index f283d5cf6dc..23ef4d5c189 100644 --- a/compiler/testData/codegen/box/smartCasts/kt44814.dot +++ b/compiler/testData/codegen/box/smartCasts/kt44814.dot @@ -5,190 +5,190 @@ digraph kt44814_kt { subgraph cluster_0 { color=red - 3 [label="Enter class FlyweightCapableTreeStructure [1]" style="filled" fillcolor=red]; - 4 [label="Exit class FlyweightCapableTreeStructure [1]" style="filled" fillcolor=red]; + 0 [label="Enter class FlyweightCapableTreeStructure [1]" style="filled" fillcolor=red]; + 1 [label="Exit class FlyweightCapableTreeStructure [1]" style="filled" fillcolor=red]; } subgraph cluster_1 { color=blue - 0 [label="Enter function [2]" style="filled" fillcolor=red]; - 1 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 2 [label="Exit function [2]" style="filled" fillcolor=red]; + 2 [label="Enter function [2]" style="filled" fillcolor=red]; + 3 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 4 [label="Exit function [2]" style="filled" fillcolor=red]; } - 3 -> {4} [color=green]; - 4 -> {0} [color=green]; - 4 -> {0} [style=dashed]; - 0 -> {1}; - 1 -> {2}; + 0 -> {1} [color=green]; + 1 -> {2} [color=green]; + 1 -> {2} [style=dashed]; + 2 -> {3}; + 3 -> {4}; subgraph cluster_2 { color=red - 8 [label="Enter class FirSourceElement [1]" style="filled" fillcolor=red]; - 9 [label="Exit class FirSourceElement [1]" style="filled" fillcolor=red]; + 5 [label="Enter class FirSourceElement [1]" style="filled" fillcolor=red]; + 6 [label="Exit class FirSourceElement [1]" style="filled" fillcolor=red]; } subgraph cluster_3 { color=blue - 5 [label="Enter function [2]" style="filled" fillcolor=red]; - 6 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 7 [label="Exit function [2]" style="filled" fillcolor=red]; + 7 [label="Enter function [2]" style="filled" fillcolor=red]; + 8 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 9 [label="Exit function [2]" style="filled" fillcolor=red]; } - 8 -> {9} [color=green]; - 9 -> {5} [color=green]; - 9 -> {5} [style=dashed]; - 5 -> {6}; - 6 -> {7}; + 5 -> {6} [color=green]; + 6 -> {7} [color=green]; + 6 -> {7} [style=dashed]; + 7 -> {8}; + 8 -> {9}; subgraph cluster_4 { color=red - 22 [label="Enter class FirPsiSourceElement [1]" style="filled" fillcolor=red]; - 23 [label="Part of class initialization [1]"]; + 10 [label="Enter class FirPsiSourceElement [1]" style="filled" fillcolor=red]; + 11 [label="Part of class initialization [1]"]; subgraph cluster_5 { color=blue - 13 [label="Enter property [2]" style="filled" fillcolor=red]; - 14 [label="Access variable R|/psi| [2]"]; - 15 [label="Exit property [2]" style="filled" fillcolor=red]; + 12 [label="Enter property [2]" style="filled" fillcolor=red]; + 13 [label="Access variable R|/psi| [2]"]; + 14 [label="Exit property [2]" style="filled" fillcolor=red]; } - 24 [label="Part of class initialization [1]"]; + 15 [label="Part of class initialization [1]"]; subgraph cluster_6 { color=blue 16 [label="Enter property [2]" style="filled" fillcolor=red]; 17 [label="Access variable R|/lighterASTNode| [2]"]; 18 [label="Exit property [2]" style="filled" fillcolor=red]; } - 25 [label="Part of class initialization [1]"]; + 19 [label="Part of class initialization [1]"]; subgraph cluster_7 { color=blue - 19 [label="Enter property [2]" style="filled" fillcolor=red]; - 20 [label="Access variable R|/treeStructure| [2]"]; - 21 [label="Exit property [2]" style="filled" fillcolor=red]; + 20 [label="Enter property [2]" style="filled" fillcolor=red]; + 21 [label="Access variable R|/treeStructure| [2]"]; + 22 [label="Exit property [2]" style="filled" fillcolor=red]; } - 26 [label="Exit class FirPsiSourceElement [1]" style="filled" fillcolor=red]; + 23 [label="Exit class FirPsiSourceElement [1]" style="filled" fillcolor=red]; } subgraph cluster_8 { color=blue - 10 [label="Enter function [2]" style="filled" fillcolor=red]; - 11 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 12 [label="Exit function [2]" style="filled" fillcolor=red]; + 24 [label="Enter function [2]" style="filled" fillcolor=red]; + 25 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 26 [label="Exit function [2]" style="filled" fillcolor=red]; } - 22 -> {23} [color=green]; - 23 -> {13} [color=green]; - 23 -> {24} [style=dotted]; - 23 -> {13} [style=dashed]; - 24 -> {16} [color=green]; - 24 -> {25} [style=dotted]; - 24 -> {16} [style=dashed]; - 25 -> {19} [color=green]; - 25 -> {26} [style=dotted]; - 25 -> {19} [style=dashed]; - 26 -> {10} [color=green]; - 26 -> {10} [style=dashed]; + 10 -> {11} [color=green]; + 11 -> {12} [color=green]; + 11 -> {15} [style=dotted]; + 11 -> {12} [style=dashed]; + 12 -> {13}; 13 -> {14}; - 14 -> {15}; - 15 -> {24} [color=green]; + 14 -> {15} [color=green]; + 15 -> {16} [color=green]; + 15 -> {19} [style=dotted]; + 15 -> {16} [style=dashed]; 16 -> {17}; 17 -> {18}; - 18 -> {25} [color=green]; - 19 -> {20}; + 18 -> {19} [color=green]; + 19 -> {20} [color=green]; + 19 -> {23} [style=dotted]; + 19 -> {20} [style=dashed]; 20 -> {21}; - 21 -> {26} [color=green]; - 10 -> {11}; - 11 -> {12}; + 21 -> {22}; + 22 -> {23} [color=green]; + 23 -> {24} [color=green]; + 23 -> {24} [style=dashed]; + 24 -> {25}; + 25 -> {26}; subgraph cluster_9 { color=red - 36 [label="Enter class FirLightSourceElement [1]" style="filled" fillcolor=red]; - 37 [label="Part of class initialization [1]"]; + 27 [label="Enter class FirLightSourceElement [1]" style="filled" fillcolor=red]; + 28 [label="Part of class initialization [1]"]; subgraph cluster_10 { color=blue - 30 [label="Enter property [2]" style="filled" fillcolor=red]; - 31 [label="Access variable R|/lighterASTNode| [2]"]; - 32 [label="Exit property [2]" style="filled" fillcolor=red]; + 29 [label="Enter property [2]" style="filled" fillcolor=red]; + 30 [label="Access variable R|/lighterASTNode| [2]"]; + 31 [label="Exit property [2]" style="filled" fillcolor=red]; } - 38 [label="Part of class initialization [1]"]; + 32 [label="Part of class initialization [1]"]; subgraph cluster_11 { color=blue 33 [label="Enter property [2]" style="filled" fillcolor=red]; 34 [label="Access variable R|/treeStructure| [2]"]; 35 [label="Exit property [2]" style="filled" fillcolor=red]; } - 39 [label="Exit class FirLightSourceElement [1]" style="filled" fillcolor=red]; + 36 [label="Exit class FirLightSourceElement [1]" style="filled" fillcolor=red]; } subgraph cluster_12 { color=blue - 27 [label="Enter function [2]" style="filled" fillcolor=red]; - 28 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 29 [label="Exit function [2]" style="filled" fillcolor=red]; + 37 [label="Enter function [2]" style="filled" fillcolor=red]; + 38 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 39 [label="Exit function [2]" style="filled" fillcolor=red]; } - 36 -> {37} [color=green]; - 37 -> {30} [color=green]; - 37 -> {38} [style=dotted]; - 37 -> {30} [style=dashed]; - 38 -> {33} [color=green]; - 38 -> {39} [style=dotted]; - 38 -> {33} [style=dashed]; - 39 -> {27} [color=green]; - 39 -> {27} [style=dashed]; + 27 -> {28} [color=green]; + 28 -> {29} [color=green]; + 28 -> {32} [style=dotted]; + 28 -> {29} [style=dashed]; + 29 -> {30}; 30 -> {31}; - 31 -> {32}; - 32 -> {38} [color=green]; + 31 -> {32} [color=green]; + 32 -> {33} [color=green]; + 32 -> {36} [style=dotted]; + 32 -> {33} [style=dashed]; 33 -> {34}; 34 -> {35}; - 35 -> {39} [color=green]; - 27 -> {28}; - 28 -> {29}; + 35 -> {36} [color=green]; + 36 -> {37} [color=green]; + 36 -> {37} [style=dashed]; + 37 -> {38}; + 38 -> {39}; subgraph cluster_13 { color=red - 43 [label="Enter class PsiElement [1]" style="filled" fillcolor=red]; - 44 [label="Exit class PsiElement [1]" style="filled" fillcolor=red]; + 40 [label="Enter class PsiElement [1]" style="filled" fillcolor=red]; + 41 [label="Exit class PsiElement [1]" style="filled" fillcolor=red]; } subgraph cluster_14 { color=blue - 40 [label="Enter function [2]" style="filled" fillcolor=red]; - 41 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 42 [label="Exit function [2]" style="filled" fillcolor=red]; + 42 [label="Enter function [2]" style="filled" fillcolor=red]; + 43 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 44 [label="Exit function [2]" style="filled" fillcolor=red]; } - 43 -> {44} [color=green]; - 44 -> {40} [color=green]; - 44 -> {40} [style=dashed]; - 40 -> {41}; - 41 -> {42}; + 40 -> {41} [color=green]; + 41 -> {42} [color=green]; + 41 -> {42} [style=dashed]; + 42 -> {43}; + 43 -> {44}; subgraph cluster_15 { color=red - 48 [label="Enter class ASTNode [1]" style="filled" fillcolor=red]; - 49 [label="Exit class ASTNode [1]" style="filled" fillcolor=red]; + 45 [label="Enter class ASTNode [1]" style="filled" fillcolor=red]; + 46 [label="Exit class ASTNode [1]" style="filled" fillcolor=red]; } subgraph cluster_16 { color=blue - 45 [label="Enter function [2]" style="filled" fillcolor=red]; - 46 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 47 [label="Exit function [2]" style="filled" fillcolor=red]; + 47 [label="Enter function [2]" style="filled" fillcolor=red]; + 48 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 49 [label="Exit function [2]" style="filled" fillcolor=red]; } - 48 -> {49} [color=green]; - 49 -> {45} [color=green]; - 49 -> {45} [style=dashed]; - 45 -> {46}; - 46 -> {47}; + 45 -> {46} [color=green]; + 46 -> {47} [color=green]; + 46 -> {47} [style=dashed]; + 47 -> {48}; + 48 -> {49}; subgraph cluster_17 { color=red - 72 [label="Enter class LighterASTNode [1]" style="filled" fillcolor=red]; - 73 [label="Part of class initialization [1]"]; + 50 [label="Enter class LighterASTNode [1]" style="filled" fillcolor=red]; + 51 [label="Part of class initialization [1]"]; subgraph cluster_18 { color=blue - 58 [label="Enter property [2]" style="filled" fillcolor=red]; - 59 [label="Access variable R|/_children| [2]"]; - 60 [label="Exit property [2]" style="filled" fillcolor=red]; + 52 [label="Enter property [2]" style="filled" fillcolor=red]; + 53 [label="Access variable R|/_children| [2]"]; + 54 [label="Exit property [2]" style="filled" fillcolor=red]; } - 74 [label="Part of class initialization [1]"]; + 55 [label="Part of class initialization [1]"]; subgraph cluster_19 { color=blue - 68 [label="Enter property [2]" style="filled" fillcolor=red]; - 69 [label="Access qualifier /TokenType [2]"]; - 70 [label="Access variable R|/TokenType.Companion.MODIFIER_LIST| [2]"]; - 71 [label="Exit property [2]" style="filled" fillcolor=red]; + 56 [label="Enter property [2]" style="filled" fillcolor=red]; + 57 [label="Access qualifier /TokenType [2]"]; + 58 [label="Access variable R|/TokenType.Companion.MODIFIER_LIST| [2]"]; + 59 [label="Exit property [2]" style="filled" fillcolor=red]; } - 75 [label="Exit class LighterASTNode [1]" style="filled" fillcolor=red]; + 60 [label="Exit class LighterASTNode [1]" style="filled" fillcolor=red]; } subgraph cluster_20 { color=blue @@ -205,42 +205,34 @@ digraph kt44814_kt { } subgraph cluster_22 { color=blue - 50 [label="Enter function [2]" style="filled" fillcolor=red]; - 51 [label="Enter default value of _children [2]"]; + 68 [label="Enter function [2]" style="filled" fillcolor=red]; + 69 [label="Enter default value of _children [2]"]; subgraph cluster_23 { color=blue - 55 [label="Enter default value of _children [3]" style="filled" fillcolor=red]; - 56 [label="Function call: R|kotlin/collections/emptyList|() [3]" style="filled" fillcolor=yellow]; - 57 [label="Exit default value of _children [3]" style="filled" fillcolor=red]; + 70 [label="Enter default value of _children [3]" style="filled" fillcolor=red]; + 71 [label="Function call: R|kotlin/collections/emptyList|() [3]" style="filled" fillcolor=yellow]; + 72 [label="Exit default value of _children [3]" style="filled" fillcolor=red]; } - 52 [label="Exit default value of _children [2]"]; - 53 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 54 [label="Exit function [2]" style="filled" fillcolor=red]; + 73 [label="Exit default value of _children [2]"]; + 74 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 75 [label="Exit function [2]" style="filled" fillcolor=red]; } - 72 -> {73} [color=green]; - 73 -> {58} [color=green]; - 73 -> {74} [style=dotted]; - 73 -> {58} [style=dashed]; - 74 -> {68} [color=green]; - 74 -> {75} [style=dotted]; - 74 -> {68} [style=dashed]; - 75 -> {50 61} [color=green]; - 75 -> {50 61} [style=dashed]; - 58 -> {59}; - 59 -> {60}; - 60 -> {74} [color=green]; - 68 -> {69}; - 69 -> {70}; - 70 -> {71}; - 71 -> {75} [color=green]; - 50 -> {51}; - 51 -> {52 55}; - 51 -> {55} [style=dashed]; + 50 -> {51} [color=green]; + 51 -> {52} [color=green]; + 51 -> {55} [style=dotted]; + 51 -> {52} [style=dashed]; 52 -> {53}; 53 -> {54}; - 55 -> {56}; + 54 -> {55} [color=green]; + 55 -> {56} [color=green]; + 55 -> {60} [style=dotted]; + 55 -> {56} [style=dashed]; 56 -> {57}; - 57 -> {52}; + 57 -> {58}; + 58 -> {59}; + 59 -> {60} [color=green]; + 60 -> {61 68} [color=green]; + 60 -> {61 68} [style=dashed]; 61 -> {62}; 62 -> {63}; 63 -> {64}; @@ -248,147 +240,155 @@ digraph kt44814_kt { 64 -> {65} [style=dotted]; 65 -> {66} [style=dotted]; 66 -> {67} [style=dotted]; + 68 -> {69}; + 69 -> {70 73}; + 69 -> {70} [style=dashed]; + 70 -> {71}; + 71 -> {72}; + 72 -> {73}; + 73 -> {74}; + 74 -> {75}; subgraph cluster_24 { color=red - 88 [label="Enter class TokenType [1]" style="filled" fillcolor=red]; - 89 [label="Exit class TokenType [1]" style="filled" fillcolor=red]; + 76 [label="Enter class TokenType [1]" style="filled" fillcolor=red]; + 77 [label="Exit class TokenType [1]" style="filled" fillcolor=red]; } subgraph cluster_25 { color=blue - 85 [label="Enter class Companion [2]" style="filled" fillcolor=red]; - 86 [label="Part of class initialization [2]"]; + 78 [label="Enter class Companion [2]" style="filled" fillcolor=red]; + 79 [label="Part of class initialization [2]"]; subgraph cluster_26 { color=blue - 82 [label="Enter property [3]" style="filled" fillcolor=red]; - 83 [label="Function call: R|/TokenType.TokenType|() [3]" style="filled" fillcolor=yellow]; - 84 [label="Exit property [3]" style="filled" fillcolor=red]; + 80 [label="Enter property [3]" style="filled" fillcolor=red]; + 81 [label="Function call: R|/TokenType.TokenType|() [3]" style="filled" fillcolor=yellow]; + 82 [label="Exit property [3]" style="filled" fillcolor=red]; } - 87 [label="Exit class Companion [2]" style="filled" fillcolor=red]; + 83 [label="Exit class Companion [2]" style="filled" fillcolor=red]; } subgraph cluster_27 { color=blue - 79 [label="Enter function [3]" style="filled" fillcolor=red]; - 80 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 81 [label="Exit function [3]" style="filled" fillcolor=red]; + 84 [label="Enter function [3]" style="filled" fillcolor=red]; + 85 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 86 [label="Exit function [3]" style="filled" fillcolor=red]; } subgraph cluster_28 { color=blue - 76 [label="Enter function [2]" style="filled" fillcolor=red]; - 77 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 78 [label="Exit function [2]" style="filled" fillcolor=red]; + 87 [label="Enter function [2]" style="filled" fillcolor=red]; + 88 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 89 [label="Exit function [2]" style="filled" fillcolor=red]; } - 88 -> {89} [color=green]; - 89 -> {76 85} [color=green]; - 89 -> {76 85} [style=dashed]; - 76 -> {77}; - 77 -> {78}; - 85 -> {86} [color=green]; - 86 -> {82} [color=green]; - 86 -> {87} [style=dotted]; - 86 -> {82} [style=dashed]; - 87 -> {79} [color=green]; - 87 -> {79} [style=dashed]; - 82 -> {83}; - 83 -> {84}; - 84 -> {87} [color=green]; - 79 -> {80}; + 76 -> {77} [color=green]; + 77 -> {78 87} [color=green]; + 77 -> {78 87} [style=dashed]; + 78 -> {79} [color=green]; + 79 -> {80} [color=green]; + 79 -> {83} [style=dotted]; + 79 -> {80} [style=dashed]; 80 -> {81}; + 81 -> {82}; + 82 -> {83} [color=green]; + 83 -> {84} [color=green]; + 83 -> {84} [style=dashed]; + 84 -> {85}; + 85 -> {86}; + 87 -> {88}; + 88 -> {89}; subgraph cluster_29 { color=red - 93 [label="Enter class KtModifierKeywordToken [1]" style="filled" fillcolor=red]; - 94 [label="Exit class KtModifierKeywordToken [1]" style="filled" fillcolor=red]; + 90 [label="Enter class KtModifierKeywordToken [1]" style="filled" fillcolor=red]; + 91 [label="Exit class KtModifierKeywordToken [1]" style="filled" fillcolor=red]; } subgraph cluster_30 { color=blue - 90 [label="Enter function [2]" style="filled" fillcolor=red]; - 91 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 92 [label="Exit function [2]" style="filled" fillcolor=red]; + 92 [label="Enter function [2]" style="filled" fillcolor=red]; + 93 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 94 [label="Exit function [2]" style="filled" fillcolor=red]; } - 93 -> {94} [color=green]; - 94 -> {90} [color=green]; - 94 -> {90} [style=dashed]; - 90 -> {91}; - 91 -> {92}; + 90 -> {91} [color=green]; + 91 -> {92} [color=green]; + 91 -> {92} [style=dashed]; + 92 -> {93}; + 93 -> {94}; subgraph cluster_31 { color=red - 98 [label="Enter class KtModifierList [1]" style="filled" fillcolor=red]; - 99 [label="Exit class KtModifierList [1]" style="filled" fillcolor=red]; + 95 [label="Enter class KtModifierList [1]" style="filled" fillcolor=red]; + 96 [label="Exit class KtModifierList [1]" style="filled" fillcolor=red]; } subgraph cluster_32 { color=blue - 95 [label="Enter function [2]" style="filled" fillcolor=red]; - 96 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 97 [label="Exit function [2]" style="filled" fillcolor=red]; + 97 [label="Enter function [2]" style="filled" fillcolor=red]; + 98 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 99 [label="Exit function [2]" style="filled" fillcolor=red]; } - 98 -> {99} [color=green]; - 99 -> {95} [color=green]; - 99 -> {95} [style=dashed]; - 95 -> {96}; - 96 -> {97}; + 95 -> {96} [color=green]; + 96 -> {97} [color=green]; + 96 -> {97} [style=dashed]; + 97 -> {98}; + 98 -> {99}; subgraph cluster_33 { color=red - 106 [label="Enter class KtModifierListOwner [1]" style="filled" fillcolor=red]; - 107 [label="Part of class initialization [1]"]; + 100 [label="Enter class KtModifierListOwner [1]" style="filled" fillcolor=red]; + 101 [label="Part of class initialization [1]"]; subgraph cluster_34 { color=blue - 103 [label="Enter property [2]" style="filled" fillcolor=red]; - 104 [label="Function call: R|/KtModifierList.KtModifierList|() [2]" style="filled" fillcolor=yellow]; - 105 [label="Exit property [2]" style="filled" fillcolor=red]; + 102 [label="Enter property [2]" style="filled" fillcolor=red]; + 103 [label="Function call: R|/KtModifierList.KtModifierList|() [2]" style="filled" fillcolor=yellow]; + 104 [label="Exit property [2]" style="filled" fillcolor=red]; } - 108 [label="Exit class KtModifierListOwner [1]" style="filled" fillcolor=red]; + 105 [label="Exit class KtModifierListOwner [1]" style="filled" fillcolor=red]; } subgraph cluster_35 { color=blue - 100 [label="Enter function [2]" style="filled" fillcolor=red]; - 101 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 102 [label="Exit function [2]" style="filled" fillcolor=red]; + 106 [label="Enter function [2]" style="filled" fillcolor=red]; + 107 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 108 [label="Exit function [2]" style="filled" fillcolor=red]; } - 106 -> {107} [color=green]; - 107 -> {103} [color=green]; - 107 -> {108} [style=dotted]; - 107 -> {103} [style=dashed]; - 108 -> {100} [color=green]; - 108 -> {100} [style=dashed]; + 100 -> {101} [color=green]; + 101 -> {102} [color=green]; + 101 -> {105} [style=dotted]; + 101 -> {102} [style=dashed]; + 102 -> {103}; 103 -> {104}; - 104 -> {105}; - 105 -> {108} [color=green]; - 100 -> {101}; - 101 -> {102}; + 104 -> {105} [color=green]; + 105 -> {106} [color=green]; + 105 -> {106} [style=dashed]; + 106 -> {107}; + 107 -> {108}; subgraph cluster_36 { color=red - 136 [label="Enter class FirModifier [1]" style="filled" fillcolor=red]; - 137 [label="Part of class initialization [1]"]; + 109 [label="Enter class FirModifier [1]" style="filled" fillcolor=red]; + 110 [label="Part of class initialization [1]"]; subgraph cluster_37 { color=blue - 112 [label="Enter property [2]" style="filled" fillcolor=red]; - 113 [label="Access variable R|/node| [2]"]; - 114 [label="Exit property [2]" style="filled" fillcolor=red]; + 111 [label="Enter property [2]" style="filled" fillcolor=red]; + 112 [label="Access variable R|/node| [2]"]; + 113 [label="Exit property [2]" style="filled" fillcolor=red]; } - 138 [label="Part of class initialization [1]"]; + 114 [label="Part of class initialization [1]"]; subgraph cluster_38 { color=blue 115 [label="Enter property [2]" style="filled" fillcolor=red]; 116 [label="Access variable R|/token| [2]"]; 117 [label="Exit property [2]" style="filled" fillcolor=red]; } - 139 [label="Exit class FirModifier [1]" style="filled" fillcolor=red]; + 118 [label="Exit class FirModifier [1]" style="filled" fillcolor=red]; } subgraph cluster_39 { color=blue - 133 [label="Enter class FirLightModifier [2]" style="filled" fillcolor=red]; - 134 [label="Part of class initialization [2]"]; + 119 [label="Enter class FirLightModifier [2]" style="filled" fillcolor=red]; + 120 [label="Part of class initialization [2]"]; subgraph cluster_40 { color=blue - 130 [label="Enter property [3]" style="filled" fillcolor=red]; - 131 [label="Access variable R|/tree| [3]"]; - 132 [label="Exit property [3]" style="filled" fillcolor=red]; + 121 [label="Enter property [3]" style="filled" fillcolor=red]; + 122 [label="Access variable R|/tree| [3]"]; + 123 [label="Exit property [3]" style="filled" fillcolor=red]; } - 135 [label="Exit class FirLightModifier [2]" style="filled" fillcolor=red]; + 124 [label="Exit class FirLightModifier [2]" style="filled" fillcolor=red]; } subgraph cluster_41 { color=blue @@ -400,127 +400,127 @@ digraph kt44814_kt { } subgraph cluster_42 { color=blue - 123 [label="Enter class FirPsiModifier [2]" style="filled" fillcolor=red]; - 124 [label="Exit class FirPsiModifier [2]" style="filled" fillcolor=red]; + 130 [label="Enter class FirPsiModifier [2]" style="filled" fillcolor=red]; + 131 [label="Exit class FirPsiModifier [2]" style="filled" fillcolor=red]; } subgraph cluster_43 { color=blue - 118 [label="Enter function [3]" style="filled" fillcolor=red]; - 119 [label="Access variable R|/node| [4]"]; - 120 [label="Access variable R|/token| [4]"]; - 121 [label="Delegated constructor call: super|>(...) [3]" style="filled" fillcolor=yellow]; - 122 [label="Exit function [3]" style="filled" fillcolor=red]; + 132 [label="Enter function [3]" style="filled" fillcolor=red]; + 133 [label="Access variable R|/node| [4]"]; + 134 [label="Access variable R|/token| [4]"]; + 135 [label="Delegated constructor call: super|>(...) [3]" style="filled" fillcolor=yellow]; + 136 [label="Exit function [3]" style="filled" fillcolor=red]; } subgraph cluster_44 { color=blue - 109 [label="Enter function [2]" style="filled" fillcolor=red]; - 110 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 111 [label="Exit function [2]" style="filled" fillcolor=red]; + 137 [label="Enter function [2]" style="filled" fillcolor=red]; + 138 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 139 [label="Exit function [2]" style="filled" fillcolor=red]; } - 136 -> {137} [color=green]; - 137 -> {112} [color=green]; - 137 -> {138} [style=dotted]; - 137 -> {112} [style=dashed]; - 138 -> {115} [color=green]; - 138 -> {139} [style=dotted]; - 138 -> {115} [style=dashed]; - 139 -> {109 123 133} [color=green]; - 139 -> {109 123 133} [style=dashed]; + 109 -> {110} [color=green]; + 110 -> {111} [color=green]; + 110 -> {114} [style=dotted]; + 110 -> {111} [style=dashed]; + 111 -> {112}; 112 -> {113}; - 113 -> {114}; - 114 -> {138} [color=green]; + 113 -> {114} [color=green]; + 114 -> {115} [color=green]; + 114 -> {118} [style=dotted]; + 114 -> {115} [style=dashed]; 115 -> {116}; 116 -> {117}; - 117 -> {139} [color=green]; - 109 -> {110}; - 110 -> {111}; - 123 -> {124} [color=green]; - 124 -> {118} [color=green]; - 124 -> {118} [style=dashed]; - 118 -> {119}; - 119 -> {120}; - 120 -> {121}; + 117 -> {118} [color=green]; + 118 -> {119 130 137} [color=green]; + 118 -> {119 130 137} [style=dashed]; + 119 -> {120} [color=green]; + 120 -> {121} [color=green]; + 120 -> {124} [style=dotted]; + 120 -> {121} [style=dashed]; 121 -> {122}; - 133 -> {134} [color=green]; - 134 -> {130} [color=green]; - 134 -> {135} [style=dotted]; - 134 -> {130} [style=dashed]; - 135 -> {125} [color=green]; - 135 -> {125} [style=dashed]; - 130 -> {131}; - 131 -> {132}; - 132 -> {135} [color=green]; + 122 -> {123}; + 123 -> {124} [color=green]; + 124 -> {125} [color=green]; + 124 -> {125} [style=dashed]; 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; + 130 -> {131} [color=green]; + 131 -> {132} [color=green]; + 131 -> {132} [style=dashed]; + 132 -> {133}; + 133 -> {134}; + 134 -> {135}; + 135 -> {136}; + 137 -> {138}; + 138 -> {139}; subgraph cluster_45 { color=red - 286 [label="Enter class FirModifierList [1]" style="filled" fillcolor=red]; - 287 [label="Part of class initialization [1]"]; + 140 [label="Enter class FirModifierList [1]" style="filled" fillcolor=red]; + 141 [label="Part of class initialization [1]"]; subgraph cluster_46 { color=blue - 143 [label="Enter property [2]" style="filled" fillcolor=red]; - 144 [label="Function call: R|kotlin/collections/emptyList||>() [2]" style="filled" fillcolor=yellow]; - 145 [label="Exit property [2]" style="filled" fillcolor=red]; + 142 [label="Enter property [2]" style="filled" fillcolor=red]; + 143 [label="Function call: R|kotlin/collections/emptyList||>() [2]" style="filled" fillcolor=yellow]; + 144 [label="Exit property [2]" style="filled" fillcolor=red]; } - 288 [label="Exit class FirModifierList [1]" style="filled" fillcolor=red]; + 145 [label="Exit class FirModifierList [1]" style="filled" fillcolor=red]; } subgraph cluster_47 { color=blue - 284 [label="Enter class Companion [2]" style="filled" fillcolor=red]; - 285 [label="Exit class Companion [2]" style="filled" fillcolor=red]; + 146 [label="Enter class Companion [2]" style="filled" fillcolor=red]; + 147 [label="Exit class Companion [2]" style="filled" fillcolor=red]; } subgraph cluster_48 { color=blue - 251 [label="Enter function boxImpl [3]" style="filled" fillcolor=red]; + 148 [label="Enter function boxImpl [3]" style="filled" fillcolor=red]; subgraph cluster_49 { color=blue - 252 [label="Enter block [3]"]; - 253 [label="Function call: R|/LighterASTNode.LighterASTNode|() [6]" style="filled" fillcolor=yellow]; - 254 [label="Function call: R|kotlin/collections/listOf|(...) [5]" style="filled" fillcolor=yellow]; - 255 [label="Function call: R|/LighterASTNode.LighterASTNode|(...) [4]" style="filled" fillcolor=yellow]; - 256 [label="Function call: R|/FlyweightCapableTreeStructure.FlyweightCapableTreeStructure|() [4]" style="filled" fillcolor=yellow]; - 257 [label="Function call: R|/FirLightSourceElement.FirLightSourceElement|(...) [3]" style="filled" fillcolor=yellow]; - 258 [label="Variable declaration: lval sourceElement: R|FirSourceElement?| [3]"]; - 259 [label="Access variable R|/sourceElement| [4]"]; - 260 [label="Function call: (this@R|/FirModifierList.Companion|, R|/sourceElement|).R|/FirModifierList.Companion.getModifierList|() [3]" style="filled" fillcolor=yellow]; - 261 [label="Variable declaration: lval result: R|FirModifierList?| [3]"]; + 149 [label="Enter block [3]"]; + 150 [label="Function call: R|/LighterASTNode.LighterASTNode|() [6]" style="filled" fillcolor=yellow]; + 151 [label="Function call: R|kotlin/collections/listOf|(...) [5]" style="filled" fillcolor=yellow]; + 152 [label="Function call: R|/LighterASTNode.LighterASTNode|(...) [4]" style="filled" fillcolor=yellow]; + 153 [label="Function call: R|/FlyweightCapableTreeStructure.FlyweightCapableTreeStructure|() [4]" style="filled" fillcolor=yellow]; + 154 [label="Function call: R|/FirLightSourceElement.FirLightSourceElement|(...) [3]" style="filled" fillcolor=yellow]; + 155 [label="Variable declaration: lval sourceElement: R|FirSourceElement?| [3]"]; + 156 [label="Access variable R|/sourceElement| [4]"]; + 157 [label="Function call: (this@R|/FirModifierList.Companion|, R|/sourceElement|).R|/FirModifierList.Companion.getModifierList|() [3]" style="filled" fillcolor=yellow]; + 158 [label="Variable declaration: lval result: R|FirModifierList?| [3]"]; subgraph cluster_50 { color=blue - 262 [label="Enter when [3]"]; + 159 [label="Enter when [3]"]; subgraph cluster_51 { color=blue - 263 [label="Enter when branch condition [4]"]; - 264 [label="Access variable R|/result| [5]"]; - 265 [label="Type operator: (R|/result| is R|FirModifierList.FirLightModifierList|) [5]"]; - 266 [label="Exit when branch condition [4]"]; + 160 [label="Enter when branch condition [4]"]; + 161 [label="Access variable R|/result| [5]"]; + 162 [label="Type operator: (R|/result| is R|FirModifierList.FirLightModifierList|) [5]"]; + 163 [label="Exit when branch condition [4]"]; } subgraph cluster_52 { color=blue - 267 [label="Enter when branch condition else [5]"]; - 268 [label="Exit when branch condition [5]"]; + 164 [label="Enter when branch condition else [5]"]; + 165 [label="Exit when branch condition [5]"]; } - 269 [label="Enter when branch result [6]"]; + 166 [label="Enter when branch result [6]"]; subgraph cluster_53 { color=blue - 270 [label="Enter block [6]"]; - 271 [label="Const: String(Fail) [6]"]; - 272 [label="Exit block [6]"]; + 167 [label="Enter block [6]"]; + 168 [label="Const: String(Fail) [6]"]; + 169 [label="Exit block [6]"]; } - 273 [label="Exit when branch result [5]"]; - 274 [label="Enter when branch result [5]"]; + 170 [label="Exit when branch result [5]"]; + 171 [label="Enter when branch result [5]"]; subgraph cluster_54 { color=blue - 275 [label="Enter block [5]"]; - 276 [label="Const: String(OK) [5]"]; - 277 [label="Exit block [5]"]; + 172 [label="Enter block [5]"]; + 173 [label="Const: String(OK) [5]"]; + 174 [label="Exit block [5]"]; } - 278 [label="Exit when branch result [4]"]; - 279 [label="Exit when [3]"]; + 175 [label="Exit when branch result [4]"]; + 176 [label="Exit when [3]"]; } - 280 [label="Jump: ^boxImpl when () { + 177 [label="Jump: ^boxImpl when () { (R|/result| is R|FirModifierList.FirLightModifierList|) -> { String(OK) } @@ -529,125 +529,125 @@ digraph kt44814_kt { } } [3]"]; - 281 [label="Stub [3]" style="filled" fillcolor=gray]; - 282 [label="Exit block [3]" style="filled" fillcolor=gray]; + 178 [label="Stub [3]" style="filled" fillcolor=gray]; + 179 [label="Exit block [3]" style="filled" fillcolor=gray]; } - 283 [label="Exit function boxImpl [3]" style="filled" fillcolor=red]; + 180 [label="Exit function boxImpl [3]" style="filled" fillcolor=red]; } subgraph cluster_55 { color=blue - 171 [label="Enter function getModifierList [3]" style="filled" fillcolor=red]; + 181 [label="Enter function getModifierList [3]" style="filled" fillcolor=red]; subgraph cluster_56 { color=blue - 172 [label="Enter block [3]"]; + 182 [label="Enter block [3]"]; subgraph cluster_57 { color=blue - 173 [label="Enter when [3]"]; - 174 [label="Access variable this@R|/FirModifierList.Companion.getModifierList| [4]"]; + 183 [label="Enter when [3]"]; + 184 [label="Access variable this@R|/FirModifierList.Companion.getModifierList| [4]"]; subgraph cluster_58 { color=blue - 175 [label="Enter when branch condition [4]"]; - 176 [label="Exit $subj [5]"]; - 177 [label="Const: Null(null) [5]"]; - 178 [label="Equality operator == [5]"]; - 179 [label="Exit when branch condition [4]"]; + 185 [label="Enter when branch condition [4]"]; + 186 [label="Exit $subj [5]"]; + 187 [label="Const: Null(null) [5]"]; + 188 [label="Equality operator == [5]"]; + 189 [label="Exit when branch condition [4]"]; } subgraph cluster_59 { color=blue - 180 [label="Enter when branch condition [5]"]; - 181 [label="Exit $subj [6]"]; - 182 [label="Type operator: ($subj$ is R|FirPsiSourceElement|) [6]"]; - 183 [label="Exit when branch condition [5]"]; + 190 [label="Enter when branch condition [5]"]; + 191 [label="Exit $subj [6]"]; + 192 [label="Type operator: ($subj$ is R|FirPsiSourceElement|) [6]"]; + 193 [label="Exit when branch condition [5]"]; } subgraph cluster_60 { color=blue - 184 [label="Enter when branch condition [6]"]; - 185 [label="Exit $subj [7]"]; - 186 [label="Type operator: ($subj$ is R|FirLightSourceElement|) [7]"]; - 187 [label="Exit when branch condition [6]"]; + 194 [label="Enter when branch condition [6]"]; + 195 [label="Exit $subj [7]"]; + 196 [label="Type operator: ($subj$ is R|FirLightSourceElement|) [7]"]; + 197 [label="Exit when branch condition [6]"]; } - 188 [label="Enter when branch result [7]"]; + 198 [label="Enter when branch result [7]"]; subgraph cluster_61 { color=blue - 189 [label="Enter block [7]"]; - 190 [label="Access variable R|/FirLightSourceElement.lighterASTNode| [9]"]; - 191 [label="Access variable R|/FirLightSourceElement.treeStructure| [9]"]; - 192 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...) [8]" style="filled" fillcolor=yellow]; - 193 [label="Postponed enter to lambda [8]"]; + 199 [label="Enter block [7]"]; + 200 [label="Access variable R|/FirLightSourceElement.lighterASTNode| [9]"]; + 201 [label="Access variable R|/FirLightSourceElement.treeStructure| [9]"]; + 202 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...) [8]" style="filled" fillcolor=yellow]; + 203 [label="Postponed enter to lambda [8]"]; subgraph cluster_62 { color=blue - 234 [label="Enter function anonymousFunction [9]" style="filled" fillcolor=red]; + 204 [label="Enter function anonymousFunction [9]" style="filled" fillcolor=red]; subgraph cluster_63 { color=blue - 235 [label="Enter block [9]"]; - 236 [label="Access variable R|/it| [9]"]; - 237 [label="Enter safe call [9]"]; - 238 [label="Access variable R|/LighterASTNode.tokenType| [9]"]; - 239 [label="Exit safe call [9]"]; - 240 [label="Access qualifier /TokenType [9]"]; - 241 [label="Access variable R|/TokenType.Companion.MODIFIER_LIST| [9]"]; - 242 [label="Equality operator == [9]"]; - 243 [label="Exit block [9]"]; + 205 [label="Enter block [9]"]; + 206 [label="Access variable R|/it| [9]"]; + 207 [label="Enter safe call [9]"]; + 208 [label="Access variable R|/LighterASTNode.tokenType| [9]"]; + 209 [label="Exit safe call [9]"]; + 210 [label="Access qualifier /TokenType [9]"]; + 211 [label="Access variable R|/TokenType.Companion.MODIFIER_LIST| [9]"]; + 212 [label="Equality operator == [9]"]; + 213 [label="Exit block [9]"]; } - 244 [label="Exit function anonymousFunction [9]" style="filled" fillcolor=red]; + 214 [label="Exit function anonymousFunction [9]" style="filled" fillcolor=red]; } - 194 [label="Postponed exit from lambda [8]"]; - 195 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...).R|kotlin/collections/find|(...) [7]" style="filled" fillcolor=yellow]; - 196 [label="Exit lhs of ?: [7]"]; - 197 [label="Enter rhs of ?: [7]"]; - 198 [label="Const: Null(null) [7]"]; - 199 [label="Jump: ^getModifierList Null(null) [7]"]; - 200 [label="Stub [7]" style="filled" fillcolor=gray]; - 201 [label="Lhs of ?: is not null [7]"]; - 202 [label="Exit ?: [7]"]; - 203 [label="Variable declaration: lval modifierListNode: R|LighterASTNode| [7]"]; - 204 [label="Access variable R|/modifierListNode| [8]"]; - 205 [label="Access variable R|/FirLightSourceElement.treeStructure| [8]"]; - 206 [label="Function call: R|/FirModifierList.FirLightModifierList.FirLightModifierList|(...) [7]" style="filled" fillcolor=yellow]; - 207 [label="Exit block [7]"]; + 215 [label="Postponed exit from lambda [8]"]; + 216 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...).R|kotlin/collections/find|(...) [7]" style="filled" fillcolor=yellow]; + 217 [label="Exit lhs of ?: [7]"]; + 218 [label="Enter rhs of ?: [7]"]; + 219 [label="Const: Null(null) [7]"]; + 220 [label="Jump: ^getModifierList Null(null) [7]"]; + 221 [label="Stub [7]" style="filled" fillcolor=gray]; + 222 [label="Lhs of ?: is not null [7]"]; + 223 [label="Exit ?: [7]"]; + 224 [label="Variable declaration: lval modifierListNode: R|LighterASTNode| [7]"]; + 225 [label="Access variable R|/modifierListNode| [8]"]; + 226 [label="Access variable R|/FirLightSourceElement.treeStructure| [8]"]; + 227 [label="Function call: R|/FirModifierList.FirLightModifierList.FirLightModifierList|(...) [7]" style="filled" fillcolor=yellow]; + 228 [label="Exit block [7]"]; } - 208 [label="Exit when branch result [6]"]; - 209 [label="Enter when branch result [6]"]; + 229 [label="Exit when branch result [6]"]; + 230 [label="Enter when branch result [6]"]; subgraph cluster_64 { color=blue - 210 [label="Enter block [6]"]; - 211 [label="Access variable R|/FirPsiSourceElement.psi| [6]"]; - 212 [label="Type operator: (this@R|/FirModifierList.Companion.getModifierList|.R|/FirPsiSourceElement.psi| as? R|KtModifierListOwner|) [6]"]; - 213 [label="Enter safe call [6]"]; - 214 [label="Access variable R|/KtModifierListOwner.modifierList| [6]"]; - 215 [label="Enter safe call [6]"]; - 216 [label="Postponed enter to lambda [7]"]; + 231 [label="Enter block [6]"]; + 232 [label="Access variable R|/FirPsiSourceElement.psi| [6]"]; + 233 [label="Type operator: (this@R|/FirModifierList.Companion.getModifierList|.R|/FirPsiSourceElement.psi| as? R|KtModifierListOwner|) [6]"]; + 234 [label="Enter safe call [6]"]; + 235 [label="Access variable R|/KtModifierListOwner.modifierList| [6]"]; + 236 [label="Enter safe call [6]"]; + 237 [label="Postponed enter to lambda [7]"]; subgraph cluster_65 { color=blue - 245 [label="Enter function anonymousFunction [8]" style="filled" fillcolor=red]; + 238 [label="Enter function anonymousFunction [8]" style="filled" fillcolor=red]; subgraph cluster_66 { color=blue - 246 [label="Enter block [8]"]; - 247 [label="Access variable R|/it| [9]"]; - 248 [label="Function call: R|/FirModifierList.FirPsiModifierList.FirPsiModifierList|(...) [8]" style="filled" fillcolor=yellow]; - 249 [label="Exit block [8]"]; + 239 [label="Enter block [8]"]; + 240 [label="Access variable R|/it| [9]"]; + 241 [label="Function call: R|/FirModifierList.FirPsiModifierList.FirPsiModifierList|(...) [8]" style="filled" fillcolor=yellow]; + 242 [label="Exit block [8]"]; } - 250 [label="Exit function anonymousFunction [8]" style="filled" fillcolor=red]; + 243 [label="Exit function anonymousFunction [8]" style="filled" fillcolor=red]; } - 217 [label="Postponed exit from lambda [7]"]; - 218 [label="Function call: $subj$.R|kotlin/let|(...) [6]" style="filled" fillcolor=yellow]; - 219 [label="Exit safe call [6]"]; - 220 [label="Exit safe call [6]"]; - 221 [label="Exit block [6]"]; + 244 [label="Postponed exit from lambda [7]"]; + 245 [label="Function call: $subj$.R|kotlin/let|(...) [6]" style="filled" fillcolor=yellow]; + 246 [label="Exit safe call [6]"]; + 247 [label="Exit safe call [6]"]; + 248 [label="Exit block [6]"]; } - 222 [label="Exit when branch result [5]"]; - 223 [label="Merge postponed lambda exits [6]"]; - 224 [label="Enter when branch result [5]"]; + 249 [label="Exit when branch result [5]"]; + 250 [label="Merge postponed lambda exits [6]"]; + 251 [label="Enter when branch result [5]"]; subgraph cluster_67 { color=blue - 225 [label="Enter block [5]"]; - 226 [label="Const: Null(null) [5]"]; - 227 [label="Exit block [5]"]; + 252 [label="Enter block [5]"]; + 253 [label="Const: Null(null) [5]"]; + 254 [label="Exit block [5]"]; } - 228 [label="Exit when branch result [4]"]; - 229 [label="Exit when [3]"]; + 255 [label="Exit when branch result [4]"]; + 256 [label="Exit when [3]"]; } - 230 [label="Jump: ^getModifierList when (this@R|/FirModifierList.Companion.getModifierList|) { + 257 [label="Jump: ^getModifierList when (this@R|/FirModifierList.Companion.getModifierList|) { ==($subj$, Null(null)) -> { Null(null) } @@ -666,229 +666,229 @@ digraph kt44814_kt { } } [3]"]; - 231 [label="Stub [3]" style="filled" fillcolor=gray]; - 232 [label="Exit block [3]" style="filled" fillcolor=gray]; + 258 [label="Stub [3]" style="filled" fillcolor=gray]; + 259 [label="Exit block [3]" style="filled" fillcolor=gray]; } - 233 [label="Exit function getModifierList [3]" style="filled" fillcolor=red]; + 260 [label="Exit function getModifierList [3]" style="filled" fillcolor=red]; } subgraph cluster_68 { color=blue - 168 [label="Enter function [3]" style="filled" fillcolor=red]; - 169 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 170 [label="Exit function [3]" style="filled" fillcolor=red]; + 261 [label="Enter function [3]" style="filled" fillcolor=red]; + 262 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 263 [label="Exit function [3]" style="filled" fillcolor=red]; } subgraph cluster_69 { color=blue - 164 [label="Enter class FirLightModifierList [2]" style="filled" fillcolor=red]; - 165 [label="Part of class initialization [2]"]; + 264 [label="Enter class FirLightModifierList [2]" style="filled" fillcolor=red]; + 265 [label="Part of class initialization [2]"]; subgraph cluster_70 { color=blue - 158 [label="Enter property [3]" style="filled" fillcolor=red]; - 159 [label="Access variable R|/modifierList| [3]"]; - 160 [label="Exit property [3]" style="filled" fillcolor=red]; + 266 [label="Enter property [3]" style="filled" fillcolor=red]; + 267 [label="Access variable R|/modifierList| [3]"]; + 268 [label="Exit property [3]" style="filled" fillcolor=red]; } - 166 [label="Part of class initialization [2]"]; + 269 [label="Part of class initialization [2]"]; subgraph cluster_71 { color=blue - 161 [label="Enter property [3]" style="filled" fillcolor=red]; - 162 [label="Access variable R|/tree| [3]"]; - 163 [label="Exit property [3]" style="filled" fillcolor=red]; + 270 [label="Enter property [3]" style="filled" fillcolor=red]; + 271 [label="Access variable R|/tree| [3]"]; + 272 [label="Exit property [3]" style="filled" fillcolor=red]; } - 167 [label="Exit class FirLightModifierList [2]" style="filled" fillcolor=red]; + 273 [label="Exit class FirLightModifierList [2]" style="filled" fillcolor=red]; } subgraph cluster_72 { color=blue - 155 [label="Enter function [3]" style="filled" fillcolor=red]; - 156 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 157 [label="Exit function [3]" style="filled" fillcolor=red]; + 274 [label="Enter function [3]" style="filled" fillcolor=red]; + 275 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 276 [label="Exit function [3]" style="filled" fillcolor=red]; } subgraph cluster_73 { color=blue - 152 [label="Enter class FirPsiModifierList [2]" style="filled" fillcolor=red]; - 153 [label="Part of class initialization [2]"]; + 277 [label="Enter class FirPsiModifierList [2]" style="filled" fillcolor=red]; + 278 [label="Part of class initialization [2]"]; subgraph cluster_74 { color=blue - 149 [label="Enter property [3]" style="filled" fillcolor=red]; - 150 [label="Access variable R|/modifierList| [3]"]; - 151 [label="Exit property [3]" style="filled" fillcolor=red]; + 279 [label="Enter property [3]" style="filled" fillcolor=red]; + 280 [label="Access variable R|/modifierList| [3]"]; + 281 [label="Exit property [3]" style="filled" fillcolor=red]; } - 154 [label="Exit class FirPsiModifierList [2]" style="filled" fillcolor=red]; + 282 [label="Exit class FirPsiModifierList [2]" style="filled" fillcolor=red]; } subgraph cluster_75 { color=blue - 146 [label="Enter function [3]" style="filled" fillcolor=red]; - 147 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 148 [label="Exit function [3]" style="filled" fillcolor=red]; + 283 [label="Enter function [3]" style="filled" fillcolor=red]; + 284 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 285 [label="Exit function [3]" style="filled" fillcolor=red]; } subgraph cluster_76 { color=blue - 140 [label="Enter function [2]" style="filled" fillcolor=red]; - 141 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 142 [label="Exit function [2]" style="filled" fillcolor=red]; + 286 [label="Enter function [2]" style="filled" fillcolor=red]; + 287 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; + 288 [label="Exit function [2]" style="filled" fillcolor=red]; } - 286 -> {287} [color=green]; - 287 -> {143} [color=green]; - 287 -> {288} [style=dotted]; - 287 -> {143} [style=dashed]; - 288 -> {140 152 164 284} [color=green]; - 288 -> {140 152 164 284} [style=dashed]; + 140 -> {141} [color=green]; + 141 -> {142} [color=green]; + 141 -> {145} [style=dotted]; + 141 -> {142} [style=dashed]; + 142 -> {143}; 143 -> {144}; - 144 -> {145}; - 145 -> {288} [color=green]; - 140 -> {141}; - 141 -> {142}; - 152 -> {153} [color=green]; - 153 -> {149} [color=green]; - 153 -> {154} [style=dotted]; - 153 -> {149} [style=dashed]; - 154 -> {146} [color=green]; - 154 -> {146} [style=dashed]; + 144 -> {145} [color=green]; + 145 -> {146 264 277 286} [color=green]; + 145 -> {146 264 277 286} [style=dashed]; + 146 -> {147} [color=green]; + 147 -> {148 181 261} [color=green]; + 147 -> {148 181 261} [style=dashed]; + 148 -> {149}; 149 -> {150}; 150 -> {151}; - 151 -> {154} [color=green]; - 146 -> {147}; - 147 -> {148}; - 164 -> {165} [color=green]; - 165 -> {158} [color=green]; - 165 -> {166} [style=dotted]; - 165 -> {158} [style=dashed]; - 166 -> {161} [color=green]; - 166 -> {167} [style=dotted]; - 166 -> {161} [style=dashed]; - 167 -> {155} [color=green]; - 167 -> {155} [style=dashed]; - 158 -> {159}; - 159 -> {160}; - 160 -> {166} [color=green]; - 161 -> {162}; - 162 -> {163}; - 163 -> {167} [color=green]; + 151 -> {152}; + 152 -> {153}; + 153 -> {154}; + 154 -> {155}; 155 -> {156}; 156 -> {157}; - 284 -> {285} [color=green]; - 285 -> {168 171 251} [color=green]; - 285 -> {168 171 251} [style=dashed]; + 157 -> {158}; + 158 -> {159}; + 159 -> {160}; + 160 -> {161}; + 161 -> {162}; + 162 -> {163}; + 163 -> {164 171}; + 164 -> {165}; + 165 -> {166}; + 166 -> {167}; + 167 -> {168}; 168 -> {169}; 169 -> {170}; + 170 -> {176}; 171 -> {172}; 172 -> {173}; 173 -> {174}; 174 -> {175}; 175 -> {176}; 176 -> {177}; - 177 -> {178}; - 178 -> {179}; - 179 -> {180 224}; - 180 -> {181}; + 177 -> {180}; + 177 -> {178} [style=dotted]; + 178 -> {179} [style=dotted]; + 179 -> {180} [style=dotted]; 181 -> {182}; 182 -> {183}; - 183 -> {184 209}; + 183 -> {184}; 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; - 189 -> {190}; + 189 -> {190 251}; 190 -> {191}; 191 -> {192}; 192 -> {193}; - 193 -> {194 195 234}; - 193 -> {234} [style=dashed]; + 193 -> {194 230}; 194 -> {195}; - 194 -> {193} [color=green style=dashed]; 195 -> {196}; - 196 -> {197 201}; + 196 -> {197}; 197 -> {198}; 198 -> {199}; - 199 -> {233}; - 199 -> {200} [style=dotted]; - 200 -> {202} [style=dotted]; + 199 -> {200}; + 200 -> {201}; 201 -> {202}; 202 -> {203}; - 203 -> {204}; + 203 -> {204 215 216}; + 203 -> {204} [style=dashed]; 204 -> {205}; 205 -> {206}; - 206 -> {207}; + 206 -> {207 209}; 207 -> {208}; - 208 -> {229}; + 208 -> {209}; 209 -> {210}; 210 -> {211}; 211 -> {212}; - 212 -> {213 219}; + 212 -> {213}; 213 -> {214}; - 214 -> {215 219}; + 214 -> {215}; 215 -> {216}; - 216 -> {218 245}; - 216 -> {217} [style=dotted]; - 216 -> {245} [style=dashed]; - 217 -> {218} [color=green]; - 217 -> {223} [color=red]; - 218 -> {220}; + 215 -> {203} [color=green style=dashed]; + 216 -> {217}; + 217 -> {218 222}; + 218 -> {219}; 219 -> {220}; - 220 -> {221 223}; - 221 -> {222}; - 222 -> {229}; - 223 -> {229} [color=red]; + 220 -> {260}; + 220 -> {221} [style=dotted]; + 221 -> {223} [style=dotted]; + 222 -> {223}; + 223 -> {224}; 224 -> {225}; 225 -> {226}; 226 -> {227}; 227 -> {228}; 228 -> {229}; - 229 -> {230}; - 230 -> {233}; - 230 -> {231} [style=dotted]; - 231 -> {232} [style=dotted]; - 232 -> {233} [style=dotted]; + 229 -> {256}; + 230 -> {231}; + 231 -> {232}; + 232 -> {233}; + 233 -> {234 246}; 234 -> {235}; - 235 -> {236}; - 236 -> {237 239}; - 237 -> {238}; + 235 -> {236 246}; + 236 -> {237}; + 237 -> {238 245}; + 237 -> {244} [style=dotted]; + 237 -> {238} [style=dashed]; 238 -> {239}; 239 -> {240}; 240 -> {241}; 241 -> {242}; 242 -> {243}; 243 -> {244}; - 244 -> {194}; - 245 -> {246}; + 244 -> {245} [color=green]; + 244 -> {250} [color=red]; + 245 -> {247}; 246 -> {247}; - 247 -> {248}; + 247 -> {248 250}; 248 -> {249}; - 249 -> {250}; - 250 -> {217}; + 249 -> {256}; + 250 -> {256} [color=red]; 251 -> {252}; 252 -> {253}; 253 -> {254}; 254 -> {255}; 255 -> {256}; 256 -> {257}; - 257 -> {258}; - 258 -> {259}; - 259 -> {260}; - 260 -> {261}; + 257 -> {260}; + 257 -> {258} [style=dotted]; + 258 -> {259} [style=dotted]; + 259 -> {260} [style=dotted]; 261 -> {262}; 262 -> {263}; - 263 -> {264}; - 264 -> {265}; - 265 -> {266}; - 266 -> {267 274}; + 264 -> {265} [color=green]; + 265 -> {266} [color=green]; + 265 -> {269} [style=dotted]; + 265 -> {266} [style=dashed]; + 266 -> {267}; 267 -> {268}; - 268 -> {269}; - 269 -> {270}; + 268 -> {269} [color=green]; + 269 -> {270} [color=green]; + 269 -> {273} [style=dotted]; + 269 -> {270} [style=dashed]; 270 -> {271}; 271 -> {272}; - 272 -> {273}; - 273 -> {279}; + 272 -> {273} [color=green]; + 273 -> {274} [color=green]; + 273 -> {274} [style=dashed]; 274 -> {275}; 275 -> {276}; - 276 -> {277}; - 277 -> {278}; - 278 -> {279}; + 277 -> {278} [color=green]; + 278 -> {279} [color=green]; + 278 -> {282} [style=dotted]; + 278 -> {279} [style=dashed]; 279 -> {280}; - 280 -> {283}; - 280 -> {281} [style=dotted]; - 281 -> {282} [style=dotted]; - 282 -> {283} [style=dotted]; + 280 -> {281}; + 281 -> {282} [color=green]; + 282 -> {283} [color=green]; + 282 -> {283} [style=dashed]; + 283 -> {284}; + 284 -> {285}; + 286 -> {287}; + 287 -> {288}; subgraph cluster_77 { color=red