Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot
T
Tianyu Geng 2e049c1208 FIR DFA: fix CFG with normal arg after lambda [KT-46825]
The fix is a bit hacky, but it's very simple. In addition, it still does
not handle the case where the receiver is a lambda function. But such
case seems to be fairly rare in practice.
2021-06-29 10:46:41 +03:00

434 lines
14 KiB
Plaintext
Vendored

digraph callsInPlace_kt {
graph [nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter function test" style="filled" fillcolor=red];
subgraph cluster_1 {
color=blue
1 [label="Enter block"];
2 [label="Variable declaration: lval x: R|kotlin/Int|"];
3 [label="Postponed enter to lambda"];
subgraph cluster_2 {
color=blue
11 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_3 {
color=blue
12 [label="Enter block"];
13 [label="Const: Int(1)"];
14 [label="Assignment: R|<local>/x|"];
15 [label="Exit block"];
}
16 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
4 [label="Call arguments union" style="filled" fillcolor=yellow];
5 [label="Postponed exit from lambda"];
6 [label="Function call: R|kotlin/run|<R|kotlin/Unit|>(...)"];
7 [label="Access variable R|<local>/x|"];
8 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
9 [label="Exit block"];
}
10 [label="Exit function test" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
2 -> {3};
3 -> {11};
3 -> {5} [color=red];
3 -> {11} [style=dashed];
4 -> {6} [color=red];
5 -> {6} [color=green];
6 -> {7};
7 -> {8};
8 -> {9};
9 -> {10};
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {4} [color=red];
16 -> {5} [color=green];
subgraph cluster_4 {
color=red
17 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue
18 [label="Enter block"];
19 [label="Const: Int(10)"];
20 [label="Postponed enter to lambda"];
subgraph cluster_6 {
color=blue
25 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_7 {
color=blue
26 [label="Enter block"];
27 [label="Const: String(test_2)"];
28 [label="Exit block"];
}
29 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
21 [label="Postponed exit from lambda"];
22 [label="Function call: R|kotlin/repeat|(...)"];
23 [label="Exit block"];
}
24 [label="Exit function test_2" style="filled" fillcolor=red];
}
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {25};
20 -> {21} [color=red];
20 -> {25} [style=dashed];
21 -> {22};
22 -> {23};
23 -> {24};
25 -> {29 26};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {21} [color=green];
29 -> {25} [color=green style=dashed];
subgraph cluster_8 {
color=red
30 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_9 {
color=blue
31 [label="Enter block"];
32 [label="Postponed enter to lambda"];
subgraph cluster_10 {
color=blue
38 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
39 [label="Enter block"];
40 [label="Const: String(test_3)"];
41 [label="Exit block"];
}
42 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
33 [label="Postponed exit from lambda"];
34 [label="Const: Int(10)"];
35 [label="Function call: R|kotlin/repeat|(...)"];
36 [label="Exit block"];
}
37 [label="Exit function test_3" style="filled" fillcolor=red];
}
30 -> {31};
31 -> {32};
32 -> {38};
32 -> {33} [color=red];
32 -> {38} [style=dashed];
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
38 -> {42 39};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {33} [color=green];
42 -> {38} [color=green style=dashed];
subgraph cluster_12 {
color=red
43 [label="Enter function test_4" style="filled" fillcolor=red];
subgraph cluster_13 {
color=blue
44 [label="Enter block"];
45 [label="Const: Int(1)"];
46 [label="Postponed enter to lambda"];
subgraph cluster_14 {
color=blue
52 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_15 {
color=blue
53 [label="Enter block"];
54 [label="Const: String(test_4)"];
55 [label="Access variable R|<local>/it|"];
56 [label="Const: Int(0)"];
57 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(...)"];
58 [label="Comparison >"];
59 [label="Exit block"];
}
60 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
47 [label="Call arguments union" style="filled" fillcolor=yellow];
48 [label="Postponed exit from lambda"];
49 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(...)"];
50 [label="Exit block"];
}
51 [label="Exit function test_4" style="filled" fillcolor=red];
}
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {52};
46 -> {48} [color=red];
46 -> {52} [style=dashed];
47 -> {49} [color=red];
48 -> {49} [color=green];
49 -> {50};
50 -> {51};
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60};
60 -> {47} [color=red];
60 -> {48} [color=green];
subgraph cluster_16 {
color=red
61 [label="Enter function test_5" style="filled" fillcolor=red];
subgraph cluster_17 {
color=blue
62 [label="Enter block"];
63 [label="Const: Int(1)"];
64 [label="Postponed enter to lambda"];
subgraph cluster_18 {
color=blue
70 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_19 {
color=blue
71 [label="Enter block"];
72 [label="Const: String(test_5)"];
73 [label="Access variable R|<local>/it|"];
74 [label="Const: Int(0)"];
75 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(...)"];
76 [label="Comparison >"];
77 [label="Exit block"];
}
78 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
65 [label="Call arguments union" style="filled" fillcolor=yellow];
66 [label="Postponed exit from lambda"];
67 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(...)"];
68 [label="Exit block"];
}
69 [label="Exit function test_5" style="filled" fillcolor=red];
}
61 -> {62};
62 -> {63};
63 -> {64};
64 -> {70};
64 -> {66} [color=red];
64 -> {70} [style=dashed];
65 -> {67} [color=red];
66 -> {67} [color=green];
67 -> {68};
68 -> {69};
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {76};
76 -> {77};
77 -> {78};
78 -> {65} [color=red];
78 -> {66} [color=green];
subgraph cluster_20 {
color=red
79 [label="Enter function myRun" style="filled" fillcolor=red];
subgraph cluster_21 {
color=blue
80 [label="Enter block"];
81 [label="Function call: R|<local>/block1|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
82 [label="Function call: R|<local>/block2|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
83 [label="Exit block"];
}
84 [label="Exit function myRun" style="filled" fillcolor=red];
}
79 -> {80};
80 -> {81};
81 -> {82};
82 -> {83};
83 -> {84};
subgraph cluster_22 {
color=red
85 [label="Enter function test_6" style="filled" fillcolor=red];
subgraph cluster_23 {
color=blue
86 [label="Enter block"];
87 [label="Postponed enter to lambda"];
subgraph cluster_24 {
color=blue
99 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_25 {
color=blue
100 [label="Enter block"];
101 [label="Const: String(test_6_2)"];
102 [label="Exit block"];
}
103 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
88 [label="Postponed exit from lambda"];
89 [label="Postponed enter to lambda"];
subgraph cluster_26 {
color=blue
94 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_27 {
color=blue
95 [label="Enter block"];
96 [label="Const: String(test_6_1)"];
97 [label="Exit block"];
}
98 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
90 [label="Postponed exit from lambda"];
91 [label="Function call: R|/myRun|(...)"];
92 [label="Exit block"];
}
93 [label="Exit function test_6" style="filled" fillcolor=red];
}
85 -> {86};
86 -> {87};
87 -> {99};
87 -> {88} [color=red];
87 -> {99} [style=dashed];
88 -> {89};
89 -> {94};
89 -> {90} [color=red];
89 -> {94} [style=dashed];
90 -> {91};
91 -> {92};
92 -> {93};
94 -> {98 95};
95 -> {96};
96 -> {97};
97 -> {98};
98 -> {90} [color=green];
98 -> {94} [color=green style=dashed];
99 -> {103 100};
100 -> {101};
101 -> {102};
102 -> {103};
103 -> {88} [color=green];
103 -> {99} [color=green style=dashed];
subgraph cluster_28 {
color=red
104 [label="Enter function test_7" style="filled" fillcolor=red];
subgraph cluster_29 {
color=blue
105 [label="Enter block"];
106 [label="Postponed enter to lambda"];
subgraph cluster_30 {
color=blue
113 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_31 {
color=blue
114 [label="Enter block"];
115 [label="Const: String(test_7_2)"];
116 [label="Exit block"];
}
117 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
107 [label="Postponed exit from lambda"];
108 [label="Postponed enter to lambda"];
subgraph cluster_32 {
color=blue
118 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_33 {
color=blue
119 [label="Enter block"];
120 [label="Const: String(test_7_1)"];
121 [label="Exit block"];
}
122 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
109 [label="Postponed exit from lambda"];
110 [label="Function call: R|/myRun|(...)"];
111 [label="Exit block"];
}
112 [label="Exit function test_7" style="filled" fillcolor=red];
}
104 -> {105};
105 -> {106};
106 -> {113};
106 -> {107} [color=red];
106 -> {113} [style=dashed];
107 -> {108};
108 -> {118};
108 -> {109} [color=red];
108 -> {118} [style=dashed];
109 -> {110};
110 -> {111};
111 -> {112};
113 -> {117 114};
114 -> {115};
115 -> {116};
116 -> {117};
117 -> {107} [color=green];
117 -> {113} [color=green style=dashed];
118 -> {122 119};
119 -> {120};
120 -> {121};
121 -> {122};
122 -> {109} [color=green];
122 -> {118} [color=green style=dashed];
subgraph cluster_34 {
color=red
123 [label="Enter function myDummyRun" style="filled" fillcolor=red];
subgraph cluster_35 {
color=blue
124 [label="Enter block"];
125 [label="Function call: R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
126 [label="Exit block"];
}
127 [label="Exit function myDummyRun" style="filled" fillcolor=red];
}
123 -> {124};
124 -> {125};
125 -> {126};
126 -> {127};
subgraph cluster_36 {
color=red
128 [label="Enter function test_8" style="filled" fillcolor=red];
subgraph cluster_37 {
color=blue
129 [label="Enter block"];
130 [label="Postponed enter to lambda"];
subgraph cluster_38 {
color=blue
135 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_39 {
color=blue
136 [label="Enter block"];
137 [label="Const: String(test_8)"];
138 [label="Exit block"];
}
139 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
131 [label="Postponed exit from lambda"];
132 [label="Function call: R|/myDummyRun|(...)"];
133 [label="Exit block"];
}
134 [label="Exit function test_8" style="filled" fillcolor=red];
}
128 -> {129};
129 -> {130};
130 -> {131 135};
130 -> {135} [style=dashed];
131 -> {132};
132 -> {133};
133 -> {134};
135 -> {136};
136 -> {137};
137 -> {138};
138 -> {139};
}