[FIR] Tests. Make cfg graphs more strict

This commit is contained in:
Dmitriy Novozhilov
2019-08-29 16:15:24 +03:00
parent a87891bec9
commit 63bd920f16
26 changed files with 5897 additions and 3369 deletions
@@ -38,32 +38,35 @@ interface ReturnableNothingNode {
val returnsNothing: Boolean val returnsNothing: Boolean
} }
interface EnterNode
interface ExitNode
// ----------------------------------- Named function ----------------------------------- // ----------------------------------- Named function -----------------------------------
class FunctionEnterNode(owner: ControlFlowGraph, override val fir: FirFunction<*>, level: Int) : CFGNode<FirFunction<*>>(owner, level) class FunctionEnterNode(owner: ControlFlowGraph, override val fir: FirFunction<*>, level: Int) : CFGNode<FirFunction<*>>(owner, level), EnterNode
class FunctionExitNode(owner: ControlFlowGraph, override val fir: FirFunction<*>, level: Int) : CFGNode<FirFunction<*>>(owner, level) class FunctionExitNode(owner: ControlFlowGraph, override val fir: FirFunction<*>, level: Int) : CFGNode<FirFunction<*>>(owner, level), ExitNode
// ----------------------------------- Property ----------------------------------- // ----------------------------------- Property -----------------------------------
class PropertyEnterNode(owner: ControlFlowGraph, override val fir: FirProperty, level: Int) : CFGNode<FirProperty>(owner, level) class PropertyEnterNode(owner: ControlFlowGraph, override val fir: FirProperty, level: Int) : CFGNode<FirProperty>(owner, level), EnterNode
class PropertyExitNode(owner: ControlFlowGraph, override val fir: FirProperty, level: Int) : CFGNode<FirProperty>(owner, level) class PropertyExitNode(owner: ControlFlowGraph, override val fir: FirProperty, level: Int) : CFGNode<FirProperty>(owner, level), ExitNode
// ----------------------------------- Init ----------------------------------- // ----------------------------------- Init -----------------------------------
class InitBlockEnterNode(owner: ControlFlowGraph, override val fir: FirAnonymousInitializer, level: Int) : CFGNode<FirAnonymousInitializer>(owner, level) class InitBlockEnterNode(owner: ControlFlowGraph, override val fir: FirAnonymousInitializer, level: Int) : CFGNode<FirAnonymousInitializer>(owner, level), EnterNode
class InitBlockExitNode(owner: ControlFlowGraph, override val fir: FirAnonymousInitializer, level: Int) : CFGNode<FirAnonymousInitializer>(owner, level) class InitBlockExitNode(owner: ControlFlowGraph, override val fir: FirAnonymousInitializer, level: Int) : CFGNode<FirAnonymousInitializer>(owner, level), ExitNode
// ----------------------------------- Block ----------------------------------- // ----------------------------------- Block -----------------------------------
class BlockEnterNode(owner: ControlFlowGraph, override val fir: FirBlock, level: Int) : CFGNode<FirBlock>(owner, level) class BlockEnterNode(owner: ControlFlowGraph, override val fir: FirBlock, level: Int) : CFGNode<FirBlock>(owner, level), EnterNode
class BlockExitNode(owner: ControlFlowGraph, override val fir: FirBlock, level: Int) : CFGNode<FirBlock>(owner, level) class BlockExitNode(owner: ControlFlowGraph, override val fir: FirBlock, level: Int) : CFGNode<FirBlock>(owner, level), ExitNode
// ----------------------------------- When ----------------------------------- // ----------------------------------- When -----------------------------------
class WhenEnterNode(owner: ControlFlowGraph, override val fir: FirWhenExpression, level: Int) : CFGNode<FirWhenExpression>(owner, level) class WhenEnterNode(owner: ControlFlowGraph, override val fir: FirWhenExpression, level: Int) : CFGNode<FirWhenExpression>(owner, level), EnterNode
class WhenExitNode(owner: ControlFlowGraph, override val fir: FirWhenExpression, level: Int) : CFGNode<FirWhenExpression>(owner, level) class WhenExitNode(owner: ControlFlowGraph, override val fir: FirWhenExpression, level: Int) : CFGNode<FirWhenExpression>(owner, level), ExitNode
class WhenBranchConditionEnterNode(owner: ControlFlowGraph, override val fir: FirWhenBranch, level: Int) : CFGNode<FirWhenBranch>(owner, level) class WhenBranchConditionEnterNode(owner: ControlFlowGraph, override val fir: FirWhenBranch, level: Int) : CFGNode<FirWhenBranch>(owner, level), EnterNode
class WhenBranchConditionExitNode(owner: ControlFlowGraph, override val fir: FirWhenBranch, level: Int) : CFGNode<FirWhenBranch>(owner, level) { class WhenBranchConditionExitNode(owner: ControlFlowGraph, override val fir: FirWhenBranch, level: Int) : CFGNode<FirWhenBranch>(owner, level), ExitNode {
lateinit var trueCondition: Condition lateinit var trueCondition: Condition
lateinit var falseCondition: Condition lateinit var falseCondition: Condition
} }
@@ -71,25 +74,25 @@ class WhenBranchResultExitNode(owner: ControlFlowGraph, override val fir: FirWhe
// ----------------------------------- Loop ----------------------------------- // ----------------------------------- Loop -----------------------------------
class LoopEnterNode(owner: ControlFlowGraph, override val fir: FirLoop, level: Int) : CFGNode<FirLoop>(owner, level) class LoopEnterNode(owner: ControlFlowGraph, override val fir: FirLoop, level: Int) : CFGNode<FirLoop>(owner, level), EnterNode
class LoopBlockEnterNode(owner: ControlFlowGraph, override val fir: FirLoop, level: Int) : CFGNode<FirLoop>(owner, level) class LoopBlockEnterNode(owner: ControlFlowGraph, override val fir: FirLoop, level: Int) : CFGNode<FirLoop>(owner, level), EnterNode
class LoopBlockExitNode(owner: ControlFlowGraph, override val fir: FirLoop, level: Int) : CFGNode<FirLoop>(owner, level) class LoopBlockExitNode(owner: ControlFlowGraph, override val fir: FirLoop, level: Int) : CFGNode<FirLoop>(owner, level), ExitNode
class LoopConditionEnterNode(owner: ControlFlowGraph, override val fir: FirExpression, level: Int) : CFGNode<FirExpression>(owner, level) class LoopConditionEnterNode(owner: ControlFlowGraph, override val fir: FirExpression, level: Int) : CFGNode<FirExpression>(owner, level), EnterNode
class LoopConditionExitNode(owner: ControlFlowGraph, override val fir: FirExpression, level: Int) : CFGNode<FirExpression>(owner, level) class LoopConditionExitNode(owner: ControlFlowGraph, override val fir: FirExpression, level: Int) : CFGNode<FirExpression>(owner, level), ExitNode
class LoopExitNode(owner: ControlFlowGraph, override val fir: FirLoop, level: Int) : CFGNode<FirLoop>(owner, level) class LoopExitNode(owner: ControlFlowGraph, override val fir: FirLoop, level: Int) : CFGNode<FirLoop>(owner, level), ExitNode
// ----------------------------------- Try-catch-finally ----------------------------------- // ----------------------------------- Try-catch-finally -----------------------------------
class TryExpressionEnterNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level) class TryExpressionEnterNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level), EnterNode
class TryMainBlockEnterNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level) class TryMainBlockEnterNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level), EnterNode
class TryMainBlockExitNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level) class TryMainBlockExitNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level), ExitNode
class CatchClauseEnterNode(owner: ControlFlowGraph, override val fir: FirCatch, level: Int) : CFGNode<FirCatch>(owner, level) class CatchClauseEnterNode(owner: ControlFlowGraph, override val fir: FirCatch, level: Int) : CFGNode<FirCatch>(owner, level), EnterNode
class CatchClauseExitNode(owner: ControlFlowGraph, override val fir: FirCatch, level: Int) : CFGNode<FirCatch>(owner, level) class CatchClauseExitNode(owner: ControlFlowGraph, override val fir: FirCatch, level: Int) : CFGNode<FirCatch>(owner, level), ExitNode
class FinallyBlockEnterNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level) class FinallyBlockEnterNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level), EnterNode
class FinallyBlockExitNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level) class FinallyBlockExitNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level), ExitNode
class FinallyProxyEnterNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level) class FinallyProxyEnterNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level), EnterNode
class FinallyProxyExitNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level) class FinallyProxyExitNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level), ExitNode
class TryExpressionExitNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level) class TryExpressionExitNode(owner: ControlFlowGraph, override val fir: FirTryExpression, level: Int) : CFGNode<FirTryExpression>(owner, level), ExitNode
// ----------------------------------- Boolean operators ----------------------------------- // ----------------------------------- Boolean operators -----------------------------------
@@ -98,13 +101,13 @@ abstract class AbstractBinaryExitNode<T : FirElement>(owner: ControlFlowGraph, l
val rightOperandNode: CFGNode<*> get() = previousNodes[1] val rightOperandNode: CFGNode<*> get() = previousNodes[1]
} }
class BinaryAndEnterNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : CFGNode<FirBinaryLogicExpression>(owner, level) class BinaryAndEnterNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : CFGNode<FirBinaryLogicExpression>(owner, level), EnterNode
class BinaryAndExitLeftOperandNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : CFGNode<FirBinaryLogicExpression>(owner, level) class BinaryAndExitLeftOperandNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : CFGNode<FirBinaryLogicExpression>(owner, level)
class BinaryAndExitNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : AbstractBinaryExitNode<FirBinaryLogicExpression>(owner, level) class BinaryAndExitNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : AbstractBinaryExitNode<FirBinaryLogicExpression>(owner, level), ExitNode
class BinaryOrEnterNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : CFGNode<FirBinaryLogicExpression>(owner, level) class BinaryOrEnterNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : CFGNode<FirBinaryLogicExpression>(owner, level), EnterNode
class BinaryOrExitLeftOperandNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : CFGNode<FirBinaryLogicExpression>(owner, level) class BinaryOrExitLeftOperandNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : CFGNode<FirBinaryLogicExpression>(owner, level)
class BinaryOrExitNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : AbstractBinaryExitNode<FirBinaryLogicExpression>(owner, level) class BinaryOrExitNode(owner: ControlFlowGraph, override val fir: FirBinaryLogicExpression, level: Int) : AbstractBinaryExitNode<FirBinaryLogicExpression>(owner, level), ExitNode
// ----------------------------------- Operator call ----------------------------------- // ----------------------------------- Operator call -----------------------------------
@@ -153,8 +156,8 @@ class VariableAssignmentNode(owner: ControlFlowGraph, override val fir: FirVaria
// ----------------------------------- Other ----------------------------------- // ----------------------------------- Other -----------------------------------
class AnnotationEnterNode(owner: ControlFlowGraph, override val fir: FirAnnotationCall, level: Int) : CFGNode<FirAnnotationCall>(owner, level) class AnnotationEnterNode(owner: ControlFlowGraph, override val fir: FirAnnotationCall, level: Int) : CFGNode<FirAnnotationCall>(owner, level), EnterNode
class AnnotationExitNode(owner: ControlFlowGraph, override val fir: FirAnnotationCall, level: Int) : CFGNode<FirAnnotationCall>(owner, level) class AnnotationExitNode(owner: ControlFlowGraph, override val fir: FirAnnotationCall, level: Int) : CFGNode<FirAnnotationCall>(owner, level), ExitNode
// ----------------------------------- Stub ----------------------------------- // ----------------------------------- Stub -----------------------------------
@@ -149,9 +149,6 @@ fun CFGNode<*>.render(): String =
else -> TODO(this@render.toString()) else -> TODO(this@render.toString())
} }
) )
if (isDead) {
append(DEAD)
}
} }
private fun FirFunction<*>.name(): String = when (this) { private fun FirFunction<*>.name(): String = when (this) {
+201 -105
View File
@@ -1,29 +1,54 @@
digraph binaryOperations_kt { digraph binaryOperations_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_test_1 { subgraph cluster_0 {
0 [shape=box label="Enter function test_1" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function test_1" style="filled" fillcolor=red];
2 [shape=box label="Enter when"]; subgraph cluster_1 {
3 [shape=box label="Enter when branch condition "]; color=blue
4 [shape=box label="Enter ||"]; 1 [label="Enter block"];
5 [shape=box label="Access variable R|<local>/b1|"]; subgraph cluster_2 {
6 [shape=box label="Exit left part of ||"]; color=blue
7 [shape=box label="Access variable R|<local>/b2|"]; 2 [label="Enter when"];
8 [shape=box label="Exit ||"]; subgraph cluster_3 {
9 [shape=box label="Exit when branch condition"]; color=blue
10 [shape=box label="Enter block"]; 3 [label="Enter when branch condition "];
11 [shape=box label="Const: Int(1)"]; subgraph cluster_4 {
12 [shape=box label="Exit block"]; color=blue
13 [shape=box label="Exit when branch result"]; 4 [label="Enter ||"];
14 [shape=box label="Enter when branch condition else"]; 5 [label="Access variable R|<local>/b1|"];
15 [shape=box label="Exit when branch condition"]; 6 [label="Exit left part of ||"];
16 [shape=box label="Enter block"]; 7 [label="Access variable R|<local>/b2|"];
17 [shape=box label="Exit block"]; 8 [label="Exit ||"];
18 [shape=box label="Exit when branch result"]; }
19 [shape=box label="Exit when"]; 9 [label="Exit when branch condition"];
20 [shape=box label="Exit block"]; }
21 [shape=box label="Exit function test_1" style="filled"]; subgraph cluster_5 {
color=blue
10 [label="Enter block"];
11 [label="Const: Int(1)"];
12 [label="Exit block"];
}
13 [label="Exit when branch result"];
subgraph cluster_6 {
color=blue
14 [label="Enter when branch condition else"];
15 [label="Exit when branch condition"];
}
subgraph cluster_7 {
color=blue
16 [label="Enter block"];
17 [label="Exit block"];
}
18 [label="Exit when branch result"];
19 [label="Exit when"];
}
20 [label="Exit block"];
}
21 [label="Exit function test_1" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
@@ -46,31 +71,53 @@ subgraph cluster_test_1 {
18 -> {19}; 18 -> {19};
19 -> {20}; 19 -> {20};
20 -> {21}; 20 -> {21};
}
subgraph cluster_test_2 { subgraph cluster_8 {
22 [shape=box label="Enter function test_2" style="filled"]; color=red
23 [shape=box label="Enter block"]; 22 [label="Enter function test_2" style="filled" fillcolor=red];
24 [shape=box label="Enter when"]; subgraph cluster_9 {
25 [shape=box label="Enter when branch condition "]; color=blue
26 [shape=box label="Enter &&"]; 23 [label="Enter block"];
27 [shape=box label="Access variable R|<local>/b1|"]; subgraph cluster_10 {
28 [shape=box label="Exit left part of &&"]; color=blue
29 [shape=box label="Access variable R|<local>/b2|"]; 24 [label="Enter when"];
30 [shape=box label="Exit &&"]; subgraph cluster_11 {
31 [shape=box label="Exit when branch condition"]; color=blue
32 [shape=box label="Enter block"]; 25 [label="Enter when branch condition "];
33 [shape=box label="Const: Int(1)"]; subgraph cluster_12 {
34 [shape=box label="Exit block"]; color=blue
35 [shape=box label="Exit when branch result"]; 26 [label="Enter &&"];
36 [shape=box label="Enter when branch condition else"]; 27 [label="Access variable R|<local>/b1|"];
37 [shape=box label="Exit when branch condition"]; 28 [label="Exit left part of &&"];
38 [shape=box label="Enter block"]; 29 [label="Access variable R|<local>/b2|"];
39 [shape=box label="Exit block"]; 30 [label="Exit &&"];
40 [shape=box label="Exit when branch result"]; }
41 [shape=box label="Exit when"]; 31 [label="Exit when branch condition"];
42 [shape=box label="Exit block"]; }
43 [shape=box label="Exit function test_2" style="filled"]; subgraph cluster_13 {
color=blue
32 [label="Enter block"];
33 [label="Const: Int(1)"];
34 [label="Exit block"];
}
35 [label="Exit when branch result"];
subgraph cluster_14 {
color=blue
36 [label="Enter when branch condition else"];
37 [label="Exit when branch condition"];
}
subgraph cluster_15 {
color=blue
38 [label="Enter block"];
39 [label="Exit block"];
}
40 [label="Exit when branch result"];
41 [label="Exit when"];
}
42 [label="Exit block"];
}
43 [label="Exit function test_2" style="filled" fillcolor=red];
}
22 -> {23}; 22 -> {23};
23 -> {24}; 23 -> {24};
@@ -93,35 +140,60 @@ subgraph cluster_test_2 {
40 -> {41}; 40 -> {41};
41 -> {42}; 41 -> {42};
42 -> {43}; 42 -> {43};
}
subgraph cluster_test_3 { subgraph cluster_16 {
44 [shape=box label="Enter function test_3" style="filled"]; color=red
45 [shape=box label="Enter block"]; 44 [label="Enter function test_3" style="filled" fillcolor=red];
46 [shape=box label="Enter when"]; subgraph cluster_17 {
47 [shape=box label="Enter when branch condition "]; color=blue
48 [shape=box label="Enter ||"]; 45 [label="Enter block"];
49 [shape=box label="Enter &&"]; subgraph cluster_18 {
50 [shape=box label="Access variable R|<local>/b1|"]; color=blue
51 [shape=box label="Exit left part of &&"]; 46 [label="Enter when"];
52 [shape=box label="Access variable R|<local>/b2|"]; subgraph cluster_19 {
53 [shape=box label="Exit &&"]; color=blue
54 [shape=box label="Exit left part of ||"]; 47 [label="Enter when branch condition "];
55 [shape=box label="Access variable R|<local>/b3|"]; subgraph cluster_20 {
56 [shape=box label="Exit ||"]; color=blue
57 [shape=box label="Exit when branch condition"]; 48 [label="Enter ||"];
58 [shape=box label="Enter block"]; subgraph cluster_21 {
59 [shape=box label="Const: Int(1)"]; color=blue
60 [shape=box label="Exit block"]; 49 [label="Enter &&"];
61 [shape=box label="Exit when branch result"]; 50 [label="Access variable R|<local>/b1|"];
62 [shape=box label="Enter when branch condition else"]; 51 [label="Exit left part of &&"];
63 [shape=box label="Exit when branch condition"]; 52 [label="Access variable R|<local>/b2|"];
64 [shape=box label="Enter block"]; 53 [label="Exit &&"];
65 [shape=box label="Exit block"]; }
66 [shape=box label="Exit when branch result"]; 54 [label="Exit left part of ||"];
67 [shape=box label="Exit when"]; 55 [label="Access variable R|<local>/b3|"];
68 [shape=box label="Exit block"]; 56 [label="Exit ||"];
69 [shape=box label="Exit function test_3" style="filled"]; }
57 [label="Exit when branch condition"];
}
subgraph cluster_22 {
color=blue
58 [label="Enter block"];
59 [label="Const: Int(1)"];
60 [label="Exit block"];
}
61 [label="Exit when branch result"];
subgraph cluster_23 {
color=blue
62 [label="Enter when branch condition else"];
63 [label="Exit when branch condition"];
}
subgraph cluster_24 {
color=blue
64 [label="Enter block"];
65 [label="Exit block"];
}
66 [label="Exit when branch result"];
67 [label="Exit when"];
}
68 [label="Exit block"];
}
69 [label="Exit function test_3" style="filled" fillcolor=red];
}
44 -> {45}; 44 -> {45};
45 -> {46}; 45 -> {46};
@@ -148,35 +220,60 @@ subgraph cluster_test_3 {
66 -> {67}; 66 -> {67};
67 -> {68}; 67 -> {68};
68 -> {69}; 68 -> {69};
}
subgraph cluster_test_4 { subgraph cluster_25 {
70 [shape=box label="Enter function test_4" style="filled"]; color=red
71 [shape=box label="Enter block"]; 70 [label="Enter function test_4" style="filled" fillcolor=red];
72 [shape=box label="Enter when"]; subgraph cluster_26 {
73 [shape=box label="Enter when branch condition "]; color=blue
74 [shape=box label="Enter ||"]; 71 [label="Enter block"];
75 [shape=box label="Access variable R|<local>/b1|"]; subgraph cluster_27 {
76 [shape=box label="Exit left part of ||"]; color=blue
77 [shape=box label="Enter &&"]; 72 [label="Enter when"];
78 [shape=box label="Access variable R|<local>/b2|"]; subgraph cluster_28 {
79 [shape=box label="Exit left part of &&"]; color=blue
80 [shape=box label="Access variable R|<local>/b3|"]; 73 [label="Enter when branch condition "];
81 [shape=box label="Exit &&"]; subgraph cluster_29 {
82 [shape=box label="Exit ||"]; color=blue
83 [shape=box label="Exit when branch condition"]; 74 [label="Enter ||"];
84 [shape=box label="Enter block"]; 75 [label="Access variable R|<local>/b1|"];
85 [shape=box label="Const: Int(1)"]; 76 [label="Exit left part of ||"];
86 [shape=box label="Exit block"]; subgraph cluster_30 {
87 [shape=box label="Exit when branch result"]; color=blue
88 [shape=box label="Enter when branch condition else"]; 77 [label="Enter &&"];
89 [shape=box label="Exit when branch condition"]; 78 [label="Access variable R|<local>/b2|"];
90 [shape=box label="Enter block"]; 79 [label="Exit left part of &&"];
91 [shape=box label="Exit block"]; 80 [label="Access variable R|<local>/b3|"];
92 [shape=box label="Exit when branch result"]; 81 [label="Exit &&"];
93 [shape=box label="Exit when"]; }
94 [shape=box label="Exit block"]; 82 [label="Exit ||"];
95 [shape=box label="Exit function test_4" style="filled"]; }
83 [label="Exit when branch condition"];
}
subgraph cluster_31 {
color=blue
84 [label="Enter block"];
85 [label="Const: Int(1)"];
86 [label="Exit block"];
}
87 [label="Exit when branch result"];
subgraph cluster_32 {
color=blue
88 [label="Enter when branch condition else"];
89 [label="Exit when branch condition"];
}
subgraph cluster_33 {
color=blue
90 [label="Enter block"];
91 [label="Exit block"];
}
92 [label="Exit when branch result"];
93 [label="Exit when"];
}
94 [label="Exit block"];
}
95 [label="Exit function test_4" style="filled" fillcolor=red];
}
70 -> {71}; 70 -> {71};
71 -> {72}; 71 -> {72};
@@ -203,6 +300,5 @@ subgraph cluster_test_4 {
92 -> {93}; 92 -> {93};
93 -> {94}; 93 -> {94};
94 -> {95}; 94 -> {95};
}
} }
@@ -1,29 +1,54 @@
digraph booleanOperatorsWithConsts_kt { digraph booleanOperatorsWithConsts_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_test_1 { subgraph cluster_0 {
0 [shape=box label="Enter function test_1" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function test_1" style="filled" fillcolor=red];
2 [shape=box label="Enter when"]; subgraph cluster_1 {
3 [shape=box label="Enter when branch condition "]; color=blue
4 [shape=box label="Enter ||"]; 1 [label="Enter block"];
5 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_2 {
6 [shape=box label="Exit left part of ||"]; color=blue
7 [shape=box label="Const: Boolean(false)"]; 2 [label="Enter when"];
8 [shape=box label="Exit ||"]; subgraph cluster_3 {
9 [shape=box label="Exit when branch condition"]; color=blue
10 [shape=box label="Enter block"]; 3 [label="Enter when branch condition "];
11 [shape=box label="Const: Int(1)"]; subgraph cluster_4 {
12 [shape=box label="Exit block"]; color=blue
13 [shape=box label="Exit when branch result"]; 4 [label="Enter ||"];
14 [shape=box label="Enter when branch condition else"]; 5 [label="Access variable R|<local>/b|"];
15 [shape=box label="Exit when branch condition"]; 6 [label="Exit left part of ||"];
16 [shape=box label="Enter block"]; 7 [label="Const: Boolean(false)"];
17 [shape=box label="Exit block"]; 8 [label="Exit ||"];
18 [shape=box label="Exit when branch result"]; }
19 [shape=box label="Exit when"]; 9 [label="Exit when branch condition"];
20 [shape=box label="Exit block"]; }
21 [shape=box label="Exit function test_1" style="filled"]; subgraph cluster_5 {
color=blue
10 [label="Enter block"];
11 [label="Const: Int(1)"];
12 [label="Exit block"];
}
13 [label="Exit when branch result"];
subgraph cluster_6 {
color=blue
14 [label="Enter when branch condition else"];
15 [label="Exit when branch condition"];
}
subgraph cluster_7 {
color=blue
16 [label="Enter block"];
17 [label="Exit block"];
}
18 [label="Exit when branch result"];
19 [label="Exit when"];
}
20 [label="Exit block"];
}
21 [label="Exit function test_1" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
@@ -46,32 +71,54 @@ subgraph cluster_test_1 {
18 -> {19}; 18 -> {19};
19 -> {20}; 19 -> {20};
20 -> {21}; 20 -> {21};
}
subgraph cluster_test_2 { subgraph cluster_8 {
22 [shape=box label="Enter function test_2" style="filled"]; color=red
23 [shape=box label="Enter block"]; 22 [label="Enter function test_2" style="filled" fillcolor=red];
24 [shape=box label="Enter when"]; subgraph cluster_9 {
25 [shape=box label="Enter when branch condition "]; color=blue
26 [shape=box label="Enter ||"]; 23 [label="Enter block"];
27 [shape=box label="Const: Boolean(false)"]; subgraph cluster_10 {
28 [shape=box label="Exit left part of ||"]; color=blue
29 [shape=box label="Access variable R|<local>/b|"]; 24 [label="Enter when"];
30 [shape=box label="Stub[DEAD]"]; subgraph cluster_11 {
31 [shape=box label="Exit ||"]; color=blue
32 [shape=box label="Exit when branch condition"]; 25 [label="Enter when branch condition "];
33 [shape=box label="Enter block"]; subgraph cluster_12 {
34 [shape=box label="Const: Int(1)"]; color=blue
35 [shape=box label="Exit block"]; 26 [label="Enter ||"];
36 [shape=box label="Exit when branch result"]; 27 [label="Const: Boolean(false)"];
37 [shape=box label="Enter when branch condition else"]; 28 [label="Exit left part of ||"];
38 [shape=box label="Exit when branch condition"]; 29 [label="Access variable R|<local>/b|"];
39 [shape=box label="Enter block"]; 30 [label="Stub" style="filled" fillcolor=gray];
40 [shape=box label="Exit block"]; 31 [label="Exit ||"];
41 [shape=box label="Exit when branch result"]; }
42 [shape=box label="Exit when"]; 32 [label="Exit when branch condition"];
43 [shape=box label="Exit block"]; }
44 [shape=box label="Exit function test_2" style="filled"]; subgraph cluster_13 {
color=blue
33 [label="Enter block"];
34 [label="Const: Int(1)"];
35 [label="Exit block"];
}
36 [label="Exit when branch result"];
subgraph cluster_14 {
color=blue
37 [label="Enter when branch condition else"];
38 [label="Exit when branch condition"];
}
subgraph cluster_15 {
color=blue
39 [label="Enter block"];
40 [label="Exit block"];
}
41 [label="Exit when branch result"];
42 [label="Exit when"];
}
43 [label="Exit block"];
}
44 [label="Exit function test_2" style="filled" fillcolor=red];
}
22 -> {23}; 22 -> {23};
23 -> {24}; 23 -> {24};
@@ -96,31 +143,53 @@ subgraph cluster_test_2 {
41 -> {42}; 41 -> {42};
42 -> {43}; 42 -> {43};
43 -> {44}; 43 -> {44};
}
subgraph cluster_test_3 { subgraph cluster_16 {
45 [shape=box label="Enter function test_3" style="filled"]; color=red
46 [shape=box label="Enter block"]; 45 [label="Enter function test_3" style="filled" fillcolor=red];
47 [shape=box label="Enter when"]; subgraph cluster_17 {
48 [shape=box label="Enter when branch condition "]; color=blue
49 [shape=box label="Enter ||"]; 46 [label="Enter block"];
50 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_18 {
51 [shape=box label="Exit left part of ||"]; color=blue
52 [shape=box label="Const: Boolean(true)"]; 47 [label="Enter when"];
53 [shape=box label="Exit ||"]; subgraph cluster_19 {
54 [shape=box label="Exit when branch condition"]; color=blue
55 [shape=box label="Enter block"]; 48 [label="Enter when branch condition "];
56 [shape=box label="Const: Int(1)"]; subgraph cluster_20 {
57 [shape=box label="Exit block"]; color=blue
58 [shape=box label="Exit when branch result"]; 49 [label="Enter ||"];
59 [shape=box label="Enter when branch condition else"]; 50 [label="Access variable R|<local>/b|"];
60 [shape=box label="Exit when branch condition"]; 51 [label="Exit left part of ||"];
61 [shape=box label="Enter block"]; 52 [label="Const: Boolean(true)"];
62 [shape=box label="Exit block"]; 53 [label="Exit ||"];
63 [shape=box label="Exit when branch result"]; }
64 [shape=box label="Exit when"]; 54 [label="Exit when branch condition"];
65 [shape=box label="Exit block"]; }
66 [shape=box label="Exit function test_3" style="filled"]; subgraph cluster_21 {
color=blue
55 [label="Enter block"];
56 [label="Const: Int(1)"];
57 [label="Exit block"];
}
58 [label="Exit when branch result"];
subgraph cluster_22 {
color=blue
59 [label="Enter when branch condition else"];
60 [label="Exit when branch condition"];
}
subgraph cluster_23 {
color=blue
61 [label="Enter block"];
62 [label="Exit block"];
}
63 [label="Exit when branch result"];
64 [label="Exit when"];
}
65 [label="Exit block"];
}
66 [label="Exit function test_3" style="filled" fillcolor=red];
}
45 -> {46}; 45 -> {46};
46 -> {47}; 46 -> {47};
@@ -143,32 +212,54 @@ subgraph cluster_test_3 {
63 -> {64}; 63 -> {64};
64 -> {65}; 64 -> {65};
65 -> {66}; 65 -> {66};
}
subgraph cluster_test_4 { subgraph cluster_24 {
67 [shape=box label="Enter function test_4" style="filled"]; color=red
68 [shape=box label="Enter block"]; 67 [label="Enter function test_4" style="filled" fillcolor=red];
69 [shape=box label="Enter when"]; subgraph cluster_25 {
70 [shape=box label="Enter when branch condition "]; color=blue
71 [shape=box label="Enter ||"]; 68 [label="Enter block"];
72 [shape=box label="Const: Boolean(true)"]; subgraph cluster_26 {
73 [shape=box label="Stub[DEAD]"]; color=blue
74 [shape=box label="Exit left part of ||[DEAD]"]; 69 [label="Enter when"];
75 [shape=box label="Access variable R|<local>/b|[DEAD]"]; subgraph cluster_27 {
76 [shape=box label="Exit ||"]; color=blue
77 [shape=box label="Exit when branch condition"]; 70 [label="Enter when branch condition "];
78 [shape=box label="Enter block"]; subgraph cluster_28 {
79 [shape=box label="Const: Int(1)"]; color=blue
80 [shape=box label="Exit block"]; 71 [label="Enter ||"];
81 [shape=box label="Exit when branch result"]; 72 [label="Const: Boolean(true)"];
82 [shape=box label="Enter when branch condition else"]; 73 [label="Stub" style="filled" fillcolor=gray];
83 [shape=box label="Exit when branch condition"]; 74 [label="Exit left part of ||" style="filled" fillcolor=gray];
84 [shape=box label="Enter block"]; 75 [label="Access variable R|<local>/b|" style="filled" fillcolor=gray];
85 [shape=box label="Exit block"]; 76 [label="Exit ||"];
86 [shape=box label="Exit when branch result"]; }
87 [shape=box label="Exit when"]; 77 [label="Exit when branch condition"];
88 [shape=box label="Exit block"]; }
89 [shape=box label="Exit function test_4" style="filled"]; subgraph cluster_29 {
color=blue
78 [label="Enter block"];
79 [label="Const: Int(1)"];
80 [label="Exit block"];
}
81 [label="Exit when branch result"];
subgraph cluster_30 {
color=blue
82 [label="Enter when branch condition else"];
83 [label="Exit when branch condition"];
}
subgraph cluster_31 {
color=blue
84 [label="Enter block"];
85 [label="Exit block"];
}
86 [label="Exit when branch result"];
87 [label="Exit when"];
}
88 [label="Exit block"];
}
89 [label="Exit function test_4" style="filled" fillcolor=red];
}
67 -> {68}; 67 -> {68};
68 -> {69}; 68 -> {69};
@@ -193,31 +284,53 @@ subgraph cluster_test_4 {
86 -> {87}; 86 -> {87};
87 -> {88}; 87 -> {88};
88 -> {89}; 88 -> {89};
}
subgraph cluster_test_5 { subgraph cluster_32 {
90 [shape=box label="Enter function test_5" style="filled"]; color=red
91 [shape=box label="Enter block"]; 90 [label="Enter function test_5" style="filled" fillcolor=red];
92 [shape=box label="Enter when"]; subgraph cluster_33 {
93 [shape=box label="Enter when branch condition "]; color=blue
94 [shape=box label="Enter &&"]; 91 [label="Enter block"];
95 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_34 {
96 [shape=box label="Exit left part of &&"]; color=blue
97 [shape=box label="Const: Boolean(false)"]; 92 [label="Enter when"];
98 [shape=box label="Exit &&"]; subgraph cluster_35 {
99 [shape=box label="Exit when branch condition"]; color=blue
100 [shape=box label="Enter block"]; 93 [label="Enter when branch condition "];
101 [shape=box label="Const: Int(1)"]; subgraph cluster_36 {
102 [shape=box label="Exit block"]; color=blue
103 [shape=box label="Exit when branch result"]; 94 [label="Enter &&"];
104 [shape=box label="Enter when branch condition else"]; 95 [label="Access variable R|<local>/b|"];
105 [shape=box label="Exit when branch condition"]; 96 [label="Exit left part of &&"];
106 [shape=box label="Enter block"]; 97 [label="Const: Boolean(false)"];
107 [shape=box label="Exit block"]; 98 [label="Exit &&"];
108 [shape=box label="Exit when branch result"]; }
109 [shape=box label="Exit when"]; 99 [label="Exit when branch condition"];
110 [shape=box label="Exit block"]; }
111 [shape=box label="Exit function test_5" style="filled"]; subgraph cluster_37 {
color=blue
100 [label="Enter block"];
101 [label="Const: Int(1)"];
102 [label="Exit block"];
}
103 [label="Exit when branch result"];
subgraph cluster_38 {
color=blue
104 [label="Enter when branch condition else"];
105 [label="Exit when branch condition"];
}
subgraph cluster_39 {
color=blue
106 [label="Enter block"];
107 [label="Exit block"];
}
108 [label="Exit when branch result"];
109 [label="Exit when"];
}
110 [label="Exit block"];
}
111 [label="Exit function test_5" style="filled" fillcolor=red];
}
90 -> {91}; 90 -> {91};
91 -> {92}; 91 -> {92};
@@ -240,33 +353,55 @@ subgraph cluster_test_5 {
108 -> {109}; 108 -> {109};
109 -> {110}; 109 -> {110};
110 -> {111}; 110 -> {111};
}
subgraph cluster_test_6 { subgraph cluster_40 {
112 [shape=box label="Enter function test_6" style="filled"]; color=red
113 [shape=box label="Enter block"]; 112 [label="Enter function test_6" style="filled" fillcolor=red];
114 [shape=box label="Enter when"]; subgraph cluster_41 {
115 [shape=box label="Enter when branch condition "]; color=blue
116 [shape=box label="Enter &&"]; 113 [label="Enter block"];
117 [shape=box label="Const: Boolean(false)"]; subgraph cluster_42 {
118 [shape=box label="Stub[DEAD]"]; color=blue
119 [shape=box label="Exit left part of &&[DEAD]"]; 114 [label="Enter when"];
120 [shape=box label="Access variable R|<local>/b|[DEAD]"]; subgraph cluster_43 {
121 [shape=box label="Stub[DEAD]"]; color=blue
122 [shape=box label="Exit &&"]; 115 [label="Enter when branch condition "];
123 [shape=box label="Exit when branch condition"]; subgraph cluster_44 {
124 [shape=box label="Enter block"]; color=blue
125 [shape=box label="Const: Int(1)"]; 116 [label="Enter &&"];
126 [shape=box label="Exit block"]; 117 [label="Const: Boolean(false)"];
127 [shape=box label="Exit when branch result"]; 118 [label="Stub" style="filled" fillcolor=gray];
128 [shape=box label="Enter when branch condition else"]; 119 [label="Exit left part of &&" style="filled" fillcolor=gray];
129 [shape=box label="Exit when branch condition"]; 120 [label="Access variable R|<local>/b|" style="filled" fillcolor=gray];
130 [shape=box label="Enter block"]; 121 [label="Stub" style="filled" fillcolor=gray];
131 [shape=box label="Exit block"]; 122 [label="Exit &&"];
132 [shape=box label="Exit when branch result"]; }
133 [shape=box label="Exit when"]; 123 [label="Exit when branch condition"];
134 [shape=box label="Exit block"]; }
135 [shape=box label="Exit function test_6" style="filled"]; subgraph cluster_45 {
color=blue
124 [label="Enter block"];
125 [label="Const: Int(1)"];
126 [label="Exit block"];
}
127 [label="Exit when branch result"];
subgraph cluster_46 {
color=blue
128 [label="Enter when branch condition else"];
129 [label="Exit when branch condition"];
}
subgraph cluster_47 {
color=blue
130 [label="Enter block"];
131 [label="Exit block"];
}
132 [label="Exit when branch result"];
133 [label="Exit when"];
}
134 [label="Exit block"];
}
135 [label="Exit function test_6" style="filled" fillcolor=red];
}
112 -> {113}; 112 -> {113};
113 -> {114}; 113 -> {114};
@@ -292,31 +427,53 @@ subgraph cluster_test_6 {
132 -> {133}; 132 -> {133};
133 -> {134}; 133 -> {134};
134 -> {135}; 134 -> {135};
}
subgraph cluster_test_7 { subgraph cluster_48 {
136 [shape=box label="Enter function test_7" style="filled"]; color=red
137 [shape=box label="Enter block"]; 136 [label="Enter function test_7" style="filled" fillcolor=red];
138 [shape=box label="Enter when"]; subgraph cluster_49 {
139 [shape=box label="Enter when branch condition "]; color=blue
140 [shape=box label="Enter &&"]; 137 [label="Enter block"];
141 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_50 {
142 [shape=box label="Exit left part of &&"]; color=blue
143 [shape=box label="Const: Boolean(true)"]; 138 [label="Enter when"];
144 [shape=box label="Exit &&"]; subgraph cluster_51 {
145 [shape=box label="Exit when branch condition"]; color=blue
146 [shape=box label="Enter block"]; 139 [label="Enter when branch condition "];
147 [shape=box label="Const: Int(1)"]; subgraph cluster_52 {
148 [shape=box label="Exit block"]; color=blue
149 [shape=box label="Exit when branch result"]; 140 [label="Enter &&"];
150 [shape=box label="Enter when branch condition else"]; 141 [label="Access variable R|<local>/b|"];
151 [shape=box label="Exit when branch condition"]; 142 [label="Exit left part of &&"];
152 [shape=box label="Enter block"]; 143 [label="Const: Boolean(true)"];
153 [shape=box label="Exit block"]; 144 [label="Exit &&"];
154 [shape=box label="Exit when branch result"]; }
155 [shape=box label="Exit when"]; 145 [label="Exit when branch condition"];
156 [shape=box label="Exit block"]; }
157 [shape=box label="Exit function test_7" style="filled"]; subgraph cluster_53 {
color=blue
146 [label="Enter block"];
147 [label="Const: Int(1)"];
148 [label="Exit block"];
}
149 [label="Exit when branch result"];
subgraph cluster_54 {
color=blue
150 [label="Enter when branch condition else"];
151 [label="Exit when branch condition"];
}
subgraph cluster_55 {
color=blue
152 [label="Enter block"];
153 [label="Exit block"];
}
154 [label="Exit when branch result"];
155 [label="Exit when"];
}
156 [label="Exit block"];
}
157 [label="Exit function test_7" style="filled" fillcolor=red];
}
136 -> {137}; 136 -> {137};
137 -> {138}; 137 -> {138};
@@ -339,32 +496,54 @@ subgraph cluster_test_7 {
154 -> {155}; 154 -> {155};
155 -> {156}; 155 -> {156};
156 -> {157}; 156 -> {157};
}
subgraph cluster_test_8 { subgraph cluster_56 {
158 [shape=box label="Enter function test_8" style="filled"]; color=red
159 [shape=box label="Enter block"]; 158 [label="Enter function test_8" style="filled" fillcolor=red];
160 [shape=box label="Enter when"]; subgraph cluster_57 {
161 [shape=box label="Enter when branch condition "]; color=blue
162 [shape=box label="Enter &&"]; 159 [label="Enter block"];
163 [shape=box label="Const: Boolean(true)"]; subgraph cluster_58 {
164 [shape=box label="Exit left part of &&"]; color=blue
165 [shape=box label="Access variable R|<local>/b|"]; 160 [label="Enter when"];
166 [shape=box label="Stub[DEAD]"]; subgraph cluster_59 {
167 [shape=box label="Exit &&"]; color=blue
168 [shape=box label="Exit when branch condition"]; 161 [label="Enter when branch condition "];
169 [shape=box label="Enter block"]; subgraph cluster_60 {
170 [shape=box label="Const: Int(1)"]; color=blue
171 [shape=box label="Exit block"]; 162 [label="Enter &&"];
172 [shape=box label="Exit when branch result"]; 163 [label="Const: Boolean(true)"];
173 [shape=box label="Enter when branch condition else"]; 164 [label="Exit left part of &&"];
174 [shape=box label="Exit when branch condition"]; 165 [label="Access variable R|<local>/b|"];
175 [shape=box label="Enter block"]; 166 [label="Stub" style="filled" fillcolor=gray];
176 [shape=box label="Exit block"]; 167 [label="Exit &&"];
177 [shape=box label="Exit when branch result"]; }
178 [shape=box label="Exit when"]; 168 [label="Exit when branch condition"];
179 [shape=box label="Exit block"]; }
180 [shape=box label="Exit function test_8" style="filled"]; subgraph cluster_61 {
color=blue
169 [label="Enter block"];
170 [label="Const: Int(1)"];
171 [label="Exit block"];
}
172 [label="Exit when branch result"];
subgraph cluster_62 {
color=blue
173 [label="Enter when branch condition else"];
174 [label="Exit when branch condition"];
}
subgraph cluster_63 {
color=blue
175 [label="Enter block"];
176 [label="Exit block"];
}
177 [label="Exit when branch result"];
178 [label="Exit when"];
}
179 [label="Exit block"];
}
180 [label="Exit function test_8" style="filled" fillcolor=red];
}
158 -> {159}; 158 -> {159};
159 -> {160}; 159 -> {160};
@@ -389,6 +568,5 @@ subgraph cluster_test_8 {
177 -> {178}; 177 -> {178};
178 -> {179}; 178 -> {179};
179 -> {180}; 179 -> {180};
}
} }
+75 -45
View File
@@ -1,52 +1,83 @@
digraph complex_kt { digraph complex_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_fetchPluginReleaseDate { subgraph cluster_0 {
0 [shape=box label="Enter function fetchPluginReleaseDate" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function fetchPluginReleaseDate" style="filled" fillcolor=red];
2 [shape=box label="Const: String(https://plugins.jetbrains.com/api/plugins/)"]; subgraph cluster_1 {
3 [shape=box label="Access variable R|<local>/pluginId|"]; color=blue
4 [shape=box label="Access variable <Unresolved name: idString>#"]; 1 [label="Enter block"];
5 [shape=box label="Const: String(/updates?version=)"]; 2 [label="Const: String(https://plugins.jetbrains.com/api/plugins/)"];
6 [shape=box label="Access variable R|<local>/version|"]; 3 [label="Access variable R|<local>/pluginId|"];
7 [shape=box label="Variable declaration: lval url: R|kotlin/String|"]; 4 [label="Access variable <Unresolved name: idString>#"];
8 [shape=box label="Try expression enter"]; 5 [label="Const: String(/updates?version=)"];
9 [shape=box label="Try main block enter"]; 6 [label="Access variable R|<local>/version|"];
10 [shape=box label="Enter block"]; 7 [label="Variable declaration: lval url: R|kotlin/String|"];
11 [shape=box label="Access variable <Unresolved name: HttpRequests>#"]; subgraph cluster_2 {
12 [shape=box label="Access variable R|<local>/url|"]; color=blue
13 [shape=box label="Function call: <Unresolved name: HttpRequests>#.<Unresolved name: request>#(R|<local>/url|)"]; 8 [label="Try expression enter"];
14 [shape=box label="Function call: <Unresolved name: HttpRequests>#.<Unresolved name: request>#(R|<local>/url|).<Unresolved name: connect>#(<L> = connect@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> { subgraph cluster_3 {
color=blue
9 [label="Try main block enter"];
subgraph cluster_4 {
color=blue
10 [label="Enter block"];
11 [label="Access variable <Unresolved name: HttpRequests>#"];
12 [label="Access variable R|<local>/url|"];
13 [label="Function call: <Unresolved name: HttpRequests>#.<Unresolved name: request>#(R|<local>/url|)"];
14 [label="Function call: <Unresolved name: HttpRequests>#.<Unresolved name: request>#(R|<local>/url|).<Unresolved name: connect>#(<L> = connect@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
GsonBuilder#().create#().fromJson#(it#.inputStream#.reader#(), <getClass>(Array#<R|class error: Symbol not found, for `PluginDTO`|>()).java#) GsonBuilder#().create#().fromJson#(it#.inputStream#.reader#(), <getClass>(Array#<R|class error: Symbol not found, for `PluginDTO`|>()).java#)
} }
)"]; )"];
15 [shape=box label="Exit block"]; 15 [label="Exit block"];
16 [shape=box label="Try main block exit"]; }
17 [shape=box label="Catch enter"]; 16 [label="Try main block exit"];
18 [shape=box label="Enter block"]; }
19 [shape=box label="Const: String(Can't parse json response)"]; subgraph cluster_5 {
20 [shape=box label="Access variable R|<local>/syntaxException|"]; color=blue
21 [shape=box label="Function call: <Unresolved name: ResponseParseException>#(String(Can't parse json response), R|<local>/syntaxException|)"]; 17 [label="Catch enter"];
22 [shape=box label="Throw: throw <Unresolved name: ResponseParseException>#(String(Can't parse json response), R|<local>/syntaxException|)"]; subgraph cluster_6 {
23 [shape=box label="Stub[DEAD]"]; color=blue
24 [shape=box label="Exit block[DEAD]"]; 18 [label="Enter block"];
25 [shape=box label="Catch exit[DEAD]"]; 19 [label="Const: String(Can't parse json response)"];
26 [shape=box label="Catch enter"]; 20 [label="Access variable R|<local>/syntaxException|"];
27 [shape=box label="Enter block"]; 21 [label="Function call: <Unresolved name: ResponseParseException>#(String(Can't parse json response), R|<local>/syntaxException|)"];
28 [shape=box label="Access variable R|<local>/ioException|"]; 22 [label="Throw: throw <Unresolved name: ResponseParseException>#(String(Can't parse json response), R|<local>/syntaxException|)"];
29 [shape=box label="Function call: <Unresolved name: IOException>#(R|<local>/ioException|)"]; 23 [label="Stub" style="filled" fillcolor=gray];
30 [shape=box label="Throw: throw <Unresolved name: IOException>#(R|<local>/ioException|)"]; 24 [label="Exit block" style="filled" fillcolor=gray];
31 [shape=box label="Stub[DEAD]"]; }
32 [shape=box label="Exit block[DEAD]"]; 25 [label="Catch exit" style="filled" fillcolor=gray];
33 [shape=box label="Catch exit[DEAD]"]; }
34 [shape=box label="Try expression exit"]; subgraph cluster_7 {
35 [shape=box label="Variable declaration: lval pluginDTOs: R|kotlin/Array<class error: Symbol not found, for `PluginDTO`>|"]; color=blue
36 [shape=box label="Exit block"]; 26 [label="Catch enter"];
37 [shape=box label="Enter annotation"]; subgraph cluster_8 {
38 [shape=box label="Access variable <Unresolved name: IOException>#"]; color=blue
39 [shape=box label="Access variable <Unresolved name: ResponseParseException>#"]; 27 [label="Enter block"];
40 [shape=box label="Exit annotation"]; 28 [label="Access variable R|<local>/ioException|"];
41 [shape=box label="Exit function fetchPluginReleaseDate" style="filled"]; 29 [label="Function call: <Unresolved name: IOException>#(R|<local>/ioException|)"];
30 [label="Throw: throw <Unresolved name: IOException>#(R|<local>/ioException|)"];
31 [label="Stub" style="filled" fillcolor=gray];
32 [label="Exit block" style="filled" fillcolor=gray];
}
33 [label="Catch exit" style="filled" fillcolor=gray];
}
34 [label="Try expression exit"];
}
35 [label="Variable declaration: lval pluginDTOs: R|kotlin/Array<class error: Symbol not found, for `PluginDTO`>|"];
36 [label="Exit block"];
}
subgraph cluster_9 {
color=blue
37 [label="Enter annotation"];
38 [label="Access variable <Unresolved name: IOException>#"];
39 [label="Access variable <Unresolved name: ResponseParseException>#"];
40 [label="Exit annotation"];
}
41 [label="Exit function fetchPluginReleaseDate" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
@@ -91,6 +122,5 @@ subgraph cluster_fetchPluginReleaseDate {
38 -> {39}; 38 -> {39};
39 -> {40}; 39 -> {40};
40 -> {41}; 40 -> {41};
}
} }
+13 -9
View File
@@ -1,18 +1,22 @@
digraph initBlock_kt { digraph initBlock_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster__init_ { subgraph cluster_0 {
0 [shape=box label="Enter function <init>" style="filled"]; color=red
1 [shape=box label="Exit function <init>" style="filled"]; 0 [label="Enter function <init>" style="filled" fillcolor=red];
1 [label="Exit function <init>" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
}
subgraph cluster__init_ { subgraph cluster_1 {
2 [shape=box label="Enter function <init>" style="filled"]; color=red
3 [shape=box label="Exit function <init>" style="filled"]; 2 [label="Enter function <init>" style="filled" fillcolor=red];
3 [label="Exit function <init>" style="filled" fillcolor=red];
}
2 -> {3}; 2 -> {3};
}
} }
+266 -149
View File
@@ -1,33 +1,55 @@
digraph jumps_kt { digraph jumps_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_test_1 { subgraph cluster_0 {
0 [shape=box label="Enter function test_1" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function test_1" style="filled" fillcolor=red];
2 [shape=box label="Enter when"]; subgraph cluster_1 {
3 [shape=box label="Enter when branch condition "]; color=blue
4 [shape=box label="Access variable R|<local>/x|"]; 1 [label="Enter block"];
5 [shape=box label="Const: Null(null)"]; subgraph cluster_2 {
6 [shape=box label="Operator =="]; color=blue
7 [shape=box label="Exit when branch condition"]; 2 [label="Enter when"];
8 [shape=box label="Enter block"]; subgraph cluster_3 {
9 [shape=box label="Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"]; color=blue
10 [shape=box label="Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"]; 3 [label="Enter when branch condition "];
11 [shape=box label="Stub[DEAD]"]; 4 [label="Access variable R|<local>/x|"];
12 [shape=box label="Exit block[DEAD]"]; 5 [label="Const: Null(null)"];
13 [shape=box label="Exit when branch result[DEAD]"]; 6 [label="Operator =="];
14 [shape=box label="Enter when branch condition else"]; 7 [label="Exit when branch condition"];
15 [shape=box label="Exit when branch condition"]; }
16 [shape=box label="Enter block"]; subgraph cluster_4 {
17 [shape=box label="Access variable R|<local>/x|"]; color=blue
18 [shape=box label="Exit block"]; 8 [label="Enter block"];
19 [shape=box label="Exit when branch result"]; 9 [label="Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
20 [shape=box label="Exit when"]; 10 [label="Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
21 [shape=box label="Variable declaration: lval y: R|kotlin/Int|"]; 11 [label="Stub" style="filled" fillcolor=gray];
22 [shape=box label="Access variable R|<local>/y|"]; 12 [label="Exit block" style="filled" fillcolor=gray];
23 [shape=box label="Function call: R|<local>/y|.R|kotlin/Int.inc|()"]; }
24 [shape=box label="Exit block"]; 13 [label="Exit when branch result" style="filled" fillcolor=gray];
25 [shape=box label="Exit function test_1" style="filled"]; subgraph cluster_5 {
color=blue
14 [label="Enter when branch condition else"];
15 [label="Exit when branch condition"];
}
subgraph cluster_6 {
color=blue
16 [label="Enter block"];
17 [label="Access variable R|<local>/x|"];
18 [label="Exit block"];
}
19 [label="Exit when branch result"];
20 [label="Exit when"];
}
21 [label="Variable declaration: lval y: R|kotlin/Int|"];
22 [label="Access variable R|<local>/y|"];
23 [label="Function call: R|<local>/y|.R|kotlin/Int.inc|()"];
24 [label="Exit block"];
}
25 [label="Exit function test_1" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
@@ -55,33 +77,52 @@ subgraph cluster_test_1 {
22 -> {23}; 22 -> {23};
23 -> {24}; 23 -> {24};
24 -> {25}; 24 -> {25};
}
subgraph cluster_test_2 { subgraph cluster_7 {
26 [shape=box label="Enter function test_2" style="filled"]; color=red
27 [shape=box label="Enter block"]; 26 [label="Enter function test_2" style="filled" fillcolor=red];
28 [shape=box label="Enter when"]; subgraph cluster_8 {
29 [shape=box label="Enter when branch condition "]; color=blue
30 [shape=box label="Access variable R|<local>/x|"]; 27 [label="Enter block"];
31 [shape=box label="Const: Null(null)"]; subgraph cluster_9 {
32 [shape=box label="Operator =="]; color=blue
33 [shape=box label="Exit when branch condition"]; 28 [label="Enter when"];
34 [shape=box label="Enter block"]; subgraph cluster_10 {
35 [shape=box label="Access variable R|<local>/x|"]; color=blue
36 [shape=box label="Exit block"]; 29 [label="Enter when branch condition "];
37 [shape=box label="Exit when branch result"]; 30 [label="Access variable R|<local>/x|"];
38 [shape=box label="Enter when branch condition else"]; 31 [label="Const: Null(null)"];
39 [shape=box label="Exit when branch condition"]; 32 [label="Operator =="];
40 [shape=box label="Enter block"]; 33 [label="Exit when branch condition"];
41 [shape=box label="Access variable R|<local>/x|"]; }
42 [shape=box label="Exit block"]; subgraph cluster_11 {
43 [shape=box label="Exit when branch result"]; color=blue
44 [shape=box label="Exit when"]; 34 [label="Enter block"];
45 [shape=box label="Variable declaration: lval y: R|kotlin/Int?|"]; 35 [label="Access variable R|<local>/x|"];
46 [shape=box label="Access variable R|<local>/y|"]; 36 [label="Exit block"];
47 [shape=box label="Function call: R|<local>/y|.<Ambiguity: inc, [kotlin/inc, kotlin/inc]>#()"]; }
48 [shape=box label="Exit block"]; 37 [label="Exit when branch result"];
49 [shape=box label="Exit function test_2" style="filled"]; subgraph cluster_12 {
color=blue
38 [label="Enter when branch condition else"];
39 [label="Exit when branch condition"];
}
subgraph cluster_13 {
color=blue
40 [label="Enter block"];
41 [label="Access variable R|<local>/x|"];
42 [label="Exit block"];
}
43 [label="Exit when branch result"];
44 [label="Exit when"];
}
45 [label="Variable declaration: lval y: R|kotlin/Int?|"];
46 [label="Access variable R|<local>/y|"];
47 [label="Function call: R|<local>/y|.<Ambiguity: inc, [kotlin/inc, kotlin/inc]>#()"];
48 [label="Exit block"];
}
49 [label="Exit function test_2" style="filled" fillcolor=red];
}
26 -> {27}; 26 -> {27};
27 -> {28}; 27 -> {28};
@@ -106,29 +147,45 @@ subgraph cluster_test_2 {
46 -> {47}; 46 -> {47};
47 -> {48}; 47 -> {48};
48 -> {49}; 48 -> {49};
}
subgraph cluster_test_3 { subgraph cluster_14 {
50 [shape=box label="Enter function test_3" style="filled"]; color=red
51 [shape=box label="Enter block"]; 50 [label="Enter function test_3" style="filled" fillcolor=red];
52 [shape=box label="Enter while loop"]; subgraph cluster_15 {
53 [shape=box label="Enter loop condition"]; color=blue
54 [shape=box label="Const: Boolean(true)"]; 51 [label="Enter block"];
55 [shape=box label="Exit loop condition"]; subgraph cluster_16 {
56 [shape=box label="Enter loop block"]; color=blue
57 [shape=box label="Enter block"]; 52 [label="Enter while loop"];
58 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_17 {
59 [shape=box label="Type operator: x as Int"]; color=blue
60 [shape=box label="Jump: break@@@[Boolean(true)] "]; 53 [label="Enter loop condition"];
61 [shape=box label="Stub[DEAD]"]; 54 [label="Const: Boolean(true)"];
62 [shape=box label="Exit block[DEAD]"]; 55 [label="Exit loop condition"];
63 [shape=box label="Exit loop block[DEAD]"]; }
64 [shape=box label="Stub[DEAD]"]; subgraph cluster_18 {
65 [shape=box label="Exit whileloop"]; color=blue
66 [shape=box label="Access variable R|<local>/x|"]; 56 [label="Enter loop block"];
67 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; subgraph cluster_19 {
68 [shape=box label="Exit block"]; color=blue
69 [shape=box label="Exit function test_3" style="filled"]; 57 [label="Enter block"];
58 [label="Access variable R|<local>/x|"];
59 [label="Type operator: x as Int"];
60 [label="Jump: break@@@[Boolean(true)] "];
61 [label="Stub" style="filled" fillcolor=gray];
62 [label="Exit block" style="filled" fillcolor=gray];
}
63 [label="Exit loop block" style="filled" fillcolor=gray];
}
64 [label="Stub" style="filled" fillcolor=gray];
65 [label="Exit whileloop"];
}
66 [label="Access variable R|<local>/x|"];
67 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
68 [label="Exit block"];
}
69 [label="Exit function test_3" style="filled" fillcolor=red];
}
50 -> {51}; 50 -> {51};
51 -> {52}; 51 -> {52};
@@ -151,29 +208,45 @@ subgraph cluster_test_3 {
66 -> {67}; 66 -> {67};
67 -> {68}; 67 -> {68};
68 -> {69}; 68 -> {69};
}
subgraph cluster_test_4 { subgraph cluster_20 {
70 [shape=box label="Enter function test_4" style="filled"]; color=red
71 [shape=box label="Enter block"]; 70 [label="Enter function test_4" style="filled" fillcolor=red];
72 [shape=box label="Enter do-while loop"]; subgraph cluster_21 {
73 [shape=box label="Enter loop block"]; color=blue
74 [shape=box label="Enter block"]; 71 [label="Enter block"];
75 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_22 {
76 [shape=box label="Type operator: x as Int"]; color=blue
77 [shape=box label="Jump: break@@@[Boolean(true)] "]; 72 [label="Enter do-while loop"];
78 [shape=box label="Stub[DEAD]"]; subgraph cluster_23 {
79 [shape=box label="Exit block[DEAD]"]; color=blue
80 [shape=box label="Exit loop block[DEAD]"]; 73 [label="Enter loop block"];
81 [shape=box label="Enter loop condition[DEAD]"]; subgraph cluster_24 {
82 [shape=box label="Const: Boolean(true)[DEAD]"]; color=blue
83 [shape=box label="Exit loop condition[DEAD]"]; 74 [label="Enter block"];
84 [shape=box label="Stub[DEAD]"]; 75 [label="Access variable R|<local>/x|"];
85 [shape=box label="Exit do-whileloop"]; 76 [label="Type operator: x as Int"];
86 [shape=box label="Access variable R|<local>/x|"]; 77 [label="Jump: break@@@[Boolean(true)] "];
87 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; 78 [label="Stub" style="filled" fillcolor=gray];
88 [shape=box label="Exit block"]; 79 [label="Exit block" style="filled" fillcolor=gray];
89 [shape=box label="Exit function test_4" style="filled"]; }
80 [label="Exit loop block" style="filled" fillcolor=gray];
}
subgraph cluster_25 {
color=blue
81 [label="Enter loop condition" style="filled" fillcolor=gray];
82 [label="Const: Boolean(true)" style="filled" fillcolor=gray];
83 [label="Exit loop condition" style="filled" fillcolor=gray];
}
84 [label="Stub" style="filled" fillcolor=gray];
85 [label="Exit do-whileloop"];
}
86 [label="Access variable R|<local>/x|"];
87 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
88 [label="Exit block"];
}
89 [label="Exit function test_4" style="filled" fillcolor=red];
}
70 -> {71}; 70 -> {71};
71 -> {72}; 71 -> {72};
@@ -195,37 +268,68 @@ subgraph cluster_test_4 {
86 -> {87}; 86 -> {87};
87 -> {88}; 87 -> {88};
88 -> {89}; 88 -> {89};
}
subgraph cluster_test_5 { subgraph cluster_26 {
90 [shape=box label="Enter function test_5" style="filled"]; color=red
91 [shape=box label="Enter block"]; 90 [label="Enter function test_5" style="filled" fillcolor=red];
92 [shape=box label="Enter while loop"]; subgraph cluster_27 {
93 [shape=box label="Enter loop condition"]; color=blue
94 [shape=box label="Access variable R|<local>/b|"]; 91 [label="Enter block"];
95 [shape=box label="Exit loop condition"]; subgraph cluster_28 {
96 [shape=box label="Enter loop block"]; color=blue
97 [shape=box label="Enter block"]; 92 [label="Enter while loop"];
98 [shape=box label="Enter when"]; subgraph cluster_29 {
99 [shape=box label="Enter when branch condition "]; color=blue
100 [shape=box label="Access variable R|<local>/b|"]; 93 [label="Enter loop condition"];
101 [shape=box label="Exit when branch condition"]; 94 [label="Access variable R|<local>/b|"];
102 [shape=box label="Enter block"]; 95 [label="Exit loop condition"];
103 [shape=box label="Jump: continue@@@[R|<local>/b|] "]; }
104 [shape=box label="Stub[DEAD]"]; subgraph cluster_30 {
105 [shape=box label="Exit block[DEAD]"]; color=blue
106 [shape=box label="Exit when branch result[DEAD]"]; 96 [label="Enter loop block"];
107 [shape=box label="Enter when branch condition else"]; subgraph cluster_31 {
108 [shape=box label="Exit when branch condition"]; color=blue
109 [shape=box label="Enter block"]; 97 [label="Enter block"];
110 [shape=box label="Exit block"]; subgraph cluster_32 {
111 [shape=box label="Exit when branch result"]; color=blue
112 [shape=box label="Exit when"]; 98 [label="Enter when"];
113 [shape=box label="Exit block"]; subgraph cluster_33 {
114 [shape=box label="Exit loop block"]; color=blue
115 [shape=box label="Exit whileloop"]; 99 [label="Enter when branch condition "];
116 [shape=box label="Exit block"]; 100 [label="Access variable R|<local>/b|"];
117 [shape=box label="Exit function test_5" style="filled"]; 101 [label="Exit when branch condition"];
}
subgraph cluster_34 {
color=blue
102 [label="Enter block"];
103 [label="Jump: continue@@@[R|<local>/b|] "];
104 [label="Stub" style="filled" fillcolor=gray];
105 [label="Exit block" style="filled" fillcolor=gray];
}
106 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_35 {
color=blue
107 [label="Enter when branch condition else"];
108 [label="Exit when branch condition"];
}
subgraph cluster_36 {
color=blue
109 [label="Enter block"];
110 [label="Exit block"];
}
111 [label="Exit when branch result"];
112 [label="Exit when"];
}
113 [label="Exit block"];
}
114 [label="Exit loop block"];
}
115 [label="Exit whileloop"];
}
116 [label="Exit block"];
}
117 [label="Exit function test_5" style="filled" fillcolor=red];
}
90 -> {91}; 90 -> {91};
91 -> {92}; 91 -> {92};
@@ -255,36 +359,50 @@ subgraph cluster_test_5 {
114 -> {93}; 114 -> {93};
115 -> {116}; 115 -> {116};
116 -> {117}; 116 -> {117};
}
subgraph cluster_run { subgraph cluster_37 {
118 [shape=box label="Enter function run" style="filled"]; color=red
119 [shape=box label="Enter block"]; 118 [label="Enter function run" style="filled" fillcolor=red];
120 [shape=box label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"]; subgraph cluster_38 {
121 [shape=box label="Exit block"]; color=blue
122 [shape=box label="Exit function run" style="filled"]; 119 [label="Enter block"];
120 [label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
121 [label="Exit block"];
}
122 [label="Exit function run" style="filled" fillcolor=red];
}
118 -> {119}; 118 -> {119};
119 -> {120}; 119 -> {120};
120 -> {121}; 120 -> {121};
121 -> {122}; 121 -> {122};
}
subgraph cluster_test_6 { subgraph cluster_39 {
123 [shape=box label="Enter function test_6" style="filled"]; color=red
124 [shape=box label="Enter block"]; 123 [label="Enter function test_6" style="filled" fillcolor=red];
125 [shape=box label="Enter function anonymousFunction"]; subgraph cluster_40 {
126 [shape=box label="Enter block"]; color=blue
127 [shape=box label="Jump: ^@run Unit"]; 124 [label="Enter block"];
128 [shape=box label="Stub[DEAD]"]; subgraph cluster_41 {
129 [shape=box label="Exit block[DEAD]"]; color=blue
130 [shape=box label="Exit function anonymousFunction"]; 125 [label="Enter function anonymousFunction"];
131 [shape=box label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> { subgraph cluster_42 {
color=blue
126 [label="Enter block"];
127 [label="Jump: ^@run Unit"];
128 [label="Stub" style="filled" fillcolor=gray];
129 [label="Exit block" style="filled" fillcolor=gray];
}
130 [label="Exit function anonymousFunction"];
}
131 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
^@run Unit ^@run Unit
} }
)"]; )"];
132 [shape=box label="Exit block"]; 132 [label="Exit block"];
133 [shape=box label="Exit function test_6" style="filled"]; }
133 [label="Exit function test_6" style="filled" fillcolor=red];
}
123 -> {124}; 123 -> {124};
124 -> {125}; 124 -> {125};
@@ -297,6 +415,5 @@ subgraph cluster_test_6 {
130 -> {131}; 130 -> {131};
131 -> {132}; 131 -> {132};
132 -> {133}; 132 -> {133};
}
} }
+118 -64
View File
@@ -1,48 +1,80 @@
digraph lambdas_kt { digraph lambdas_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_run { subgraph cluster_0 {
0 [shape=box label="Enter function run" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function run" style="filled" fillcolor=red];
2 [shape=box label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"]; subgraph cluster_1 {
3 [shape=box label="Exit block"]; color=blue
4 [shape=box label="Exit function run" style="filled"]; 1 [label="Enter block"];
2 [label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
3 [label="Exit block"];
}
4 [label="Exit function run" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
2 -> {3}; 2 -> {3};
3 -> {4}; 3 -> {4};
}
subgraph cluster_test_1 { subgraph cluster_2 {
5 [shape=box label="Enter function test_1" style="filled"]; color=red
6 [shape=box label="Enter block"]; 5 [label="Enter function test_1" style="filled" fillcolor=red];
7 [shape=box label="Enter when"]; subgraph cluster_3 {
8 [shape=box label="Enter when branch condition "]; color=blue
9 [shape=box label="Access variable R|<local>/x|"]; 6 [label="Enter block"];
10 [shape=box label="Type operator: x is Int"]; subgraph cluster_4 {
11 [shape=box label="Exit when branch condition"]; color=blue
12 [shape=box label="Enter block"]; 7 [label="Enter when"];
13 [shape=box label="Enter function anonymousFunction"]; subgraph cluster_5 {
14 [shape=box label="Enter block"]; color=blue
15 [shape=box label="Access variable R|<local>/x|"]; 8 [label="Enter when branch condition "];
16 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; 9 [label="Access variable R|<local>/x|"];
17 [shape=box label="Exit block"]; 10 [label="Type operator: x is Int"];
18 [shape=box label="Exit function anonymousFunction"]; 11 [label="Exit when branch condition"];
19 [shape=box label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> { }
subgraph cluster_6 {
color=blue
12 [label="Enter block"];
subgraph cluster_7 {
color=blue
13 [label="Enter function anonymousFunction"];
subgraph cluster_8 {
color=blue
14 [label="Enter block"];
15 [label="Access variable R|<local>/x|"];
16 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
17 [label="Exit block"];
}
18 [label="Exit function anonymousFunction"];
}
19 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
R|<local>/x|.R|kotlin/Int.inc|() R|<local>/x|.R|kotlin/Int.inc|()
} }
)"]; )"];
20 [shape=box label="Exit block"]; 20 [label="Exit block"];
21 [shape=box label="Exit when branch result"]; }
22 [shape=box label="Enter when branch condition else"]; 21 [label="Exit when branch result"];
23 [shape=box label="Exit when branch condition"]; subgraph cluster_9 {
24 [shape=box label="Enter block"]; color=blue
25 [shape=box label="Exit block"]; 22 [label="Enter when branch condition else"];
26 [shape=box label="Exit when branch result"]; 23 [label="Exit when branch condition"];
27 [shape=box label="Exit when"]; }
28 [shape=box label="Exit block"]; subgraph cluster_10 {
29 [shape=box label="Exit function test_1" style="filled"]; color=blue
24 [label="Enter block"];
25 [label="Exit block"];
}
26 [label="Exit when branch result"];
27 [label="Exit when"];
}
28 [label="Exit block"];
}
29 [label="Exit function test_1" style="filled" fillcolor=red];
}
5 -> {6}; 5 -> {6};
6 -> {7}; 6 -> {7};
@@ -68,43 +100,66 @@ subgraph cluster_test_1 {
26 -> {27}; 26 -> {27};
27 -> {28}; 27 -> {28};
28 -> {29}; 28 -> {29};
}
subgraph cluster__anonymous_ { subgraph cluster_11 {
30 [shape=box label="Enter function anonymousFunction" style="filled"]; color=red
31 [shape=box label="Enter block"]; 30 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
32 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_12 {
33 [shape=box label="Function call: R|<local>/x|.<Ambiguity: inc, [kotlin/inc, kotlin/inc]>#()"]; color=blue
34 [shape=box label="Exit block"]; 31 [label="Enter block"];
35 [shape=box label="Exit function anonymousFunction" style="filled"]; 32 [label="Access variable R|<local>/x|"];
33 [label="Function call: R|<local>/x|.<Ambiguity: inc, [kotlin/inc, kotlin/inc]>#()"];
34 [label="Exit block"];
}
35 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
30 -> {31}; 30 -> {31};
31 -> {32}; 31 -> {32};
32 -> {33}; 32 -> {33};
33 -> {34}; 33 -> {34};
34 -> {35}; 34 -> {35};
}
subgraph cluster_test_2 { subgraph cluster_13 {
36 [shape=box label="Enter function test_2" style="filled"]; color=red
37 [shape=box label="Enter block"]; 36 [label="Enter function test_2" style="filled" fillcolor=red];
38 [shape=box label="Enter when"]; subgraph cluster_14 {
39 [shape=box label="Enter when branch condition "]; color=blue
40 [shape=box label="Access variable R|<local>/x|"]; 37 [label="Enter block"];
41 [shape=box label="Type operator: x is Int"]; subgraph cluster_15 {
42 [shape=box label="Exit when branch condition"]; color=blue
43 [shape=box label="Enter block"]; 38 [label="Enter when"];
44 [shape=box label="Variable declaration: lval lambda: R|kotlin/Function0<class error: Ambiguity: inc, [kotlin/inc, kotlin/inc]>|"]; subgraph cluster_16 {
45 [shape=box label="Exit block"]; color=blue
46 [shape=box label="Exit when branch result"]; 39 [label="Enter when branch condition "];
47 [shape=box label="Enter when branch condition else"]; 40 [label="Access variable R|<local>/x|"];
48 [shape=box label="Exit when branch condition"]; 41 [label="Type operator: x is Int"];
49 [shape=box label="Enter block"]; 42 [label="Exit when branch condition"];
50 [shape=box label="Exit block"]; }
51 [shape=box label="Exit when branch result"]; subgraph cluster_17 {
52 [shape=box label="Exit when"]; color=blue
53 [shape=box label="Exit block"]; 43 [label="Enter block"];
54 [shape=box label="Exit function test_2" style="filled"]; 44 [label="Variable declaration: lval lambda: R|kotlin/Function0<class error: Ambiguity: inc, [kotlin/inc, kotlin/inc]>|"];
45 [label="Exit block"];
}
46 [label="Exit when branch result"];
subgraph cluster_18 {
color=blue
47 [label="Enter when branch condition else"];
48 [label="Exit when branch condition"];
}
subgraph cluster_19 {
color=blue
49 [label="Enter block"];
50 [label="Exit block"];
}
51 [label="Exit when branch result"];
52 [label="Exit when"];
}
53 [label="Exit block"];
}
54 [label="Exit function test_2" style="filled" fillcolor=red];
}
36 -> {37}; 36 -> {37};
37 -> {38}; 37 -> {38};
@@ -124,6 +179,5 @@ subgraph cluster_test_2 {
51 -> {52}; 51 -> {52};
52 -> {53}; 52 -> {53};
53 -> {54}; 53 -> {54};
}
} }
+384 -208
View File
@@ -1,25 +1,44 @@
digraph loops_kt { digraph loops_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_testWhile { subgraph cluster_0 {
0 [shape=box label="Enter function testWhile" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function testWhile" style="filled" fillcolor=red];
2 [shape=box label="Enter while loop"]; subgraph cluster_1 {
3 [shape=box label="Enter loop condition"]; color=blue
4 [shape=box label="Access variable R|<local>/b|"]; 1 [label="Enter block"];
5 [shape=box label="Exit loop condition"]; subgraph cluster_2 {
6 [shape=box label="Enter loop block"]; color=blue
7 [shape=box label="Enter block"]; 2 [label="Enter while loop"];
8 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_3 {
9 [shape=box label="Type operator: x is String"]; color=blue
10 [shape=box label="Variable declaration: lval y: R|kotlin/Boolean|"]; 3 [label="Enter loop condition"];
11 [shape=box label="Exit block"]; 4 [label="Access variable R|<local>/b|"];
12 [shape=box label="Exit loop block"]; 5 [label="Exit loop condition"];
13 [shape=box label="Exit whileloop"]; }
14 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_4 {
15 [shape=box label="Type operator: x is String"]; color=blue
16 [shape=box label="Exit block"]; 6 [label="Enter loop block"];
17 [shape=box label="Exit function testWhile" style="filled"]; subgraph cluster_5 {
color=blue
7 [label="Enter block"];
8 [label="Access variable R|<local>/x|"];
9 [label="Type operator: x is String"];
10 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
11 [label="Exit block"];
}
12 [label="Exit loop block"];
}
13 [label="Exit whileloop"];
}
14 [label="Access variable R|<local>/x|"];
15 [label="Type operator: x is String"];
16 [label="Exit block"];
}
17 [label="Exit function testWhile" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
@@ -38,27 +57,43 @@ subgraph cluster_testWhile {
14 -> {15}; 14 -> {15};
15 -> {16}; 15 -> {16};
16 -> {17}; 16 -> {17};
}
subgraph cluster_testDoWhile { subgraph cluster_6 {
18 [shape=box label="Enter function testDoWhile" style="filled"]; color=red
19 [shape=box label="Enter block"]; 18 [label="Enter function testDoWhile" style="filled" fillcolor=red];
20 [shape=box label="Enter do-while loop"]; subgraph cluster_7 {
21 [shape=box label="Enter loop block"]; color=blue
22 [shape=box label="Enter block"]; 19 [label="Enter block"];
23 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_8 {
24 [shape=box label="Type operator: x is String"]; color=blue
25 [shape=box label="Variable declaration: lval y: R|kotlin/Boolean|"]; 20 [label="Enter do-while loop"];
26 [shape=box label="Exit block"]; subgraph cluster_9 {
27 [shape=box label="Exit loop block"]; color=blue
28 [shape=box label="Enter loop condition"]; 21 [label="Enter loop block"];
29 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_10 {
30 [shape=box label="Exit loop condition"]; color=blue
31 [shape=box label="Exit do-whileloop"]; 22 [label="Enter block"];
32 [shape=box label="Access variable R|<local>/x|"]; 23 [label="Access variable R|<local>/x|"];
33 [shape=box label="Type operator: x is String"]; 24 [label="Type operator: x is String"];
34 [shape=box label="Exit block"]; 25 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
35 [shape=box label="Exit function testDoWhile" style="filled"]; 26 [label="Exit block"];
}
27 [label="Exit loop block"];
}
subgraph cluster_11 {
color=blue
28 [label="Enter loop condition"];
29 [label="Access variable R|<local>/b|"];
30 [label="Exit loop condition"];
}
31 [label="Exit do-whileloop"];
}
32 [label="Access variable R|<local>/x|"];
33 [label="Type operator: x is String"];
34 [label="Exit block"];
}
35 [label="Exit function testDoWhile" style="filled" fillcolor=red];
}
18 -> {19}; 18 -> {19};
19 -> {20}; 19 -> {20};
@@ -77,38 +112,54 @@ subgraph cluster_testDoWhile {
32 -> {33}; 32 -> {33};
33 -> {34}; 33 -> {34};
34 -> {35}; 34 -> {35};
}
subgraph cluster_testFor { subgraph cluster_12 {
36 [shape=box label="Enter function testFor" style="filled"]; color=red
37 [shape=box label="Enter block"]; 36 [label="Enter function testFor" style="filled" fillcolor=red];
38 [shape=box label="Const: Int(0)"]; subgraph cluster_13 {
39 [shape=box label="Const: Int(5)"]; color=blue
40 [shape=box label="Function call: Int(0).R|kotlin/Int.rangeTo|(Int(5))"]; 37 [label="Enter block"];
41 [shape=box label="Variable declaration: lval <range>: R|kotlin/ranges/IntRange|"]; 38 [label="Const: Int(0)"];
42 [shape=box label="Access variable R|<local>/<range>|"]; 39 [label="Const: Int(5)"];
43 [shape=box label="Function call: R|<local>/<range>|.R|kotlin/ranges/IntProgression.iterator|()"]; 40 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(Int(5))"];
44 [shape=box label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"]; 41 [label="Variable declaration: lval <range>: R|kotlin/ranges/IntRange|"];
45 [shape=box label="Enter while loop"]; 42 [label="Access variable R|<local>/<range>|"];
46 [shape=box label="Enter loop condition"]; 43 [label="Function call: R|<local>/<range>|.R|kotlin/ranges/IntProgression.iterator|()"];
47 [shape=box label="Access variable R|<local>/<iterator>|"]; 44 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
48 [shape=box label="Function call: R|<local>/<iterator>|.R|FakeOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()"]; subgraph cluster_14 {
49 [shape=box label="Exit loop condition"]; color=blue
50 [shape=box label="Enter loop block"]; 45 [label="Enter while loop"];
51 [shape=box label="Enter block"]; subgraph cluster_15 {
52 [shape=box label="Access variable R|<local>/<iterator>|"]; color=blue
53 [shape=box label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"]; 46 [label="Enter loop condition"];
54 [shape=box label="Variable declaration: lval i: R|kotlin/Int|"]; 47 [label="Access variable R|<local>/<iterator>|"];
55 [shape=box label="Access variable R|<local>/x|"]; 48 [label="Function call: R|<local>/<iterator>|.R|FakeOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()"];
56 [shape=box label="Type operator: x is String"]; 49 [label="Exit loop condition"];
57 [shape=box label="Variable declaration: lval y: R|kotlin/Boolean|"]; }
58 [shape=box label="Exit block"]; subgraph cluster_16 {
59 [shape=box label="Exit loop block"]; color=blue
60 [shape=box label="Exit whileloop"]; 50 [label="Enter loop block"];
61 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_17 {
62 [shape=box label="Type operator: x is String"]; color=blue
63 [shape=box label="Exit block"]; 51 [label="Enter block"];
64 [shape=box label="Exit function testFor" style="filled"]; 52 [label="Access variable R|<local>/<iterator>|"];
53 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"];
54 [label="Variable declaration: lval i: R|kotlin/Int|"];
55 [label="Access variable R|<local>/x|"];
56 [label="Type operator: x is String"];
57 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
58 [label="Exit block"];
}
59 [label="Exit loop block"];
}
60 [label="Exit whileloop"];
}
61 [label="Access variable R|<local>/x|"];
62 [label="Type operator: x is String"];
63 [label="Exit block"];
}
64 [label="Exit function testFor" style="filled" fillcolor=red];
}
36 -> {37}; 36 -> {37};
37 -> {38}; 37 -> {38};
@@ -138,25 +189,41 @@ subgraph cluster_testFor {
61 -> {62}; 61 -> {62};
62 -> {63}; 62 -> {63};
63 -> {64}; 63 -> {64};
}
subgraph cluster_testWhileTrue { subgraph cluster_18 {
65 [shape=box label="Enter function testWhileTrue" style="filled"]; color=red
66 [shape=box label="Enter block"]; 65 [label="Enter function testWhileTrue" style="filled" fillcolor=red];
67 [shape=box label="Enter while loop"]; subgraph cluster_19 {
68 [shape=box label="Enter loop condition"]; color=blue
69 [shape=box label="Const: Boolean(true)"]; 66 [label="Enter block"];
70 [shape=box label="Exit loop condition"]; subgraph cluster_20 {
71 [shape=box label="Enter loop block"]; color=blue
72 [shape=box label="Enter block"]; 67 [label="Enter while loop"];
73 [shape=box label="Const: Int(1)"]; subgraph cluster_21 {
74 [shape=box label="Exit block"]; color=blue
75 [shape=box label="Exit loop block"]; 68 [label="Enter loop condition"];
76 [shape=box label="Stub[DEAD]"]; 69 [label="Const: Boolean(true)"];
77 [shape=box label="Exit whileloop[DEAD]"]; 70 [label="Exit loop condition"];
78 [shape=box label="Const: Int(1)[DEAD]"]; }
79 [shape=box label="Exit block[DEAD]"]; subgraph cluster_22 {
80 [shape=box label="Exit function testWhileTrue[DEAD]" style="filled"]; color=blue
71 [label="Enter loop block"];
subgraph cluster_23 {
color=blue
72 [label="Enter block"];
73 [label="Const: Int(1)"];
74 [label="Exit block"];
}
75 [label="Exit loop block"];
}
76 [label="Stub" style="filled" fillcolor=gray];
77 [label="Exit whileloop" style="filled" fillcolor=gray];
}
78 [label="Const: Int(1)" style="filled" fillcolor=gray];
79 [label="Exit block" style="filled" fillcolor=gray];
}
80 [label="Exit function testWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
}
65 -> {66}; 65 -> {66};
66 -> {67}; 66 -> {67};
@@ -174,39 +241,70 @@ subgraph cluster_testWhileTrue {
77 -> {78} [style=dotted]; 77 -> {78} [style=dotted];
78 -> {79} [style=dotted]; 78 -> {79} [style=dotted];
79 -> {80} [style=dotted]; 79 -> {80} [style=dotted];
}
subgraph cluster_testWhileTrueWithBreak { subgraph cluster_24 {
81 [shape=box label="Enter function testWhileTrueWithBreak" style="filled"]; color=red
82 [shape=box label="Enter block"]; 81 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red];
83 [shape=box label="Enter while loop"]; subgraph cluster_25 {
84 [shape=box label="Enter loop condition"]; color=blue
85 [shape=box label="Const: Boolean(true)"]; 82 [label="Enter block"];
86 [shape=box label="Exit loop condition"]; subgraph cluster_26 {
87 [shape=box label="Enter loop block"]; color=blue
88 [shape=box label="Enter block"]; 83 [label="Enter while loop"];
89 [shape=box label="Enter when"]; subgraph cluster_27 {
90 [shape=box label="Enter when branch condition "]; color=blue
91 [shape=box label="Access variable R|<local>/b|"]; 84 [label="Enter loop condition"];
92 [shape=box label="Exit when branch condition"]; 85 [label="Const: Boolean(true)"];
93 [shape=box label="Enter block"]; 86 [label="Exit loop condition"];
94 [shape=box label="Jump: break@@@[Boolean(true)] "]; }
95 [shape=box label="Stub[DEAD]"]; subgraph cluster_28 {
96 [shape=box label="Exit block[DEAD]"]; color=blue
97 [shape=box label="Exit when branch result[DEAD]"]; 87 [label="Enter loop block"];
98 [shape=box label="Enter when branch condition else"]; subgraph cluster_29 {
99 [shape=box label="Exit when branch condition"]; color=blue
100 [shape=box label="Enter block"]; 88 [label="Enter block"];
101 [shape=box label="Exit block"]; subgraph cluster_30 {
102 [shape=box label="Exit when branch result"]; color=blue
103 [shape=box label="Exit when"]; 89 [label="Enter when"];
104 [shape=box label="Exit block"]; subgraph cluster_31 {
105 [shape=box label="Exit loop block"]; color=blue
106 [shape=box label="Stub[DEAD]"]; 90 [label="Enter when branch condition "];
107 [shape=box label="Exit whileloop"]; 91 [label="Access variable R|<local>/b|"];
108 [shape=box label="Const: Int(1)"]; 92 [label="Exit when branch condition"];
109 [shape=box label="Exit block"]; }
110 [shape=box label="Exit function testWhileTrueWithBreak" style="filled"]; subgraph cluster_32 {
color=blue
93 [label="Enter block"];
94 [label="Jump: break@@@[Boolean(true)] "];
95 [label="Stub" style="filled" fillcolor=gray];
96 [label="Exit block" style="filled" fillcolor=gray];
}
97 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_33 {
color=blue
98 [label="Enter when branch condition else"];
99 [label="Exit when branch condition"];
}
subgraph cluster_34 {
color=blue
100 [label="Enter block"];
101 [label="Exit block"];
}
102 [label="Exit when branch result"];
103 [label="Exit when"];
}
104 [label="Exit block"];
}
105 [label="Exit loop block"];
}
106 [label="Stub" style="filled" fillcolor=gray];
107 [label="Exit whileloop"];
}
108 [label="Const: Int(1)"];
109 [label="Exit block"];
}
110 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red];
}
81 -> {82}; 81 -> {82};
82 -> {83}; 82 -> {83};
@@ -239,25 +337,41 @@ subgraph cluster_testWhileTrueWithBreak {
107 -> {108}; 107 -> {108};
108 -> {109}; 108 -> {109};
109 -> {110}; 109 -> {110};
}
subgraph cluster_testWhileFalse { subgraph cluster_35 {
111 [shape=box label="Enter function testWhileFalse" style="filled"]; color=red
112 [shape=box label="Enter block"]; 111 [label="Enter function testWhileFalse" style="filled" fillcolor=red];
113 [shape=box label="Enter while loop"]; subgraph cluster_36 {
114 [shape=box label="Enter loop condition"]; color=blue
115 [shape=box label="Const: Boolean(false)"]; 112 [label="Enter block"];
116 [shape=box label="Exit loop condition"]; subgraph cluster_37 {
117 [shape=box label="Stub[DEAD]"]; color=blue
118 [shape=box label="Enter loop block[DEAD]"]; 113 [label="Enter while loop"];
119 [shape=box label="Enter block[DEAD]"]; subgraph cluster_38 {
120 [shape=box label="Const: Int(1)[DEAD]"]; color=blue
121 [shape=box label="Exit block[DEAD]"]; 114 [label="Enter loop condition"];
122 [shape=box label="Exit loop block[DEAD]"]; 115 [label="Const: Boolean(false)"];
123 [shape=box label="Exit whileloop"]; 116 [label="Exit loop condition"];
124 [shape=box label="Const: Int(1)"]; }
125 [shape=box label="Exit block"]; 117 [label="Stub" style="filled" fillcolor=gray];
126 [shape=box label="Exit function testWhileFalse" style="filled"]; subgraph cluster_39 {
color=blue
118 [label="Enter loop block" style="filled" fillcolor=gray];
subgraph cluster_40 {
color=blue
119 [label="Enter block" style="filled" fillcolor=gray];
120 [label="Const: Int(1)" style="filled" fillcolor=gray];
121 [label="Exit block" style="filled" fillcolor=gray];
}
122 [label="Exit loop block" style="filled" fillcolor=gray];
}
123 [label="Exit whileloop"];
}
124 [label="Const: Int(1)"];
125 [label="Exit block"];
}
126 [label="Exit function testWhileFalse" style="filled" fillcolor=red];
}
111 -> {112}; 111 -> {112};
112 -> {113}; 112 -> {113};
@@ -275,25 +389,41 @@ subgraph cluster_testWhileFalse {
123 -> {124}; 123 -> {124};
124 -> {125}; 124 -> {125};
125 -> {126}; 125 -> {126};
}
subgraph cluster_testDoWhileTrue { subgraph cluster_41 {
127 [shape=box label="Enter function testDoWhileTrue" style="filled"]; color=red
128 [shape=box label="Enter block"]; 127 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red];
129 [shape=box label="Enter do-while loop"]; subgraph cluster_42 {
130 [shape=box label="Enter loop block"]; color=blue
131 [shape=box label="Enter block"]; 128 [label="Enter block"];
132 [shape=box label="Const: Int(1)"]; subgraph cluster_43 {
133 [shape=box label="Exit block"]; color=blue
134 [shape=box label="Exit loop block"]; 129 [label="Enter do-while loop"];
135 [shape=box label="Enter loop condition"]; subgraph cluster_44 {
136 [shape=box label="Const: Boolean(true)"]; color=blue
137 [shape=box label="Exit loop condition"]; 130 [label="Enter loop block"];
138 [shape=box label="Stub[DEAD]"]; subgraph cluster_45 {
139 [shape=box label="Exit do-whileloop[DEAD]"]; color=blue
140 [shape=box label="Const: Int(1)[DEAD]"]; 131 [label="Enter block"];
141 [shape=box label="Exit block[DEAD]"]; 132 [label="Const: Int(1)"];
142 [shape=box label="Exit function testDoWhileTrue[DEAD]" style="filled"]; 133 [label="Exit block"];
}
134 [label="Exit loop block"];
}
subgraph cluster_46 {
color=blue
135 [label="Enter loop condition"];
136 [label="Const: Boolean(true)"];
137 [label="Exit loop condition"];
}
138 [label="Stub" style="filled" fillcolor=gray];
139 [label="Exit do-whileloop" style="filled" fillcolor=gray];
}
140 [label="Const: Int(1)" style="filled" fillcolor=gray];
141 [label="Exit block" style="filled" fillcolor=gray];
}
142 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
}
127 -> {128}; 127 -> {128};
128 -> {129}; 128 -> {129};
@@ -311,39 +441,70 @@ subgraph cluster_testDoWhileTrue {
139 -> {140} [style=dotted]; 139 -> {140} [style=dotted];
140 -> {141} [style=dotted]; 140 -> {141} [style=dotted];
141 -> {142} [style=dotted]; 141 -> {142} [style=dotted];
}
subgraph cluster_testDoWhileTrueWithBreak { subgraph cluster_47 {
143 [shape=box label="Enter function testDoWhileTrueWithBreak" style="filled"]; color=red
144 [shape=box label="Enter block"]; 143 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
145 [shape=box label="Enter do-while loop"]; subgraph cluster_48 {
146 [shape=box label="Enter loop block"]; color=blue
147 [shape=box label="Enter block"]; 144 [label="Enter block"];
148 [shape=box label="Enter when"]; subgraph cluster_49 {
149 [shape=box label="Enter when branch condition "]; color=blue
150 [shape=box label="Access variable R|<local>/b|"]; 145 [label="Enter do-while loop"];
151 [shape=box label="Exit when branch condition"]; subgraph cluster_50 {
152 [shape=box label="Enter block"]; color=blue
153 [shape=box label="Jump: break@@@[Boolean(true)] "]; 146 [label="Enter loop block"];
154 [shape=box label="Stub[DEAD]"]; subgraph cluster_51 {
155 [shape=box label="Exit block[DEAD]"]; color=blue
156 [shape=box label="Exit when branch result[DEAD]"]; 147 [label="Enter block"];
157 [shape=box label="Enter when branch condition else"]; subgraph cluster_52 {
158 [shape=box label="Exit when branch condition"]; color=blue
159 [shape=box label="Enter block"]; 148 [label="Enter when"];
160 [shape=box label="Exit block"]; subgraph cluster_53 {
161 [shape=box label="Exit when branch result"]; color=blue
162 [shape=box label="Exit when"]; 149 [label="Enter when branch condition "];
163 [shape=box label="Exit block"]; 150 [label="Access variable R|<local>/b|"];
164 [shape=box label="Exit loop block"]; 151 [label="Exit when branch condition"];
165 [shape=box label="Enter loop condition"]; }
166 [shape=box label="Const: Boolean(true)"]; subgraph cluster_54 {
167 [shape=box label="Exit loop condition"]; color=blue
168 [shape=box label="Stub[DEAD]"]; 152 [label="Enter block"];
169 [shape=box label="Exit do-whileloop"]; 153 [label="Jump: break@@@[Boolean(true)] "];
170 [shape=box label="Const: Int(1)"]; 154 [label="Stub" style="filled" fillcolor=gray];
171 [shape=box label="Exit block"]; 155 [label="Exit block" style="filled" fillcolor=gray];
172 [shape=box label="Exit function testDoWhileTrueWithBreak" style="filled"]; }
156 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_55 {
color=blue
157 [label="Enter when branch condition else"];
158 [label="Exit when branch condition"];
}
subgraph cluster_56 {
color=blue
159 [label="Enter block"];
160 [label="Exit block"];
}
161 [label="Exit when branch result"];
162 [label="Exit when"];
}
163 [label="Exit block"];
}
164 [label="Exit loop block"];
}
subgraph cluster_57 {
color=blue
165 [label="Enter loop condition"];
166 [label="Const: Boolean(true)"];
167 [label="Exit loop condition"];
}
168 [label="Stub" style="filled" fillcolor=gray];
169 [label="Exit do-whileloop"];
}
170 [label="Const: Int(1)"];
171 [label="Exit block"];
}
172 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
}
143 -> {144}; 143 -> {144};
144 -> {145}; 144 -> {145};
@@ -376,25 +537,41 @@ subgraph cluster_testDoWhileTrueWithBreak {
169 -> {170}; 169 -> {170};
170 -> {171}; 170 -> {171};
171 -> {172}; 171 -> {172};
}
subgraph cluster_testDoWhileFalse { subgraph cluster_58 {
173 [shape=box label="Enter function testDoWhileFalse" style="filled"]; color=red
174 [shape=box label="Enter block"]; 173 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red];
175 [shape=box label="Enter do-while loop"]; subgraph cluster_59 {
176 [shape=box label="Enter loop block"]; color=blue
177 [shape=box label="Enter block"]; 174 [label="Enter block"];
178 [shape=box label="Const: Int(1)"]; subgraph cluster_60 {
179 [shape=box label="Exit block"]; color=blue
180 [shape=box label="Exit loop block"]; 175 [label="Enter do-while loop"];
181 [shape=box label="Enter loop condition"]; subgraph cluster_61 {
182 [shape=box label="Const: Boolean(false)"]; color=blue
183 [shape=box label="Exit loop condition"]; 176 [label="Enter loop block"];
184 [shape=box label="Exit do-whileloop"]; subgraph cluster_62 {
185 [shape=box label="Const: Int(1)"]; color=blue
186 [shape=box label="Exit block"]; 177 [label="Enter block"];
187 [shape=box label="Exit function testDoWhileFalse" style="filled"]; 178 [label="Const: Int(1)"];
188 [shape=box label="Stub[DEAD]"]; 179 [label="Exit block"];
}
180 [label="Exit loop block"];
}
subgraph cluster_63 {
color=blue
181 [label="Enter loop condition"];
182 [label="Const: Boolean(false)"];
183 [label="Exit loop condition"];
}
184 [label="Exit do-whileloop"];
}
185 [label="Const: Int(1)"];
186 [label="Exit block"];
}
187 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red];
}
188 [label="Stub" style="filled" fillcolor=gray];
173 -> {174}; 173 -> {174};
174 -> {175}; 174 -> {175};
@@ -412,6 +589,5 @@ subgraph cluster_testDoWhileFalse {
185 -> {186}; 185 -> {186};
186 -> {187}; 186 -> {187};
188 -> {176} [style=dotted]; 188 -> {176} [style=dotted];
}
} }
@@ -1,36 +1,48 @@
digraph propertiesAndInitBlocks_kt { digraph propertiesAndInitBlocks_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_run { subgraph cluster_0 {
0 [shape=box label="Enter function run" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function run" style="filled" fillcolor=red];
2 [shape=box label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"]; subgraph cluster_1 {
3 [shape=box label="Exit block"]; color=blue
4 [shape=box label="Exit function run" style="filled"]; 1 [label="Enter block"];
2 [label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
3 [label="Exit block"];
}
4 [label="Exit function run" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
2 -> {3}; 2 -> {3};
3 -> {4}; 3 -> {4};
}
subgraph cluster_val_x1 { subgraph cluster_2 {
5 [shape=box label="Enter property" style="filled"]; color=red
6 [shape=box label="Const: Int(1)"]; 5 [label="Enter property" style="filled" fillcolor=red];
7 [shape=box label="Exit property" style="filled"]; 6 [label="Const: Int(1)"];
7 [label="Exit property" style="filled" fillcolor=red];
}
5 -> {6}; 5 -> {6};
6 -> {7}; 6 -> {7};
}
subgraph cluster__getter_ { subgraph cluster_3 {
8 [shape=box label="Enter function getter" style="filled"]; color=red
9 [shape=box label="Enter block"]; 8 [label="Enter function getter" style="filled" fillcolor=red];
10 [shape=box label="Const: Int(1)"]; subgraph cluster_4 {
11 [shape=box label="Jump: ^ Int(1)"]; color=blue
12 [shape=box label="Stub[DEAD]"]; 9 [label="Enter block"];
13 [shape=box label="Exit block[DEAD]"]; 10 [label="Const: Int(1)"];
14 [shape=box label="Exit function getter" style="filled"]; 11 [label="Jump: ^ Int(1)"];
12 [label="Stub" style="filled" fillcolor=gray];
13 [label="Exit block" style="filled" fillcolor=gray];
}
14 [label="Exit function getter" style="filled" fillcolor=red];
}
8 -> {9}; 8 -> {9};
9 -> {10}; 9 -> {10};
@@ -39,44 +51,53 @@ subgraph cluster__getter_ {
11 -> {12} [style=dotted]; 11 -> {12} [style=dotted];
12 -> {13} [style=dotted]; 12 -> {13} [style=dotted];
13 -> {14} [style=dotted]; 13 -> {14} [style=dotted];
}
subgraph cluster__setter_ { subgraph cluster_5 {
15 [shape=box label="Enter function setter" style="filled"]; color=red
16 [shape=box label="Enter block"]; 15 [label="Enter function setter" style="filled" fillcolor=red];
17 [shape=box label="Const: Int(1)"]; subgraph cluster_6 {
18 [shape=box label="Assignmenet: F|/x2|"]; color=blue
19 [shape=box label="Exit block"]; 16 [label="Enter block"];
20 [shape=box label="Exit function setter" style="filled"]; 17 [label="Const: Int(1)"];
18 [label="Assignmenet: F|/x2|"];
19 [label="Exit block"];
}
20 [label="Exit function setter" style="filled" fillcolor=red];
}
15 -> {16}; 15 -> {16};
16 -> {17}; 16 -> {17};
17 -> {18}; 17 -> {18};
18 -> {19}; 18 -> {19};
19 -> {20}; 19 -> {20};
}
subgraph cluster_val_x2 { subgraph cluster_7 {
21 [shape=box label="Enter property" style="filled"]; color=red
22 [shape=box label="Const: Int(1)"]; 21 [label="Enter property" style="filled" fillcolor=red];
23 [shape=box label="Exit property" style="filled"]; 22 [label="Const: Int(1)"];
23 [label="Exit property" style="filled" fillcolor=red];
}
21 -> {22}; 21 -> {22};
22 -> {23}; 22 -> {23};
}
subgraph cluster_foo { subgraph cluster_8 {
24 [shape=box label="Enter function foo" style="filled"]; color=red
25 [shape=box label="Enter block"]; 24 [label="Enter function foo" style="filled" fillcolor=red];
26 [shape=box label="Const: Int(1)"]; subgraph cluster_9 {
27 [shape=box label="Const: Int(1)"]; color=blue
28 [shape=box label="Function call: Int(1).R|kotlin/Int.plus|(Int(1))"]; 25 [label="Enter block"];
29 [shape=box label="Variable declaration: lval c: R|kotlin/Int|"]; 26 [label="Const: Int(1)"];
30 [shape=box label="Function call: <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"]; 27 [label="Const: Int(1)"];
31 [shape=box label="Throw: throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"]; 28 [label="Function call: Int(1).R|kotlin/Int.plus|(Int(1))"];
32 [shape=box label="Stub[DEAD]"]; 29 [label="Variable declaration: lval c: R|kotlin/Int|"];
33 [shape=box label="Exit block[DEAD]"]; 30 [label="Function call: <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"];
34 [shape=box label="Exit function foo" style="filled"]; 31 [label="Throw: throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"];
32 [label="Stub" style="filled" fillcolor=gray];
33 [label="Exit block" style="filled" fillcolor=gray];
}
34 [label="Exit function foo" style="filled" fillcolor=red];
}
24 -> {25}; 24 -> {25};
25 -> {26}; 25 -> {26};
@@ -89,27 +110,38 @@ subgraph cluster_foo {
31 -> {32} [style=dotted]; 31 -> {32} [style=dotted];
32 -> {33} [style=dotted]; 32 -> {33} [style=dotted];
33 -> {34} [style=dotted]; 33 -> {34} [style=dotted];
}
subgraph cluster__init_ { subgraph cluster_10 {
35 [shape=box label="Enter function <init>" style="filled"]; color=red
36 [shape=box label="Exit function <init>" style="filled"]; 35 [label="Enter function <init>" style="filled" fillcolor=red];
36 [label="Exit function <init>" style="filled" fillcolor=red];
}
35 -> {36}; 35 -> {36};
}
subgraph cluster__getter_ { subgraph cluster_11 {
37 [shape=box label="Enter init block"]; color=red
38 [shape=box label="Enter block"]; 37 [label="Enter init block"];
39 [shape=box label="Function call: <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"]; subgraph cluster_12 {
40 [shape=box label="Throw: throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"]; color=blue
41 [shape=box label="Stub[DEAD]"]; 38 [label="Enter block"];
42 [shape=box label="Exit block[DEAD]"]; 39 [label="Function call: <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"];
43 [shape=box label="Exit init block"]; 40 [label="Throw: throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"];
44 [shape=box label="Enter function getter" style="filled"]; 41 [label="Stub" style="filled" fillcolor=gray];
45 [shape=box label="Enter block"]; 42 [label="Exit block" style="filled" fillcolor=gray];
46 [shape=box label="Exit block"]; }
47 [shape=box label="Exit function getter" style="filled"]; 43 [label="Exit init block"];
}
subgraph cluster_13 {
color=blue
44 [label="Enter function getter" style="filled" fillcolor=red];
subgraph cluster_14 {
color=blue
45 [label="Enter block"];
46 [label="Exit block"];
}
47 [label="Exit function getter" style="filled" fillcolor=red];
}
37 -> {38}; 37 -> {38};
38 -> {39}; 38 -> {39};
@@ -121,33 +153,46 @@ subgraph cluster__getter_ {
44 -> {45}; 44 -> {45};
45 -> {46}; 45 -> {46};
46 -> {47}; 46 -> {47};
}
subgraph cluster__init_ { subgraph cluster_15 {
48 [shape=box label="Enter function <init>" style="filled"]; color=red
49 [shape=box label="Exit function <init>" style="filled"]; 48 [label="Enter function <init>" style="filled" fillcolor=red];
49 [label="Exit function <init>" style="filled" fillcolor=red];
}
48 -> {49}; 48 -> {49};
}
subgraph cluster_val_x3 { subgraph cluster_16 {
50 [shape=box label="Enter init block"]; color=red
51 [shape=box label="Enter block"]; 50 [label="Enter init block"];
52 [shape=box label="Function call: <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"]; subgraph cluster_17 {
53 [shape=box label="Throw: throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"]; color=blue
54 [shape=box label="Stub[DEAD]"]; 51 [label="Enter block"];
55 [shape=box label="Const: Int(1)[DEAD]"]; 52 [label="Function call: <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"];
56 [shape=box label="Exit block[DEAD]"]; 53 [label="Throw: throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"];
57 [shape=box label="Exit init block"]; 54 [label="Stub" style="filled" fillcolor=gray];
58 [shape=box label="Enter property" style="filled"]; 55 [label="Const: Int(1)" style="filled" fillcolor=gray];
59 [shape=box label="Enter function anonymousFunction"]; 56 [label="Exit block" style="filled" fillcolor=gray];
60 [shape=box label="Enter block"]; }
61 [shape=box label="Function call: <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"]; 57 [label="Exit init block"];
62 [shape=box label="Throw: throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"]; }
63 [shape=box label="Stub[DEAD]"]; subgraph cluster_18 {
64 [shape=box label="Exit block[DEAD]"]; color=blue
65 [shape=box label="Exit function anonymousFunction[DEAD]"]; 58 [label="Enter property" style="filled" fillcolor=red];
66 [shape=box label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> { subgraph cluster_19 {
color=blue
59 [label="Enter function anonymousFunction"];
subgraph cluster_20 {
color=blue
60 [label="Enter block"];
61 [label="Function call: <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"];
62 [label="Throw: throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()"];
63 [label="Stub" style="filled" fillcolor=gray];
64 [label="Exit block" style="filled" fillcolor=gray];
}
65 [label="Exit function anonymousFunction" style="filled" fillcolor=gray];
}
66 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
local final fun foo(): R|kotlin/Unit| { local final fun foo(): R|kotlin/Unit| {
lval c: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(1)) lval c: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(1))
throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#() throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()
@@ -167,8 +212,9 @@ subgraph cluster_val_x3 {
throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#() throw <Ambiguity: Exception, [java/lang/Exception.Exception, java/lang/Exception.Exception]>#()
} }
)[DEAD]"]; )" style="filled" fillcolor=gray];
67 [shape=box label="Exit property" style="filled"]; 67 [label="Exit property" style="filled" fillcolor=red];
}
50 -> {51}; 50 -> {51};
51 -> {52}; 51 -> {52};
@@ -188,28 +234,50 @@ subgraph cluster_val_x3 {
64 -> {65} [style=dotted]; 64 -> {65} [style=dotted];
65 -> {66} [style=dotted]; 65 -> {66} [style=dotted];
66 -> {67} [style=dotted]; 66 -> {67} [style=dotted];
}
subgraph cluster_val_x4 { subgraph cluster_21 {
68 [shape=box label="Enter property" style="filled"]; color=red
69 [shape=box label="Try expression enter"]; 68 [label="Enter property" style="filled" fillcolor=red];
70 [shape=box label="Try main block enter"]; subgraph cluster_22 {
71 [shape=box label="Enter block"]; color=blue
72 [shape=box label="Const: Int(1)"]; 69 [label="Try expression enter"];
73 [shape=box label="Exit block"]; subgraph cluster_23 {
74 [shape=box label="Try main block exit"]; color=blue
75 [shape=box label="Enter finally"]; 70 [label="Try main block enter"];
76 [shape=box label="Enter block"]; subgraph cluster_24 {
77 [shape=box label="Const: Int(0)"]; color=blue
78 [shape=box label="Exit block"]; 71 [label="Enter block"];
79 [shape=box label="Exit finally"]; 72 [label="Const: Int(1)"];
80 [shape=box label="Catch enter"]; 73 [label="Exit block"];
81 [shape=box label="Enter block"]; }
82 [shape=box label="Const: Int(2)"]; 74 [label="Try main block exit"];
83 [shape=box label="Exit block"]; }
84 [shape=box label="Catch exit"]; subgraph cluster_25 {
85 [shape=box label="Try expression exit"]; color=blue
86 [shape=box label="Exit property" style="filled"]; 75 [label="Enter finally"];
subgraph cluster_26 {
color=blue
76 [label="Enter block"];
77 [label="Const: Int(0)"];
78 [label="Exit block"];
}
79 [label="Exit finally"];
}
subgraph cluster_27 {
color=blue
80 [label="Catch enter"];
subgraph cluster_28 {
color=blue
81 [label="Enter block"];
82 [label="Const: Int(2)"];
83 [label="Exit block"];
}
84 [label="Catch exit"];
}
85 [label="Try expression exit"];
}
86 [label="Exit property" style="filled" fillcolor=red];
}
68 -> {69}; 68 -> {69};
69 -> {70}; 69 -> {70};
@@ -229,6 +297,5 @@ subgraph cluster_val_x4 {
83 -> {84}; 83 -> {84};
84 -> {85}; 84 -> {85};
85 -> {86}; 85 -> {86};
}
} }
+30 -20
View File
@@ -1,29 +1,40 @@
digraph simple_kt { digraph simple_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_foo { subgraph cluster_0 {
0 [shape=box label="Enter function foo" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function foo" style="filled" fillcolor=red];
2 [shape=box label="Exit block"]; subgraph cluster_1 {
3 [shape=box label="Exit function foo" style="filled"]; color=blue
1 [label="Enter block"];
2 [label="Exit block"];
}
3 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
2 -> {3}; 2 -> {3};
}
subgraph cluster_test { subgraph cluster_2 {
4 [shape=box label="Enter function test" style="filled"]; color=red
5 [shape=box label="Enter block"]; 4 [label="Enter function test" style="filled" fillcolor=red];
6 [shape=box label="Const: Int(1)"]; subgraph cluster_3 {
7 [shape=box label="Variable declaration: lval x: R|kotlin/Int|"]; color=blue
8 [shape=box label="Access variable R|<local>/x|"]; 5 [label="Enter block"];
9 [shape=box label="Const: Int(1)"]; 6 [label="Const: Int(1)"];
10 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.plus|(Int(1))"]; 7 [label="Variable declaration: lval x: R|kotlin/Int|"];
11 [shape=box label="Variable declaration: lval y: R|kotlin/Int|"]; 8 [label="Access variable R|<local>/x|"];
12 [shape=box label="Function call: R|/foo|()"]; 9 [label="Const: Int(1)"];
13 [shape=box label="Exit block"]; 10 [label="Function call: R|<local>/x|.R|kotlin/Int.plus|(Int(1))"];
14 [shape=box label="Exit function test" style="filled"]; 11 [label="Variable declaration: lval y: R|kotlin/Int|"];
12 [label="Function call: R|/foo|()"];
13 [label="Exit block"];
}
14 [label="Exit function test" style="filled" fillcolor=red];
}
4 -> {5}; 4 -> {5};
5 -> {6}; 5 -> {6};
@@ -35,6 +46,5 @@ subgraph cluster_test {
11 -> {12}; 11 -> {12};
12 -> {13}; 12 -> {13};
13 -> {14}; 13 -> {14};
}
} }
+230 -117
View File
@@ -1,31 +1,59 @@
digraph tryCatch_kt { digraph tryCatch_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_test_1 { subgraph cluster_0 {
0 [shape=box label="Enter function test_1" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function test_1" style="filled" fillcolor=red];
2 [shape=box label="Try expression enter"]; subgraph cluster_1 {
3 [shape=box label="Try main block enter"]; color=blue
4 [shape=box label="Enter block"]; 1 [label="Enter block"];
5 [shape=box label="Const: Int(1)"]; subgraph cluster_2 {
6 [shape=box label="Variable declaration: lval x: R|kotlin/Int|"]; color=blue
7 [shape=box label="Exit block"]; 2 [label="Try expression enter"];
8 [shape=box label="Try main block exit"]; subgraph cluster_3 {
9 [shape=box label="Catch enter"]; color=blue
10 [shape=box label="Enter block"]; 3 [label="Try main block enter"];
11 [shape=box label="Const: Int(3)"]; subgraph cluster_4 {
12 [shape=box label="Variable declaration: lval z: R|kotlin/Int|"]; color=blue
13 [shape=box label="Exit block"]; 4 [label="Enter block"];
14 [shape=box label="Catch exit"]; 5 [label="Const: Int(1)"];
15 [shape=box label="Catch enter"]; 6 [label="Variable declaration: lval x: R|kotlin/Int|"];
16 [shape=box label="Enter block"]; 7 [label="Exit block"];
17 [shape=box label="Const: Int(2)"]; }
18 [shape=box label="Variable declaration: lval y: R|kotlin/Int|"]; 8 [label="Try main block exit"];
19 [shape=box label="Exit block"]; }
20 [shape=box label="Catch exit"]; subgraph cluster_5 {
21 [shape=box label="Try expression exit"]; color=blue
22 [shape=box label="Exit block"]; 9 [label="Catch enter"];
23 [shape=box label="Exit function test_1" style="filled"]; subgraph cluster_6 {
color=blue
10 [label="Enter block"];
11 [label="Const: Int(3)"];
12 [label="Variable declaration: lval z: R|kotlin/Int|"];
13 [label="Exit block"];
}
14 [label="Catch exit"];
}
subgraph cluster_7 {
color=blue
15 [label="Catch enter"];
subgraph cluster_8 {
color=blue
16 [label="Enter block"];
17 [label="Const: Int(2)"];
18 [label="Variable declaration: lval y: R|kotlin/Int|"];
19 [label="Exit block"];
}
20 [label="Catch exit"];
}
21 [label="Try expression exit"];
}
22 [label="Exit block"];
}
23 [label="Exit function test_1" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
@@ -50,26 +78,45 @@ subgraph cluster_test_1 {
20 -> {21}; 20 -> {21};
21 -> {22}; 21 -> {22};
22 -> {23}; 22 -> {23};
}
subgraph cluster_test_2 { subgraph cluster_9 {
24 [shape=box label="Enter function test_2" style="filled"]; color=red
25 [shape=box label="Enter block"]; 24 [label="Enter function test_2" style="filled" fillcolor=red];
26 [shape=box label="Try expression enter"]; subgraph cluster_10 {
27 [shape=box label="Try main block enter"]; color=blue
28 [shape=box label="Enter block"]; 25 [label="Enter block"];
29 [shape=box label="Const: Int(1)"]; subgraph cluster_11 {
30 [shape=box label="Exit block"]; color=blue
31 [shape=box label="Try main block exit"]; 26 [label="Try expression enter"];
32 [shape=box label="Catch enter"]; subgraph cluster_12 {
33 [shape=box label="Enter block"]; color=blue
34 [shape=box label="Const: Int(2)"]; 27 [label="Try main block enter"];
35 [shape=box label="Exit block"]; subgraph cluster_13 {
36 [shape=box label="Catch exit"]; color=blue
37 [shape=box label="Try expression exit"]; 28 [label="Enter block"];
38 [shape=box label="Variable declaration: lval x: R|kotlin/Int|"]; 29 [label="Const: Int(1)"];
39 [shape=box label="Exit block"]; 30 [label="Exit block"];
40 [shape=box label="Exit function test_2" style="filled"]; }
31 [label="Try main block exit"];
}
subgraph cluster_14 {
color=blue
32 [label="Catch enter"];
subgraph cluster_15 {
color=blue
33 [label="Enter block"];
34 [label="Const: Int(2)"];
35 [label="Exit block"];
}
36 [label="Catch exit"];
}
37 [label="Try expression exit"];
}
38 [label="Variable declaration: lval x: R|kotlin/Int|"];
39 [label="Exit block"];
}
40 [label="Exit function test_2" style="filled" fillcolor=red];
}
24 -> {25}; 24 -> {25};
25 -> {26}; 25 -> {26};
@@ -87,78 +134,145 @@ subgraph cluster_test_2 {
37 -> {38}; 37 -> {38};
38 -> {39}; 38 -> {39};
39 -> {40}; 39 -> {40};
}
subgraph cluster_test_3 { subgraph cluster_16 {
41 [shape=box label="Enter function test_3" style="filled"]; color=red
42 [shape=box label="Enter block"]; 41 [label="Enter function test_3" style="filled" fillcolor=red];
43 [shape=box label="Enter while loop"]; subgraph cluster_17 {
44 [shape=box label="Enter loop condition"]; color=blue
45 [shape=box label="Const: Boolean(true)"]; 42 [label="Enter block"];
46 [shape=box label="Exit loop condition"]; subgraph cluster_18 {
47 [shape=box label="Enter loop block"]; color=blue
48 [shape=box label="Enter block"]; 43 [label="Enter while loop"];
49 [shape=box label="Try expression enter"]; subgraph cluster_19 {
50 [shape=box label="Try main block enter"]; color=blue
51 [shape=box label="Enter block"]; 44 [label="Enter loop condition"];
52 [shape=box label="Enter when"]; 45 [label="Const: Boolean(true)"];
53 [shape=box label="Enter when branch condition "]; 46 [label="Exit loop condition"];
54 [shape=box label="Access variable R|<local>/b|"]; }
55 [shape=box label="Exit when branch condition"]; subgraph cluster_20 {
56 [shape=box label="Enter block"]; color=blue
57 [shape=box label="Jump: ^test_3 Unit"]; 47 [label="Enter loop block"];
58 [shape=box label="Stub[DEAD]"]; subgraph cluster_21 {
59 [shape=box label="Exit block[DEAD]"]; color=blue
60 [shape=box label="Exit when branch result[DEAD]"]; 48 [label="Enter block"];
61 [shape=box label="Enter when branch condition else"]; subgraph cluster_22 {
62 [shape=box label="Exit when branch condition"]; color=blue
63 [shape=box label="Enter block"]; 49 [label="Try expression enter"];
64 [shape=box label="Exit block"]; subgraph cluster_23 {
65 [shape=box label="Exit when branch result"]; color=blue
66 [shape=box label="Exit when"]; 50 [label="Try main block enter"];
67 [shape=box label="Const: Int(1)"]; subgraph cluster_24 {
68 [shape=box label="Variable declaration: lval x: R|kotlin/Int|"]; color=blue
69 [shape=box label="Enter when"]; 51 [label="Enter block"];
70 [shape=box label="Enter when branch condition "]; subgraph cluster_25 {
71 [shape=box label="Access variable R|<local>/b|"]; color=blue
72 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; 52 [label="Enter when"];
73 [shape=box label="Exit when branch condition"]; subgraph cluster_26 {
74 [shape=box label="Enter block"]; color=blue
75 [shape=box label="Jump: break@@@[Boolean(true)] "]; 53 [label="Enter when branch condition "];
76 [shape=box label="Stub[DEAD]"]; 54 [label="Access variable R|<local>/b|"];
77 [shape=box label="Exit block[DEAD]"]; 55 [label="Exit when branch condition"];
78 [shape=box label="Exit when branch result[DEAD]"]; }
79 [shape=box label="Enter when branch condition else"]; subgraph cluster_27 {
80 [shape=box label="Exit when branch condition"]; color=blue
81 [shape=box label="Enter block"]; 56 [label="Enter block"];
82 [shape=box label="Exit block"]; 57 [label="Jump: ^test_3 Unit"];
83 [shape=box label="Exit when branch result"]; 58 [label="Stub" style="filled" fillcolor=gray];
84 [shape=box label="Exit when"]; 59 [label="Exit block" style="filled" fillcolor=gray];
85 [shape=box label="Exit block"]; }
86 [shape=box label="Try main block exit"]; 60 [label="Exit when branch result" style="filled" fillcolor=gray];
87 [shape=box label="Catch enter"]; subgraph cluster_28 {
88 [shape=box label="Enter block"]; color=blue
89 [shape=box label="Jump: break@@@[Boolean(true)] "]; 61 [label="Enter when branch condition else"];
90 [shape=box label="Stub[DEAD]"]; 62 [label="Exit when branch condition"];
91 [shape=box label="Exit block[DEAD]"]; }
92 [shape=box label="Catch exit[DEAD]"]; subgraph cluster_29 {
93 [shape=box label="Catch enter"]; color=blue
94 [shape=box label="Enter block"]; 63 [label="Enter block"];
95 [shape=box label="Jump: continue@@@[Boolean(true)] "]; 64 [label="Exit block"];
96 [shape=box label="Stub[DEAD]"]; }
97 [shape=box label="Exit block[DEAD]"]; 65 [label="Exit when branch result"];
98 [shape=box label="Catch exit[DEAD]"]; 66 [label="Exit when"];
99 [shape=box label="Try expression exit"]; }
100 [shape=box label="Const: Int(2)"]; 67 [label="Const: Int(1)"];
101 [shape=box label="Variable declaration: lval y: R|kotlin/Int|"]; 68 [label="Variable declaration: lval x: R|kotlin/Int|"];
102 [shape=box label="Exit block"]; subgraph cluster_30 {
103 [shape=box label="Exit loop block"]; color=blue
104 [shape=box label="Stub[DEAD]"]; 69 [label="Enter when"];
105 [shape=box label="Exit whileloop"]; subgraph cluster_31 {
106 [shape=box label="Const: Int(3)"]; color=blue
107 [shape=box label="Variable declaration: lval z: R|kotlin/Int|"]; 70 [label="Enter when branch condition "];
108 [shape=box label="Exit block"]; 71 [label="Access variable R|<local>/b|"];
109 [shape=box label="Exit function test_3" style="filled"]; 72 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
73 [label="Exit when branch condition"];
}
subgraph cluster_32 {
color=blue
74 [label="Enter block"];
75 [label="Jump: break@@@[Boolean(true)] "];
76 [label="Stub" style="filled" fillcolor=gray];
77 [label="Exit block" style="filled" fillcolor=gray];
}
78 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_33 {
color=blue
79 [label="Enter when branch condition else"];
80 [label="Exit when branch condition"];
}
subgraph cluster_34 {
color=blue
81 [label="Enter block"];
82 [label="Exit block"];
}
83 [label="Exit when branch result"];
84 [label="Exit when"];
}
85 [label="Exit block"];
}
86 [label="Try main block exit"];
}
subgraph cluster_35 {
color=blue
87 [label="Catch enter"];
subgraph cluster_36 {
color=blue
88 [label="Enter block"];
89 [label="Jump: break@@@[Boolean(true)] "];
90 [label="Stub" style="filled" fillcolor=gray];
91 [label="Exit block" style="filled" fillcolor=gray];
}
92 [label="Catch exit" style="filled" fillcolor=gray];
}
subgraph cluster_37 {
color=blue
93 [label="Catch enter"];
subgraph cluster_38 {
color=blue
94 [label="Enter block"];
95 [label="Jump: continue@@@[Boolean(true)] "];
96 [label="Stub" style="filled" fillcolor=gray];
97 [label="Exit block" style="filled" fillcolor=gray];
}
98 [label="Catch exit" style="filled" fillcolor=gray];
}
99 [label="Try expression exit"];
}
100 [label="Const: Int(2)"];
101 [label="Variable declaration: lval y: R|kotlin/Int|"];
102 [label="Exit block"];
}
103 [label="Exit loop block"];
}
104 [label="Stub" style="filled" fillcolor=gray];
105 [label="Exit whileloop"];
}
106 [label="Const: Int(3)"];
107 [label="Variable declaration: lval z: R|kotlin/Int|"];
108 [label="Exit block"];
}
109 [label="Exit function test_3" style="filled" fillcolor=red];
}
41 -> {42}; 41 -> {42};
42 -> {43}; 42 -> {43};
@@ -233,6 +347,5 @@ subgraph cluster_test_3 {
106 -> {107}; 106 -> {107};
107 -> {108}; 107 -> {108};
108 -> {109}; 108 -> {109};
}
} }
+130 -75
View File
@@ -1,52 +1,86 @@
digraph when_kt { digraph when_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_test_1 { subgraph cluster_0 {
0 [shape=box label="Enter function test_1" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function test_1" style="filled" fillcolor=red];
2 [shape=box label="Enter when"]; subgraph cluster_1 {
3 [shape=box label="Enter when branch condition "]; color=blue
4 [shape=box label="Access variable R|<local>/x|"]; 1 [label="Enter block"];
5 [shape=box label="Const: Int(1)"]; subgraph cluster_2 {
6 [shape=box label="Operator =="]; color=blue
7 [shape=box label="Exit when branch condition"]; 2 [label="Enter when"];
8 [shape=box label="Enter block"]; subgraph cluster_3 {
9 [shape=box label="Const: Int(10)"]; color=blue
10 [shape=box label="Exit block"]; 3 [label="Enter when branch condition "];
11 [shape=box label="Exit when branch result"]; 4 [label="Access variable R|<local>/x|"];
12 [shape=box label="Enter when branch condition "]; 5 [label="Const: Int(1)"];
13 [shape=box label="Access variable R|<local>/x|"]; 6 [label="Operator =="];
14 [shape=box label="Const: Int(2)"]; 7 [label="Exit when branch condition"];
15 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.rem|(Int(2))"]; }
16 [shape=box label="Const: Int(0)"]; subgraph cluster_4 {
17 [shape=box label="Operator =="]; color=blue
18 [shape=box label="Exit when branch condition"]; 8 [label="Enter block"];
19 [shape=box label="Enter block"]; 9 [label="Const: Int(10)"];
20 [shape=box label="Const: Int(20)"]; 10 [label="Exit block"];
21 [shape=box label="Exit block"]; }
22 [shape=box label="Exit when branch result"]; 11 [label="Exit when branch result"];
23 [shape=box label="Enter when branch condition "]; subgraph cluster_5 {
24 [shape=box label="Const: Int(1)"]; color=blue
25 [shape=box label="Const: Int(1)"]; 12 [label="Enter when branch condition "];
26 [shape=box label="Function call: Int(1).R|kotlin/Int.minus|(Int(1))"]; 13 [label="Access variable R|<local>/x|"];
27 [shape=box label="Const: Int(0)"]; 14 [label="Const: Int(2)"];
28 [shape=box label="Operator =="]; 15 [label="Function call: R|<local>/x|.R|kotlin/Int.rem|(Int(2))"];
29 [shape=box label="Exit when branch condition"]; 16 [label="Const: Int(0)"];
30 [shape=box label="Enter block"]; 17 [label="Operator =="];
31 [shape=box label="Jump: ^test_1 Unit"]; 18 [label="Exit when branch condition"];
32 [shape=box label="Stub[DEAD]"]; }
33 [shape=box label="Exit block[DEAD]"]; subgraph cluster_6 {
34 [shape=box label="Exit when branch result[DEAD]"]; color=blue
35 [shape=box label="Enter when branch condition else"]; 19 [label="Enter block"];
36 [shape=box label="Exit when branch condition"]; 20 [label="Const: Int(20)"];
37 [shape=box label="Enter block"]; 21 [label="Exit block"];
38 [shape=box label="Const: Int(5)"]; }
39 [shape=box label="Exit block"]; 22 [label="Exit when branch result"];
40 [shape=box label="Exit when branch result"]; subgraph cluster_7 {
41 [shape=box label="Exit when"]; color=blue
42 [shape=box label="Variable declaration: lval y: R|kotlin/Int|"]; 23 [label="Enter when branch condition "];
43 [shape=box label="Exit block"]; 24 [label="Const: Int(1)"];
44 [shape=box label="Exit function test_1" style="filled"]; 25 [label="Const: Int(1)"];
26 [label="Function call: Int(1).R|kotlin/Int.minus|(Int(1))"];
27 [label="Const: Int(0)"];
28 [label="Operator =="];
29 [label="Exit when branch condition"];
}
subgraph cluster_8 {
color=blue
30 [label="Enter block"];
31 [label="Jump: ^test_1 Unit"];
32 [label="Stub" style="filled" fillcolor=gray];
33 [label="Exit block" style="filled" fillcolor=gray];
}
34 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_9 {
color=blue
35 [label="Enter when branch condition else"];
36 [label="Exit when branch condition"];
}
subgraph cluster_10 {
color=blue
37 [label="Enter block"];
38 [label="Const: Int(5)"];
39 [label="Exit block"];
}
40 [label="Exit when branch result"];
41 [label="Exit when"];
}
42 [label="Variable declaration: lval y: R|kotlin/Int|"];
43 [label="Exit block"];
}
44 [label="Exit function test_1" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
@@ -93,34 +127,56 @@ subgraph cluster_test_1 {
41 -> {42}; 41 -> {42};
42 -> {43}; 42 -> {43};
43 -> {44}; 43 -> {44};
}
subgraph cluster_test_2 { subgraph cluster_11 {
45 [shape=box label="Enter function test_2" style="filled"]; color=red
46 [shape=box label="Enter block"]; 45 [label="Enter function test_2" style="filled" fillcolor=red];
47 [shape=box label="Enter when"]; subgraph cluster_12 {
48 [shape=box label="Enter when branch condition "]; color=blue
49 [shape=box label="Enter &&"]; 46 [label="Enter block"];
50 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_13 {
51 [shape=box label="Type operator: x is A"]; color=blue
52 [shape=box label="Exit left part of &&"]; 47 [label="Enter when"];
53 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_14 {
54 [shape=box label="Type operator: x is B"]; color=blue
55 [shape=box label="Exit &&"]; 48 [label="Enter when branch condition "];
56 [shape=box label="Exit when branch condition"]; subgraph cluster_15 {
57 [shape=box label="Enter block"]; color=blue
58 [shape=box label="Access variable R|<local>/x|"]; 49 [label="Enter &&"];
59 [shape=box label="Type operator: x is A"]; 50 [label="Access variable R|<local>/x|"];
60 [shape=box label="Exit block"]; 51 [label="Type operator: x is A"];
61 [shape=box label="Exit when branch result"]; 52 [label="Exit left part of &&"];
62 [shape=box label="Enter when branch condition else"]; 53 [label="Access variable R|<local>/x|"];
63 [shape=box label="Exit when branch condition"]; 54 [label="Type operator: x is B"];
64 [shape=box label="Enter block"]; 55 [label="Exit &&"];
65 [shape=box label="Exit block"]; }
66 [shape=box label="Exit when branch result"]; 56 [label="Exit when branch condition"];
67 [shape=box label="Exit when"]; }
68 [shape=box label="Exit block"]; subgraph cluster_16 {
69 [shape=box label="Exit function test_2" style="filled"]; color=blue
57 [label="Enter block"];
58 [label="Access variable R|<local>/x|"];
59 [label="Type operator: x is A"];
60 [label="Exit block"];
}
61 [label="Exit when branch result"];
subgraph cluster_17 {
color=blue
62 [label="Enter when branch condition else"];
63 [label="Exit when branch condition"];
}
subgraph cluster_18 {
color=blue
64 [label="Enter block"];
65 [label="Exit block"];
}
66 [label="Exit when branch result"];
67 [label="Exit when"];
}
68 [label="Exit block"];
}
69 [label="Exit function test_2" style="filled" fillcolor=red];
}
45 -> {46}; 45 -> {46};
46 -> {47}; 46 -> {47};
@@ -146,6 +202,5 @@ subgraph cluster_test_2 {
66 -> {67}; 66 -> {67};
67 -> {68}; 67 -> {68};
68 -> {69}; 68 -> {69};
}
} }
@@ -1,64 +1,93 @@
digraph booleanOperators_kt { digraph booleanOperators_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_foo { subgraph cluster_0 {
0 [shape=box label="Enter function foo" style="filled"]; color=red
1 [shape=box label="Exit function foo" style="filled"]; 0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
}
subgraph cluster_bool { subgraph cluster_1 {
2 [shape=box label="Enter function bool" style="filled"]; color=red
3 [shape=box label="Exit function bool" style="filled"]; 2 [label="Enter function bool" style="filled" fillcolor=red];
3 [label="Exit function bool" style="filled" fillcolor=red];
}
2 -> {3}; 2 -> {3};
}
subgraph cluster_bar { subgraph cluster_2 {
4 [shape=box label="Enter function bar" style="filled"]; color=red
5 [shape=box label="Exit function bar" style="filled"]; 4 [label="Enter function bar" style="filled" fillcolor=red];
5 [label="Exit function bar" style="filled" fillcolor=red];
}
4 -> {5}; 4 -> {5};
}
subgraph cluster_baz { subgraph cluster_3 {
6 [shape=box label="Enter function baz" style="filled"]; color=red
7 [shape=box label="Exit function baz" style="filled"]; 6 [label="Enter function baz" style="filled" fillcolor=red];
7 [label="Exit function baz" style="filled" fillcolor=red];
}
6 -> {7}; 6 -> {7};
}
subgraph cluster_test_1 { subgraph cluster_4 {
8 [shape=box label="Enter function test_1" style="filled"]; color=red
9 [shape=box label="Enter block"]; 8 [label="Enter function test_1" style="filled" fillcolor=red];
10 [shape=box label="Enter when"]; subgraph cluster_5 {
11 [shape=box label="Enter when branch condition "]; color=blue
12 [shape=box label="Enter &&"]; 9 [label="Enter block"];
13 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_6 {
14 [shape=box label="Type operator: x is B"]; color=blue
15 [shape=box label="Exit left part of &&"]; 10 [label="Enter when"];
16 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_7 {
17 [shape=box label="Type operator: x is C"]; color=blue
18 [shape=box label="Exit &&"]; 11 [label="Enter when branch condition "];
19 [shape=box label="Exit when branch condition"]; subgraph cluster_8 {
20 [shape=box label="Enter block"]; color=blue
21 [shape=box label="Access variable R|<local>/x|"]; 12 [label="Enter &&"];
22 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 13 [label="Access variable R|<local>/x|"];
23 [shape=box label="Access variable R|<local>/x|"]; 14 [label="Type operator: x is B"];
24 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; 15 [label="Exit left part of &&"];
25 [shape=box label="Access variable R|<local>/x|"]; 16 [label="Access variable R|<local>/x|"];
26 [shape=box label="Function call: R|<local>/x|.R|/C.baz|()"]; 17 [label="Type operator: x is C"];
27 [shape=box label="Exit block"]; 18 [label="Exit &&"];
28 [shape=box label="Exit when branch result"]; }
29 [shape=box label="Enter when branch condition else"]; 19 [label="Exit when branch condition"];
30 [shape=box label="Exit when branch condition"]; }
31 [shape=box label="Enter block"]; subgraph cluster_9 {
32 [shape=box label="Exit block"]; color=blue
33 [shape=box label="Exit when branch result"]; 20 [label="Enter block"];
34 [shape=box label="Exit when"]; 21 [label="Access variable R|<local>/x|"];
35 [shape=box label="Exit block"]; 22 [label="Function call: R|<local>/x|.R|/A.foo|()"];
36 [shape=box label="Exit function test_1" style="filled"]; 23 [label="Access variable R|<local>/x|"];
24 [label="Function call: R|<local>/x|.R|/B.bar|()"];
25 [label="Access variable R|<local>/x|"];
26 [label="Function call: R|<local>/x|.R|/C.baz|()"];
27 [label="Exit block"];
}
28 [label="Exit when branch result"];
subgraph cluster_10 {
color=blue
29 [label="Enter when branch condition else"];
30 [label="Exit when branch condition"];
}
subgraph cluster_11 {
color=blue
31 [label="Enter block"];
32 [label="Exit block"];
}
33 [label="Exit when branch result"];
34 [label="Exit when"];
}
35 [label="Exit block"];
}
36 [label="Exit function test_1" style="filled" fillcolor=red];
}
8 -> {9}; 8 -> {9};
9 -> {10}; 9 -> {10};
@@ -88,38 +117,60 @@ subgraph cluster_test_1 {
33 -> {34}; 33 -> {34};
34 -> {35}; 34 -> {35};
35 -> {36}; 35 -> {36};
}
subgraph cluster_test_2 { subgraph cluster_12 {
37 [shape=box label="Enter function test_2" style="filled"]; color=red
38 [shape=box label="Enter block"]; 37 [label="Enter function test_2" style="filled" fillcolor=red];
39 [shape=box label="Enter when"]; subgraph cluster_13 {
40 [shape=box label="Enter when branch condition "]; color=blue
41 [shape=box label="Enter ||"]; 38 [label="Enter block"];
42 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_14 {
43 [shape=box label="Type operator: x is B"]; color=blue
44 [shape=box label="Exit left part of ||"]; 39 [label="Enter when"];
45 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_15 {
46 [shape=box label="Type operator: x is C"]; color=blue
47 [shape=box label="Exit ||"]; 40 [label="Enter when branch condition "];
48 [shape=box label="Exit when branch condition"]; subgraph cluster_16 {
49 [shape=box label="Enter block"]; color=blue
50 [shape=box label="Access variable R|<local>/x|"]; 41 [label="Enter ||"];
51 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 42 [label="Access variable R|<local>/x|"];
52 [shape=box label="Access variable R|<local>/x|"]; 43 [label="Type operator: x is B"];
53 [shape=box label="Function call: R|<local>/x|.<Unresolved name: bar>#()"]; 44 [label="Exit left part of ||"];
54 [shape=box label="Access variable R|<local>/x|"]; 45 [label="Access variable R|<local>/x|"];
55 [shape=box label="Function call: R|<local>/x|.<Unresolved name: baz>#()"]; 46 [label="Type operator: x is C"];
56 [shape=box label="Exit block"]; 47 [label="Exit ||"];
57 [shape=box label="Exit when branch result"]; }
58 [shape=box label="Enter when branch condition else"]; 48 [label="Exit when branch condition"];
59 [shape=box label="Exit when branch condition"]; }
60 [shape=box label="Enter block"]; subgraph cluster_17 {
61 [shape=box label="Exit block"]; color=blue
62 [shape=box label="Exit when branch result"]; 49 [label="Enter block"];
63 [shape=box label="Exit when"]; 50 [label="Access variable R|<local>/x|"];
64 [shape=box label="Exit block"]; 51 [label="Function call: R|<local>/x|.R|/A.foo|()"];
65 [shape=box label="Exit function test_2" style="filled"]; 52 [label="Access variable R|<local>/x|"];
53 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()"];
54 [label="Access variable R|<local>/x|"];
55 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()"];
56 [label="Exit block"];
}
57 [label="Exit when branch result"];
subgraph cluster_18 {
color=blue
58 [label="Enter when branch condition else"];
59 [label="Exit when branch condition"];
}
subgraph cluster_19 {
color=blue
60 [label="Enter block"];
61 [label="Exit block"];
}
62 [label="Exit when branch result"];
63 [label="Exit when"];
}
64 [label="Exit block"];
}
65 [label="Exit function test_2" style="filled" fillcolor=red];
}
37 -> {38}; 37 -> {38};
38 -> {39}; 38 -> {39};
@@ -149,30 +200,49 @@ subgraph cluster_test_2 {
62 -> {63}; 62 -> {63};
63 -> {64}; 63 -> {64};
64 -> {65}; 64 -> {65};
}
subgraph cluster_test_3 { subgraph cluster_20 {
66 [shape=box label="Enter function test_3" style="filled"]; color=red
67 [shape=box label="Enter block"]; 66 [label="Enter function test_3" style="filled" fillcolor=red];
68 [shape=box label="Enter when"]; subgraph cluster_21 {
69 [shape=box label="Enter when branch condition "]; color=blue
70 [shape=box label="Access variable R|<local>/x|"]; 67 [label="Enter block"];
71 [shape=box label="Type operator: x !is A"]; subgraph cluster_22 {
72 [shape=box label="Function call: (R|<local>/x| !is R|A|).R|kotlin/Boolean.not|()"]; color=blue
73 [shape=box label="Exit when branch condition"]; 68 [label="Enter when"];
74 [shape=box label="Enter block"]; subgraph cluster_23 {
75 [shape=box label="Access variable R|<local>/x|"]; color=blue
76 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 69 [label="Enter when branch condition "];
77 [shape=box label="Exit block"]; 70 [label="Access variable R|<local>/x|"];
78 [shape=box label="Exit when branch result"]; 71 [label="Type operator: x !is A"];
79 [shape=box label="Enter when branch condition else"]; 72 [label="Function call: (R|<local>/x| !is R|A|).R|kotlin/Boolean.not|()"];
80 [shape=box label="Exit when branch condition"]; 73 [label="Exit when branch condition"];
81 [shape=box label="Enter block"]; }
82 [shape=box label="Exit block"]; subgraph cluster_24 {
83 [shape=box label="Exit when branch result"]; color=blue
84 [shape=box label="Exit when"]; 74 [label="Enter block"];
85 [shape=box label="Exit block"]; 75 [label="Access variable R|<local>/x|"];
86 [shape=box label="Exit function test_3" style="filled"]; 76 [label="Function call: R|<local>/x|.R|/A.foo|()"];
77 [label="Exit block"];
}
78 [label="Exit when branch result"];
subgraph cluster_25 {
color=blue
79 [label="Enter when branch condition else"];
80 [label="Exit when branch condition"];
}
subgraph cluster_26 {
color=blue
81 [label="Enter block"];
82 [label="Exit block"];
}
83 [label="Exit when branch result"];
84 [label="Exit when"];
}
85 [label="Exit block"];
}
86 [label="Exit function test_3" style="filled" fillcolor=red];
}
66 -> {67}; 66 -> {67};
67 -> {68}; 67 -> {68};
@@ -194,38 +264,60 @@ subgraph cluster_test_3 {
83 -> {84}; 83 -> {84};
84 -> {85}; 84 -> {85};
85 -> {86}; 85 -> {86};
}
subgraph cluster_test_4 { subgraph cluster_27 {
87 [shape=box label="Enter function test_4" style="filled"]; color=red
88 [shape=box label="Enter block"]; 87 [label="Enter function test_4" style="filled" fillcolor=red];
89 [shape=box label="Enter when"]; subgraph cluster_28 {
90 [shape=box label="Enter when branch condition "]; color=blue
91 [shape=box label="Enter ||"]; 88 [label="Enter block"];
92 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_29 {
93 [shape=box label="Type operator: x !is String"]; color=blue
94 [shape=box label="Exit left part of ||"]; 89 [label="Enter when"];
95 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_30 {
96 [shape=box label="Access variable R|kotlin/String.length|"]; color=blue
97 [shape=box label="Const: Int(0)"]; 90 [label="Enter when branch condition "];
98 [shape=box label="Operator =="]; subgraph cluster_31 {
99 [shape=box label="Exit ||"]; color=blue
100 [shape=box label="Exit when branch condition"]; 91 [label="Enter ||"];
101 [shape=box label="Enter block"]; 92 [label="Access variable R|<local>/x|"];
102 [shape=box label="Access variable R|<local>/x|"]; 93 [label="Type operator: x !is String"];
103 [shape=box label="Access variable <Unresolved name: length>#"]; 94 [label="Exit left part of ||"];
104 [shape=box label="Exit block"]; 95 [label="Access variable R|<local>/x|"];
105 [shape=box label="Exit when branch result"]; 96 [label="Access variable R|kotlin/String.length|"];
106 [shape=box label="Enter when branch condition else"]; 97 [label="Const: Int(0)"];
107 [shape=box label="Exit when branch condition"]; 98 [label="Operator =="];
108 [shape=box label="Enter block"]; 99 [label="Exit ||"];
109 [shape=box label="Exit block"]; }
110 [shape=box label="Exit when branch result"]; 100 [label="Exit when branch condition"];
111 [shape=box label="Exit when"]; }
112 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_32 {
113 [shape=box label="Access variable <Unresolved name: length>#"]; color=blue
114 [shape=box label="Exit block"]; 101 [label="Enter block"];
115 [shape=box label="Exit function test_4" style="filled"]; 102 [label="Access variable R|<local>/x|"];
103 [label="Access variable <Unresolved name: length>#"];
104 [label="Exit block"];
}
105 [label="Exit when branch result"];
subgraph cluster_33 {
color=blue
106 [label="Enter when branch condition else"];
107 [label="Exit when branch condition"];
}
subgraph cluster_34 {
color=blue
108 [label="Enter block"];
109 [label="Exit block"];
}
110 [label="Exit when branch result"];
111 [label="Exit when"];
}
112 [label="Access variable R|<local>/x|"];
113 [label="Access variable <Unresolved name: length>#"];
114 [label="Exit block"];
}
115 [label="Exit function test_4" style="filled" fillcolor=red];
}
87 -> {88}; 87 -> {88};
88 -> {89}; 88 -> {89};
@@ -255,34 +347,56 @@ subgraph cluster_test_4 {
112 -> {113}; 112 -> {113};
113 -> {114}; 113 -> {114};
114 -> {115}; 114 -> {115};
}
subgraph cluster_test_5 { subgraph cluster_35 {
116 [shape=box label="Enter function test_5" style="filled"]; color=red
117 [shape=box label="Enter block"]; 116 [label="Enter function test_5" style="filled" fillcolor=red];
118 [shape=box label="Enter when"]; subgraph cluster_36 {
119 [shape=box label="Enter when branch condition "]; color=blue
120 [shape=box label="Enter ||"]; 117 [label="Enter block"];
121 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_37 {
122 [shape=box label="Const: Null(null)"]; color=blue
123 [shape=box label="Operator !="]; 118 [label="Enter when"];
124 [shape=box label="Exit left part of ||"]; subgraph cluster_38 {
125 [shape=box label="Const: Boolean(false)"]; color=blue
126 [shape=box label="Exit ||"]; 119 [label="Enter when branch condition "];
127 [shape=box label="Exit when branch condition"]; subgraph cluster_39 {
128 [shape=box label="Enter block"]; color=blue
129 [shape=box label="Access variable R|<local>/x|"]; 120 [label="Enter ||"];
130 [shape=box label="Function call: R|<local>/x|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"]; 121 [label="Access variable R|<local>/x|"];
131 [shape=box label="Exit block"]; 122 [label="Const: Null(null)"];
132 [shape=box label="Exit when branch result"]; 123 [label="Operator !="];
133 [shape=box label="Enter when branch condition else"]; 124 [label="Exit left part of ||"];
134 [shape=box label="Exit when branch condition"]; 125 [label="Const: Boolean(false)"];
135 [shape=box label="Enter block"]; 126 [label="Exit ||"];
136 [shape=box label="Exit block"]; }
137 [shape=box label="Exit when branch result"]; 127 [label="Exit when branch condition"];
138 [shape=box label="Exit when"]; }
139 [shape=box label="Exit block"]; subgraph cluster_40 {
140 [shape=box label="Exit function test_5" style="filled"]; color=blue
128 [label="Enter block"];
129 [label="Access variable R|<local>/x|"];
130 [label="Function call: R|<local>/x|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
131 [label="Exit block"];
}
132 [label="Exit when branch result"];
subgraph cluster_41 {
color=blue
133 [label="Enter when branch condition else"];
134 [label="Exit when branch condition"];
}
subgraph cluster_42 {
color=blue
135 [label="Enter block"];
136 [label="Exit block"];
}
137 [label="Exit when branch result"];
138 [label="Exit when"];
}
139 [label="Exit block"];
}
140 [label="Exit function test_5" style="filled" fillcolor=red];
}
116 -> {117}; 116 -> {117};
117 -> {118}; 117 -> {118};
@@ -308,35 +422,57 @@ subgraph cluster_test_5 {
137 -> {138}; 137 -> {138};
138 -> {139}; 138 -> {139};
139 -> {140}; 139 -> {140};
}
subgraph cluster_test_6 { subgraph cluster_43 {
141 [shape=box label="Enter function test_6" style="filled"]; color=red
142 [shape=box label="Enter block"]; 141 [label="Enter function test_6" style="filled" fillcolor=red];
143 [shape=box label="Enter when"]; subgraph cluster_44 {
144 [shape=box label="Enter when branch condition "]; color=blue
145 [shape=box label="Enter ||"]; 142 [label="Enter block"];
146 [shape=box label="Const: Boolean(false)"]; subgraph cluster_45 {
147 [shape=box label="Exit left part of ||"]; color=blue
148 [shape=box label="Access variable R|<local>/x|"]; 143 [label="Enter when"];
149 [shape=box label="Const: Null(null)"]; subgraph cluster_46 {
150 [shape=box label="Operator !="]; color=blue
151 [shape=box label="Stub[DEAD]"]; 144 [label="Enter when branch condition "];
152 [shape=box label="Exit ||"]; subgraph cluster_47 {
153 [shape=box label="Exit when branch condition"]; color=blue
154 [shape=box label="Enter block"]; 145 [label="Enter ||"];
155 [shape=box label="Access variable R|<local>/x|"]; 146 [label="Const: Boolean(false)"];
156 [shape=box label="Function call: R|<local>/x|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"]; 147 [label="Exit left part of ||"];
157 [shape=box label="Exit block"]; 148 [label="Access variable R|<local>/x|"];
158 [shape=box label="Exit when branch result"]; 149 [label="Const: Null(null)"];
159 [shape=box label="Enter when branch condition else"]; 150 [label="Operator !="];
160 [shape=box label="Exit when branch condition"]; 151 [label="Stub" style="filled" fillcolor=gray];
161 [shape=box label="Enter block"]; 152 [label="Exit ||"];
162 [shape=box label="Exit block"]; }
163 [shape=box label="Exit when branch result"]; 153 [label="Exit when branch condition"];
164 [shape=box label="Exit when"]; }
165 [shape=box label="Exit block"]; subgraph cluster_48 {
166 [shape=box label="Exit function test_6" style="filled"]; color=blue
154 [label="Enter block"];
155 [label="Access variable R|<local>/x|"];
156 [label="Function call: R|<local>/x|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
157 [label="Exit block"];
}
158 [label="Exit when branch result"];
subgraph cluster_49 {
color=blue
159 [label="Enter when branch condition else"];
160 [label="Exit when branch condition"];
}
subgraph cluster_50 {
color=blue
161 [label="Enter block"];
162 [label="Exit block"];
}
163 [label="Exit when branch result"];
164 [label="Exit when"];
}
165 [label="Exit block"];
}
166 [label="Exit function test_6" style="filled" fillcolor=red];
}
141 -> {142}; 141 -> {142};
142 -> {143}; 142 -> {143};
@@ -364,34 +500,56 @@ subgraph cluster_test_6 {
163 -> {164}; 163 -> {164};
164 -> {165}; 164 -> {165};
165 -> {166}; 165 -> {166};
}
subgraph cluster_test_7 { subgraph cluster_51 {
167 [shape=box label="Enter function test_7" style="filled"]; color=red
168 [shape=box label="Enter block"]; 167 [label="Enter function test_7" style="filled" fillcolor=red];
169 [shape=box label="Enter when"]; subgraph cluster_52 {
170 [shape=box label="Enter when branch condition "]; color=blue
171 [shape=box label="Enter &&"]; 168 [label="Enter block"];
172 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_53 {
173 [shape=box label="Type operator: x is A"]; color=blue
174 [shape=box label="Exit left part of &&"]; 169 [label="Enter when"];
175 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_54 {
176 [shape=box label="Function call: R|<local>/x|.R|/A.bool|()"]; color=blue
177 [shape=box label="Exit &&"]; 170 [label="Enter when branch condition "];
178 [shape=box label="Exit when branch condition"]; subgraph cluster_55 {
179 [shape=box label="Enter block"]; color=blue
180 [shape=box label="Access variable R|<local>/x|"]; 171 [label="Enter &&"];
181 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 172 [label="Access variable R|<local>/x|"];
182 [shape=box label="Exit block"]; 173 [label="Type operator: x is A"];
183 [shape=box label="Exit when branch result"]; 174 [label="Exit left part of &&"];
184 [shape=box label="Enter when branch condition else"]; 175 [label="Access variable R|<local>/x|"];
185 [shape=box label="Exit when branch condition"]; 176 [label="Function call: R|<local>/x|.R|/A.bool|()"];
186 [shape=box label="Enter block"]; 177 [label="Exit &&"];
187 [shape=box label="Exit block"]; }
188 [shape=box label="Exit when branch result"]; 178 [label="Exit when branch condition"];
189 [shape=box label="Exit when"]; }
190 [shape=box label="Exit block"]; subgraph cluster_56 {
191 [shape=box label="Exit function test_7" style="filled"]; color=blue
179 [label="Enter block"];
180 [label="Access variable R|<local>/x|"];
181 [label="Function call: R|<local>/x|.R|/A.foo|()"];
182 [label="Exit block"];
}
183 [label="Exit when branch result"];
subgraph cluster_57 {
color=blue
184 [label="Enter when branch condition else"];
185 [label="Exit when branch condition"];
}
subgraph cluster_58 {
color=blue
186 [label="Enter block"];
187 [label="Exit block"];
}
188 [label="Exit when branch result"];
189 [label="Exit when"];
}
190 [label="Exit block"];
}
191 [label="Exit function test_7" style="filled" fillcolor=red];
}
167 -> {168}; 167 -> {168};
168 -> {169}; 168 -> {169};
@@ -417,6 +575,5 @@ subgraph cluster_test_7 {
188 -> {189}; 188 -> {189};
189 -> {190}; 189 -> {190};
190 -> {191}; 190 -> {191};
}
} }
@@ -1,45 +1,69 @@
digraph boundSmartcasts_kt { digraph boundSmartcasts_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_foo { subgraph cluster_0 {
0 [shape=box label="Enter function foo" style="filled"]; color=red
1 [shape=box label="Exit function foo" style="filled"]; 0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
}
subgraph cluster_bar { subgraph cluster_1 {
2 [shape=box label="Enter function bar" style="filled"]; color=red
3 [shape=box label="Exit function bar" style="filled"]; 2 [label="Enter function bar" style="filled" fillcolor=red];
3 [label="Exit function bar" style="filled" fillcolor=red];
}
2 -> {3}; 2 -> {3};
}
subgraph cluster_test_1 { subgraph cluster_2 {
4 [shape=box label="Enter function test_1" style="filled"]; color=red
5 [shape=box label="Enter block"]; 4 [label="Enter function test_1" style="filled" fillcolor=red];
6 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_3 {
7 [shape=box label="Variable declaration: lval y: R|kotlin/Any|"]; color=blue
8 [shape=box label="Enter when"]; 5 [label="Enter block"];
9 [shape=box label="Enter when branch condition "]; 6 [label="Access variable R|<local>/x|"];
10 [shape=box label="Access variable R|<local>/x|"]; 7 [label="Variable declaration: lval y: R|kotlin/Any|"];
11 [shape=box label="Type operator: x is A"]; subgraph cluster_4 {
12 [shape=box label="Exit when branch condition"]; color=blue
13 [shape=box label="Enter block"]; 8 [label="Enter when"];
14 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_5 {
15 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; color=blue
16 [shape=box label="Access variable R|<local>/y|"]; 9 [label="Enter when branch condition "];
17 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; 10 [label="Access variable R|<local>/x|"];
18 [shape=box label="Exit block"]; 11 [label="Type operator: x is A"];
19 [shape=box label="Exit when branch result"]; 12 [label="Exit when branch condition"];
20 [shape=box label="Enter when branch condition else"]; }
21 [shape=box label="Exit when branch condition"]; subgraph cluster_6 {
22 [shape=box label="Enter block"]; color=blue
23 [shape=box label="Exit block"]; 13 [label="Enter block"];
24 [shape=box label="Exit when branch result"]; 14 [label="Access variable R|<local>/x|"];
25 [shape=box label="Exit when"]; 15 [label="Function call: R|<local>/x|.R|/A.foo|()"];
26 [shape=box label="Exit block"]; 16 [label="Access variable R|<local>/y|"];
27 [shape=box label="Exit function test_1" style="filled"]; 17 [label="Function call: R|<local>/y|.R|/A.foo|()"];
18 [label="Exit block"];
}
19 [label="Exit when branch result"];
subgraph cluster_7 {
color=blue
20 [label="Enter when branch condition else"];
21 [label="Exit when branch condition"];
}
subgraph cluster_8 {
color=blue
22 [label="Enter block"];
23 [label="Exit block"];
}
24 [label="Exit when branch result"];
25 [label="Exit when"];
}
26 [label="Exit block"];
}
27 [label="Exit function test_1" style="filled" fillcolor=red];
}
4 -> {5}; 4 -> {5};
5 -> {6}; 5 -> {6};
@@ -64,33 +88,52 @@ subgraph cluster_test_1 {
24 -> {25}; 24 -> {25};
25 -> {26}; 25 -> {26};
26 -> {27}; 26 -> {27};
}
subgraph cluster_test_2 { subgraph cluster_9 {
28 [shape=box label="Enter function test_2" style="filled"]; color=red
29 [shape=box label="Enter block"]; 28 [label="Enter function test_2" style="filled" fillcolor=red];
30 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_10 {
31 [shape=box label="Variable declaration: lval y: R|kotlin/Any|"]; color=blue
32 [shape=box label="Enter when"]; 29 [label="Enter block"];
33 [shape=box label="Enter when branch condition "]; 30 [label="Access variable R|<local>/x|"];
34 [shape=box label="Access variable R|<local>/y|"]; 31 [label="Variable declaration: lval y: R|kotlin/Any|"];
35 [shape=box label="Type operator: y is A"]; subgraph cluster_11 {
36 [shape=box label="Exit when branch condition"]; color=blue
37 [shape=box label="Enter block"]; 32 [label="Enter when"];
38 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_12 {
39 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; color=blue
40 [shape=box label="Access variable R|<local>/y|"]; 33 [label="Enter when branch condition "];
41 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; 34 [label="Access variable R|<local>/y|"];
42 [shape=box label="Exit block"]; 35 [label="Type operator: y is A"];
43 [shape=box label="Exit when branch result"]; 36 [label="Exit when branch condition"];
44 [shape=box label="Enter when branch condition else"]; }
45 [shape=box label="Exit when branch condition"]; subgraph cluster_13 {
46 [shape=box label="Enter block"]; color=blue
47 [shape=box label="Exit block"]; 37 [label="Enter block"];
48 [shape=box label="Exit when branch result"]; 38 [label="Access variable R|<local>/x|"];
49 [shape=box label="Exit when"]; 39 [label="Function call: R|<local>/x|.R|/A.foo|()"];
50 [shape=box label="Exit block"]; 40 [label="Access variable R|<local>/y|"];
51 [shape=box label="Exit function test_2" style="filled"]; 41 [label="Function call: R|<local>/y|.R|/A.foo|()"];
42 [label="Exit block"];
}
43 [label="Exit when branch result"];
subgraph cluster_14 {
color=blue
44 [label="Enter when branch condition else"];
45 [label="Exit when branch condition"];
}
subgraph cluster_15 {
color=blue
46 [label="Enter block"];
47 [label="Exit block"];
}
48 [label="Exit when branch result"];
49 [label="Exit when"];
}
50 [label="Exit block"];
}
51 [label="Exit function test_2" style="filled" fillcolor=red];
}
28 -> {29}; 28 -> {29};
29 -> {30}; 29 -> {30};
@@ -115,49 +158,83 @@ subgraph cluster_test_2 {
48 -> {49}; 48 -> {49};
49 -> {50}; 49 -> {50};
50 -> {51}; 50 -> {51};
}
subgraph cluster_test_3 { subgraph cluster_16 {
52 [shape=box label="Enter function test_3" style="filled"]; color=red
53 [shape=box label="Enter block"]; 52 [label="Enter function test_3" style="filled" fillcolor=red];
54 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_17 {
55 [shape=box label="Variable declaration: lvar z: R|kotlin/Any|"]; color=blue
56 [shape=box label="Enter when"]; 53 [label="Enter block"];
57 [shape=box label="Enter when branch condition "]; 54 [label="Access variable R|<local>/x|"];
58 [shape=box label="Access variable R|<local>/x|"]; 55 [label="Variable declaration: lvar z: R|kotlin/Any|"];
59 [shape=box label="Type operator: x is A"]; subgraph cluster_18 {
60 [shape=box label="Exit when branch condition"]; color=blue
61 [shape=box label="Enter block"]; 56 [label="Enter when"];
62 [shape=box label="Access variable R|<local>/z|"]; subgraph cluster_19 {
63 [shape=box label="Function call: R|<local>/z|.R|/A.foo|()"]; color=blue
64 [shape=box label="Exit block"]; 57 [label="Enter when branch condition "];
65 [shape=box label="Exit when branch result"]; 58 [label="Access variable R|<local>/x|"];
66 [shape=box label="Enter when branch condition else"]; 59 [label="Type operator: x is A"];
67 [shape=box label="Exit when branch condition"]; 60 [label="Exit when branch condition"];
68 [shape=box label="Enter block"]; }
69 [shape=box label="Exit block"]; subgraph cluster_20 {
70 [shape=box label="Exit when branch result"]; color=blue
71 [shape=box label="Exit when"]; 61 [label="Enter block"];
72 [shape=box label="Access variable R|<local>/y|"]; 62 [label="Access variable R|<local>/z|"];
73 [shape=box label="Assignmenet: R|<local>/z|"]; 63 [label="Function call: R|<local>/z|.R|/A.foo|()"];
74 [shape=box label="Enter when"]; 64 [label="Exit block"];
75 [shape=box label="Enter when branch condition "]; }
76 [shape=box label="Access variable R|<local>/y|"]; 65 [label="Exit when branch result"];
77 [shape=box label="Type operator: y is B"]; subgraph cluster_21 {
78 [shape=box label="Exit when branch condition"]; color=blue
79 [shape=box label="Enter block"]; 66 [label="Enter when branch condition else"];
80 [shape=box label="Access variable R|<local>/z|"]; 67 [label="Exit when branch condition"];
81 [shape=box label="Function call: R|<local>/z|.R|/B.bar|()"]; }
82 [shape=box label="Exit block"]; subgraph cluster_22 {
83 [shape=box label="Exit when branch result"]; color=blue
84 [shape=box label="Enter when branch condition else"]; 68 [label="Enter block"];
85 [shape=box label="Exit when branch condition"]; 69 [label="Exit block"];
86 [shape=box label="Enter block"]; }
87 [shape=box label="Exit block"]; 70 [label="Exit when branch result"];
88 [shape=box label="Exit when branch result"]; 71 [label="Exit when"];
89 [shape=box label="Exit when"]; }
90 [shape=box label="Exit block"]; 72 [label="Access variable R|<local>/y|"];
91 [shape=box label="Exit function test_3" style="filled"]; 73 [label="Assignmenet: R|<local>/z|"];
subgraph cluster_23 {
color=blue
74 [label="Enter when"];
subgraph cluster_24 {
color=blue
75 [label="Enter when branch condition "];
76 [label="Access variable R|<local>/y|"];
77 [label="Type operator: y is B"];
78 [label="Exit when branch condition"];
}
subgraph cluster_25 {
color=blue
79 [label="Enter block"];
80 [label="Access variable R|<local>/z|"];
81 [label="Function call: R|<local>/z|.R|/B.bar|()"];
82 [label="Exit block"];
}
83 [label="Exit when branch result"];
subgraph cluster_26 {
color=blue
84 [label="Enter when branch condition else"];
85 [label="Exit when branch condition"];
}
subgraph cluster_27 {
color=blue
86 [label="Enter block"];
87 [label="Exit block"];
}
88 [label="Exit when branch result"];
89 [label="Exit when"];
}
90 [label="Exit block"];
}
91 [label="Exit function test_3" style="filled" fillcolor=red];
}
52 -> {53}; 52 -> {53};
53 -> {54}; 53 -> {54};
@@ -198,41 +275,60 @@ subgraph cluster_test_3 {
88 -> {89}; 88 -> {89};
89 -> {90}; 89 -> {90};
90 -> {91}; 90 -> {91};
}
subgraph cluster_test_4 { subgraph cluster_28 {
92 [shape=box label="Enter function test_4" style="filled"]; color=red
93 [shape=box label="Enter block"]; 92 [label="Enter function test_4" style="filled" fillcolor=red];
94 [shape=box label="Const: Int(1)"]; subgraph cluster_29 {
95 [shape=box label="Variable declaration: lvar x: R|kotlin/Any|"]; color=blue
96 [shape=box label="Access variable R|<local>/x|"]; 93 [label="Enter block"];
97 [shape=box label="Type operator: x as Int"]; 94 [label="Const: Int(1)"];
98 [shape=box label="Access variable R|<local>/x|"]; 95 [label="Variable declaration: lvar x: R|kotlin/Any|"];
99 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; 96 [label="Access variable R|<local>/x|"];
100 [shape=box label="Access variable R|<local>/y|"]; 97 [label="Type operator: x as Int"];
101 [shape=box label="Assignmenet: R|<local>/x|"]; 98 [label="Access variable R|<local>/x|"];
102 [shape=box label="Access variable R|<local>/x|"]; 99 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
103 [shape=box label="Function call: R|<local>/x|.<Ambiguity: inc, [kotlin/inc, kotlin/inc]>#()"]; 100 [label="Access variable R|<local>/y|"];
104 [shape=box label="Enter when"]; 101 [label="Assignmenet: R|<local>/x|"];
105 [shape=box label="Enter when branch condition "]; 102 [label="Access variable R|<local>/x|"];
106 [shape=box label="Access variable R|<local>/y|"]; 103 [label="Function call: R|<local>/x|.<Ambiguity: inc, [kotlin/inc, kotlin/inc]>#()"];
107 [shape=box label="Type operator: y is A"]; subgraph cluster_30 {
108 [shape=box label="Exit when branch condition"]; color=blue
109 [shape=box label="Enter block"]; 104 [label="Enter when"];
110 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_31 {
111 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; color=blue
112 [shape=box label="Access variable R|<local>/y|"]; 105 [label="Enter when branch condition "];
113 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; 106 [label="Access variable R|<local>/y|"];
114 [shape=box label="Exit block"]; 107 [label="Type operator: y is A"];
115 [shape=box label="Exit when branch result"]; 108 [label="Exit when branch condition"];
116 [shape=box label="Enter when branch condition else"]; }
117 [shape=box label="Exit when branch condition"]; subgraph cluster_32 {
118 [shape=box label="Enter block"]; color=blue
119 [shape=box label="Exit block"]; 109 [label="Enter block"];
120 [shape=box label="Exit when branch result"]; 110 [label="Access variable R|<local>/x|"];
121 [shape=box label="Exit when"]; 111 [label="Function call: R|<local>/x|.R|/A.foo|()"];
122 [shape=box label="Exit block"]; 112 [label="Access variable R|<local>/y|"];
123 [shape=box label="Exit function test_4" style="filled"]; 113 [label="Function call: R|<local>/y|.R|/A.foo|()"];
114 [label="Exit block"];
}
115 [label="Exit when branch result"];
subgraph cluster_33 {
color=blue
116 [label="Enter when branch condition else"];
117 [label="Exit when branch condition"];
}
subgraph cluster_34 {
color=blue
118 [label="Enter block"];
119 [label="Exit block"];
}
120 [label="Exit when branch result"];
121 [label="Exit when"];
}
122 [label="Exit block"];
}
123 [label="Exit function test_4" style="filled" fillcolor=red];
}
92 -> {93}; 92 -> {93};
93 -> {94}; 93 -> {94};
@@ -265,6 +361,5 @@ subgraph cluster_test_4 {
120 -> {121}; 120 -> {121};
121 -> {122}; 121 -> {122};
122 -> {123}; 122 -> {123};
}
} }
+276 -159
View File
@@ -1,15 +1,22 @@
digraph casts_kt { digraph casts_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_test_1 { subgraph cluster_0 {
0 [shape=box label="Enter function test_1" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function test_1" style="filled" fillcolor=red];
2 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_1 {
3 [shape=box label="Type operator: x as String"]; color=blue
4 [shape=box label="Access variable R|<local>/x|"]; 1 [label="Enter block"];
5 [shape=box label="Access variable R|kotlin/String.length|"]; 2 [label="Access variable R|<local>/x|"];
6 [shape=box label="Exit block"]; 3 [label="Type operator: x as String"];
7 [shape=box label="Exit function test_1" style="filled"]; 4 [label="Access variable R|<local>/x|"];
5 [label="Access variable R|kotlin/String.length|"];
6 [label="Exit block"];
}
7 [label="Exit function test_1" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
@@ -18,31 +25,50 @@ subgraph cluster_test_1 {
4 -> {5}; 4 -> {5};
5 -> {6}; 5 -> {6};
6 -> {7}; 6 -> {7};
}
subgraph cluster_test_2 { subgraph cluster_2 {
8 [shape=box label="Enter function test_2" style="filled"]; color=red
9 [shape=box label="Enter block"]; 8 [label="Enter function test_2" style="filled" fillcolor=red];
10 [shape=box label="Enter when"]; subgraph cluster_3 {
11 [shape=box label="Enter when branch condition "]; color=blue
12 [shape=box label="Access variable R|<local>/x|"]; 9 [label="Enter block"];
13 [shape=box label="Type operator: x as Boolean"]; subgraph cluster_4 {
14 [shape=box label="Exit when branch condition"]; color=blue
15 [shape=box label="Enter block"]; 10 [label="Enter when"];
16 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_5 {
17 [shape=box label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()"]; color=blue
18 [shape=box label="Exit block"]; 11 [label="Enter when branch condition "];
19 [shape=box label="Exit when branch result"]; 12 [label="Access variable R|<local>/x|"];
20 [shape=box label="Enter when branch condition else"]; 13 [label="Type operator: x as Boolean"];
21 [shape=box label="Exit when branch condition"]; 14 [label="Exit when branch condition"];
22 [shape=box label="Enter block"]; }
23 [shape=box label="Exit block"]; subgraph cluster_6 {
24 [shape=box label="Exit when branch result"]; color=blue
25 [shape=box label="Exit when"]; 15 [label="Enter block"];
26 [shape=box label="Access variable R|<local>/x|"]; 16 [label="Access variable R|<local>/x|"];
27 [shape=box label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()"]; 17 [label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()"];
28 [shape=box label="Exit block"]; 18 [label="Exit block"];
29 [shape=box label="Exit function test_2" style="filled"]; }
19 [label="Exit when branch result"];
subgraph cluster_7 {
color=blue
20 [label="Enter when branch condition else"];
21 [label="Exit when branch condition"];
}
subgraph cluster_8 {
color=blue
22 [label="Enter block"];
23 [label="Exit block"];
}
24 [label="Exit when branch result"];
25 [label="Exit when"];
}
26 [label="Access variable R|<local>/x|"];
27 [label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()"];
28 [label="Exit block"];
}
29 [label="Exit function test_2" style="filled" fillcolor=red];
}
8 -> {9}; 8 -> {9};
9 -> {10}; 9 -> {10};
@@ -65,81 +91,139 @@ subgraph cluster_test_2 {
26 -> {27}; 26 -> {27};
27 -> {28}; 27 -> {28};
28 -> {29}; 28 -> {29};
}
subgraph cluster_test_3 { subgraph cluster_9 {
30 [shape=box label="Enter function test_3" style="filled"]; color=red
31 [shape=box label="Enter block"]; 30 [label="Enter function test_3" style="filled" fillcolor=red];
32 [shape=box label="Enter when"]; subgraph cluster_10 {
33 [shape=box label="Enter when branch condition "]; color=blue
34 [shape=box label="Enter &&"]; 31 [label="Enter block"];
35 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_11 {
36 [shape=box label="Exit left part of &&"]; color=blue
37 [shape=box label="Access variable R|<local>/x|"]; 32 [label="Enter when"];
38 [shape=box label="Type operator: x as Boolean"]; subgraph cluster_12 {
39 [shape=box label="Exit &&"]; color=blue
40 [shape=box label="Exit when branch condition"]; 33 [label="Enter when branch condition "];
41 [shape=box label="Enter block"]; subgraph cluster_13 {
42 [shape=box label="Access variable R|<local>/x|"]; color=blue
43 [shape=box label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()"]; 34 [label="Enter &&"];
44 [shape=box label="Exit block"]; 35 [label="Access variable R|<local>/b|"];
45 [shape=box label="Exit when branch result"]; 36 [label="Exit left part of &&"];
46 [shape=box label="Enter when branch condition else"]; 37 [label="Access variable R|<local>/x|"];
47 [shape=box label="Exit when branch condition"]; 38 [label="Type operator: x as Boolean"];
48 [shape=box label="Enter block"]; 39 [label="Exit &&"];
49 [shape=box label="Exit block"]; }
50 [shape=box label="Exit when branch result"]; 40 [label="Exit when branch condition"];
51 [shape=box label="Exit when"]; }
52 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_14 {
53 [shape=box label="Function call: R|<local>/x|.<Unresolved name: not>#()"]; color=blue
54 [shape=box label="Enter when"]; 41 [label="Enter block"];
55 [shape=box label="Enter when branch condition "]; 42 [label="Access variable R|<local>/x|"];
56 [shape=box label="Enter &&"]; 43 [label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()"];
57 [shape=box label="Access variable R|<local>/b|"]; 44 [label="Exit block"];
58 [shape=box label="Exit left part of &&"]; }
59 [shape=box label="Access variable R|<local>/x|"]; 45 [label="Exit when branch result"];
60 [shape=box label="Type operator: x as Boolean"]; subgraph cluster_15 {
61 [shape=box label="Const: Boolean(true)"]; color=blue
62 [shape=box label="Operator =="]; 46 [label="Enter when branch condition else"];
63 [shape=box label="Exit &&"]; 47 [label="Exit when branch condition"];
64 [shape=box label="Exit when branch condition"]; }
65 [shape=box label="Enter block"]; subgraph cluster_16 {
66 [shape=box label="Access variable R|<local>/x|"]; color=blue
67 [shape=box label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()"]; 48 [label="Enter block"];
68 [shape=box label="Exit block"]; 49 [label="Exit block"];
69 [shape=box label="Exit when branch result"]; }
70 [shape=box label="Enter when branch condition else"]; 50 [label="Exit when branch result"];
71 [shape=box label="Exit when branch condition"]; 51 [label="Exit when"];
72 [shape=box label="Enter block"]; }
73 [shape=box label="Exit block"]; 52 [label="Access variable R|<local>/x|"];
74 [shape=box label="Exit when branch result"]; 53 [label="Function call: R|<local>/x|.<Unresolved name: not>#()"];
75 [shape=box label="Exit when"]; subgraph cluster_17 {
76 [shape=box label="Access variable R|<local>/x|"]; color=blue
77 [shape=box label="Function call: R|<local>/x|.<Unresolved name: not>#()"]; 54 [label="Enter when"];
78 [shape=box label="Enter when"]; subgraph cluster_18 {
79 [shape=box label="Enter when branch condition "]; color=blue
80 [shape=box label="Enter ||"]; 55 [label="Enter when branch condition "];
81 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_19 {
82 [shape=box label="Exit left part of ||"]; color=blue
83 [shape=box label="Access variable R|<local>/x|"]; 56 [label="Enter &&"];
84 [shape=box label="Type operator: x as Boolean"]; 57 [label="Access variable R|<local>/b|"];
85 [shape=box label="Exit ||"]; 58 [label="Exit left part of &&"];
86 [shape=box label="Exit when branch condition"]; 59 [label="Access variable R|<local>/x|"];
87 [shape=box label="Enter block"]; 60 [label="Type operator: x as Boolean"];
88 [shape=box label="Access variable R|<local>/x|"]; 61 [label="Const: Boolean(true)"];
89 [shape=box label="Function call: R|<local>/x|.<Unresolved name: not>#()"]; 62 [label="Operator =="];
90 [shape=box label="Exit block"]; 63 [label="Exit &&"];
91 [shape=box label="Exit when branch result"]; }
92 [shape=box label="Enter when branch condition else"]; 64 [label="Exit when branch condition"];
93 [shape=box label="Exit when branch condition"]; }
94 [shape=box label="Enter block"]; subgraph cluster_20 {
95 [shape=box label="Exit block"]; color=blue
96 [shape=box label="Exit when branch result"]; 65 [label="Enter block"];
97 [shape=box label="Exit when"]; 66 [label="Access variable R|<local>/x|"];
98 [shape=box label="Access variable R|<local>/x|"]; 67 [label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()"];
99 [shape=box label="Function call: R|<local>/x|.<Unresolved name: not>#()"]; 68 [label="Exit block"];
100 [shape=box label="Exit block"]; }
101 [shape=box label="Exit function test_3" style="filled"]; 69 [label="Exit when branch result"];
subgraph cluster_21 {
color=blue
70 [label="Enter when branch condition else"];
71 [label="Exit when branch condition"];
}
subgraph cluster_22 {
color=blue
72 [label="Enter block"];
73 [label="Exit block"];
}
74 [label="Exit when branch result"];
75 [label="Exit when"];
}
76 [label="Access variable R|<local>/x|"];
77 [label="Function call: R|<local>/x|.<Unresolved name: not>#()"];
subgraph cluster_23 {
color=blue
78 [label="Enter when"];
subgraph cluster_24 {
color=blue
79 [label="Enter when branch condition "];
subgraph cluster_25 {
color=blue
80 [label="Enter ||"];
81 [label="Access variable R|<local>/b|"];
82 [label="Exit left part of ||"];
83 [label="Access variable R|<local>/x|"];
84 [label="Type operator: x as Boolean"];
85 [label="Exit ||"];
}
86 [label="Exit when branch condition"];
}
subgraph cluster_26 {
color=blue
87 [label="Enter block"];
88 [label="Access variable R|<local>/x|"];
89 [label="Function call: R|<local>/x|.<Unresolved name: not>#()"];
90 [label="Exit block"];
}
91 [label="Exit when branch result"];
subgraph cluster_27 {
color=blue
92 [label="Enter when branch condition else"];
93 [label="Exit when branch condition"];
}
subgraph cluster_28 {
color=blue
94 [label="Enter block"];
95 [label="Exit block"];
}
96 [label="Exit when branch result"];
97 [label="Exit when"];
}
98 [label="Access variable R|<local>/x|"];
99 [label="Function call: R|<local>/x|.<Unresolved name: not>#()"];
100 [label="Exit block"];
}
101 [label="Exit function test_3" style="filled" fillcolor=red];
}
30 -> {31}; 30 -> {31};
31 -> {32}; 31 -> {32};
@@ -212,57 +296,91 @@ subgraph cluster_test_3 {
98 -> {99}; 98 -> {99};
99 -> {100}; 99 -> {100};
100 -> {101}; 100 -> {101};
}
subgraph cluster_test_4 { subgraph cluster_29 {
102 [shape=box label="Enter function test_4" style="filled"]; color=red
103 [shape=box label="Enter block"]; 102 [label="Enter function test_4" style="filled" fillcolor=red];
104 [shape=box label="Enter when"]; subgraph cluster_30 {
105 [shape=box label="Enter when branch condition "]; color=blue
106 [shape=box label="Access variable R|<local>/b|"]; 103 [label="Enter block"];
107 [shape=box label="Type operator: b as? Boolean"]; subgraph cluster_31 {
108 [shape=box label="Const: Null(null)"]; color=blue
109 [shape=box label="Operator !="]; 104 [label="Enter when"];
110 [shape=box label="Exit when branch condition"]; subgraph cluster_32 {
111 [shape=box label="Enter block"]; color=blue
112 [shape=box label="Access variable R|<local>/b|"]; 105 [label="Enter when branch condition "];
113 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; 106 [label="Access variable R|<local>/b|"];
114 [shape=box label="Exit block"]; 107 [label="Type operator: b as? Boolean"];
115 [shape=box label="Exit when branch result"]; 108 [label="Const: Null(null)"];
116 [shape=box label="Enter when branch condition else"]; 109 [label="Operator !="];
117 [shape=box label="Exit when branch condition"]; 110 [label="Exit when branch condition"];
118 [shape=box label="Enter block"]; }
119 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_33 {
120 [shape=box label="Function call: R|<local>/b|.<Unresolved name: not>#()"]; color=blue
121 [shape=box label="Exit block"]; 111 [label="Enter block"];
122 [shape=box label="Exit when branch result"]; 112 [label="Access variable R|<local>/b|"];
123 [shape=box label="Exit when"]; 113 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
124 [shape=box label="Access variable R|<local>/b|"]; 114 [label="Exit block"];
125 [shape=box label="Function call: R|<local>/b|.<Unresolved name: not>#()"]; }
126 [shape=box label="Enter when"]; 115 [label="Exit when branch result"];
127 [shape=box label="Enter when branch condition "]; subgraph cluster_34 {
128 [shape=box label="Access variable R|<local>/b|"]; color=blue
129 [shape=box label="Type operator: b as? Boolean"]; 116 [label="Enter when branch condition else"];
130 [shape=box label="Const: Null(null)"]; 117 [label="Exit when branch condition"];
131 [shape=box label="Operator =="]; }
132 [shape=box label="Exit when branch condition"]; subgraph cluster_35 {
133 [shape=box label="Enter block"]; color=blue
134 [shape=box label="Access variable R|<local>/b|"]; 118 [label="Enter block"];
135 [shape=box label="Function call: R|<local>/b|.<Unresolved name: not>#()"]; 119 [label="Access variable R|<local>/b|"];
136 [shape=box label="Exit block"]; 120 [label="Function call: R|<local>/b|.<Unresolved name: not>#()"];
137 [shape=box label="Exit when branch result"]; 121 [label="Exit block"];
138 [shape=box label="Enter when branch condition else"]; }
139 [shape=box label="Exit when branch condition"]; 122 [label="Exit when branch result"];
140 [shape=box label="Enter block"]; 123 [label="Exit when"];
141 [shape=box label="Access variable R|<local>/b|"]; }
142 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; 124 [label="Access variable R|<local>/b|"];
143 [shape=box label="Exit block"]; 125 [label="Function call: R|<local>/b|.<Unresolved name: not>#()"];
144 [shape=box label="Exit when branch result"]; subgraph cluster_36 {
145 [shape=box label="Exit when"]; color=blue
146 [shape=box label="Access variable R|<local>/b|"]; 126 [label="Enter when"];
147 [shape=box label="Function call: R|<local>/b|.<Unresolved name: not>#()"]; subgraph cluster_37 {
148 [shape=box label="Exit block"]; color=blue
149 [shape=box label="Exit function test_4" style="filled"]; 127 [label="Enter when branch condition "];
128 [label="Access variable R|<local>/b|"];
129 [label="Type operator: b as? Boolean"];
130 [label="Const: Null(null)"];
131 [label="Operator =="];
132 [label="Exit when branch condition"];
}
subgraph cluster_38 {
color=blue
133 [label="Enter block"];
134 [label="Access variable R|<local>/b|"];
135 [label="Function call: R|<local>/b|.<Unresolved name: not>#()"];
136 [label="Exit block"];
}
137 [label="Exit when branch result"];
subgraph cluster_39 {
color=blue
138 [label="Enter when branch condition else"];
139 [label="Exit when branch condition"];
}
subgraph cluster_40 {
color=blue
140 [label="Enter block"];
141 [label="Access variable R|<local>/b|"];
142 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
143 [label="Exit block"];
}
144 [label="Exit when branch result"];
145 [label="Exit when"];
}
146 [label="Access variable R|<local>/b|"];
147 [label="Function call: R|<local>/b|.<Unresolved name: not>#()"];
148 [label="Exit block"];
}
149 [label="Exit function test_4" style="filled" fillcolor=red];
}
102 -> {103}; 102 -> {103};
103 -> {104}; 103 -> {104};
@@ -311,6 +429,5 @@ subgraph cluster_test_4 {
146 -> {147}; 146 -> {147};
147 -> {148}; 147 -> {148};
148 -> {149}; 148 -> {149};
}
} }
+87 -49
View File
@@ -1,59 +1,98 @@
digraph elvis_kt { digraph elvis_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_foo { subgraph cluster_0 {
0 [shape=box label="Enter function foo" style="filled"]; color=red
1 [shape=box label="Exit function foo" style="filled"]; 0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
}
subgraph cluster_val_b { subgraph cluster_1 {
2 [shape=box label="Enter property" style="filled"]; color=red
3 [shape=box label="Exit property" style="filled"]; 2 [label="Enter property" style="filled" fillcolor=red];
3 [label="Exit property" style="filled" fillcolor=red];
}
2 -> {3}; 2 -> {3};
}
subgraph cluster_test_1 { subgraph cluster_2 {
4 [shape=box label="Enter function test_1" style="filled"]; color=red
5 [shape=box label="Enter block"]; 4 [label="Enter function test_1" style="filled" fillcolor=red];
6 [shape=box label="Enter when"]; subgraph cluster_3 {
7 [shape=box label="Enter when branch condition "]; color=blue
8 [shape=box label="Enter when"]; 5 [label="Enter block"];
9 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_4 {
10 [shape=box label="Access variable R|/A.b|"]; color=blue
11 [shape=box label="Variable declaration: lval <elvis>: R|kotlin/Boolean?|"]; 6 [label="Enter when"];
12 [shape=box label="Enter when branch condition "]; subgraph cluster_5 {
13 [shape=box label="Const: Null(null)"]; color=blue
14 [shape=box label="Operator =="]; 7 [label="Enter when branch condition "];
15 [shape=box label="Exit when branch condition"]; subgraph cluster_6 {
16 [shape=box label="Enter block"]; color=blue
17 [shape=box label="Jump: ^test_1 Unit"]; 8 [label="Enter when"];
18 [shape=box label="Stub[DEAD]"]; 9 [label="Access variable R|<local>/x|"];
19 [shape=box label="Exit block[DEAD]"]; 10 [label="Access variable R|/A.b|"];
20 [shape=box label="Exit when branch result[DEAD]"]; 11 [label="Variable declaration: lval <elvis>: R|kotlin/Boolean?|"];
21 [shape=box label="Enter when branch condition else"]; subgraph cluster_7 {
22 [shape=box label="Exit when branch condition"]; color=blue
23 [shape=box label="Enter block"]; 12 [label="Enter when branch condition "];
24 [shape=box label="Access variable R|<local>/<elvis>|"]; 13 [label="Const: Null(null)"];
25 [shape=box label="Exit block"]; 14 [label="Operator =="];
26 [shape=box label="Exit when branch result"]; 15 [label="Exit when branch condition"];
27 [shape=box label="Exit when"]; }
28 [shape=box label="Exit when branch condition"]; subgraph cluster_8 {
29 [shape=box label="Enter block"]; color=blue
30 [shape=box label="Access variable R|<local>/x|"]; 16 [label="Enter block"];
31 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 17 [label="Jump: ^test_1 Unit"];
32 [shape=box label="Exit block"]; 18 [label="Stub" style="filled" fillcolor=gray];
33 [shape=box label="Exit when branch result"]; 19 [label="Exit block" style="filled" fillcolor=gray];
34 [shape=box label="Enter when branch condition else"]; }
35 [shape=box label="Exit when branch condition"]; 20 [label="Exit when branch result" style="filled" fillcolor=gray];
36 [shape=box label="Enter block"]; subgraph cluster_9 {
37 [shape=box label="Exit block"]; color=blue
38 [shape=box label="Exit when branch result"]; 21 [label="Enter when branch condition else"];
39 [shape=box label="Exit when"]; 22 [label="Exit when branch condition"];
40 [shape=box label="Exit block"]; }
41 [shape=box label="Exit function test_1" style="filled"]; subgraph cluster_10 {
color=blue
23 [label="Enter block"];
24 [label="Access variable R|<local>/<elvis>|"];
25 [label="Exit block"];
}
26 [label="Exit when branch result"];
27 [label="Exit when"];
}
28 [label="Exit when branch condition"];
}
subgraph cluster_11 {
color=blue
29 [label="Enter block"];
30 [label="Access variable R|<local>/x|"];
31 [label="Function call: R|<local>/x|.R|/A.foo|()"];
32 [label="Exit block"];
}
33 [label="Exit when branch result"];
subgraph cluster_12 {
color=blue
34 [label="Enter when branch condition else"];
35 [label="Exit when branch condition"];
}
subgraph cluster_13 {
color=blue
36 [label="Enter block"];
37 [label="Exit block"];
}
38 [label="Exit when branch result"];
39 [label="Exit when"];
}
40 [label="Exit block"];
}
41 [label="Exit function test_1" style="filled" fillcolor=red];
}
4 -> {5}; 4 -> {5};
5 -> {6}; 5 -> {6};
@@ -93,6 +132,5 @@ subgraph cluster_test_1 {
38 -> {39}; 38 -> {39};
39 -> {40}; 39 -> {40};
40 -> {41}; 40 -> {41};
}
} }
@@ -1,47 +1,82 @@
digraph endlessLoops_kt { digraph endlessLoops_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_foo { subgraph cluster_0 {
0 [shape=box label="Enter function foo" style="filled"]; color=red
1 [shape=box label="Exit function foo" style="filled"]; 0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
}
subgraph cluster_test_1 { subgraph cluster_1 {
2 [shape=box label="Enter function test_1" style="filled"]; color=red
3 [shape=box label="Enter block"]; 2 [label="Enter function test_1" style="filled" fillcolor=red];
4 [shape=box label="Enter while loop"]; subgraph cluster_2 {
5 [shape=box label="Enter loop condition"]; color=blue
6 [shape=box label="Const: Boolean(true)"]; 3 [label="Enter block"];
7 [shape=box label="Exit loop condition"]; subgraph cluster_3 {
8 [shape=box label="Enter loop block"]; color=blue
9 [shape=box label="Enter block"]; 4 [label="Enter while loop"];
10 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_4 {
11 [shape=box label="Type operator: x as A"]; color=blue
12 [shape=box label="Enter when"]; 5 [label="Enter loop condition"];
13 [shape=box label="Enter when branch condition "]; 6 [label="Const: Boolean(true)"];
14 [shape=box label="Access variable R|<local>/b|"]; 7 [label="Exit loop condition"];
15 [shape=box label="Exit when branch condition"]; }
16 [shape=box label="Enter block"]; subgraph cluster_5 {
17 [shape=box label="Jump: break@@@[Boolean(true)] "]; color=blue
18 [shape=box label="Stub[DEAD]"]; 8 [label="Enter loop block"];
19 [shape=box label="Exit block[DEAD]"]; subgraph cluster_6 {
20 [shape=box label="Exit when branch result[DEAD]"]; color=blue
21 [shape=box label="Enter when branch condition else"]; 9 [label="Enter block"];
22 [shape=box label="Exit when branch condition"]; 10 [label="Access variable R|<local>/x|"];
23 [shape=box label="Enter block"]; 11 [label="Type operator: x as A"];
24 [shape=box label="Exit block"]; subgraph cluster_7 {
25 [shape=box label="Exit when branch result"]; color=blue
26 [shape=box label="Exit when"]; 12 [label="Enter when"];
27 [shape=box label="Exit block"]; subgraph cluster_8 {
28 [shape=box label="Exit loop block"]; color=blue
29 [shape=box label="Stub[DEAD]"]; 13 [label="Enter when branch condition "];
30 [shape=box label="Exit whileloop"]; 14 [label="Access variable R|<local>/b|"];
31 [shape=box label="Access variable R|<local>/x|"]; 15 [label="Exit when branch condition"];
32 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; }
33 [shape=box label="Exit block"]; subgraph cluster_9 {
34 [shape=box label="Exit function test_1" style="filled"]; color=blue
16 [label="Enter block"];
17 [label="Jump: break@@@[Boolean(true)] "];
18 [label="Stub" style="filled" fillcolor=gray];
19 [label="Exit block" style="filled" fillcolor=gray];
}
20 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_10 {
color=blue
21 [label="Enter when branch condition else"];
22 [label="Exit when branch condition"];
}
subgraph cluster_11 {
color=blue
23 [label="Enter block"];
24 [label="Exit block"];
}
25 [label="Exit when branch result"];
26 [label="Exit when"];
}
27 [label="Exit block"];
}
28 [label="Exit loop block"];
}
29 [label="Stub" style="filled" fillcolor=gray];
30 [label="Exit whileloop"];
}
31 [label="Access variable R|<local>/x|"];
32 [label="Function call: R|<local>/x|.R|/A.foo|()"];
33 [label="Exit block"];
}
34 [label="Exit function test_1" style="filled" fillcolor=red];
}
2 -> {3}; 2 -> {3};
3 -> {4}; 3 -> {4};
@@ -77,42 +112,73 @@ subgraph cluster_test_1 {
31 -> {32}; 31 -> {32};
32 -> {33}; 32 -> {33};
33 -> {34}; 33 -> {34};
}
subgraph cluster_test_2 { subgraph cluster_12 {
35 [shape=box label="Enter function test_2" style="filled"]; color=red
36 [shape=box label="Enter block"]; 35 [label="Enter function test_2" style="filled" fillcolor=red];
37 [shape=box label="Enter while loop"]; subgraph cluster_13 {
38 [shape=box label="Enter loop condition"]; color=blue
39 [shape=box label="Const: Boolean(true)"]; 36 [label="Enter block"];
40 [shape=box label="Exit loop condition"]; subgraph cluster_14 {
41 [shape=box label="Enter loop block"]; color=blue
42 [shape=box label="Enter block"]; 37 [label="Enter while loop"];
43 [shape=box label="Enter when"]; subgraph cluster_15 {
44 [shape=box label="Enter when branch condition "]; color=blue
45 [shape=box label="Access variable R|<local>/b|"]; 38 [label="Enter loop condition"];
46 [shape=box label="Exit when branch condition"]; 39 [label="Const: Boolean(true)"];
47 [shape=box label="Enter block"]; 40 [label="Exit loop condition"];
48 [shape=box label="Access variable R|<local>/x|"]; }
49 [shape=box label="Type operator: x as A"]; subgraph cluster_16 {
50 [shape=box label="Jump: break@@@[Boolean(true)] "]; color=blue
51 [shape=box label="Stub[DEAD]"]; 41 [label="Enter loop block"];
52 [shape=box label="Exit block[DEAD]"]; subgraph cluster_17 {
53 [shape=box label="Exit when branch result[DEAD]"]; color=blue
54 [shape=box label="Enter when branch condition else"]; 42 [label="Enter block"];
55 [shape=box label="Exit when branch condition"]; subgraph cluster_18 {
56 [shape=box label="Enter block"]; color=blue
57 [shape=box label="Exit block"]; 43 [label="Enter when"];
58 [shape=box label="Exit when branch result"]; subgraph cluster_19 {
59 [shape=box label="Exit when"]; color=blue
60 [shape=box label="Exit block"]; 44 [label="Enter when branch condition "];
61 [shape=box label="Exit loop block"]; 45 [label="Access variable R|<local>/b|"];
62 [shape=box label="Stub[DEAD]"]; 46 [label="Exit when branch condition"];
63 [shape=box label="Exit whileloop"]; }
64 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_20 {
65 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; color=blue
66 [shape=box label="Exit block"]; 47 [label="Enter block"];
67 [shape=box label="Exit function test_2" style="filled"]; 48 [label="Access variable R|<local>/x|"];
49 [label="Type operator: x as A"];
50 [label="Jump: break@@@[Boolean(true)] "];
51 [label="Stub" style="filled" fillcolor=gray];
52 [label="Exit block" style="filled" fillcolor=gray];
}
53 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_21 {
color=blue
54 [label="Enter when branch condition else"];
55 [label="Exit when branch condition"];
}
subgraph cluster_22 {
color=blue
56 [label="Enter block"];
57 [label="Exit block"];
}
58 [label="Exit when branch result"];
59 [label="Exit when"];
}
60 [label="Exit block"];
}
61 [label="Exit loop block"];
}
62 [label="Stub" style="filled" fillcolor=gray];
63 [label="Exit whileloop"];
}
64 [label="Access variable R|<local>/x|"];
65 [label="Function call: R|<local>/x|.R|/A.foo|()"];
66 [label="Exit block"];
}
67 [label="Exit function test_2" style="filled" fillcolor=red];
}
35 -> {36}; 35 -> {36};
36 -> {37}; 36 -> {37};
@@ -148,57 +214,103 @@ subgraph cluster_test_2 {
64 -> {65}; 64 -> {65};
65 -> {66}; 65 -> {66};
66 -> {67}; 66 -> {67};
}
subgraph cluster_test_3 { subgraph cluster_23 {
68 [shape=box label="Enter function test_3" style="filled"]; color=red
69 [shape=box label="Enter block"]; 68 [label="Enter function test_3" style="filled" fillcolor=red];
70 [shape=box label="Enter while loop"]; subgraph cluster_24 {
71 [shape=box label="Enter loop condition"]; color=blue
72 [shape=box label="Const: Boolean(true)"]; 69 [label="Enter block"];
73 [shape=box label="Exit loop condition"]; subgraph cluster_25 {
74 [shape=box label="Enter loop block"]; color=blue
75 [shape=box label="Enter block"]; 70 [label="Enter while loop"];
76 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_26 {
77 [shape=box label="Type operator: x as A"]; color=blue
78 [shape=box label="Enter when"]; 71 [label="Enter loop condition"];
79 [shape=box label="Enter when branch condition "]; 72 [label="Const: Boolean(true)"];
80 [shape=box label="Access variable R|<local>/b|"]; 73 [label="Exit loop condition"];
81 [shape=box label="Exit when branch condition"]; }
82 [shape=box label="Enter block"]; subgraph cluster_27 {
83 [shape=box label="Jump: break@@@[Boolean(true)] "]; color=blue
84 [shape=box label="Stub[DEAD]"]; 74 [label="Enter loop block"];
85 [shape=box label="Exit block[DEAD]"]; subgraph cluster_28 {
86 [shape=box label="Exit when branch result[DEAD]"]; color=blue
87 [shape=box label="Enter when branch condition else"]; 75 [label="Enter block"];
88 [shape=box label="Exit when branch condition"]; 76 [label="Access variable R|<local>/x|"];
89 [shape=box label="Enter block"]; 77 [label="Type operator: x as A"];
90 [shape=box label="Exit block"]; subgraph cluster_29 {
91 [shape=box label="Exit when branch result"]; color=blue
92 [shape=box label="Exit when"]; 78 [label="Enter when"];
93 [shape=box label="Enter when"]; subgraph cluster_30 {
94 [shape=box label="Enter when branch condition "]; color=blue
95 [shape=box label="Access variable R|<local>/b|"]; 79 [label="Enter when branch condition "];
96 [shape=box label="Exit when branch condition"]; 80 [label="Access variable R|<local>/b|"];
97 [shape=box label="Enter block"]; 81 [label="Exit when branch condition"];
98 [shape=box label="Jump: break@@@[Boolean(true)] "]; }
99 [shape=box label="Stub[DEAD]"]; subgraph cluster_31 {
100 [shape=box label="Exit block[DEAD]"]; color=blue
101 [shape=box label="Exit when branch result[DEAD]"]; 82 [label="Enter block"];
102 [shape=box label="Enter when branch condition else"]; 83 [label="Jump: break@@@[Boolean(true)] "];
103 [shape=box label="Exit when branch condition"]; 84 [label="Stub" style="filled" fillcolor=gray];
104 [shape=box label="Enter block"]; 85 [label="Exit block" style="filled" fillcolor=gray];
105 [shape=box label="Exit block"]; }
106 [shape=box label="Exit when branch result"]; 86 [label="Exit when branch result" style="filled" fillcolor=gray];
107 [shape=box label="Exit when"]; subgraph cluster_32 {
108 [shape=box label="Exit block"]; color=blue
109 [shape=box label="Exit loop block"]; 87 [label="Enter when branch condition else"];
110 [shape=box label="Stub[DEAD]"]; 88 [label="Exit when branch condition"];
111 [shape=box label="Exit whileloop"]; }
112 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_33 {
113 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; color=blue
114 [shape=box label="Exit block"]; 89 [label="Enter block"];
115 [shape=box label="Exit function test_3" style="filled"]; 90 [label="Exit block"];
}
91 [label="Exit when branch result"];
92 [label="Exit when"];
}
subgraph cluster_34 {
color=blue
93 [label="Enter when"];
subgraph cluster_35 {
color=blue
94 [label="Enter when branch condition "];
95 [label="Access variable R|<local>/b|"];
96 [label="Exit when branch condition"];
}
subgraph cluster_36 {
color=blue
97 [label="Enter block"];
98 [label="Jump: break@@@[Boolean(true)] "];
99 [label="Stub" style="filled" fillcolor=gray];
100 [label="Exit block" style="filled" fillcolor=gray];
}
101 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_37 {
color=blue
102 [label="Enter when branch condition else"];
103 [label="Exit when branch condition"];
}
subgraph cluster_38 {
color=blue
104 [label="Enter block"];
105 [label="Exit block"];
}
106 [label="Exit when branch result"];
107 [label="Exit when"];
}
108 [label="Exit block"];
}
109 [label="Exit loop block"];
}
110 [label="Stub" style="filled" fillcolor=gray];
111 [label="Exit whileloop"];
}
112 [label="Access variable R|<local>/x|"];
113 [label="Function call: R|<local>/x|.R|/A.foo|()"];
114 [label="Exit block"];
}
115 [label="Exit function test_3" style="filled" fillcolor=red];
}
68 -> {69}; 68 -> {69};
69 -> {70}; 69 -> {70};
@@ -250,44 +362,75 @@ subgraph cluster_test_3 {
112 -> {113}; 112 -> {113};
113 -> {114}; 113 -> {114};
114 -> {115}; 114 -> {115};
}
subgraph cluster_test_4 { subgraph cluster_39 {
116 [shape=box label="Enter function test_4" style="filled"]; color=red
117 [shape=box label="Enter block"]; 116 [label="Enter function test_4" style="filled" fillcolor=red];
118 [shape=box label="Enter while loop"]; subgraph cluster_40 {
119 [shape=box label="Enter loop condition"]; color=blue
120 [shape=box label="Const: Boolean(true)"]; 117 [label="Enter block"];
121 [shape=box label="Exit loop condition"]; subgraph cluster_41 {
122 [shape=box label="Enter loop block"]; color=blue
123 [shape=box label="Enter block"]; 118 [label="Enter while loop"];
124 [shape=box label="Enter when"]; subgraph cluster_42 {
125 [shape=box label="Enter when branch condition "]; color=blue
126 [shape=box label="Access variable R|<local>/b|"]; 119 [label="Enter loop condition"];
127 [shape=box label="Exit when branch condition"]; 120 [label="Const: Boolean(true)"];
128 [shape=box label="Enter block"]; 121 [label="Exit loop condition"];
129 [shape=box label="Access variable R|<local>/x|"]; }
130 [shape=box label="Type operator: x as A"]; subgraph cluster_43 {
131 [shape=box label="Jump: break@@@[Boolean(true)] "]; color=blue
132 [shape=box label="Stub[DEAD]"]; 122 [label="Enter loop block"];
133 [shape=box label="Exit block[DEAD]"]; subgraph cluster_44 {
134 [shape=box label="Exit when branch result[DEAD]"]; color=blue
135 [shape=box label="Enter when branch condition else"]; 123 [label="Enter block"];
136 [shape=box label="Exit when branch condition"]; subgraph cluster_45 {
137 [shape=box label="Enter block"]; color=blue
138 [shape=box label="Exit block"]; 124 [label="Enter when"];
139 [shape=box label="Exit when branch result"]; subgraph cluster_46 {
140 [shape=box label="Exit when"]; color=blue
141 [shape=box label="Jump: break@@@[Boolean(true)] "]; 125 [label="Enter when branch condition "];
142 [shape=box label="Stub[DEAD]"]; 126 [label="Access variable R|<local>/b|"];
143 [shape=box label="Exit block[DEAD]"]; 127 [label="Exit when branch condition"];
144 [shape=box label="Exit loop block[DEAD]"]; }
145 [shape=box label="Stub[DEAD]"]; subgraph cluster_47 {
146 [shape=box label="Exit whileloop"]; color=blue
147 [shape=box label="Access variable R|<local>/x|"]; 128 [label="Enter block"];
148 [shape=box label="Function call: R|<local>/x|.<Unresolved name: foo>#()"]; 129 [label="Access variable R|<local>/x|"];
149 [shape=box label="Exit block"]; 130 [label="Type operator: x as A"];
150 [shape=box label="Exit function test_4" style="filled"]; 131 [label="Jump: break@@@[Boolean(true)] "];
132 [label="Stub" style="filled" fillcolor=gray];
133 [label="Exit block" style="filled" fillcolor=gray];
}
134 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_48 {
color=blue
135 [label="Enter when branch condition else"];
136 [label="Exit when branch condition"];
}
subgraph cluster_49 {
color=blue
137 [label="Enter block"];
138 [label="Exit block"];
}
139 [label="Exit when branch result"];
140 [label="Exit when"];
}
141 [label="Jump: break@@@[Boolean(true)] "];
142 [label="Stub" style="filled" fillcolor=gray];
143 [label="Exit block" style="filled" fillcolor=gray];
}
144 [label="Exit loop block" style="filled" fillcolor=gray];
}
145 [label="Stub" style="filled" fillcolor=gray];
146 [label="Exit whileloop"];
}
147 [label="Access variable R|<local>/x|"];
148 [label="Function call: R|<local>/x|.<Unresolved name: foo>#()"];
149 [label="Exit block"];
}
150 [label="Exit function test_4" style="filled" fillcolor=red];
}
116 -> {117}; 116 -> {117};
117 -> {118}; 117 -> {118};
@@ -326,42 +469,73 @@ subgraph cluster_test_4 {
147 -> {148}; 147 -> {148};
148 -> {149}; 148 -> {149};
149 -> {150}; 149 -> {150};
}
subgraph cluster_test_5 { subgraph cluster_50 {
151 [shape=box label="Enter function test_5" style="filled"]; color=red
152 [shape=box label="Enter block"]; 151 [label="Enter function test_5" style="filled" fillcolor=red];
153 [shape=box label="Enter do-while loop"]; subgraph cluster_51 {
154 [shape=box label="Enter loop block"]; color=blue
155 [shape=box label="Enter block"]; 152 [label="Enter block"];
156 [shape=box label="Enter when"]; subgraph cluster_52 {
157 [shape=box label="Enter when branch condition "]; color=blue
158 [shape=box label="Access variable R|<local>/b|"]; 153 [label="Enter do-while loop"];
159 [shape=box label="Exit when branch condition"]; subgraph cluster_53 {
160 [shape=box label="Enter block"]; color=blue
161 [shape=box label="Access variable R|<local>/x|"]; 154 [label="Enter loop block"];
162 [shape=box label="Type operator: x as A"]; subgraph cluster_54 {
163 [shape=box label="Jump: break@@@[Boolean(true)] "]; color=blue
164 [shape=box label="Stub[DEAD]"]; 155 [label="Enter block"];
165 [shape=box label="Exit block[DEAD]"]; subgraph cluster_55 {
166 [shape=box label="Exit when branch result[DEAD]"]; color=blue
167 [shape=box label="Enter when branch condition else"]; 156 [label="Enter when"];
168 [shape=box label="Exit when branch condition"]; subgraph cluster_56 {
169 [shape=box label="Enter block"]; color=blue
170 [shape=box label="Exit block"]; 157 [label="Enter when branch condition "];
171 [shape=box label="Exit when branch result"]; 158 [label="Access variable R|<local>/b|"];
172 [shape=box label="Exit when"]; 159 [label="Exit when branch condition"];
173 [shape=box label="Exit block"]; }
174 [shape=box label="Exit loop block"]; subgraph cluster_57 {
175 [shape=box label="Enter loop condition"]; color=blue
176 [shape=box label="Const: Boolean(true)"]; 160 [label="Enter block"];
177 [shape=box label="Exit loop condition"]; 161 [label="Access variable R|<local>/x|"];
178 [shape=box label="Stub[DEAD]"]; 162 [label="Type operator: x as A"];
179 [shape=box label="Exit do-whileloop"]; 163 [label="Jump: break@@@[Boolean(true)] "];
180 [shape=box label="Access variable R|<local>/x|"]; 164 [label="Stub" style="filled" fillcolor=gray];
181 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 165 [label="Exit block" style="filled" fillcolor=gray];
182 [shape=box label="Exit block"]; }
183 [shape=box label="Exit function test_5" style="filled"]; 166 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_58 {
color=blue
167 [label="Enter when branch condition else"];
168 [label="Exit when branch condition"];
}
subgraph cluster_59 {
color=blue
169 [label="Enter block"];
170 [label="Exit block"];
}
171 [label="Exit when branch result"];
172 [label="Exit when"];
}
173 [label="Exit block"];
}
174 [label="Exit loop block"];
}
subgraph cluster_60 {
color=blue
175 [label="Enter loop condition"];
176 [label="Const: Boolean(true)"];
177 [label="Exit loop condition"];
}
178 [label="Stub" style="filled" fillcolor=gray];
179 [label="Exit do-whileloop"];
}
180 [label="Access variable R|<local>/x|"];
181 [label="Function call: R|<local>/x|.R|/A.foo|()"];
182 [label="Exit block"];
}
183 [label="Exit function test_5" style="filled" fillcolor=red];
}
151 -> {152}; 151 -> {152};
152 -> {153}; 152 -> {153};
@@ -397,42 +571,73 @@ subgraph cluster_test_5 {
180 -> {181}; 180 -> {181};
181 -> {182}; 181 -> {182};
182 -> {183}; 182 -> {183};
}
subgraph cluster_test_6 { subgraph cluster_61 {
184 [shape=box label="Enter function test_6" style="filled"]; color=red
185 [shape=box label="Enter block"]; 184 [label="Enter function test_6" style="filled" fillcolor=red];
186 [shape=box label="Enter do-while loop"]; subgraph cluster_62 {
187 [shape=box label="Enter loop block"]; color=blue
188 [shape=box label="Enter block"]; 185 [label="Enter block"];
189 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_63 {
190 [shape=box label="Type operator: x as A"]; color=blue
191 [shape=box label="Enter when"]; 186 [label="Enter do-while loop"];
192 [shape=box label="Enter when branch condition "]; subgraph cluster_64 {
193 [shape=box label="Access variable R|<local>/b|"]; color=blue
194 [shape=box label="Exit when branch condition"]; 187 [label="Enter loop block"];
195 [shape=box label="Enter block"]; subgraph cluster_65 {
196 [shape=box label="Jump: break@@@[Boolean(true)] "]; color=blue
197 [shape=box label="Stub[DEAD]"]; 188 [label="Enter block"];
198 [shape=box label="Exit block[DEAD]"]; 189 [label="Access variable R|<local>/x|"];
199 [shape=box label="Exit when branch result[DEAD]"]; 190 [label="Type operator: x as A"];
200 [shape=box label="Enter when branch condition else"]; subgraph cluster_66 {
201 [shape=box label="Exit when branch condition"]; color=blue
202 [shape=box label="Enter block"]; 191 [label="Enter when"];
203 [shape=box label="Exit block"]; subgraph cluster_67 {
204 [shape=box label="Exit when branch result"]; color=blue
205 [shape=box label="Exit when"]; 192 [label="Enter when branch condition "];
206 [shape=box label="Exit block"]; 193 [label="Access variable R|<local>/b|"];
207 [shape=box label="Exit loop block"]; 194 [label="Exit when branch condition"];
208 [shape=box label="Enter loop condition"]; }
209 [shape=box label="Const: Boolean(true)"]; subgraph cluster_68 {
210 [shape=box label="Exit loop condition"]; color=blue
211 [shape=box label="Stub[DEAD]"]; 195 [label="Enter block"];
212 [shape=box label="Exit do-whileloop"]; 196 [label="Jump: break@@@[Boolean(true)] "];
213 [shape=box label="Access variable R|<local>/x|"]; 197 [label="Stub" style="filled" fillcolor=gray];
214 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 198 [label="Exit block" style="filled" fillcolor=gray];
215 [shape=box label="Exit block"]; }
216 [shape=box label="Exit function test_6" style="filled"]; 199 [label="Exit when branch result" style="filled" fillcolor=gray];
subgraph cluster_69 {
color=blue
200 [label="Enter when branch condition else"];
201 [label="Exit when branch condition"];
}
subgraph cluster_70 {
color=blue
202 [label="Enter block"];
203 [label="Exit block"];
}
204 [label="Exit when branch result"];
205 [label="Exit when"];
}
206 [label="Exit block"];
}
207 [label="Exit loop block"];
}
subgraph cluster_71 {
color=blue
208 [label="Enter loop condition"];
209 [label="Const: Boolean(true)"];
210 [label="Exit loop condition"];
}
211 [label="Stub" style="filled" fillcolor=gray];
212 [label="Exit do-whileloop"];
}
213 [label="Access variable R|<local>/x|"];
214 [label="Function call: R|<local>/x|.R|/A.foo|()"];
215 [label="Exit block"];
}
216 [label="Exit function test_6" style="filled" fillcolor=red];
}
184 -> {185}; 184 -> {185};
185 -> {186}; 185 -> {186};
@@ -468,27 +673,43 @@ subgraph cluster_test_6 {
213 -> {214}; 213 -> {214};
214 -> {215}; 214 -> {215};
215 -> {216}; 215 -> {216};
}
subgraph cluster_test_7 { subgraph cluster_72 {
217 [shape=box label="Enter function test_7" style="filled"]; color=red
218 [shape=box label="Enter block"]; 217 [label="Enter function test_7" style="filled" fillcolor=red];
219 [shape=box label="Enter do-while loop"]; subgraph cluster_73 {
220 [shape=box label="Enter loop block"]; color=blue
221 [shape=box label="Enter block"]; 218 [label="Enter block"];
222 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_74 {
223 [shape=box label="Type operator: x as A"]; color=blue
224 [shape=box label="Exit block"]; 219 [label="Enter do-while loop"];
225 [shape=box label="Exit loop block"]; subgraph cluster_75 {
226 [shape=box label="Enter loop condition"]; color=blue
227 [shape=box label="Const: Boolean(true)"]; 220 [label="Enter loop block"];
228 [shape=box label="Exit loop condition"]; subgraph cluster_76 {
229 [shape=box label="Stub[DEAD]"]; color=blue
230 [shape=box label="Exit do-whileloop[DEAD]"]; 221 [label="Enter block"];
231 [shape=box label="Access variable R|<local>/x|[DEAD]"]; 222 [label="Access variable R|<local>/x|"];
232 [shape=box label="Function call: R|<local>/x|.<Unresolved name: foo>#()[DEAD]"]; 223 [label="Type operator: x as A"];
233 [shape=box label="Exit block[DEAD]"]; 224 [label="Exit block"];
234 [shape=box label="Exit function test_7[DEAD]" style="filled"]; }
225 [label="Exit loop block"];
}
subgraph cluster_77 {
color=blue
226 [label="Enter loop condition"];
227 [label="Const: Boolean(true)"];
228 [label="Exit loop condition"];
}
229 [label="Stub" style="filled" fillcolor=gray];
230 [label="Exit do-whileloop" style="filled" fillcolor=gray];
}
231 [label="Access variable R|<local>/x|" style="filled" fillcolor=gray];
232 [label="Function call: R|<local>/x|.<Unresolved name: foo>#()" style="filled" fillcolor=gray];
233 [label="Exit block" style="filled" fillcolor=gray];
}
234 [label="Exit function test_7" style="filled" fillcolor=red style="filled" fillcolor=gray];
}
217 -> {218}; 217 -> {218};
218 -> {219}; 218 -> {219};
@@ -508,6 +729,5 @@ subgraph cluster_test_7 {
231 -> {232} [style=dotted]; 231 -> {232} [style=dotted];
232 -> {233} [style=dotted]; 232 -> {233} [style=dotted];
233 -> {234} [style=dotted]; 233 -> {234} [style=dotted];
}
} }
@@ -1,56 +1,94 @@
digraph equalsAndIdentity_kt { digraph equalsAndIdentity_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_foo { subgraph cluster_0 {
0 [shape=box label="Enter function foo" style="filled"]; color=red
1 [shape=box label="Exit function foo" style="filled"]; 0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
}
subgraph cluster_test_1 { subgraph cluster_1 {
2 [shape=box label="Enter function test_1" style="filled"]; color=red
3 [shape=box label="Enter block"]; 2 [label="Enter function test_1" style="filled" fillcolor=red];
4 [shape=box label="Enter when"]; subgraph cluster_2 {
5 [shape=box label="Enter when branch condition "]; color=blue
6 [shape=box label="Access variable R|<local>/x|"]; 3 [label="Enter block"];
7 [shape=box label="Access variable R|<local>/y|"]; subgraph cluster_3 {
8 [shape=box label="Operator =="]; color=blue
9 [shape=box label="Exit when branch condition"]; 4 [label="Enter when"];
10 [shape=box label="Enter block"]; subgraph cluster_4 {
11 [shape=box label="Access variable R|<local>/x|"]; color=blue
12 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 5 [label="Enter when branch condition "];
13 [shape=box label="Access variable R|<local>/y|"]; 6 [label="Access variable R|<local>/x|"];
14 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; 7 [label="Access variable R|<local>/y|"];
15 [shape=box label="Exit block"]; 8 [label="Operator =="];
16 [shape=box label="Exit when branch result"]; 9 [label="Exit when branch condition"];
17 [shape=box label="Enter when branch condition else"]; }
18 [shape=box label="Exit when branch condition"]; subgraph cluster_5 {
19 [shape=box label="Enter block"]; color=blue
20 [shape=box label="Exit block"]; 10 [label="Enter block"];
21 [shape=box label="Exit when branch result"]; 11 [label="Access variable R|<local>/x|"];
22 [shape=box label="Exit when"]; 12 [label="Function call: R|<local>/x|.R|/A.foo|()"];
23 [shape=box label="Enter when"]; 13 [label="Access variable R|<local>/y|"];
24 [shape=box label="Enter when branch condition "]; 14 [label="Function call: R|<local>/y|.R|/A.foo|()"];
25 [shape=box label="Access variable R|<local>/x|"]; 15 [label="Exit block"];
26 [shape=box label="Access variable R|<local>/y|"]; }
27 [shape=box label="Operator ==="]; 16 [label="Exit when branch result"];
28 [shape=box label="Exit when branch condition"]; subgraph cluster_6 {
29 [shape=box label="Enter block"]; color=blue
30 [shape=box label="Access variable R|<local>/x|"]; 17 [label="Enter when branch condition else"];
31 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 18 [label="Exit when branch condition"];
32 [shape=box label="Access variable R|<local>/y|"]; }
33 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; subgraph cluster_7 {
34 [shape=box label="Exit block"]; color=blue
35 [shape=box label="Exit when branch result"]; 19 [label="Enter block"];
36 [shape=box label="Enter when branch condition else"]; 20 [label="Exit block"];
37 [shape=box label="Exit when branch condition"]; }
38 [shape=box label="Enter block"]; 21 [label="Exit when branch result"];
39 [shape=box label="Exit block"]; 22 [label="Exit when"];
40 [shape=box label="Exit when branch result"]; }
41 [shape=box label="Exit when"]; subgraph cluster_8 {
42 [shape=box label="Exit block"]; color=blue
43 [shape=box label="Exit function test_1" style="filled"]; 23 [label="Enter when"];
subgraph cluster_9 {
color=blue
24 [label="Enter when branch condition "];
25 [label="Access variable R|<local>/x|"];
26 [label="Access variable R|<local>/y|"];
27 [label="Operator ==="];
28 [label="Exit when branch condition"];
}
subgraph cluster_10 {
color=blue
29 [label="Enter block"];
30 [label="Access variable R|<local>/x|"];
31 [label="Function call: R|<local>/x|.R|/A.foo|()"];
32 [label="Access variable R|<local>/y|"];
33 [label="Function call: R|<local>/y|.R|/A.foo|()"];
34 [label="Exit block"];
}
35 [label="Exit when branch result"];
subgraph cluster_11 {
color=blue
36 [label="Enter when branch condition else"];
37 [label="Exit when branch condition"];
}
subgraph cluster_12 {
color=blue
38 [label="Enter block"];
39 [label="Exit block"];
}
40 [label="Exit when branch result"];
41 [label="Exit when"];
}
42 [label="Exit block"];
}
43 [label="Exit function test_1" style="filled" fillcolor=red];
}
2 -> {3}; 2 -> {3};
3 -> {4}; 3 -> {4};
@@ -93,51 +131,85 @@ subgraph cluster_test_1 {
40 -> {41}; 40 -> {41};
41 -> {42}; 41 -> {42};
42 -> {43}; 42 -> {43};
}
subgraph cluster_test_2 { subgraph cluster_13 {
44 [shape=box label="Enter function test_2" style="filled"]; color=red
45 [shape=box label="Enter block"]; 44 [label="Enter function test_2" style="filled" fillcolor=red];
46 [shape=box label="Enter when"]; subgraph cluster_14 {
47 [shape=box label="Enter when branch condition "]; color=blue
48 [shape=box label="Access variable R|<local>/x|"]; 45 [label="Enter block"];
49 [shape=box label="Access variable R|<local>/y|"]; subgraph cluster_15 {
50 [shape=box label="Operator =="]; color=blue
51 [shape=box label="Exit when branch condition"]; 46 [label="Enter when"];
52 [shape=box label="Enter block"]; subgraph cluster_16 {
53 [shape=box label="Access variable R|<local>/x|"]; color=blue
54 [shape=box label="Function call: R|<local>/x|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"]; 47 [label="Enter when branch condition "];
55 [shape=box label="Access variable R|<local>/y|"]; 48 [label="Access variable R|<local>/x|"];
56 [shape=box label="Function call: R|<local>/y|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"]; 49 [label="Access variable R|<local>/y|"];
57 [shape=box label="Exit block"]; 50 [label="Operator =="];
58 [shape=box label="Exit when branch result"]; 51 [label="Exit when branch condition"];
59 [shape=box label="Enter when branch condition else"]; }
60 [shape=box label="Exit when branch condition"]; subgraph cluster_17 {
61 [shape=box label="Enter block"]; color=blue
62 [shape=box label="Exit block"]; 52 [label="Enter block"];
63 [shape=box label="Exit when branch result"]; 53 [label="Access variable R|<local>/x|"];
64 [shape=box label="Exit when"]; 54 [label="Function call: R|<local>/x|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
65 [shape=box label="Enter when"]; 55 [label="Access variable R|<local>/y|"];
66 [shape=box label="Enter when branch condition "]; 56 [label="Function call: R|<local>/y|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
67 [shape=box label="Access variable R|<local>/x|"]; 57 [label="Exit block"];
68 [shape=box label="Access variable R|<local>/y|"]; }
69 [shape=box label="Operator ==="]; 58 [label="Exit when branch result"];
70 [shape=box label="Exit when branch condition"]; subgraph cluster_18 {
71 [shape=box label="Enter block"]; color=blue
72 [shape=box label="Access variable R|<local>/x|"]; 59 [label="Enter when branch condition else"];
73 [shape=box label="Function call: R|<local>/x|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"]; 60 [label="Exit when branch condition"];
74 [shape=box label="Access variable R|<local>/y|"]; }
75 [shape=box label="Function call: R|<local>/y|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"]; subgraph cluster_19 {
76 [shape=box label="Exit block"]; color=blue
77 [shape=box label="Exit when branch result"]; 61 [label="Enter block"];
78 [shape=box label="Enter when branch condition else"]; 62 [label="Exit block"];
79 [shape=box label="Exit when branch condition"]; }
80 [shape=box label="Enter block"]; 63 [label="Exit when branch result"];
81 [shape=box label="Exit block"]; 64 [label="Exit when"];
82 [shape=box label="Exit when branch result"]; }
83 [shape=box label="Exit when"]; subgraph cluster_20 {
84 [shape=box label="Exit block"]; color=blue
85 [shape=box label="Exit function test_2" style="filled"]; 65 [label="Enter when"];
subgraph cluster_21 {
color=blue
66 [label="Enter when branch condition "];
67 [label="Access variable R|<local>/x|"];
68 [label="Access variable R|<local>/y|"];
69 [label="Operator ==="];
70 [label="Exit when branch condition"];
}
subgraph cluster_22 {
color=blue
71 [label="Enter block"];
72 [label="Access variable R|<local>/x|"];
73 [label="Function call: R|<local>/x|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
74 [label="Access variable R|<local>/y|"];
75 [label="Function call: R|<local>/y|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
76 [label="Exit block"];
}
77 [label="Exit when branch result"];
subgraph cluster_23 {
color=blue
78 [label="Enter when branch condition else"];
79 [label="Exit when branch condition"];
}
subgraph cluster_24 {
color=blue
80 [label="Enter block"];
81 [label="Exit block"];
}
82 [label="Exit when branch result"];
83 [label="Exit when"];
}
84 [label="Exit block"];
}
85 [label="Exit function test_2" style="filled" fillcolor=red];
}
44 -> {45}; 44 -> {45};
45 -> {46}; 45 -> {46};
@@ -180,68 +252,117 @@ subgraph cluster_test_2 {
82 -> {83}; 82 -> {83};
83 -> {84}; 83 -> {84};
84 -> {85}; 84 -> {85};
}
subgraph cluster_test_3 { subgraph cluster_25 {
86 [shape=box label="Enter function test_3" style="filled"]; color=red
87 [shape=box label="Enter block"]; 86 [label="Enter function test_3" style="filled" fillcolor=red];
88 [shape=box label="Enter when"]; subgraph cluster_26 {
89 [shape=box label="Enter when branch condition "]; color=blue
90 [shape=box label="Access variable R|<local>/y|"]; 87 [label="Enter block"];
91 [shape=box label="Const: Null(null)"]; subgraph cluster_27 {
92 [shape=box label="Operator =="]; color=blue
93 [shape=box label="Exit when branch condition"]; 88 [label="Enter when"];
94 [shape=box label="Enter block"]; subgraph cluster_28 {
95 [shape=box label="Jump: ^test_3 Unit"]; color=blue
96 [shape=box label="Stub[DEAD]"]; 89 [label="Enter when branch condition "];
97 [shape=box label="Exit block[DEAD]"]; 90 [label="Access variable R|<local>/y|"];
98 [shape=box label="Exit when branch result[DEAD]"]; 91 [label="Const: Null(null)"];
99 [shape=box label="Enter when branch condition else"]; 92 [label="Operator =="];
100 [shape=box label="Exit when branch condition"]; 93 [label="Exit when branch condition"];
101 [shape=box label="Enter block"]; }
102 [shape=box label="Exit block"]; subgraph cluster_29 {
103 [shape=box label="Exit when branch result"]; color=blue
104 [shape=box label="Exit when"]; 94 [label="Enter block"];
105 [shape=box label="Enter when"]; 95 [label="Jump: ^test_3 Unit"];
106 [shape=box label="Enter when branch condition "]; 96 [label="Stub" style="filled" fillcolor=gray];
107 [shape=box label="Access variable R|<local>/x|"]; 97 [label="Exit block" style="filled" fillcolor=gray];
108 [shape=box label="Access variable R|<local>/y|"]; }
109 [shape=box label="Operator =="]; 98 [label="Exit when branch result" style="filled" fillcolor=gray];
110 [shape=box label="Exit when branch condition"]; subgraph cluster_30 {
111 [shape=box label="Enter block"]; color=blue
112 [shape=box label="Access variable R|<local>/x|"]; 99 [label="Enter when branch condition else"];
113 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 100 [label="Exit when branch condition"];
114 [shape=box label="Access variable R|<local>/y|"]; }
115 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; subgraph cluster_31 {
116 [shape=box label="Exit block"]; color=blue
117 [shape=box label="Exit when branch result"]; 101 [label="Enter block"];
118 [shape=box label="Enter when branch condition else"]; 102 [label="Exit block"];
119 [shape=box label="Exit when branch condition"]; }
120 [shape=box label="Enter block"]; 103 [label="Exit when branch result"];
121 [shape=box label="Exit block"]; 104 [label="Exit when"];
122 [shape=box label="Exit when branch result"]; }
123 [shape=box label="Exit when"]; subgraph cluster_32 {
124 [shape=box label="Enter when"]; color=blue
125 [shape=box label="Enter when branch condition "]; 105 [label="Enter when"];
126 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_33 {
127 [shape=box label="Access variable R|<local>/y|"]; color=blue
128 [shape=box label="Operator ==="]; 106 [label="Enter when branch condition "];
129 [shape=box label="Exit when branch condition"]; 107 [label="Access variable R|<local>/x|"];
130 [shape=box label="Enter block"]; 108 [label="Access variable R|<local>/y|"];
131 [shape=box label="Access variable R|<local>/x|"]; 109 [label="Operator =="];
132 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 110 [label="Exit when branch condition"];
133 [shape=box label="Access variable R|<local>/y|"]; }
134 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; subgraph cluster_34 {
135 [shape=box label="Exit block"]; color=blue
136 [shape=box label="Exit when branch result"]; 111 [label="Enter block"];
137 [shape=box label="Enter when branch condition else"]; 112 [label="Access variable R|<local>/x|"];
138 [shape=box label="Exit when branch condition"]; 113 [label="Function call: R|<local>/x|.R|/A.foo|()"];
139 [shape=box label="Enter block"]; 114 [label="Access variable R|<local>/y|"];
140 [shape=box label="Exit block"]; 115 [label="Function call: R|<local>/y|.R|/A.foo|()"];
141 [shape=box label="Exit when branch result"]; 116 [label="Exit block"];
142 [shape=box label="Exit when"]; }
143 [shape=box label="Exit block"]; 117 [label="Exit when branch result"];
144 [shape=box label="Exit function test_3" style="filled"]; subgraph cluster_35 {
color=blue
118 [label="Enter when branch condition else"];
119 [label="Exit when branch condition"];
}
subgraph cluster_36 {
color=blue
120 [label="Enter block"];
121 [label="Exit block"];
}
122 [label="Exit when branch result"];
123 [label="Exit when"];
}
subgraph cluster_37 {
color=blue
124 [label="Enter when"];
subgraph cluster_38 {
color=blue
125 [label="Enter when branch condition "];
126 [label="Access variable R|<local>/x|"];
127 [label="Access variable R|<local>/y|"];
128 [label="Operator ==="];
129 [label="Exit when branch condition"];
}
subgraph cluster_39 {
color=blue
130 [label="Enter block"];
131 [label="Access variable R|<local>/x|"];
132 [label="Function call: R|<local>/x|.R|/A.foo|()"];
133 [label="Access variable R|<local>/y|"];
134 [label="Function call: R|<local>/y|.R|/A.foo|()"];
135 [label="Exit block"];
}
136 [label="Exit when branch result"];
subgraph cluster_40 {
color=blue
137 [label="Enter when branch condition else"];
138 [label="Exit when branch condition"];
}
subgraph cluster_41 {
color=blue
139 [label="Enter block"];
140 [label="Exit block"];
}
141 [label="Exit when branch result"];
142 [label="Exit when"];
}
143 [label="Exit block"];
}
144 [label="Exit function test_3" style="filled" fillcolor=red];
}
86 -> {87}; 86 -> {87};
87 -> {88}; 87 -> {88};
@@ -302,6 +423,5 @@ subgraph cluster_test_3 {
141 -> {142}; 141 -> {142};
142 -> {143}; 142 -> {143};
143 -> {144}; 143 -> {144};
}
} }
@@ -1,46 +1,70 @@
digraph equalsToBoolean_kt { digraph equalsToBoolean_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_foo { subgraph cluster_0 {
0 [shape=box label="Enter function foo" style="filled"]; color=red
1 [shape=box label="Exit function foo" style="filled"]; 0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
}
subgraph cluster_val_b { subgraph cluster_1 {
2 [shape=box label="Enter property" style="filled"]; color=red
3 [shape=box label="Exit property" style="filled"]; 2 [label="Enter property" style="filled" fillcolor=red];
3 [label="Exit property" style="filled" fillcolor=red];
}
2 -> {3}; 2 -> {3};
}
subgraph cluster_test_1 { subgraph cluster_2 {
4 [shape=box label="Enter function test_1" style="filled"]; color=red
5 [shape=box label="Enter block"]; 4 [label="Enter function test_1" style="filled" fillcolor=red];
6 [shape=box label="Enter when"]; subgraph cluster_3 {
7 [shape=box label="Enter when branch condition "]; color=blue
8 [shape=box label="Access variable R|<local>/b|"]; 5 [label="Enter block"];
9 [shape=box label="Const: Boolean(true)"]; subgraph cluster_4 {
10 [shape=box label="Operator =="]; color=blue
11 [shape=box label="Const: Boolean(true)"]; 6 [label="Enter when"];
12 [shape=box label="Operator =="]; subgraph cluster_5 {
13 [shape=box label="Exit when branch condition"]; color=blue
14 [shape=box label="Enter block"]; 7 [label="Enter when branch condition "];
15 [shape=box label="Access variable R|<local>/b|"]; 8 [label="Access variable R|<local>/b|"];
16 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; 9 [label="Const: Boolean(true)"];
17 [shape=box label="Exit block"]; 10 [label="Operator =="];
18 [shape=box label="Exit when branch result"]; 11 [label="Const: Boolean(true)"];
19 [shape=box label="Enter when branch condition else"]; 12 [label="Operator =="];
20 [shape=box label="Exit when branch condition"]; 13 [label="Exit when branch condition"];
21 [shape=box label="Enter block"]; }
22 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_6 {
23 [shape=box label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"]; color=blue
24 [shape=box label="Exit block"]; 14 [label="Enter block"];
25 [shape=box label="Exit when branch result"]; 15 [label="Access variable R|<local>/b|"];
26 [shape=box label="Exit when"]; 16 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
27 [shape=box label="Exit block"]; 17 [label="Exit block"];
28 [shape=box label="Exit function test_1" style="filled"]; }
18 [label="Exit when branch result"];
subgraph cluster_7 {
color=blue
19 [label="Enter when branch condition else"];
20 [label="Exit when branch condition"];
}
subgraph cluster_8 {
color=blue
21 [label="Enter block"];
22 [label="Access variable R|<local>/b|"];
23 [label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"];
24 [label="Exit block"];
}
25 [label="Exit when branch result"];
26 [label="Exit when"];
}
27 [label="Exit block"];
}
28 [label="Exit function test_1" style="filled" fillcolor=red];
}
4 -> {5}; 4 -> {5};
5 -> {6}; 5 -> {6};
@@ -66,34 +90,53 @@ subgraph cluster_test_1 {
25 -> {26}; 25 -> {26};
26 -> {27}; 26 -> {27};
27 -> {28}; 27 -> {28};
}
subgraph cluster_test_2 { subgraph cluster_9 {
29 [shape=box label="Enter function test_2" style="filled"]; color=red
30 [shape=box label="Enter block"]; 29 [label="Enter function test_2" style="filled" fillcolor=red];
31 [shape=box label="Enter when"]; subgraph cluster_10 {
32 [shape=box label="Enter when branch condition "]; color=blue
33 [shape=box label="Access variable R|<local>/b|"]; 30 [label="Enter block"];
34 [shape=box label="Const: Boolean(true)"]; subgraph cluster_11 {
35 [shape=box label="Operator =="]; color=blue
36 [shape=box label="Const: Boolean(true)"]; 31 [label="Enter when"];
37 [shape=box label="Operator !="]; subgraph cluster_12 {
38 [shape=box label="Exit when branch condition"]; color=blue
39 [shape=box label="Enter block"]; 32 [label="Enter when branch condition "];
40 [shape=box label="Access variable R|<local>/b|"]; 33 [label="Access variable R|<local>/b|"];
41 [shape=box label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"]; 34 [label="Const: Boolean(true)"];
42 [shape=box label="Exit block"]; 35 [label="Operator =="];
43 [shape=box label="Exit when branch result"]; 36 [label="Const: Boolean(true)"];
44 [shape=box label="Enter when branch condition else"]; 37 [label="Operator !="];
45 [shape=box label="Exit when branch condition"]; 38 [label="Exit when branch condition"];
46 [shape=box label="Enter block"]; }
47 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_13 {
48 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; color=blue
49 [shape=box label="Exit block"]; 39 [label="Enter block"];
50 [shape=box label="Exit when branch result"]; 40 [label="Access variable R|<local>/b|"];
51 [shape=box label="Exit when"]; 41 [label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"];
52 [shape=box label="Exit block"]; 42 [label="Exit block"];
53 [shape=box label="Exit function test_2" style="filled"]; }
43 [label="Exit when branch result"];
subgraph cluster_14 {
color=blue
44 [label="Enter when branch condition else"];
45 [label="Exit when branch condition"];
}
subgraph cluster_15 {
color=blue
46 [label="Enter block"];
47 [label="Access variable R|<local>/b|"];
48 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
49 [label="Exit block"];
}
50 [label="Exit when branch result"];
51 [label="Exit when"];
}
52 [label="Exit block"];
}
53 [label="Exit function test_2" style="filled" fillcolor=red];
}
29 -> {30}; 29 -> {30};
30 -> {31}; 30 -> {31};
@@ -119,34 +162,53 @@ subgraph cluster_test_2 {
50 -> {51}; 50 -> {51};
51 -> {52}; 51 -> {52};
52 -> {53}; 52 -> {53};
}
subgraph cluster_test_3 { subgraph cluster_16 {
54 [shape=box label="Enter function test_3" style="filled"]; color=red
55 [shape=box label="Enter block"]; 54 [label="Enter function test_3" style="filled" fillcolor=red];
56 [shape=box label="Enter when"]; subgraph cluster_17 {
57 [shape=box label="Enter when branch condition "]; color=blue
58 [shape=box label="Access variable R|<local>/b|"]; 55 [label="Enter block"];
59 [shape=box label="Const: Boolean(true)"]; subgraph cluster_18 {
60 [shape=box label="Operator =="]; color=blue
61 [shape=box label="Const: Boolean(false)"]; 56 [label="Enter when"];
62 [shape=box label="Operator =="]; subgraph cluster_19 {
63 [shape=box label="Exit when branch condition"]; color=blue
64 [shape=box label="Enter block"]; 57 [label="Enter when branch condition "];
65 [shape=box label="Access variable R|<local>/b|"]; 58 [label="Access variable R|<local>/b|"];
66 [shape=box label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"]; 59 [label="Const: Boolean(true)"];
67 [shape=box label="Exit block"]; 60 [label="Operator =="];
68 [shape=box label="Exit when branch result"]; 61 [label="Const: Boolean(false)"];
69 [shape=box label="Enter when branch condition else"]; 62 [label="Operator =="];
70 [shape=box label="Exit when branch condition"]; 63 [label="Exit when branch condition"];
71 [shape=box label="Enter block"]; }
72 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_20 {
73 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; color=blue
74 [shape=box label="Exit block"]; 64 [label="Enter block"];
75 [shape=box label="Exit when branch result"]; 65 [label="Access variable R|<local>/b|"];
76 [shape=box label="Exit when"]; 66 [label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"];
77 [shape=box label="Exit block"]; 67 [label="Exit block"];
78 [shape=box label="Exit function test_3" style="filled"]; }
68 [label="Exit when branch result"];
subgraph cluster_21 {
color=blue
69 [label="Enter when branch condition else"];
70 [label="Exit when branch condition"];
}
subgraph cluster_22 {
color=blue
71 [label="Enter block"];
72 [label="Access variable R|<local>/b|"];
73 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
74 [label="Exit block"];
}
75 [label="Exit when branch result"];
76 [label="Exit when"];
}
77 [label="Exit block"];
}
78 [label="Exit function test_3" style="filled" fillcolor=red];
}
54 -> {55}; 54 -> {55};
55 -> {56}; 55 -> {56};
@@ -172,34 +234,53 @@ subgraph cluster_test_3 {
75 -> {76}; 75 -> {76};
76 -> {77}; 76 -> {77};
77 -> {78}; 77 -> {78};
}
subgraph cluster_test_4 { subgraph cluster_23 {
79 [shape=box label="Enter function test_4" style="filled"]; color=red
80 [shape=box label="Enter block"]; 79 [label="Enter function test_4" style="filled" fillcolor=red];
81 [shape=box label="Enter when"]; subgraph cluster_24 {
82 [shape=box label="Enter when branch condition "]; color=blue
83 [shape=box label="Access variable R|<local>/b|"]; 80 [label="Enter block"];
84 [shape=box label="Const: Boolean(true)"]; subgraph cluster_25 {
85 [shape=box label="Operator =="]; color=blue
86 [shape=box label="Const: Boolean(false)"]; 81 [label="Enter when"];
87 [shape=box label="Operator !="]; subgraph cluster_26 {
88 [shape=box label="Exit when branch condition"]; color=blue
89 [shape=box label="Enter block"]; 82 [label="Enter when branch condition "];
90 [shape=box label="Access variable R|<local>/b|"]; 83 [label="Access variable R|<local>/b|"];
91 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; 84 [label="Const: Boolean(true)"];
92 [shape=box label="Exit block"]; 85 [label="Operator =="];
93 [shape=box label="Exit when branch result"]; 86 [label="Const: Boolean(false)"];
94 [shape=box label="Enter when branch condition else"]; 87 [label="Operator !="];
95 [shape=box label="Exit when branch condition"]; 88 [label="Exit when branch condition"];
96 [shape=box label="Enter block"]; }
97 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_27 {
98 [shape=box label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"]; color=blue
99 [shape=box label="Exit block"]; 89 [label="Enter block"];
100 [shape=box label="Exit when branch result"]; 90 [label="Access variable R|<local>/b|"];
101 [shape=box label="Exit when"]; 91 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
102 [shape=box label="Exit block"]; 92 [label="Exit block"];
103 [shape=box label="Exit function test_4" style="filled"]; }
93 [label="Exit when branch result"];
subgraph cluster_28 {
color=blue
94 [label="Enter when branch condition else"];
95 [label="Exit when branch condition"];
}
subgraph cluster_29 {
color=blue
96 [label="Enter block"];
97 [label="Access variable R|<local>/b|"];
98 [label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"];
99 [label="Exit block"];
}
100 [label="Exit when branch result"];
101 [label="Exit when"];
}
102 [label="Exit block"];
}
103 [label="Exit function test_4" style="filled" fillcolor=red];
}
79 -> {80}; 79 -> {80};
80 -> {81}; 80 -> {81};
@@ -225,34 +306,53 @@ subgraph cluster_test_4 {
100 -> {101}; 100 -> {101};
101 -> {102}; 101 -> {102};
102 -> {103}; 102 -> {103};
}
subgraph cluster_test_5 { subgraph cluster_30 {
104 [shape=box label="Enter function test_5" style="filled"]; color=red
105 [shape=box label="Enter block"]; 104 [label="Enter function test_5" style="filled" fillcolor=red];
106 [shape=box label="Enter when"]; subgraph cluster_31 {
107 [shape=box label="Enter when branch condition "]; color=blue
108 [shape=box label="Access variable R|<local>/b|"]; 105 [label="Enter block"];
109 [shape=box label="Const: Boolean(true)"]; subgraph cluster_32 {
110 [shape=box label="Operator !="]; color=blue
111 [shape=box label="Const: Boolean(true)"]; 106 [label="Enter when"];
112 [shape=box label="Operator =="]; subgraph cluster_33 {
113 [shape=box label="Exit when branch condition"]; color=blue
114 [shape=box label="Enter block"]; 107 [label="Enter when branch condition "];
115 [shape=box label="Access variable R|<local>/b|"]; 108 [label="Access variable R|<local>/b|"];
116 [shape=box label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"]; 109 [label="Const: Boolean(true)"];
117 [shape=box label="Exit block"]; 110 [label="Operator !="];
118 [shape=box label="Exit when branch result"]; 111 [label="Const: Boolean(true)"];
119 [shape=box label="Enter when branch condition else"]; 112 [label="Operator =="];
120 [shape=box label="Exit when branch condition"]; 113 [label="Exit when branch condition"];
121 [shape=box label="Enter block"]; }
122 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_34 {
123 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; color=blue
124 [shape=box label="Exit block"]; 114 [label="Enter block"];
125 [shape=box label="Exit when branch result"]; 115 [label="Access variable R|<local>/b|"];
126 [shape=box label="Exit when"]; 116 [label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"];
127 [shape=box label="Exit block"]; 117 [label="Exit block"];
128 [shape=box label="Exit function test_5" style="filled"]; }
118 [label="Exit when branch result"];
subgraph cluster_35 {
color=blue
119 [label="Enter when branch condition else"];
120 [label="Exit when branch condition"];
}
subgraph cluster_36 {
color=blue
121 [label="Enter block"];
122 [label="Access variable R|<local>/b|"];
123 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
124 [label="Exit block"];
}
125 [label="Exit when branch result"];
126 [label="Exit when"];
}
127 [label="Exit block"];
}
128 [label="Exit function test_5" style="filled" fillcolor=red];
}
104 -> {105}; 104 -> {105};
105 -> {106}; 105 -> {106};
@@ -278,34 +378,53 @@ subgraph cluster_test_5 {
125 -> {126}; 125 -> {126};
126 -> {127}; 126 -> {127};
127 -> {128}; 127 -> {128};
}
subgraph cluster_test_6 { subgraph cluster_37 {
129 [shape=box label="Enter function test_6" style="filled"]; color=red
130 [shape=box label="Enter block"]; 129 [label="Enter function test_6" style="filled" fillcolor=red];
131 [shape=box label="Enter when"]; subgraph cluster_38 {
132 [shape=box label="Enter when branch condition "]; color=blue
133 [shape=box label="Access variable R|<local>/b|"]; 130 [label="Enter block"];
134 [shape=box label="Const: Boolean(true)"]; subgraph cluster_39 {
135 [shape=box label="Operator !="]; color=blue
136 [shape=box label="Const: Boolean(true)"]; 131 [label="Enter when"];
137 [shape=box label="Operator !="]; subgraph cluster_40 {
138 [shape=box label="Exit when branch condition"]; color=blue
139 [shape=box label="Enter block"]; 132 [label="Enter when branch condition "];
140 [shape=box label="Access variable R|<local>/b|"]; 133 [label="Access variable R|<local>/b|"];
141 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; 134 [label="Const: Boolean(true)"];
142 [shape=box label="Exit block"]; 135 [label="Operator !="];
143 [shape=box label="Exit when branch result"]; 136 [label="Const: Boolean(true)"];
144 [shape=box label="Enter when branch condition else"]; 137 [label="Operator !="];
145 [shape=box label="Exit when branch condition"]; 138 [label="Exit when branch condition"];
146 [shape=box label="Enter block"]; }
147 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_41 {
148 [shape=box label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"]; color=blue
149 [shape=box label="Exit block"]; 139 [label="Enter block"];
150 [shape=box label="Exit when branch result"]; 140 [label="Access variable R|<local>/b|"];
151 [shape=box label="Exit when"]; 141 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
152 [shape=box label="Exit block"]; 142 [label="Exit block"];
153 [shape=box label="Exit function test_6" style="filled"]; }
143 [label="Exit when branch result"];
subgraph cluster_42 {
color=blue
144 [label="Enter when branch condition else"];
145 [label="Exit when branch condition"];
}
subgraph cluster_43 {
color=blue
146 [label="Enter block"];
147 [label="Access variable R|<local>/b|"];
148 [label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"];
149 [label="Exit block"];
}
150 [label="Exit when branch result"];
151 [label="Exit when"];
}
152 [label="Exit block"];
}
153 [label="Exit function test_6" style="filled" fillcolor=red];
}
129 -> {130}; 129 -> {130};
130 -> {131}; 130 -> {131};
@@ -331,34 +450,53 @@ subgraph cluster_test_6 {
150 -> {151}; 150 -> {151};
151 -> {152}; 151 -> {152};
152 -> {153}; 152 -> {153};
}
subgraph cluster_test_7 { subgraph cluster_44 {
154 [shape=box label="Enter function test_7" style="filled"]; color=red
155 [shape=box label="Enter block"]; 154 [label="Enter function test_7" style="filled" fillcolor=red];
156 [shape=box label="Enter when"]; subgraph cluster_45 {
157 [shape=box label="Enter when branch condition "]; color=blue
158 [shape=box label="Access variable R|<local>/b|"]; 155 [label="Enter block"];
159 [shape=box label="Const: Boolean(true)"]; subgraph cluster_46 {
160 [shape=box label="Operator !="]; color=blue
161 [shape=box label="Const: Boolean(false)"]; 156 [label="Enter when"];
162 [shape=box label="Operator =="]; subgraph cluster_47 {
163 [shape=box label="Exit when branch condition"]; color=blue
164 [shape=box label="Enter block"]; 157 [label="Enter when branch condition "];
165 [shape=box label="Access variable R|<local>/b|"]; 158 [label="Access variable R|<local>/b|"];
166 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; 159 [label="Const: Boolean(true)"];
167 [shape=box label="Exit block"]; 160 [label="Operator !="];
168 [shape=box label="Exit when branch result"]; 161 [label="Const: Boolean(false)"];
169 [shape=box label="Enter when branch condition else"]; 162 [label="Operator =="];
170 [shape=box label="Exit when branch condition"]; 163 [label="Exit when branch condition"];
171 [shape=box label="Enter block"]; }
172 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_48 {
173 [shape=box label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"]; color=blue
174 [shape=box label="Exit block"]; 164 [label="Enter block"];
175 [shape=box label="Exit when branch result"]; 165 [label="Access variable R|<local>/b|"];
176 [shape=box label="Exit when"]; 166 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
177 [shape=box label="Exit block"]; 167 [label="Exit block"];
178 [shape=box label="Exit function test_7" style="filled"]; }
168 [label="Exit when branch result"];
subgraph cluster_49 {
color=blue
169 [label="Enter when branch condition else"];
170 [label="Exit when branch condition"];
}
subgraph cluster_50 {
color=blue
171 [label="Enter block"];
172 [label="Access variable R|<local>/b|"];
173 [label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"];
174 [label="Exit block"];
}
175 [label="Exit when branch result"];
176 [label="Exit when"];
}
177 [label="Exit block"];
}
178 [label="Exit function test_7" style="filled" fillcolor=red];
}
154 -> {155}; 154 -> {155};
155 -> {156}; 155 -> {156};
@@ -384,34 +522,53 @@ subgraph cluster_test_7 {
175 -> {176}; 175 -> {176};
176 -> {177}; 176 -> {177};
177 -> {178}; 177 -> {178};
}
subgraph cluster_test_8 { subgraph cluster_51 {
179 [shape=box label="Enter function test_8" style="filled"]; color=red
180 [shape=box label="Enter block"]; 179 [label="Enter function test_8" style="filled" fillcolor=red];
181 [shape=box label="Enter when"]; subgraph cluster_52 {
182 [shape=box label="Enter when branch condition "]; color=blue
183 [shape=box label="Access variable R|<local>/b|"]; 180 [label="Enter block"];
184 [shape=box label="Const: Boolean(true)"]; subgraph cluster_53 {
185 [shape=box label="Operator !="]; color=blue
186 [shape=box label="Const: Boolean(false)"]; 181 [label="Enter when"];
187 [shape=box label="Operator !="]; subgraph cluster_54 {
188 [shape=box label="Exit when branch condition"]; color=blue
189 [shape=box label="Enter block"]; 182 [label="Enter when branch condition "];
190 [shape=box label="Access variable R|<local>/b|"]; 183 [label="Access variable R|<local>/b|"];
191 [shape=box label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"]; 184 [label="Const: Boolean(true)"];
192 [shape=box label="Exit block"]; 185 [label="Operator !="];
193 [shape=box label="Exit when branch result"]; 186 [label="Const: Boolean(false)"];
194 [shape=box label="Enter when branch condition else"]; 187 [label="Operator !="];
195 [shape=box label="Exit when branch condition"]; 188 [label="Exit when branch condition"];
196 [shape=box label="Enter block"]; }
197 [shape=box label="Access variable R|<local>/b|"]; subgraph cluster_55 {
198 [shape=box label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"]; color=blue
199 [shape=box label="Exit block"]; 189 [label="Enter block"];
200 [shape=box label="Exit when branch result"]; 190 [label="Access variable R|<local>/b|"];
201 [shape=box label="Exit when"]; 191 [label="Function call: R|<local>/b|.<Inapplicable(WRONG_RECEIVER): [kotlin/Boolean.not]>#()"];
202 [shape=box label="Exit block"]; 192 [label="Exit block"];
203 [shape=box label="Exit function test_8" style="filled"]; }
193 [label="Exit when branch result"];
subgraph cluster_56 {
color=blue
194 [label="Enter when branch condition else"];
195 [label="Exit when branch condition"];
}
subgraph cluster_57 {
color=blue
196 [label="Enter block"];
197 [label="Access variable R|<local>/b|"];
198 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
199 [label="Exit block"];
}
200 [label="Exit when branch result"];
201 [label="Exit when"];
}
202 [label="Exit block"];
}
203 [label="Exit function test_8" style="filled" fillcolor=red];
}
179 -> {180}; 179 -> {180};
180 -> {181}; 180 -> {181};
@@ -437,6 +594,5 @@ subgraph cluster_test_8 {
200 -> {201}; 200 -> {201};
201 -> {202}; 201 -> {202};
202 -> {203}; 202 -> {203};
}
} }
@@ -1,62 +1,96 @@
digraph inPlaceLambdas_kt { digraph inPlaceLambdas_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_foo { subgraph cluster_0 {
0 [shape=box label="Enter function foo" style="filled"]; color=red
1 [shape=box label="Exit function foo" style="filled"]; 0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
}
subgraph cluster_bar { subgraph cluster_1 {
2 [shape=box label="Enter function bar" style="filled"]; color=red
3 [shape=box label="Exit function bar" style="filled"]; 2 [label="Enter function bar" style="filled" fillcolor=red];
3 [label="Exit function bar" style="filled" fillcolor=red];
}
2 -> {3}; 2 -> {3};
}
subgraph cluster_run { subgraph cluster_2 {
4 [shape=box label="Enter function run" style="filled"]; color=red
5 [shape=box label="Enter block"]; 4 [label="Enter function run" style="filled" fillcolor=red];
6 [shape=box label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"]; subgraph cluster_3 {
7 [shape=box label="Exit block"]; color=blue
8 [shape=box label="Exit function run" style="filled"]; 5 [label="Enter block"];
6 [label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
7 [label="Exit block"];
}
8 [label="Exit function run" style="filled" fillcolor=red];
}
4 -> {5}; 4 -> {5};
5 -> {6}; 5 -> {6};
6 -> {7}; 6 -> {7};
7 -> {8}; 7 -> {8};
}
subgraph cluster_test_1 { subgraph cluster_4 {
9 [shape=box label="Enter function test_1" style="filled"]; color=red
10 [shape=box label="Enter block"]; 9 [label="Enter function test_1" style="filled" fillcolor=red];
11 [shape=box label="Enter when"]; subgraph cluster_5 {
12 [shape=box label="Enter when branch condition "]; color=blue
13 [shape=box label="Access variable R|<local>/x|"]; 10 [label="Enter block"];
14 [shape=box label="Type operator: x is A"]; subgraph cluster_6 {
15 [shape=box label="Exit when branch condition"]; color=blue
16 [shape=box label="Enter block"]; 11 [label="Enter when"];
17 [shape=box label="Enter function anonymousFunction"]; subgraph cluster_7 {
18 [shape=box label="Enter block"]; color=blue
19 [shape=box label="Access variable R|<local>/x|"]; 12 [label="Enter when branch condition "];
20 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 13 [label="Access variable R|<local>/x|"];
21 [shape=box label="Exit block"]; 14 [label="Type operator: x is A"];
22 [shape=box label="Exit function anonymousFunction"]; 15 [label="Exit when branch condition"];
23 [shape=box label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> { }
subgraph cluster_8 {
color=blue
16 [label="Enter block"];
subgraph cluster_9 {
color=blue
17 [label="Enter function anonymousFunction"];
subgraph cluster_10 {
color=blue
18 [label="Enter block"];
19 [label="Access variable R|<local>/x|"];
20 [label="Function call: R|<local>/x|.R|/A.foo|()"];
21 [label="Exit block"];
}
22 [label="Exit function anonymousFunction"];
}
23 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
R|<local>/x|.R|/A.foo|() R|<local>/x|.R|/A.foo|()
} }
)"]; )"];
24 [shape=box label="Exit block"]; 24 [label="Exit block"];
25 [shape=box label="Exit when branch result"]; }
26 [shape=box label="Enter when branch condition else"]; 25 [label="Exit when branch result"];
27 [shape=box label="Exit when branch condition"]; subgraph cluster_11 {
28 [shape=box label="Enter block"]; color=blue
29 [shape=box label="Exit block"]; 26 [label="Enter when branch condition else"];
30 [shape=box label="Exit when branch result"]; 27 [label="Exit when branch condition"];
31 [shape=box label="Exit when"]; }
32 [shape=box label="Exit block"]; subgraph cluster_12 {
33 [shape=box label="Exit function test_1" style="filled"]; color=blue
28 [label="Enter block"];
29 [label="Exit block"];
}
30 [label="Exit when branch result"];
31 [label="Exit when"];
}
32 [label="Exit block"];
}
33 [label="Exit function test_1" style="filled" fillcolor=red];
}
9 -> {10}; 9 -> {10};
10 -> {11}; 10 -> {11};
@@ -82,25 +116,35 @@ subgraph cluster_test_1 {
30 -> {31}; 30 -> {31};
31 -> {32}; 31 -> {32};
32 -> {33}; 32 -> {33};
}
subgraph cluster_test_2 { subgraph cluster_13 {
34 [shape=box label="Enter function test_2" style="filled"]; color=red
35 [shape=box label="Enter block"]; 34 [label="Enter function test_2" style="filled" fillcolor=red];
36 [shape=box label="Enter function anonymousFunction"]; subgraph cluster_14 {
37 [shape=box label="Enter block"]; color=blue
38 [shape=box label="Access variable R|<local>/x|"]; 35 [label="Enter block"];
39 [shape=box label="Type operator: x as B"]; subgraph cluster_15 {
40 [shape=box label="Exit block"]; color=blue
41 [shape=box label="Exit function anonymousFunction"]; 36 [label="Enter function anonymousFunction"];
42 [shape=box label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> { subgraph cluster_16 {
color=blue
37 [label="Enter block"];
38 [label="Access variable R|<local>/x|"];
39 [label="Type operator: x as B"];
40 [label="Exit block"];
}
41 [label="Exit function anonymousFunction"];
}
42 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
(R|<local>/x| as R|B|) (R|<local>/x| as R|B|)
} }
)"]; )"];
43 [shape=box label="Access variable R|<local>/x|"]; 43 [label="Access variable R|<local>/x|"];
44 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; 44 [label="Function call: R|<local>/x|.R|/B.bar|()"];
45 [shape=box label="Exit block"]; 45 [label="Exit block"];
46 [shape=box label="Exit function test_2" style="filled"]; }
46 [label="Exit function test_2" style="filled" fillcolor=red];
}
34 -> {35}; 34 -> {35};
35 -> {36}; 35 -> {36};
@@ -114,42 +158,67 @@ subgraph cluster_test_2 {
43 -> {44}; 43 -> {44};
44 -> {45}; 44 -> {45};
45 -> {46}; 45 -> {46};
}
subgraph cluster_test_3 { subgraph cluster_17 {
47 [shape=box label="Enter function test_3" style="filled"]; color=red
48 [shape=box label="Enter block"]; 47 [label="Enter function test_3" style="filled" fillcolor=red];
49 [shape=box label="Enter when"]; subgraph cluster_18 {
50 [shape=box label="Enter when branch condition "]; color=blue
51 [shape=box label="Access variable R|<local>/x|"]; 48 [label="Enter block"];
52 [shape=box label="Type operator: x is A"]; subgraph cluster_19 {
53 [shape=box label="Exit when branch condition"]; color=blue
54 [shape=box label="Enter block"]; 49 [label="Enter when"];
55 [shape=box label="Enter function anonymousFunction"]; subgraph cluster_20 {
56 [shape=box label="Enter block"]; color=blue
57 [shape=box label="Access variable R|<local>/x|"]; 50 [label="Enter when branch condition "];
58 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 51 [label="Access variable R|<local>/x|"];
59 [shape=box label="Access variable R|<local>/x|"]; 52 [label="Type operator: x is A"];
60 [shape=box label="Type operator: x as B"]; 53 [label="Exit when branch condition"];
61 [shape=box label="Exit block"]; }
62 [shape=box label="Exit function anonymousFunction"]; subgraph cluster_21 {
63 [shape=box label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> { color=blue
54 [label="Enter block"];
subgraph cluster_22 {
color=blue
55 [label="Enter function anonymousFunction"];
subgraph cluster_23 {
color=blue
56 [label="Enter block"];
57 [label="Access variable R|<local>/x|"];
58 [label="Function call: R|<local>/x|.R|/A.foo|()"];
59 [label="Access variable R|<local>/x|"];
60 [label="Type operator: x as B"];
61 [label="Exit block"];
}
62 [label="Exit function anonymousFunction"];
}
63 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
R|<local>/x|.R|/A.foo|() R|<local>/x|.R|/A.foo|()
(R|<local>/x| as R|B|) (R|<local>/x| as R|B|)
} }
)"]; )"];
64 [shape=box label="Access variable R|<local>/x|"]; 64 [label="Access variable R|<local>/x|"];
65 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; 65 [label="Function call: R|<local>/x|.R|/B.bar|()"];
66 [shape=box label="Exit block"]; 66 [label="Exit block"];
67 [shape=box label="Exit when branch result"]; }
68 [shape=box label="Enter when branch condition else"]; 67 [label="Exit when branch result"];
69 [shape=box label="Exit when branch condition"]; subgraph cluster_24 {
70 [shape=box label="Enter block"]; color=blue
71 [shape=box label="Exit block"]; 68 [label="Enter when branch condition else"];
72 [shape=box label="Exit when branch result"]; 69 [label="Exit when branch condition"];
73 [shape=box label="Exit when"]; }
74 [shape=box label="Exit block"]; subgraph cluster_25 {
75 [shape=box label="Exit function test_3" style="filled"]; color=blue
70 [label="Enter block"];
71 [label="Exit block"];
}
72 [label="Exit when branch result"];
73 [label="Exit when"];
}
74 [label="Exit block"];
}
75 [label="Exit function test_3" style="filled" fillcolor=red];
}
47 -> {48}; 47 -> {48};
48 -> {49}; 48 -> {49};
@@ -179,6 +248,5 @@ subgraph cluster_test_3 {
72 -> {73}; 72 -> {73};
73 -> {74}; 73 -> {74};
74 -> {75}; 74 -> {75};
}
} }
File diff suppressed because it is too large Load Diff
+232 -139
View File
@@ -1,29 +1,51 @@
digraph returns_kt { digraph returns_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_test_0 { subgraph cluster_0 {
0 [shape=box label="Enter function test_0" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function test_0" style="filled" fillcolor=red];
2 [shape=box label="Enter when"]; subgraph cluster_1 {
3 [shape=box label="Enter when branch condition "]; color=blue
4 [shape=box label="Access variable R|<local>/x|"]; 1 [label="Enter block"];
5 [shape=box label="Type operator: x is String"]; subgraph cluster_2 {
6 [shape=box label="Exit when branch condition"]; color=blue
7 [shape=box label="Enter block"]; 2 [label="Enter when"];
8 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_3 {
9 [shape=box label="Access variable R|kotlin/String.length|"]; color=blue
10 [shape=box label="Exit block"]; 3 [label="Enter when branch condition "];
11 [shape=box label="Exit when branch result"]; 4 [label="Access variable R|<local>/x|"];
12 [shape=box label="Enter when branch condition else"]; 5 [label="Type operator: x is String"];
13 [shape=box label="Exit when branch condition"]; 6 [label="Exit when branch condition"];
14 [shape=box label="Enter block"]; }
15 [shape=box label="Exit block"]; subgraph cluster_4 {
16 [shape=box label="Exit when branch result"]; color=blue
17 [shape=box label="Exit when"]; 7 [label="Enter block"];
18 [shape=box label="Access variable R|<local>/x|"]; 8 [label="Access variable R|<local>/x|"];
19 [shape=box label="Access variable <Unresolved name: length>#"]; 9 [label="Access variable R|kotlin/String.length|"];
20 [shape=box label="Exit block"]; 10 [label="Exit block"];
21 [shape=box label="Exit function test_0" style="filled"]; }
11 [label="Exit when branch result"];
subgraph cluster_5 {
color=blue
12 [label="Enter when branch condition else"];
13 [label="Exit when branch condition"];
}
subgraph cluster_6 {
color=blue
14 [label="Enter block"];
15 [label="Exit block"];
}
16 [label="Exit when branch result"];
17 [label="Exit when"];
}
18 [label="Access variable R|<local>/x|"];
19 [label="Access variable <Unresolved name: length>#"];
20 [label="Exit block"];
}
21 [label="Exit function test_0" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
@@ -46,33 +68,52 @@ subgraph cluster_test_0 {
18 -> {19}; 18 -> {19};
19 -> {20}; 19 -> {20};
20 -> {21}; 20 -> {21};
}
subgraph cluster_test_1 { subgraph cluster_7 {
22 [shape=box label="Enter function test_1" style="filled"]; color=red
23 [shape=box label="Enter block"]; 22 [label="Enter function test_1" style="filled" fillcolor=red];
24 [shape=box label="Enter when"]; subgraph cluster_8 {
25 [shape=box label="Enter when branch condition "]; color=blue
26 [shape=box label="Access variable R|<local>/x|"]; 23 [label="Enter block"];
27 [shape=box label="Type operator: x is String"]; subgraph cluster_9 {
28 [shape=box label="Exit when branch condition"]; color=blue
29 [shape=box label="Enter block"]; 24 [label="Enter when"];
30 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_10 {
31 [shape=box label="Access variable R|kotlin/String.length|"]; color=blue
32 [shape=box label="Exit block"]; 25 [label="Enter when branch condition "];
33 [shape=box label="Exit when branch result"]; 26 [label="Access variable R|<local>/x|"];
34 [shape=box label="Enter when branch condition else"]; 27 [label="Type operator: x is String"];
35 [shape=box label="Exit when branch condition"]; 28 [label="Exit when branch condition"];
36 [shape=box label="Enter block"]; }
37 [shape=box label="Jump: ^test_1 Unit"]; subgraph cluster_11 {
38 [shape=box label="Stub[DEAD]"]; color=blue
39 [shape=box label="Exit block[DEAD]"]; 29 [label="Enter block"];
40 [shape=box label="Exit when branch result[DEAD]"]; 30 [label="Access variable R|<local>/x|"];
41 [shape=box label="Exit when"]; 31 [label="Access variable R|kotlin/String.length|"];
42 [shape=box label="Access variable R|<local>/x|"]; 32 [label="Exit block"];
43 [shape=box label="Access variable R|kotlin/String.length|"]; }
44 [shape=box label="Exit block"]; 33 [label="Exit when branch result"];
45 [shape=box label="Exit function test_1" style="filled"]; subgraph cluster_12 {
color=blue
34 [label="Enter when branch condition else"];
35 [label="Exit when branch condition"];
}
subgraph cluster_13 {
color=blue
36 [label="Enter block"];
37 [label="Jump: ^test_1 Unit"];
38 [label="Stub" style="filled" fillcolor=gray];
39 [label="Exit block" style="filled" fillcolor=gray];
}
40 [label="Exit when branch result" style="filled" fillcolor=gray];
41 [label="Exit when"];
}
42 [label="Access variable R|<local>/x|"];
43 [label="Access variable R|kotlin/String.length|"];
44 [label="Exit block"];
}
45 [label="Exit function test_1" style="filled" fillcolor=red];
}
22 -> {23}; 22 -> {23};
23 -> {24}; 23 -> {24};
@@ -98,67 +139,95 @@ subgraph cluster_test_1 {
42 -> {43}; 42 -> {43};
43 -> {44}; 43 -> {44};
44 -> {45}; 44 -> {45};
}
subgraph cluster_foo { subgraph cluster_14 {
46 [shape=box label="Enter function foo" style="filled"]; color=red
47 [shape=box label="Exit function foo" style="filled"]; 46 [label="Enter function foo" style="filled" fillcolor=red];
47 [label="Exit function foo" style="filled" fillcolor=red];
}
46 -> {47}; 46 -> {47};
}
subgraph cluster_bar { subgraph cluster_15 {
48 [shape=box label="Enter function bar" style="filled"]; color=red
49 [shape=box label="Exit function bar" style="filled"]; 48 [label="Enter function bar" style="filled" fillcolor=red];
49 [label="Exit function bar" style="filled" fillcolor=red];
}
48 -> {49}; 48 -> {49};
}
subgraph cluster_baz { subgraph cluster_16 {
50 [shape=box label="Enter function baz" style="filled"]; color=red
51 [shape=box label="Exit function baz" style="filled"]; 50 [label="Enter function baz" style="filled" fillcolor=red];
51 [label="Exit function baz" style="filled" fillcolor=red];
}
50 -> {51}; 50 -> {51};
}
subgraph cluster_test_2 { subgraph cluster_17 {
52 [shape=box label="Enter function test_2" style="filled"]; color=red
53 [shape=box label="Enter block"]; 52 [label="Enter function test_2" style="filled" fillcolor=red];
54 [shape=box label="Enter when"]; subgraph cluster_18 {
55 [shape=box label="Enter when branch condition "]; color=blue
56 [shape=box label="Access variable R|<local>/x|"]; 53 [label="Enter block"];
57 [shape=box label="Type operator: x is B"]; subgraph cluster_19 {
58 [shape=box label="Exit when branch condition"]; color=blue
59 [shape=box label="Enter block"]; 54 [label="Enter when"];
60 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_20 {
61 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; color=blue
62 [shape=box label="Exit block"]; 55 [label="Enter when branch condition "];
63 [shape=box label="Exit when branch result"]; 56 [label="Access variable R|<local>/x|"];
64 [shape=box label="Enter when branch condition "]; 57 [label="Type operator: x is B"];
65 [shape=box label="Access variable R|<local>/x|"]; 58 [label="Exit when branch condition"];
66 [shape=box label="Type operator: x is C"]; }
67 [shape=box label="Exit when branch condition"]; subgraph cluster_21 {
68 [shape=box label="Enter block"]; color=blue
69 [shape=box label="Access variable R|<local>/x|"]; 59 [label="Enter block"];
70 [shape=box label="Function call: R|<local>/x|.R|/C.baz|()"]; 60 [label="Access variable R|<local>/x|"];
71 [shape=box label="Exit block"]; 61 [label="Function call: R|<local>/x|.R|/B.bar|()"];
72 [shape=box label="Exit when branch result"]; 62 [label="Exit block"];
73 [shape=box label="Enter when branch condition else"]; }
74 [shape=box label="Exit when branch condition"]; 63 [label="Exit when branch result"];
75 [shape=box label="Enter block"]; subgraph cluster_22 {
76 [shape=box label="Jump: ^test_2 Unit"]; color=blue
77 [shape=box label="Stub[DEAD]"]; 64 [label="Enter when branch condition "];
78 [shape=box label="Exit block[DEAD]"]; 65 [label="Access variable R|<local>/x|"];
79 [shape=box label="Exit when branch result[DEAD]"]; 66 [label="Type operator: x is C"];
80 [shape=box label="Exit when"]; 67 [label="Exit when branch condition"];
81 [shape=box label="Access variable R|<local>/x|"]; }
82 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; subgraph cluster_23 {
83 [shape=box label="Access variable R|<local>/x|"]; color=blue
84 [shape=box label="Function call: R|<local>/x|.<Unresolved name: bar>#()"]; 68 [label="Enter block"];
85 [shape=box label="Access variable R|<local>/x|"]; 69 [label="Access variable R|<local>/x|"];
86 [shape=box label="Function call: R|<local>/x|.<Unresolved name: baz>#()"]; 70 [label="Function call: R|<local>/x|.R|/C.baz|()"];
87 [shape=box label="Exit block"]; 71 [label="Exit block"];
88 [shape=box label="Exit function test_2" style="filled"]; }
72 [label="Exit when branch result"];
subgraph cluster_24 {
color=blue
73 [label="Enter when branch condition else"];
74 [label="Exit when branch condition"];
}
subgraph cluster_25 {
color=blue
75 [label="Enter block"];
76 [label="Jump: ^test_2 Unit"];
77 [label="Stub" style="filled" fillcolor=gray];
78 [label="Exit block" style="filled" fillcolor=gray];
}
79 [label="Exit when branch result" style="filled" fillcolor=gray];
80 [label="Exit when"];
}
81 [label="Access variable R|<local>/x|"];
82 [label="Function call: R|<local>/x|.R|/A.foo|()"];
83 [label="Access variable R|<local>/x|"];
84 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()"];
85 [label="Access variable R|<local>/x|"];
86 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()"];
87 [label="Exit block"];
}
88 [label="Exit function test_2" style="filled" fillcolor=red];
}
52 -> {53}; 52 -> {53};
53 -> {54}; 53 -> {54};
@@ -197,44 +266,69 @@ subgraph cluster_test_2 {
85 -> {86}; 85 -> {86};
86 -> {87}; 86 -> {87};
87 -> {88}; 87 -> {88};
}
subgraph cluster_test_3 { subgraph cluster_26 {
89 [shape=box label="Enter function test_3" style="filled"]; color=red
90 [shape=box label="Enter block"]; 89 [label="Enter function test_3" style="filled" fillcolor=red];
91 [shape=box label="Enter when"]; subgraph cluster_27 {
92 [shape=box label="Enter when branch condition "]; color=blue
93 [shape=box label="Access variable R|<local>/x|"]; 90 [label="Enter block"];
94 [shape=box label="Type operator: x is B"]; subgraph cluster_28 {
95 [shape=box label="Exit when branch condition"]; color=blue
96 [shape=box label="Enter block"]; 91 [label="Enter when"];
97 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_29 {
98 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; color=blue
99 [shape=box label="Exit block"]; 92 [label="Enter when branch condition "];
100 [shape=box label="Exit when branch result"]; 93 [label="Access variable R|<local>/x|"];
101 [shape=box label="Enter when branch condition "]; 94 [label="Type operator: x is B"];
102 [shape=box label="Access variable R|<local>/x|"]; 95 [label="Exit when branch condition"];
103 [shape=box label="Type operator: x is C"]; }
104 [shape=box label="Exit when branch condition"]; subgraph cluster_30 {
105 [shape=box label="Enter block"]; color=blue
106 [shape=box label="Access variable R|<local>/x|"]; 96 [label="Enter block"];
107 [shape=box label="Function call: R|<local>/x|.R|/C.baz|()"]; 97 [label="Access variable R|<local>/x|"];
108 [shape=box label="Exit block"]; 98 [label="Function call: R|<local>/x|.R|/B.bar|()"];
109 [shape=box label="Exit when branch result"]; 99 [label="Exit block"];
110 [shape=box label="Enter when branch condition else"]; }
111 [shape=box label="Exit when branch condition"]; 100 [label="Exit when branch result"];
112 [shape=box label="Enter block"]; subgraph cluster_31 {
113 [shape=box label="Exit block"]; color=blue
114 [shape=box label="Exit when branch result"]; 101 [label="Enter when branch condition "];
115 [shape=box label="Exit when"]; 102 [label="Access variable R|<local>/x|"];
116 [shape=box label="Access variable R|<local>/x|"]; 103 [label="Type operator: x is C"];
117 [shape=box label="Function call: R|<local>/x|.<Unresolved name: foo>#()"]; 104 [label="Exit when branch condition"];
118 [shape=box label="Access variable R|<local>/x|"]; }
119 [shape=box label="Function call: R|<local>/x|.<Unresolved name: bar>#()"]; subgraph cluster_32 {
120 [shape=box label="Access variable R|<local>/x|"]; color=blue
121 [shape=box label="Function call: R|<local>/x|.<Unresolved name: baz>#()"]; 105 [label="Enter block"];
122 [shape=box label="Exit block"]; 106 [label="Access variable R|<local>/x|"];
123 [shape=box label="Exit function test_3" style="filled"]; 107 [label="Function call: R|<local>/x|.R|/C.baz|()"];
108 [label="Exit block"];
}
109 [label="Exit when branch result"];
subgraph cluster_33 {
color=blue
110 [label="Enter when branch condition else"];
111 [label="Exit when branch condition"];
}
subgraph cluster_34 {
color=blue
112 [label="Enter block"];
113 [label="Exit block"];
}
114 [label="Exit when branch result"];
115 [label="Exit when"];
}
116 [label="Access variable R|<local>/x|"];
117 [label="Function call: R|<local>/x|.<Unresolved name: foo>#()"];
118 [label="Access variable R|<local>/x|"];
119 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()"];
120 [label="Access variable R|<local>/x|"];
121 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()"];
122 [label="Exit block"];
}
123 [label="Exit function test_3" style="filled" fillcolor=red];
}
89 -> {90}; 89 -> {90};
90 -> {91}; 90 -> {91};
@@ -270,6 +364,5 @@ subgraph cluster_test_3 {
120 -> {121}; 120 -> {121};
121 -> {122}; 121 -> {122};
122 -> {123}; 122 -> {123};
}
} }
+147 -82
View File
@@ -1,29 +1,51 @@
digraph simpleIf_kt { digraph simpleIf_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_test_1 { subgraph cluster_0 {
0 [shape=box label="Enter function test_1" style="filled"]; color=red
1 [shape=box label="Enter block"]; 0 [label="Enter function test_1" style="filled" fillcolor=red];
2 [shape=box label="Enter when"]; subgraph cluster_1 {
3 [shape=box label="Enter when branch condition "]; color=blue
4 [shape=box label="Access variable R|<local>/x|"]; 1 [label="Enter block"];
5 [shape=box label="Type operator: x is String"]; subgraph cluster_2 {
6 [shape=box label="Exit when branch condition"]; color=blue
7 [shape=box label="Enter block"]; 2 [label="Enter when"];
8 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_3 {
9 [shape=box label="Access variable R|kotlin/String.length|"]; color=blue
10 [shape=box label="Exit block"]; 3 [label="Enter when branch condition "];
11 [shape=box label="Exit when branch result"]; 4 [label="Access variable R|<local>/x|"];
12 [shape=box label="Enter when branch condition else"]; 5 [label="Type operator: x is String"];
13 [shape=box label="Exit when branch condition"]; 6 [label="Exit when branch condition"];
14 [shape=box label="Enter block"]; }
15 [shape=box label="Exit block"]; subgraph cluster_4 {
16 [shape=box label="Exit when branch result"]; color=blue
17 [shape=box label="Exit when"]; 7 [label="Enter block"];
18 [shape=box label="Access variable R|<local>/x|"]; 8 [label="Access variable R|<local>/x|"];
19 [shape=box label="Access variable <Unresolved name: length>#"]; 9 [label="Access variable R|kotlin/String.length|"];
20 [shape=box label="Exit block"]; 10 [label="Exit block"];
21 [shape=box label="Exit function test_1" style="filled"]; }
11 [label="Exit when branch result"];
subgraph cluster_5 {
color=blue
12 [label="Enter when branch condition else"];
13 [label="Exit when branch condition"];
}
subgraph cluster_6 {
color=blue
14 [label="Enter block"];
15 [label="Exit block"];
}
16 [label="Exit when branch result"];
17 [label="Exit when"];
}
18 [label="Access variable R|<local>/x|"];
19 [label="Access variable <Unresolved name: length>#"];
20 [label="Exit block"];
}
21 [label="Exit function test_1" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
1 -> {2}; 1 -> {2};
@@ -46,33 +68,52 @@ subgraph cluster_test_1 {
18 -> {19}; 18 -> {19};
19 -> {20}; 19 -> {20};
20 -> {21}; 20 -> {21};
}
subgraph cluster_test_2 { subgraph cluster_7 {
22 [shape=box label="Enter function test_2" style="filled"]; color=red
23 [shape=box label="Enter block"]; 22 [label="Enter function test_2" style="filled" fillcolor=red];
24 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_8 {
25 [shape=box label="Type operator: x is String"]; color=blue
26 [shape=box label="Variable declaration: lval b: R|kotlin/Boolean|"]; 23 [label="Enter block"];
27 [shape=box label="Enter when"]; 24 [label="Access variable R|<local>/x|"];
28 [shape=box label="Enter when branch condition "]; 25 [label="Type operator: x is String"];
29 [shape=box label="Access variable R|<local>/b|"]; 26 [label="Variable declaration: lval b: R|kotlin/Boolean|"];
30 [shape=box label="Exit when branch condition"]; subgraph cluster_9 {
31 [shape=box label="Enter block"]; color=blue
32 [shape=box label="Access variable R|<local>/x|"]; 27 [label="Enter when"];
33 [shape=box label="Access variable R|kotlin/String.length|"]; subgraph cluster_10 {
34 [shape=box label="Exit block"]; color=blue
35 [shape=box label="Exit when branch result"]; 28 [label="Enter when branch condition "];
36 [shape=box label="Enter when branch condition else"]; 29 [label="Access variable R|<local>/b|"];
37 [shape=box label="Exit when branch condition"]; 30 [label="Exit when branch condition"];
38 [shape=box label="Enter block"]; }
39 [shape=box label="Exit block"]; subgraph cluster_11 {
40 [shape=box label="Exit when branch result"]; color=blue
41 [shape=box label="Exit when"]; 31 [label="Enter block"];
42 [shape=box label="Access variable R|<local>/x|"]; 32 [label="Access variable R|<local>/x|"];
43 [shape=box label="Access variable <Unresolved name: length>#"]; 33 [label="Access variable R|kotlin/String.length|"];
44 [shape=box label="Exit block"]; 34 [label="Exit block"];
45 [shape=box label="Exit function test_2" style="filled"]; }
35 [label="Exit when branch result"];
subgraph cluster_12 {
color=blue
36 [label="Enter when branch condition else"];
37 [label="Exit when branch condition"];
}
subgraph cluster_13 {
color=blue
38 [label="Enter block"];
39 [label="Exit block"];
}
40 [label="Exit when branch result"];
41 [label="Exit when"];
}
42 [label="Access variable R|<local>/x|"];
43 [label="Access variable <Unresolved name: length>#"];
44 [label="Exit block"];
}
45 [label="Exit function test_2" style="filled" fillcolor=red];
}
22 -> {23}; 22 -> {23};
23 -> {24}; 23 -> {24};
@@ -97,38 +138,63 @@ subgraph cluster_test_2 {
42 -> {43}; 42 -> {43};
43 -> {44}; 43 -> {44};
44 -> {45}; 44 -> {45};
}
subgraph cluster_test_3 { subgraph cluster_14 {
46 [shape=box label="Enter function test_3" style="filled"]; color=red
47 [shape=box label="Enter block"]; 46 [label="Enter function test_3" style="filled" fillcolor=red];
48 [shape=box label="Enter when"]; subgraph cluster_15 {
49 [shape=box label="Enter when branch condition "]; color=blue
50 [shape=box label="Access variable R|<local>/x|"]; 47 [label="Enter block"];
51 [shape=box label="Type operator: x !is String"]; subgraph cluster_16 {
52 [shape=box label="Exit when branch condition"]; color=blue
53 [shape=box label="Enter block"]; 48 [label="Enter when"];
54 [shape=box label="Exit block"]; subgraph cluster_17 {
55 [shape=box label="Exit when branch result"]; color=blue
56 [shape=box label="Enter when branch condition "]; 49 [label="Enter when branch condition "];
57 [shape=box label="Access variable R|<local>/x|"]; 50 [label="Access variable R|<local>/x|"];
58 [shape=box label="Type operator: x !is Int"]; 51 [label="Type operator: x !is String"];
59 [shape=box label="Exit when branch condition"]; 52 [label="Exit when branch condition"];
60 [shape=box label="Enter block"]; }
61 [shape=box label="Exit block"]; subgraph cluster_18 {
62 [shape=box label="Exit when branch result"]; color=blue
63 [shape=box label="Enter when branch condition else"]; 53 [label="Enter block"];
64 [shape=box label="Exit when branch condition"]; 54 [label="Exit block"];
65 [shape=box label="Enter block"]; }
66 [shape=box label="Access variable R|<local>/x|"]; 55 [label="Exit when branch result"];
67 [shape=box label="Access variable R|kotlin/String.length|"]; subgraph cluster_19 {
68 [shape=box label="Access variable R|<local>/x|"]; color=blue
69 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; 56 [label="Enter when branch condition "];
70 [shape=box label="Exit block"]; 57 [label="Access variable R|<local>/x|"];
71 [shape=box label="Exit when branch result"]; 58 [label="Type operator: x !is Int"];
72 [shape=box label="Exit when"]; 59 [label="Exit when branch condition"];
73 [shape=box label="Exit block"]; }
74 [shape=box label="Exit function test_3" style="filled"]; subgraph cluster_20 {
color=blue
60 [label="Enter block"];
61 [label="Exit block"];
}
62 [label="Exit when branch result"];
subgraph cluster_21 {
color=blue
63 [label="Enter when branch condition else"];
64 [label="Exit when branch condition"];
}
subgraph cluster_22 {
color=blue
65 [label="Enter block"];
66 [label="Access variable R|<local>/x|"];
67 [label="Access variable R|kotlin/String.length|"];
68 [label="Access variable R|<local>/x|"];
69 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
70 [label="Exit block"];
}
71 [label="Exit when branch result"];
72 [label="Exit when"];
}
73 [label="Exit block"];
}
74 [label="Exit function test_3" style="filled" fillcolor=red];
}
46 -> {47}; 46 -> {47};
47 -> {48}; 47 -> {48};
@@ -158,6 +224,5 @@ subgraph cluster_test_3 {
71 -> {72}; 71 -> {72};
72 -> {73}; 72 -> {73};
73 -> {74}; 73 -> {74};
}
} }
+439 -260
View File
@@ -1,90 +1,147 @@
digraph when_kt { digraph when_kt {
graph [splines=ortho, nodesep=3] graph [splines=ortho nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_foo { subgraph cluster_0 {
0 [shape=box label="Enter function foo" style="filled"]; color=red
1 [shape=box label="Exit function foo" style="filled"]; 0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1}; 0 -> {1};
}
subgraph cluster_bar { subgraph cluster_1 {
2 [shape=box label="Enter function bar" style="filled"]; color=red
3 [shape=box label="Exit function bar" style="filled"]; 2 [label="Enter function bar" style="filled" fillcolor=red];
3 [label="Exit function bar" style="filled" fillcolor=red];
}
2 -> {3}; 2 -> {3};
}
subgraph cluster_test_1 { subgraph cluster_2 {
4 [shape=box label="Enter function test_1" style="filled"]; color=red
5 [shape=box label="Enter block"]; 4 [label="Enter function test_1" style="filled" fillcolor=red];
6 [shape=box label="Enter when"]; subgraph cluster_3 {
7 [shape=box label="Enter when branch condition "]; color=blue
8 [shape=box label="Access variable R|<local>/x|"]; 5 [label="Enter block"];
9 [shape=box label="Type operator: x is A"]; subgraph cluster_4 {
10 [shape=box label="Exit when branch condition"]; color=blue
11 [shape=box label="Enter block"]; 6 [label="Enter when"];
12 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_5 {
13 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; color=blue
14 [shape=box label="Exit block"]; 7 [label="Enter when branch condition "];
15 [shape=box label="Exit when branch result"]; 8 [label="Access variable R|<local>/x|"];
16 [shape=box label="Enter when branch condition "]; 9 [label="Type operator: x is A"];
17 [shape=box label="Access variable R|<local>/x|"]; 10 [label="Exit when branch condition"];
18 [shape=box label="Type operator: x is B"]; }
19 [shape=box label="Exit when branch condition"]; subgraph cluster_6 {
20 [shape=box label="Enter block"]; color=blue
21 [shape=box label="Access variable R|<local>/x|"]; 11 [label="Enter block"];
22 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; 12 [label="Access variable R|<local>/x|"];
23 [shape=box label="Exit block"]; 13 [label="Function call: R|<local>/x|.R|/A.foo|()"];
24 [shape=box label="Exit when branch result"]; 14 [label="Exit block"];
25 [shape=box label="Enter when branch condition else"]; }
26 [shape=box label="Exit when branch condition"]; 15 [label="Exit when branch result"];
27 [shape=box label="Enter block"]; subgraph cluster_7 {
28 [shape=box label="Exit block"]; color=blue
29 [shape=box label="Exit when branch result"]; 16 [label="Enter when branch condition "];
30 [shape=box label="Exit when"]; 17 [label="Access variable R|<local>/x|"];
31 [shape=box label="Enter when"]; 18 [label="Type operator: x is B"];
32 [shape=box label="Enter when branch condition "]; 19 [label="Exit when branch condition"];
33 [shape=box label="Access variable R|<local>/x|"]; }
34 [shape=box label="Type operator: x !is A"]; subgraph cluster_8 {
35 [shape=box label="Exit when branch condition"]; color=blue
36 [shape=box label="Enter block"]; 20 [label="Enter block"];
37 [shape=box label="Exit block"]; 21 [label="Access variable R|<local>/x|"];
38 [shape=box label="Exit when branch result"]; 22 [label="Function call: R|<local>/x|.R|/B.bar|()"];
39 [shape=box label="Enter when branch condition "]; 23 [label="Exit block"];
40 [shape=box label="Access variable R|<local>/x|"]; }
41 [shape=box label="Type operator: x !is B"]; 24 [label="Exit when branch result"];
42 [shape=box label="Exit when branch condition"]; subgraph cluster_9 {
43 [shape=box label="Enter block"]; color=blue
44 [shape=box label="Access variable R|<local>/x|"]; 25 [label="Enter when branch condition else"];
45 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 26 [label="Exit when branch condition"];
46 [shape=box label="Exit block"]; }
47 [shape=box label="Exit when branch result"]; subgraph cluster_10 {
48 [shape=box label="Enter when branch condition "]; color=blue
49 [shape=box label="Access variable R|<local>/x|"]; 27 [label="Enter block"];
50 [shape=box label="Type operator: x is Int"]; 28 [label="Exit block"];
51 [shape=box label="Exit when branch condition"]; }
52 [shape=box label="Enter block"]; 29 [label="Exit when branch result"];
53 [shape=box label="Access variable R|<local>/x|"]; 30 [label="Exit when"];
54 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; }
55 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_11 {
56 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; color=blue
57 [shape=box label="Access variable R|<local>/x|"]; 31 [label="Enter when"];
58 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; subgraph cluster_12 {
59 [shape=box label="Exit block"]; color=blue
60 [shape=box label="Exit when branch result"]; 32 [label="Enter when branch condition "];
61 [shape=box label="Enter when branch condition else"]; 33 [label="Access variable R|<local>/x|"];
62 [shape=box label="Exit when branch condition"]; 34 [label="Type operator: x !is A"];
63 [shape=box label="Enter block"]; 35 [label="Exit when branch condition"];
64 [shape=box label="Access variable R|<local>/x|"]; }
65 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; subgraph cluster_13 {
66 [shape=box label="Access variable R|<local>/x|"]; color=blue
67 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; 36 [label="Enter block"];
68 [shape=box label="Exit block"]; 37 [label="Exit block"];
69 [shape=box label="Exit when branch result"]; }
70 [shape=box label="Exit when"]; 38 [label="Exit when branch result"];
71 [shape=box label="Exit block"]; subgraph cluster_14 {
72 [shape=box label="Exit function test_1" style="filled"]; color=blue
39 [label="Enter when branch condition "];
40 [label="Access variable R|<local>/x|"];
41 [label="Type operator: x !is B"];
42 [label="Exit when branch condition"];
}
subgraph cluster_15 {
color=blue
43 [label="Enter block"];
44 [label="Access variable R|<local>/x|"];
45 [label="Function call: R|<local>/x|.R|/A.foo|()"];
46 [label="Exit block"];
}
47 [label="Exit when branch result"];
subgraph cluster_16 {
color=blue
48 [label="Enter when branch condition "];
49 [label="Access variable R|<local>/x|"];
50 [label="Type operator: x is Int"];
51 [label="Exit when branch condition"];
}
subgraph cluster_17 {
color=blue
52 [label="Enter block"];
53 [label="Access variable R|<local>/x|"];
54 [label="Function call: R|<local>/x|.R|/A.foo|()"];
55 [label="Access variable R|<local>/x|"];
56 [label="Function call: R|<local>/x|.R|/B.bar|()"];
57 [label="Access variable R|<local>/x|"];
58 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
59 [label="Exit block"];
}
60 [label="Exit when branch result"];
subgraph cluster_18 {
color=blue
61 [label="Enter when branch condition else"];
62 [label="Exit when branch condition"];
}
subgraph cluster_19 {
color=blue
63 [label="Enter block"];
64 [label="Access variable R|<local>/x|"];
65 [label="Function call: R|<local>/x|.R|/A.foo|()"];
66 [label="Access variable R|<local>/x|"];
67 [label="Function call: R|<local>/x|.R|/B.bar|()"];
68 [label="Exit block"];
}
69 [label="Exit when branch result"];
70 [label="Exit when"];
}
71 [label="Exit block"];
}
72 [label="Exit function test_1" style="filled" fillcolor=red];
}
4 -> {5}; 4 -> {5};
5 -> {6}; 5 -> {6};
@@ -154,75 +211,127 @@ subgraph cluster_test_1 {
69 -> {70}; 69 -> {70};
70 -> {71}; 70 -> {71};
71 -> {72}; 71 -> {72};
}
subgraph cluster_test_2 { subgraph cluster_20 {
73 [shape=box label="Enter function test_2" style="filled"]; color=red
74 [shape=box label="Enter block"]; 73 [label="Enter function test_2" style="filled" fillcolor=red];
75 [shape=box label="Enter when"]; subgraph cluster_21 {
76 [shape=box label="Access variable R|<local>/x|"]; color=blue
77 [shape=box label="Enter when branch condition "]; 74 [label="Enter block"];
78 [shape=box label="Type operator: A"]; subgraph cluster_22 {
79 [shape=box label="Exit when branch condition"]; color=blue
80 [shape=box label="Enter block"]; 75 [label="Enter when"];
81 [shape=box label="Access variable R|<local>/x|"]; 76 [label="Access variable R|<local>/x|"];
82 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; subgraph cluster_23 {
83 [shape=box label="Exit block"]; color=blue
84 [shape=box label="Exit when branch result"]; 77 [label="Enter when branch condition "];
85 [shape=box label="Enter when branch condition "]; 78 [label="Type operator: A"];
86 [shape=box label="Type operator: B"]; 79 [label="Exit when branch condition"];
87 [shape=box label="Exit when branch condition"]; }
88 [shape=box label="Enter block"]; subgraph cluster_24 {
89 [shape=box label="Access variable R|<local>/x|"]; color=blue
90 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; 80 [label="Enter block"];
91 [shape=box label="Exit block"]; 81 [label="Access variable R|<local>/x|"];
92 [shape=box label="Exit when branch result"]; 82 [label="Function call: R|<local>/x|.R|/A.foo|()"];
93 [shape=box label="Enter when branch condition else"]; 83 [label="Exit block"];
94 [shape=box label="Exit when branch condition"]; }
95 [shape=box label="Enter block"]; 84 [label="Exit when branch result"];
96 [shape=box label="Exit block"]; subgraph cluster_25 {
97 [shape=box label="Exit when branch result"]; color=blue
98 [shape=box label="Exit when"]; 85 [label="Enter when branch condition "];
99 [shape=box label="Enter when"]; 86 [label="Type operator: B"];
100 [shape=box label="Access variable R|<local>/x|"]; 87 [label="Exit when branch condition"];
101 [shape=box label="Enter when branch condition "]; }
102 [shape=box label="Type operator: A"]; subgraph cluster_26 {
103 [shape=box label="Exit when branch condition"]; color=blue
104 [shape=box label="Enter block"]; 88 [label="Enter block"];
105 [shape=box label="Exit block"]; 89 [label="Access variable R|<local>/x|"];
106 [shape=box label="Exit when branch result"]; 90 [label="Function call: R|<local>/x|.R|/B.bar|()"];
107 [shape=box label="Enter when branch condition "]; 91 [label="Exit block"];
108 [shape=box label="Type operator: B"]; }
109 [shape=box label="Exit when branch condition"]; 92 [label="Exit when branch result"];
110 [shape=box label="Enter block"]; subgraph cluster_27 {
111 [shape=box label="Access variable R|<local>/x|"]; color=blue
112 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 93 [label="Enter when branch condition else"];
113 [shape=box label="Exit block"]; 94 [label="Exit when branch condition"];
114 [shape=box label="Exit when branch result"]; }
115 [shape=box label="Enter when branch condition "]; subgraph cluster_28 {
116 [shape=box label="Type operator: Int"]; color=blue
117 [shape=box label="Exit when branch condition"]; 95 [label="Enter block"];
118 [shape=box label="Enter block"]; 96 [label="Exit block"];
119 [shape=box label="Access variable R|<local>/x|"]; }
120 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 97 [label="Exit when branch result"];
121 [shape=box label="Access variable R|<local>/x|"]; 98 [label="Exit when"];
122 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; }
123 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_29 {
124 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; color=blue
125 [shape=box label="Exit block"]; 99 [label="Enter when"];
126 [shape=box label="Exit when branch result"]; 100 [label="Access variable R|<local>/x|"];
127 [shape=box label="Enter when branch condition else"]; subgraph cluster_30 {
128 [shape=box label="Exit when branch condition"]; color=blue
129 [shape=box label="Enter block"]; 101 [label="Enter when branch condition "];
130 [shape=box label="Access variable R|<local>/x|"]; 102 [label="Type operator: A"];
131 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 103 [label="Exit when branch condition"];
132 [shape=box label="Access variable R|<local>/x|"]; }
133 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; subgraph cluster_31 {
134 [shape=box label="Exit block"]; color=blue
135 [shape=box label="Exit when branch result"]; 104 [label="Enter block"];
136 [shape=box label="Exit when"]; 105 [label="Exit block"];
137 [shape=box label="Exit block"]; }
138 [shape=box label="Exit function test_2" style="filled"]; 106 [label="Exit when branch result"];
subgraph cluster_32 {
color=blue
107 [label="Enter when branch condition "];
108 [label="Type operator: B"];
109 [label="Exit when branch condition"];
}
subgraph cluster_33 {
color=blue
110 [label="Enter block"];
111 [label="Access variable R|<local>/x|"];
112 [label="Function call: R|<local>/x|.R|/A.foo|()"];
113 [label="Exit block"];
}
114 [label="Exit when branch result"];
subgraph cluster_34 {
color=blue
115 [label="Enter when branch condition "];
116 [label="Type operator: Int"];
117 [label="Exit when branch condition"];
}
subgraph cluster_35 {
color=blue
118 [label="Enter block"];
119 [label="Access variable R|<local>/x|"];
120 [label="Function call: R|<local>/x|.R|/A.foo|()"];
121 [label="Access variable R|<local>/x|"];
122 [label="Function call: R|<local>/x|.R|/B.bar|()"];
123 [label="Access variable R|<local>/x|"];
124 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
125 [label="Exit block"];
}
126 [label="Exit when branch result"];
subgraph cluster_36 {
color=blue
127 [label="Enter when branch condition else"];
128 [label="Exit when branch condition"];
}
subgraph cluster_37 {
color=blue
129 [label="Enter block"];
130 [label="Access variable R|<local>/x|"];
131 [label="Function call: R|<local>/x|.R|/A.foo|()"];
132 [label="Access variable R|<local>/x|"];
133 [label="Function call: R|<local>/x|.R|/B.bar|()"];
134 [label="Exit block"];
}
135 [label="Exit when branch result"];
136 [label="Exit when"];
}
137 [label="Exit block"];
}
138 [label="Exit function test_2" style="filled" fillcolor=red];
}
73 -> {74}; 73 -> {74};
74 -> {75}; 74 -> {75};
@@ -289,93 +398,145 @@ subgraph cluster_test_2 {
135 -> {136}; 135 -> {136};
136 -> {137}; 136 -> {137};
137 -> {138}; 137 -> {138};
}
subgraph cluster_test_3 { subgraph cluster_38 {
139 [shape=box label="Enter function test_3" style="filled"]; color=red
140 [shape=box label="Enter block"]; 139 [label="Enter function test_3" style="filled" fillcolor=red];
141 [shape=box label="Enter when"]; subgraph cluster_39 {
142 [shape=box label="Access variable R|<local>/x|"]; color=blue
143 [shape=box label="Variable declaration: lval y: R|kotlin/Any?|"]; 140 [label="Enter block"];
144 [shape=box label="Enter when branch condition "]; subgraph cluster_40 {
145 [shape=box label="Type operator: A"]; color=blue
146 [shape=box label="Exit when branch condition"]; 141 [label="Enter when"];
147 [shape=box label="Enter block"]; 142 [label="Access variable R|<local>/x|"];
148 [shape=box label="Access variable R|<local>/x|"]; 143 [label="Variable declaration: lval y: R|kotlin/Any?|"];
149 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; subgraph cluster_41 {
150 [shape=box label="Access variable R|<local>/y|"]; color=blue
151 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; 144 [label="Enter when branch condition "];
152 [shape=box label="Exit block"]; 145 [label="Type operator: A"];
153 [shape=box label="Exit when branch result"]; 146 [label="Exit when branch condition"];
154 [shape=box label="Enter when branch condition "]; }
155 [shape=box label="Type operator: B"]; subgraph cluster_42 {
156 [shape=box label="Exit when branch condition"]; color=blue
157 [shape=box label="Enter block"]; 147 [label="Enter block"];
158 [shape=box label="Access variable R|<local>/x|"]; 148 [label="Access variable R|<local>/x|"];
159 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; 149 [label="Function call: R|<local>/x|.R|/A.foo|()"];
160 [shape=box label="Access variable R|<local>/y|"]; 150 [label="Access variable R|<local>/y|"];
161 [shape=box label="Function call: R|<local>/y|.R|/B.bar|()"]; 151 [label="Function call: R|<local>/y|.R|/A.foo|()"];
162 [shape=box label="Exit block"]; 152 [label="Exit block"];
163 [shape=box label="Exit when branch result"]; }
164 [shape=box label="Enter when branch condition else"]; 153 [label="Exit when branch result"];
165 [shape=box label="Exit when branch condition"]; subgraph cluster_43 {
166 [shape=box label="Enter block"]; color=blue
167 [shape=box label="Exit block"]; 154 [label="Enter when branch condition "];
168 [shape=box label="Exit when branch result"]; 155 [label="Type operator: B"];
169 [shape=box label="Exit when"]; 156 [label="Exit when branch condition"];
170 [shape=box label="Enter when"]; }
171 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_44 {
172 [shape=box label="Variable declaration: lval y: R|kotlin/Any?|"]; color=blue
173 [shape=box label="Enter when branch condition "]; 157 [label="Enter block"];
174 [shape=box label="Type operator: A"]; 158 [label="Access variable R|<local>/x|"];
175 [shape=box label="Exit when branch condition"]; 159 [label="Function call: R|<local>/x|.R|/B.bar|()"];
176 [shape=box label="Enter block"]; 160 [label="Access variable R|<local>/y|"];
177 [shape=box label="Exit block"]; 161 [label="Function call: R|<local>/y|.R|/B.bar|()"];
178 [shape=box label="Exit when branch result"]; 162 [label="Exit block"];
179 [shape=box label="Enter when branch condition "]; }
180 [shape=box label="Type operator: B"]; 163 [label="Exit when branch result"];
181 [shape=box label="Exit when branch condition"]; subgraph cluster_45 {
182 [shape=box label="Enter block"]; color=blue
183 [shape=box label="Access variable R|<local>/x|"]; 164 [label="Enter when branch condition else"];
184 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; 165 [label="Exit when branch condition"];
185 [shape=box label="Access variable R|<local>/y|"]; }
186 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; subgraph cluster_46 {
187 [shape=box label="Exit block"]; color=blue
188 [shape=box label="Exit when branch result"]; 166 [label="Enter block"];
189 [shape=box label="Enter when branch condition "]; 167 [label="Exit block"];
190 [shape=box label="Type operator: Int"]; }
191 [shape=box label="Exit when branch condition"]; 168 [label="Exit when branch result"];
192 [shape=box label="Enter block"]; 169 [label="Exit when"];
193 [shape=box label="Access variable R|<local>/x|"]; }
194 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; subgraph cluster_47 {
195 [shape=box label="Access variable R|<local>/x|"]; color=blue
196 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; 170 [label="Enter when"];
197 [shape=box label="Access variable R|<local>/x|"]; 171 [label="Access variable R|<local>/x|"];
198 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; 172 [label="Variable declaration: lval y: R|kotlin/Any?|"];
199 [shape=box label="Access variable R|<local>/y|"]; subgraph cluster_48 {
200 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; color=blue
201 [shape=box label="Access variable R|<local>/y|"]; 173 [label="Enter when branch condition "];
202 [shape=box label="Function call: R|<local>/y|.R|/B.bar|()"]; 174 [label="Type operator: A"];
203 [shape=box label="Access variable R|<local>/y|"]; 175 [label="Exit when branch condition"];
204 [shape=box label="Function call: R|<local>/y|.R|kotlin/Int.inc|()"]; }
205 [shape=box label="Exit block"]; subgraph cluster_49 {
206 [shape=box label="Exit when branch result"]; color=blue
207 [shape=box label="Enter when branch condition else"]; 176 [label="Enter block"];
208 [shape=box label="Exit when branch condition"]; 177 [label="Exit block"];
209 [shape=box label="Enter block"]; }
210 [shape=box label="Access variable R|<local>/x|"]; 178 [label="Exit when branch result"];
211 [shape=box label="Function call: R|<local>/x|.R|/A.foo|()"]; subgraph cluster_50 {
212 [shape=box label="Access variable R|<local>/x|"]; color=blue
213 [shape=box label="Function call: R|<local>/x|.R|/B.bar|()"]; 179 [label="Enter when branch condition "];
214 [shape=box label="Access variable R|<local>/y|"]; 180 [label="Type operator: B"];
215 [shape=box label="Function call: R|<local>/y|.R|/A.foo|()"]; 181 [label="Exit when branch condition"];
216 [shape=box label="Access variable R|<local>/y|"]; }
217 [shape=box label="Function call: R|<local>/y|.R|/B.bar|()"]; subgraph cluster_51 {
218 [shape=box label="Exit block"]; color=blue
219 [shape=box label="Exit when branch result"]; 182 [label="Enter block"];
220 [shape=box label="Exit when"]; 183 [label="Access variable R|<local>/x|"];
221 [shape=box label="Exit block"]; 184 [label="Function call: R|<local>/x|.R|/A.foo|()"];
222 [shape=box label="Exit function test_3" style="filled"]; 185 [label="Access variable R|<local>/y|"];
186 [label="Function call: R|<local>/y|.R|/A.foo|()"];
187 [label="Exit block"];
}
188 [label="Exit when branch result"];
subgraph cluster_52 {
color=blue
189 [label="Enter when branch condition "];
190 [label="Type operator: Int"];
191 [label="Exit when branch condition"];
}
subgraph cluster_53 {
color=blue
192 [label="Enter block"];
193 [label="Access variable R|<local>/x|"];
194 [label="Function call: R|<local>/x|.R|/A.foo|()"];
195 [label="Access variable R|<local>/x|"];
196 [label="Function call: R|<local>/x|.R|/B.bar|()"];
197 [label="Access variable R|<local>/x|"];
198 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
199 [label="Access variable R|<local>/y|"];
200 [label="Function call: R|<local>/y|.R|/A.foo|()"];
201 [label="Access variable R|<local>/y|"];
202 [label="Function call: R|<local>/y|.R|/B.bar|()"];
203 [label="Access variable R|<local>/y|"];
204 [label="Function call: R|<local>/y|.R|kotlin/Int.inc|()"];
205 [label="Exit block"];
}
206 [label="Exit when branch result"];
subgraph cluster_54 {
color=blue
207 [label="Enter when branch condition else"];
208 [label="Exit when branch condition"];
}
subgraph cluster_55 {
color=blue
209 [label="Enter block"];
210 [label="Access variable R|<local>/x|"];
211 [label="Function call: R|<local>/x|.R|/A.foo|()"];
212 [label="Access variable R|<local>/x|"];
213 [label="Function call: R|<local>/x|.R|/B.bar|()"];
214 [label="Access variable R|<local>/y|"];
215 [label="Function call: R|<local>/y|.R|/A.foo|()"];
216 [label="Access variable R|<local>/y|"];
217 [label="Function call: R|<local>/y|.R|/B.bar|()"];
218 [label="Exit block"];
}
219 [label="Exit when branch result"];
220 [label="Exit when"];
}
221 [label="Exit block"];
}
222 [label="Exit function test_3" style="filled" fillcolor=red];
}
139 -> {140}; 139 -> {140};
140 -> {141}; 140 -> {141};
@@ -460,33 +621,52 @@ subgraph cluster_test_3 {
219 -> {220}; 219 -> {220};
220 -> {221}; 220 -> {221};
221 -> {222}; 221 -> {222};
}
subgraph cluster_test_4 { subgraph cluster_56 {
223 [shape=box label="Enter function test_4" style="filled"]; color=red
224 [shape=box label="Enter block"]; 223 [label="Enter function test_4" style="filled" fillcolor=red];
225 [shape=box label="Enter when"]; subgraph cluster_57 {
226 [shape=box label="Access variable R|<local>/x|"]; color=blue
227 [shape=box label="Type operator: x as Int"]; 224 [label="Enter block"];
228 [shape=box label="Enter when branch condition "]; subgraph cluster_58 {
229 [shape=box label="Const: Int(1)"]; color=blue
230 [shape=box label="Operator =="]; 225 [label="Enter when"];
231 [shape=box label="Exit when branch condition"]; 226 [label="Access variable R|<local>/x|"];
232 [shape=box label="Enter block"]; 227 [label="Type operator: x as Int"];
233 [shape=box label="Access variable R|<local>/x|"]; subgraph cluster_59 {
234 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; color=blue
235 [shape=box label="Exit block"]; 228 [label="Enter when branch condition "];
236 [shape=box label="Exit when branch result"]; 229 [label="Const: Int(1)"];
237 [shape=box label="Enter when branch condition else"]; 230 [label="Operator =="];
238 [shape=box label="Exit when branch condition"]; 231 [label="Exit when branch condition"];
239 [shape=box label="Enter block"]; }
240 [shape=box label="Exit block"]; subgraph cluster_60 {
241 [shape=box label="Exit when branch result"]; color=blue
242 [shape=box label="Exit when"]; 232 [label="Enter block"];
243 [shape=box label="Access variable R|<local>/x|"]; 233 [label="Access variable R|<local>/x|"];
244 [shape=box label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; 234 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
245 [shape=box label="Exit block"]; 235 [label="Exit block"];
246 [shape=box label="Exit function test_4" style="filled"]; }
236 [label="Exit when branch result"];
subgraph cluster_61 {
color=blue
237 [label="Enter when branch condition else"];
238 [label="Exit when branch condition"];
}
subgraph cluster_62 {
color=blue
239 [label="Enter block"];
240 [label="Exit block"];
}
241 [label="Exit when branch result"];
242 [label="Exit when"];
}
243 [label="Access variable R|<local>/x|"];
244 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
245 [label="Exit block"];
}
246 [label="Exit function test_4" style="filled" fillcolor=red];
}
223 -> {224}; 223 -> {224};
224 -> {225}; 224 -> {225};
@@ -511,6 +691,5 @@ subgraph cluster_test_4 {
243 -> {244}; 243 -> {244};
244 -> {245}; 244 -> {245};
245 -> {246}; 245 -> {246};
}
} }
@@ -13,7 +13,10 @@ import org.jetbrains.kotlin.fir.visitors.FirVisitorVoid
import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.ConfigurationKind
import org.jetbrains.kotlin.test.KotlinTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import java.io.File import java.io.File
private const val EDGE = " -> "
private const val INDENT = " "
private const val RED = "red"
private const val BLUE = "blue"
/* /*
* For comfort viewing dumps of control flow graph you can setup external tool in IDEA that opens .dot files * For comfort viewing dumps of control flow graph you can setup external tool in IDEA that opens .dot files
@@ -57,10 +60,14 @@ abstract class AbstractFirCfgBuildingTest : AbstractFirResolveTestCase() {
private val dotBuilder: StringBuilder private val dotBuilder: StringBuilder
) : FirVisitorVoid() { ) : FirVisitorVoid() {
private var indexOffset = 0 private var indexOffset = 0
private var clusterCounter = 0
private var offset = 1
override fun visitFile(file: FirFile) { override fun visitFile(file: FirFile) {
dotBuilder.appendln("digraph ${file.name.replace(".", "_")} {") dotBuilder.appendln("digraph ${file.name.replace(".", "_")} {")
.appendln("graph [splines=ortho, nodesep=3]") .appendln("${INDENT}graph [splines=ortho nodesep=3]")
.appendln("${INDENT}node [shape=box penwidth=2]")
.appendln("${INDENT}edge [penwidth=2]")
.appendln() .appendln()
super.visitFile(file) super.visitFile(file)
dotBuilder.appendln("}") dotBuilder.appendln("}")
@@ -73,60 +80,85 @@ abstract class AbstractFirCfgBuildingTest : AbstractFirResolveTestCase() {
override fun visitControlFlowGraphReference(controlFlowGraphReference: FirControlFlowGraphReference) { override fun visitControlFlowGraphReference(controlFlowGraphReference: FirControlFlowGraphReference) {
val controlFlowGraph = (controlFlowGraphReference as? FirControlFlowGraphReferenceImpl)?.controlFlowGraph ?: return val controlFlowGraph = (controlFlowGraphReference as? FirControlFlowGraphReferenceImpl)?.controlFlowGraph ?: return
controlFlowGraph.renderToStringBuilder(simpleBuilder) controlFlowGraph.renderToStringBuilder(simpleBuilder)
indexOffset = controlFlowGraph.dotRenderToStringBuilder(dotBuilder, indexOffset) indexOffset = controlFlowGraph.dotRenderToStringBuilder(dotBuilder)
dotBuilder.appendln() dotBuilder.appendln()
} }
}
}
private const val EDGE = " -> " private fun StringBuilder.enterCluster(color: String) {
private const val INDENT = " " indent()
appendln("subgraph cluster_${clusterCounter++} {")
fun ControlFlowGraph.dotRenderToStringBuilder(builder: StringBuilder, indexOffset: Int): Int { offset++
with(builder) { indent()
val sortedNodes = sortNodes() appendln("color=$color")
val indices = sortedNodes.indicesMap().mapValues { (_, index) -> index + indexOffset }
val graphName = name.replace(Regex("[ <>]"), "_")
appendln("subgraph cluster_$graphName {")
fun CFGNode<*>.splitEdges(): Pair<List<CFGNode<*>>, List<CFGNode<*>>> =
if (isDead) emptyList<CFGNode<*>>() to followingNodes
else followingNodes.filter { !it.isDead } to followingNodes.filter { it.isDead }
sortedNodes.forEach {
append(INDENT)
append(indices.getValue(it))
val attributes = mutableListOf("shape=box")
attributes += "label=\"${it.render().replace("\"", "")}\""
if (it == enterNode || it == exitNode) {
attributes += "style=\"filled\""
}
appendln(attributes.joinToString(separator = " ", prefix = " [", postfix = "];"))
} }
appendln()
sortedNodes.forEachIndexed { i, node -> private fun StringBuilder.exitCluster() {
if (node.followingNodes.isEmpty()) return@forEachIndexed offset--
val (aliveEdges, deadEdges) = node.splitEdges() indent()
appendln("}")
}
fun renderEdges(edges: List<CFGNode<*>>, isDead: Boolean) { private fun StringBuilder.indent() {
if (edges.isEmpty()) return append(INDENT.repeat(offset))
append(INDENT) }
append(i + indexOffset)
append(EDGE) fun ControlFlowGraph.dotRenderToStringBuilder(builder: StringBuilder): Int {
append(edges.joinToString(prefix = "{", postfix = "}", separator = " ") { indices.getValue(it).toString() }) with(builder) {
if (isDead) { val sortedNodes = sortNodes()
append(" [style=dotted]") val indices = sortedNodes.indicesMap().mapValues { (_, index) -> index + indexOffset }
fun CFGNode<*>.splitEdges(): Pair<List<CFGNode<*>>, List<CFGNode<*>>> =
if (isDead) emptyList<CFGNode<*>>() to followingNodes
else followingNodes.filter { !it.isDead } to followingNodes.filter { it.isDead }
var color = RED
sortedNodes.forEach {
if (it is EnterNode) {
enterCluster(color)
color = BLUE
}
indent()
append(indices.getValue(it))
val attributes = mutableListOf<String>()
attributes += "label=\"${it.render().replace("\"", "")}\""
if (it == enterNode || it == exitNode) {
attributes += "style=\"filled\""
attributes += "fillcolor=red"
}
if (it.isDead) {
attributes += "style=\"filled\""
attributes += "fillcolor=gray"
}
appendln(attributes.joinToString(separator = " ", prefix = " [", postfix = "];"))
if (it is ExitNode) {
exitCluster()
}
} }
appendln(";") appendln()
sortedNodes.forEachIndexed { i, node ->
if (node.followingNodes.isEmpty()) return@forEachIndexed
val (aliveEdges, deadEdges) = node.splitEdges()
fun renderEdges(edges: List<CFGNode<*>>, isDead: Boolean) {
if (edges.isEmpty()) return
indent()
append(i + indexOffset)
append(EDGE)
append(edges.joinToString(prefix = "{", postfix = "}", separator = " ") { indices.getValue(it).toString() })
if (isDead) {
append(" [style=dotted]")
}
appendln(";")
}
renderEdges(aliveEdges, false)
renderEdges(deadEdges, true)
}
return indexOffset + sortedNodes.size
} }
renderEdges(aliveEdges, false)
renderEdges(deadEdges, true)
} }
appendln("}")
return indexOffset + sortedNodes.size
} }
} }