digraph safeCalls_kt { graph [nodesep=3] node [shape=box penwidth=2] edge [penwidth=2] subgraph cluster_0 { color=red 0 [label="Enter function foo" style="filled" fillcolor=red]; 2 [label="Const: String()"]; 3 [label="Jump: ^foo String()"]; 4 [label="Stub" style="filled" fillcolor=gray]; 1 [label="Exit function foo" style="filled" fillcolor=red]; } 0 -> {2}; 2 -> {3}; 3 -> {1}; 3 -> {4} [style=dotted]; 4 -> {1} [style=dotted]; subgraph cluster_1 { color=red 5 [label="Enter function let" style="filled" fillcolor=red]; 6 [label="Exit function let" style="filled" fillcolor=red]; } 5 -> {6}; subgraph cluster_2 { color=red 7 [label="Enter function test" style="filled" fillcolor=red]; 9 [label="Access variable R|/x|"]; 10 [label="Enter safe call"]; 12 [label="Access variable R|/x|"]; 13 [label="Access variable R|kotlin/String.length|"]; 14 [label="Const: Int(1)"]; 15 [label="Operator =="]; 16 [label="Function call: R|/x|?.R|/foo|(...)"]; 11 [label="Exit safe call"]; 17 [label="Access variable R|/x|"]; 18 [label="Access variable #"]; 8 [label="Exit function test" style="filled" fillcolor=red]; } 7 -> {9}; 9 -> {10 11}; 10 -> {12}; 11 -> {17}; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {11}; 17 -> {18}; 18 -> {8}; subgraph cluster_3 { color=red 19 [label="Enter function bar" style="filled" fillcolor=red]; 20 [label="Exit function bar" style="filled" fillcolor=red]; } 19 -> {20}; subgraph cluster_4 { color=red 21 [label="Enter function bool" style="filled" fillcolor=red]; 22 [label="Exit function bool" style="filled" fillcolor=red]; } 21 -> {22}; subgraph cluster_5 { color=red 23 [label="Enter function id" style="filled" fillcolor=red]; 24 [label="Exit function id" style="filled" fillcolor=red]; } 23 -> {24}; subgraph cluster_6 { color=red 25 [label="Enter class A" style="filled" fillcolor=red]; 26 [label="Exit class A" style="filled" fillcolor=red]; } 25 -> {26} [color=green]; subgraph cluster_7 { color=red 27 [label="Enter function test_2" style="filled" fillcolor=red]; 29 [label="Access variable R|/x|"]; 30 [label="Type operator: (R|/x| as? R|A|)"]; 31 [label="Enter safe call"]; 33 [label="Access variable R|/x|"]; 34 [label="Function call: (R|/x| as? R|A|)?.R|/A.bar|(...)"]; 32 [label="Exit safe call"]; 28 [label="Exit function test_2" style="filled" fillcolor=red]; } 27 -> {29}; 29 -> {30}; 30 -> {31 32}; 31 -> {33}; 32 -> {28}; 33 -> {34}; 34 -> {32}; subgraph cluster_8 { color=red 35 [label="Enter function test_3" style="filled" fillcolor=red]; 37 [label="Access variable R|/x|"]; 38 [label="Type operator: (R|/x| as? R|A|)"]; 39 [label="Enter safe call"]; 41 [label="Access variable R|/x|"]; 42 [label="Function call: (R|/x| as? R|A|)?.R|/A.bar|(...)"]; 40 [label="Exit safe call"]; 43 [label="Enter safe call"]; 45 [label="Access variable R|/x|"]; 46 [label="Function call: R|/x|.R|/A.bool|()"]; 47 [label="Function call: (R|/x| as? R|A|)?.R|/A.bar|(...)?.R|/foo|(...)"]; 44 [label="Exit safe call"]; 48 [label="Enter safe call"]; 50 [label="Postponed enter to lambda"]; subgraph cluster_9 { color=blue 55 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; 57 [label="Access variable R|/x|"]; 58 [label="Function call: R|/x|.R|/A.bool|()"]; 56 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } 51 [label="Postponed exit from lambda"]; 52 [label="Function call: (R|/x| as? R|A|)?.R|/A.bar|(...)?.R|/foo|(...)?.R|/let|(...)"]; 49 [label="Exit safe call"]; 53 [label="Access variable R|/x|"]; 54 [label="Function call: R|/x|.#()"]; 36 [label="Exit function test_3" style="filled" fillcolor=red]; } 35 -> {37}; 37 -> {38}; 38 -> {39 40}; 39 -> {41}; 40 -> {43 44}; 41 -> {42}; 42 -> {40}; 43 -> {45}; 44 -> {48 49}; 45 -> {46}; 46 -> {47}; 47 -> {44}; 48 -> {50}; 49 -> {53}; 50 -> {51 51} [color=green]; 50 -> {55} [color=red]; 51 -> {52}; 52 -> {49}; 53 -> {54}; 54 -> {36}; 55 -> {57}; 57 -> {58}; 58 -> {56}; subgraph cluster_10 { color=red 59 [label="Enter function test_4" style="filled" fillcolor=red]; 61 [label="Access variable R|/x|"]; 62 [label="Enter safe call"]; 64 [label="Function call: R|/x|?.R|/A.id|()"]; 63 [label="Exit safe call"]; 65 [label="Enter safe call"]; 67 [label="Function call: R|/x|?.R|/A.id|()?.R|/A.bool|()"]; 66 [label="Exit safe call"]; 68 [label="Access variable R|/x|"]; 69 [label="Function call: R|/x|.#()"]; 60 [label="Exit function test_4" style="filled" fillcolor=red]; } 59 -> {61}; 61 -> {62 63}; 62 -> {64}; 63 -> {65 66}; 64 -> {63}; 65 -> {67}; 66 -> {68}; 67 -> {66}; 68 -> {69}; 69 -> {60}; subgraph cluster_11 { color=red 70 [label="Enter function boo" style="filled" fillcolor=red]; 71 [label="Exit function boo" style="filled" fillcolor=red]; } 70 -> {71}; subgraph cluster_12 { color=red 72 [label="Enter function test_5" style="filled" fillcolor=red]; 74 [label="Access variable R|/x|"]; 75 [label="Enter safe call"]; 77 [label="Postponed enter to lambda"]; subgraph cluster_13 { color=blue 88 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; 90 [label="Jump: ^test_5 Unit"]; 91 [label="Stub" style="filled" fillcolor=gray]; 89 [label="Exit function anonymousFunction" style="filled" fillcolor=red style="filled" fillcolor=gray]; } 80 [label="Call arguments union" style="filled" fillcolor=gray]; 78 [label="Postponed exit from lambda"]; 79 [label="Function call: R|/x|?.R|kotlin/let|(...)" style="filled" fillcolor=gray]; 76 [label="Exit safe call"]; 81 [label="Enter safe call"]; 83 [label="Access variable R|/x|"]; 84 [label="Function call: R|/x|.R|/A.bool|()"]; 85 [label="Function call: R|/x|?.R|kotlin/let|(...)?.R|/boo|(...)"]; 82 [label="Exit safe call"]; 86 [label="Access variable R|/x|"]; 87 [label="Function call: R|/x|.#()"]; 73 [label="Exit function test_5" style="filled" fillcolor=red]; } 72 -> {74}; 74 -> {75 76}; 75 -> {77}; 76 -> {81 82}; 77 -> {88}; 77 -> {78} [color=red]; 78 -> {79} [color=green]; 79 -> {76} [style=dotted]; 80 -> {79} [style=dotted]; 81 -> {83}; 82 -> {86}; 83 -> {84}; 84 -> {85}; 85 -> {82}; 86 -> {87}; 87 -> {73}; 88 -> {90}; 89 -> {80} [style=dotted]; 89 -> {78} [color=green]; 90 -> {73}; 90 -> {91} [style=dotted]; 91 -> {89} [style=dotted]; }