[FIR] Don't render call arguments in cfg dump

This commit is contained in:
Dmitriy Novozhilov
2020-03-11 12:02:35 +03:00
parent 8e295de593
commit f83cedd244
23 changed files with 81 additions and 81 deletions
@@ -132,6 +132,8 @@ class FirControlFlowGraphRenderVisitor(
} }
} }
private object CfgRenderMode : FirRenderer.RenderMode(renderLambdaBodies = false, renderCallArguments = false)
private fun CFGNode<*>.render(): String = private fun CFGNode<*>.render(): String =
buildString { buildString {
append( append(
@@ -157,26 +159,26 @@ private fun CFGNode<*>.render(): String =
is LoopConditionExitNode -> "Exit loop condition" is LoopConditionExitNode -> "Exit loop condition"
is LoopExitNode -> "Exit ${fir.type()}loop" is LoopExitNode -> "Exit ${fir.type()}loop"
is QualifiedAccessNode -> "Access variable ${fir.calleeReference.render(FirRenderer.RenderMode.DontRenderLambdaBodies)}" is QualifiedAccessNode -> "Access variable ${fir.calleeReference.render(CfgRenderMode)}"
is OperatorCallNode -> "Operator ${fir.operation.operator}" is OperatorCallNode -> "Operator ${fir.operation.operator}"
is ComparisonExpressionNode -> "Comparison ${fir.operation.operator}" is ComparisonExpressionNode -> "Comparison ${fir.operation.operator}"
is TypeOperatorCallNode -> "Type operator: \"${fir.render(FirRenderer.RenderMode.DontRenderLambdaBodies)}\"" is TypeOperatorCallNode -> "Type operator: \"${fir.render(CfgRenderMode)}\""
is JumpNode -> "Jump: ${fir.render()}" is JumpNode -> "Jump: ${fir.render()}"
is StubNode -> "Stub" is StubNode -> "Stub"
is CheckNotNullCallNode -> "Check not null: ${fir.render(FirRenderer.RenderMode.DontRenderLambdaBodies)}" is CheckNotNullCallNode -> "Check not null: ${fir.render(CfgRenderMode)}"
is ConstExpressionNode -> "Const: ${fir.render()}" is ConstExpressionNode -> "Const: ${fir.render()}"
is VariableDeclarationNode -> is VariableDeclarationNode ->
"Variable declaration: ${buildString { "Variable declaration: ${buildString {
FirRenderer( FirRenderer(
this, this,
FirRenderer.RenderMode.DontRenderLambdaBodies CfgRenderMode
).visitCallableDeclaration(fir) ).visitCallableDeclaration(fir)
}}" }}"
is VariableAssignmentNode -> "Assignmenet: ${fir.lValue.render(FirRenderer.RenderMode.DontRenderLambdaBodies)}" is VariableAssignmentNode -> "Assignmenet: ${fir.lValue.render(CfgRenderMode)}"
is FunctionCallNode -> "Function call: ${fir.render(FirRenderer.RenderMode.DontRenderLambdaBodies)}" is FunctionCallNode -> "Function call: ${fir.render(CfgRenderMode)}"
is ThrowExceptionNode -> "Throw: ${fir.render(FirRenderer.RenderMode.DontRenderLambdaBodies)}" is ThrowExceptionNode -> "Throw: ${fir.render(CfgRenderMode)}"
is TryExpressionEnterNode -> "Try expression enter" is TryExpressionEnterNode -> "Try expression enter"
is TryMainBlockEnterNode -> "Try main block enter" is TryMainBlockEnterNode -> "Try main block enter"
+1 -1
View File
@@ -72,7 +72,7 @@ digraph complex_kt {
27 [label="Enter block"]; 27 [label="Enter block"];
28 [label="Access variable R|<local>/cause|"]; 28 [label="Access variable R|<local>/cause|"];
29 [label="Access variable R|<local>/closeException|"]; 29 [label="Access variable R|<local>/closeException|"];
30 [label="Function call: R|<local>/cause|.R|/addSuppressed|(R|<local>/closeException|)"]; 30 [label="Function call: R|<local>/cause|.R|/addSuppressed|(...)"];
31 [label="Exit block"]; 31 [label="Exit block"];
} }
32 [label="Catch exit"]; 32 [label="Catch exit"];
+1 -1
View File
@@ -343,7 +343,7 @@ digraph jumps_kt {
117 [label="Exit function anonymousFunction"]; 117 [label="Exit function anonymousFunction"];
} }
118 [label="Postponed exit from lambda"]; 118 [label="Postponed exit from lambda"];
119 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"]; 119 [label="Function call: R|/run|(...)"];
120 [label="Exit function test_6" style="filled" fillcolor=red]; 120 [label="Exit function test_6" style="filled" fillcolor=red];
} }
@@ -23,7 +23,7 @@ digraph lambdaAsReturnOfLambda_kt {
color=red color=red
4 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; 4 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
5 [label="Access variable R|<local>/foo|"]; 5 [label="Access variable R|<local>/foo|"];
6 [label="Function call: R|/bar|(R|<local>/foo|)"]; 6 [label="Function call: R|/bar|(...)"];
7 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; 7 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
} }
@@ -44,7 +44,7 @@ digraph lambdaAsReturnOfLambda_kt {
10 [label="Enter property" style="filled" fillcolor=red]; 10 [label="Enter property" style="filled" fillcolor=red];
11 [label="Postponed enter to lambda"]; 11 [label="Postponed enter to lambda"];
12 [label="Postponed exit from lambda"]; 12 [label="Postponed exit from lambda"];
13 [label="Function call: R|/run|<R|(kotlin/String) -> kotlin/Unit|>(<L> = run@fun <anonymous>(): R|(kotlin/String) -> kotlin/Unit|)"]; 13 [label="Function call: R|/run|<R|(kotlin/String) -> kotlin/Unit|>(...)"];
14 [label="Exit property" style="filled" fillcolor=red]; 14 [label="Exit property" style="filled" fillcolor=red];
} }
+3 -3
View File
@@ -40,7 +40,7 @@ digraph lambdas_kt {
16 [label="Exit function anonymousFunction"]; 16 [label="Exit function anonymousFunction"];
} }
17 [label="Postponed exit from lambda"]; 17 [label="Postponed exit from lambda"];
18 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"]; 18 [label="Function call: R|/run|(...)"];
19 [label="Exit block"]; 19 [label="Exit block"];
} }
20 [label="Exit when branch result"]; 20 [label="Exit when branch result"];
@@ -154,7 +154,7 @@ digraph lambdas_kt {
53 [label="Exit function anonymousFunction"]; 53 [label="Exit function anonymousFunction"];
} }
54 [label="Postponed exit from lambda"]; 54 [label="Postponed exit from lambda"];
55 [label="Function call: R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"]; 55 [label="Function call: R|/getInt|(...)"];
56 [label="Jump: ^test_3 R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> { 56 [label="Jump: ^test_3 R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
^test_3 Int(1) ^test_3 Int(1)
} }
@@ -192,7 +192,7 @@ digraph lambdas_kt {
65 [label="Exit function anonymousFunction"]; 65 [label="Exit function anonymousFunction"];
} }
66 [label="Postponed exit from lambda"]; 66 [label="Postponed exit from lambda"];
67 [label="Function call: R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"]; 67 [label="Function call: R|/getInt|(...)"];
68 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> { 68 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
^test_4 Int(1) ^test_4 Int(1)
} }
+2 -2
View File
@@ -104,8 +104,8 @@ digraph loops_kt {
32 [label="Enter function testFor" style="filled" fillcolor=red]; 32 [label="Enter function testFor" style="filled" fillcolor=red];
33 [label="Const: Int(0)"]; 33 [label="Const: Int(0)"];
34 [label="Const: Int(5)"]; 34 [label="Const: Int(5)"];
35 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(Int(5))"]; 35 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"];
36 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()"]; 36 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"];
37 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"]; 37 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
subgraph cluster_11 { subgraph cluster_11 {
color=blue color=blue
@@ -24,7 +24,7 @@ digraph postponedLambdas_kt {
} }
8 [label="Postponed exit from lambda"]; 8 [label="Postponed exit from lambda"];
9 [label="Access variable R|<local>/b|"]; 9 [label="Access variable R|<local>/b|"];
10 [label="Function call: R|/foo|(vararg(R|<local>/a|, foo@fun <anonymous>(): R|kotlin/String| <kind=UNKNOWN> , R|<local>/b|))"]; 10 [label="Function call: R|/foo|(...)"];
11 [label="Exit function test" style="filled" fillcolor=red]; 11 [label="Exit function test" style="filled" fillcolor=red];
} }
@@ -73,7 +73,7 @@ digraph propertiesAndInitBlocks_kt {
20 [label="Enter function foo" style="filled" fillcolor=red]; 20 [label="Enter function foo" style="filled" fillcolor=red];
21 [label="Const: Int(1)"]; 21 [label="Const: Int(1)"];
22 [label="Const: Int(1)"]; 22 [label="Const: Int(1)"];
23 [label="Function call: Int(1).R|kotlin/Int.plus|(Int(1))"]; 23 [label="Function call: Int(1).R|kotlin/Int.plus|(...)"];
24 [label="Variable declaration: lval c: R|kotlin/Int|"]; 24 [label="Variable declaration: lval c: R|kotlin/Int|"];
25 [label="Function call: R|java/lang/Exception.Exception|()"]; 25 [label="Function call: R|java/lang/Exception.Exception|()"];
26 [label="Throw: throw R|java/lang/Exception.Exception|()"]; 26 [label="Throw: throw R|java/lang/Exception.Exception|()"];
@@ -128,7 +128,7 @@ digraph propertiesAndInitBlocks_kt {
41 [label="Exit function anonymousFunction"]; 41 [label="Exit function anonymousFunction"];
} }
42 [label="Postponed exit from lambda"]; 42 [label="Postponed exit from lambda"];
43 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"]; 43 [label="Function call: R|/run|(...)"];
44 [label="Exit property" style="filled" fillcolor=red]; 44 [label="Exit property" style="filled" fillcolor=red];
} }
@@ -52,7 +52,7 @@ digraph returnValuesFromLambda_kt {
21 [label="Exit function anonymousFunction"]; 21 [label="Exit function anonymousFunction"];
} }
22 [label="Postponed exit from lambda"]; 22 [label="Postponed exit from lambda"];
23 [label="Function call: R|kotlin/run|<R|A|>(<L> = run@fun <anonymous>(): R|A| <kind=EXACTLY_ONCE> )"]; 23 [label="Function call: R|kotlin/run|<R|A|>(...)"];
24 [label="Variable declaration: lval x: R|A|"]; 24 [label="Variable declaration: lval x: R|A|"];
25 [label="Exit function test_1" style="filled" fillcolor=red]; 25 [label="Exit function test_1" style="filled" fillcolor=red];
} }
@@ -94,7 +94,7 @@ digraph returnValuesFromLambda_kt {
32 [label="Exit function anonymousFunction"]; 32 [label="Exit function anonymousFunction"];
} }
33 [label="Postponed exit from lambda"]; 33 [label="Postponed exit from lambda"];
34 [label="Function call: R|kotlin/run|<R|C|>(<L> = run@fun <anonymous>(): R|C| <kind=EXACTLY_ONCE> )"]; 34 [label="Function call: R|kotlin/run|<R|C|>(...)"];
35 [label="Variable declaration: lval x: R|C|"]; 35 [label="Variable declaration: lval x: R|C|"];
36 [label="Exit function test_2" style="filled" fillcolor=red]; 36 [label="Exit function test_2" style="filled" fillcolor=red];
} }
@@ -124,7 +124,7 @@ digraph returnValuesFromLambda_kt {
42 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; 42 [label="Exit function anonymousFunction" style="filled" fillcolor=gray];
} }
43 [label="Postponed exit from lambda"]; 43 [label="Postponed exit from lambda"];
44 [label="Function call: R|kotlin/run|<R|kotlin/Nothing|>(<L> = run@fun <anonymous>(): R|kotlin/Nothing| <kind=EXACTLY_ONCE> )"]; 44 [label="Function call: R|kotlin/run|<R|kotlin/Nothing|>(...)"];
45 [label="Stub" style="filled" fillcolor=gray]; 45 [label="Stub" style="filled" fillcolor=gray];
46 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray]; 46 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray];
47 [label="Exit function test_3" style="filled" fillcolor=red]; 47 [label="Exit function test_3" style="filled" fillcolor=red];
+1 -1
View File
@@ -18,7 +18,7 @@ digraph simple_kt {
4 [label="Variable declaration: lval x: R|kotlin/Int|"]; 4 [label="Variable declaration: lval x: R|kotlin/Int|"];
5 [label="Access variable R|<local>/x|"]; 5 [label="Access variable R|<local>/x|"];
6 [label="Const: Int(1)"]; 6 [label="Const: Int(1)"];
7 [label="Function call: R|<local>/x|.R|kotlin/Int.plus|(Int(1))"]; 7 [label="Function call: R|<local>/x|.R|kotlin/Int.plus|(...)"];
8 [label="Variable declaration: lval y: R|kotlin/Int|"]; 8 [label="Variable declaration: lval y: R|kotlin/Int|"];
9 [label="Function call: R|/foo|()"]; 9 [label="Function call: R|/foo|()"];
10 [label="Exit function test" style="filled" fillcolor=red]; 10 [label="Exit function test" style="filled" fillcolor=red];
+2 -2
View File
@@ -22,7 +22,7 @@ digraph when_kt {
7 [label="Enter when branch condition "]; 7 [label="Enter when branch condition "];
8 [label="Access variable R|<local>/x|"]; 8 [label="Access variable R|<local>/x|"];
9 [label="Const: Int(2)"]; 9 [label="Const: Int(2)"];
10 [label="Function call: R|<local>/x|.R|kotlin/Int.rem|(Int(2))"]; 10 [label="Function call: R|<local>/x|.R|kotlin/Int.rem|(...)"];
11 [label="Const: Int(0)"]; 11 [label="Const: Int(0)"];
12 [label="Operator =="]; 12 [label="Operator =="];
13 [label="Exit when branch condition"]; 13 [label="Exit when branch condition"];
@@ -32,7 +32,7 @@ digraph when_kt {
14 [label="Enter when branch condition "]; 14 [label="Enter when branch condition "];
15 [label="Const: Int(1)"]; 15 [label="Const: Int(1)"];
16 [label="Const: Int(1)"]; 16 [label="Const: Int(1)"];
17 [label="Function call: Int(1).R|kotlin/Int.minus|(Int(1))"]; 17 [label="Function call: Int(1).R|kotlin/Int.minus|(...)"];
18 [label="Const: Int(0)"]; 18 [label="Const: Int(0)"];
19 [label="Operator =="]; 19 [label="Operator =="];
20 [label="Exit when branch condition"]; 20 [label="Exit when branch condition"];
@@ -87,7 +87,7 @@ digraph exhaustiveWhenAndDNNType_kt {
} }
35 [label="Variable declaration: lval b: R|B|"]; 35 [label="Variable declaration: lval b: R|B|"];
36 [label="Access variable R|<local>/b|"]; 36 [label="Access variable R|<local>/b|"];
37 [label="Function call: R|/takeB|(R|<local>/b|)"]; 37 [label="Function call: R|/takeB|(...)"];
38 [label="Exit function test_1" style="filled" fillcolor=red]; 38 [label="Exit function test_1" style="filled" fillcolor=red];
} }
@@ -164,7 +164,7 @@ digraph exhaustiveWhenAndDNNType_kt {
} }
64 [label="Variable declaration: lval b: R|B|"]; 64 [label="Variable declaration: lval b: R|B|"];
65 [label="Access variable R|<local>/b|"]; 65 [label="Access variable R|<local>/b|"];
66 [label="Function call: R|/takeB|(R|<local>/b|)"]; 66 [label="Function call: R|/takeB|(...)"];
67 [label="Exit function test_2" style="filled" fillcolor=red]; 67 [label="Exit function test_2" style="filled" fillcolor=red];
} }
@@ -240,7 +240,7 @@ digraph exhaustiveWhenAndDNNType_kt {
} }
92 [label="Variable declaration: lval b: R|B|"]; 92 [label="Variable declaration: lval b: R|B|"];
93 [label="Access variable R|<local>/b|"]; 93 [label="Access variable R|<local>/b|"];
94 [label="Function call: R|/takeB|(R|<local>/b|)"]; 94 [label="Function call: R|/takeB|(...)"];
95 [label="Exit function test_3" style="filled" fillcolor=red]; 95 [label="Exit function test_3" style="filled" fillcolor=red];
} }
@@ -427,7 +427,7 @@ digraph returns_kt {
161 [label="Variable declaration: lval length: R|kotlin/Int|"]; 161 [label="Variable declaration: lval length: R|kotlin/Int|"];
162 [label="Postponed enter to lambda"]; 162 [label="Postponed enter to lambda"];
163 [label="Postponed exit from lambda"]; 163 [label="Postponed exit from lambda"];
164 [label="Function call: R|/runHigherOrder|<R|kotlin/Int|>(<L> = runHigherOrder@fun <anonymous>(): R|kotlin/Int|)"]; 164 [label="Function call: R|/runHigherOrder|<R|kotlin/Int|>(...)"];
165 [label="Exit function test_4" style="filled" fillcolor=red]; 165 [label="Exit function test_4" style="filled" fillcolor=red];
} }
@@ -72,15 +72,7 @@ digraph smartcastFromArgument_kt {
30 [label="Exit when branch result" style="filled" fillcolor=gray]; 30 [label="Exit when branch result" style="filled" fillcolor=gray];
31 [label="Exit when"]; 31 [label="Exit when"];
} }
32 [label="Function call: R|/takeA|(when (lval <elvis>: R|A?| = (R|<local>/a| as? R|A|)) { 32 [label="Function call: R|/takeA|(...)"];
==($subj$, Null(null)) -> {
^test Unit
}
else -> {
R|<local>/<elvis>|
}
}
)"];
33 [label="Exit when branch condition"]; 33 [label="Exit when branch condition"];
} }
34 [label="Synthetic else branch"]; 34 [label="Synthetic else branch"];
@@ -56,7 +56,7 @@ digraph inPlaceLambdas_kt {
20 [label="Exit function anonymousFunction"]; 20 [label="Exit function anonymousFunction"];
} }
21 [label="Postponed exit from lambda"]; 21 [label="Postponed exit from lambda"];
22 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"]; 22 [label="Function call: R|/run|(...)"];
23 [label="Exit block"]; 23 [label="Exit block"];
} }
24 [label="Exit when branch result"]; 24 [label="Exit when branch result"];
@@ -99,7 +99,7 @@ digraph inPlaceLambdas_kt {
32 [label="Exit function anonymousFunction"]; 32 [label="Exit function anonymousFunction"];
} }
33 [label="Postponed exit from lambda"]; 33 [label="Postponed exit from lambda"];
34 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"]; 34 [label="Function call: R|/run|(...)"];
35 [label="Access variable R|<local>/x|"]; 35 [label="Access variable R|<local>/x|"];
36 [label="Function call: R|<local>/x|.R|/B.bar|()"]; 36 [label="Function call: R|<local>/x|.R|/B.bar|()"];
37 [label="Exit function test_2" style="filled" fillcolor=red]; 37 [label="Exit function test_2" style="filled" fillcolor=red];
@@ -147,7 +147,7 @@ digraph inPlaceLambdas_kt {
53 [label="Exit function anonymousFunction"]; 53 [label="Exit function anonymousFunction"];
} }
54 [label="Postponed exit from lambda"]; 54 [label="Postponed exit from lambda"];
55 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"]; 55 [label="Function call: R|/run|(...)"];
56 [label="Access variable R|<local>/x|"]; 56 [label="Access variable R|<local>/x|"];
57 [label="Function call: R|<local>/x|.R|/B.bar|()"]; 57 [label="Function call: R|<local>/x|.R|/B.bar|()"];
58 [label="Exit block"]; 58 [label="Exit block"];
@@ -215,18 +215,18 @@ digraph implicitReceivers_kt {
79 [label="Exit function anonymousFunction"]; 79 [label="Exit function anonymousFunction"];
} }
80 [label="Postponed exit from lambda"]; 80 [label="Postponed exit from lambda"];
81 [label="Function call: R|kotlin/with|<R|kotlin/Any|, R|kotlin/Unit|>(R|<local>/c|, <L> = wc@fun R|kotlin/Any|.<anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> )"]; 81 [label="Function call: R|kotlin/with|<R|kotlin/Any|, R|kotlin/Unit|>(...)"];
82 [label="Access variable this@R|special/anonymous|"]; 82 [label="Access variable this@R|special/anonymous|"];
83 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; 83 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"];
84 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; 84 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"];
85 [label="Exit function anonymousFunction"]; 85 [label="Exit function anonymousFunction"];
} }
86 [label="Postponed exit from lambda"]; 86 [label="Postponed exit from lambda"];
87 [label="Function call: R|kotlin/with|<R|kotlin/Any|, R|kotlin/Unit|>(R|<local>/b|, <L> = wb@fun R|kotlin/Any|.<anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> )"]; 87 [label="Function call: R|kotlin/with|<R|kotlin/Any|, R|kotlin/Unit|>(...)"];
88 [label="Exit function anonymousFunction"]; 88 [label="Exit function anonymousFunction"];
} }
89 [label="Postponed exit from lambda"]; 89 [label="Postponed exit from lambda"];
90 [label="Function call: R|kotlin/with|<R|kotlin/Any|, R|kotlin/Unit|>(R|<local>/a|, <L> = wa@fun R|kotlin/Any|.<anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> )"]; 90 [label="Function call: R|kotlin/with|<R|kotlin/Any|, R|kotlin/Unit|>(...)"];
91 [label="Exit function test_3" style="filled" fillcolor=red]; 91 [label="Exit function test_3" style="filled" fillcolor=red];
} }
@@ -35,7 +35,7 @@ digraph safeCalls_kt {
11 [label="Access variable R|kotlin/String.length|"]; 11 [label="Access variable R|kotlin/String.length|"];
12 [label="Const: Int(1)"]; 12 [label="Const: Int(1)"];
13 [label="Operator =="]; 13 [label="Operator =="];
14 [label="Function call: R|<local>/x|?.R|/foo|(==(R|<local>/x|.R|kotlin/String.length|, Int(1)))"]; 14 [label="Function call: R|<local>/x|?.R|/foo|(...)"];
15 [label="Exit safe call"]; 15 [label="Exit safe call"];
16 [label="Access variable R|<local>/x|"]; 16 [label="Access variable R|<local>/x|"];
17 [label="Access variable <Inapplicable(WRONG_RECEIVER): [kotlin/String.length]>#"]; 17 [label="Access variable <Inapplicable(WRONG_RECEIVER): [kotlin/String.length]>#"];
@@ -85,7 +85,7 @@ digraph safeCalls_kt {
27 [label="Type operator: (R|<local>/x| as? R|A|)"]; 27 [label="Type operator: (R|<local>/x| as? R|A|)"];
28 [label="Enter safe call"]; 28 [label="Enter safe call"];
29 [label="Access variable R|<local>/x|"]; 29 [label="Access variable R|<local>/x|"];
30 [label="Function call: (R|<local>/x| as? R|A|)?.R|/A.bar|(R|<local>/x|)"]; 30 [label="Function call: (R|<local>/x| as? R|A|)?.R|/A.bar|(...)"];
31 [label="Exit safe call"]; 31 [label="Exit safe call"];
32 [label="Exit function test_2" style="filled" fillcolor=red]; 32 [label="Exit function test_2" style="filled" fillcolor=red];
} }
@@ -105,17 +105,17 @@ digraph safeCalls_kt {
35 [label="Type operator: (R|<local>/x| as? R|A|)"]; 35 [label="Type operator: (R|<local>/x| as? R|A|)"];
36 [label="Enter safe call"]; 36 [label="Enter safe call"];
37 [label="Access variable R|<local>/x|"]; 37 [label="Access variable R|<local>/x|"];
38 [label="Function call: (R|<local>/x| as? R|A|)?.R|/A.bar|(R|<local>/x|)"]; 38 [label="Function call: (R|<local>/x| as? R|A|)?.R|/A.bar|(...)"];
39 [label="Exit safe call"]; 39 [label="Exit safe call"];
40 [label="Enter safe call"]; 40 [label="Enter safe call"];
41 [label="Access variable R|<local>/x|"]; 41 [label="Access variable R|<local>/x|"];
42 [label="Function call: R|<local>/x|.R|/A.bool|()"]; 42 [label="Function call: R|<local>/x|.R|/A.bool|()"];
43 [label="Function call: (R|<local>/x| as? R|A|)?.R|/A.bar|(R|<local>/x|)?.R|/foo|(R|<local>/x|.R|/A.bool|())"]; 43 [label="Function call: (R|<local>/x| as? R|A|)?.R|/A.bar|(...)?.R|/foo|(...)"];
44 [label="Exit safe call"]; 44 [label="Exit safe call"];
45 [label="Enter safe call"]; 45 [label="Enter safe call"];
46 [label="Postponed enter to lambda"]; 46 [label="Postponed enter to lambda"];
47 [label="Postponed exit from lambda"]; 47 [label="Postponed exit from lambda"];
48 [label="Function call: (R|<local>/x| as? R|A|)?.R|/A.bar|(R|<local>/x|)?.R|/foo|(R|<local>/x|.R|/A.bool|())?.R|/let|(<L> = let@fun <anonymous>(): R|kotlin/Unit|)"]; 48 [label="Function call: (R|<local>/x| as? R|A|)?.R|/A.bar|(...)?.R|/foo|(...)?.R|/let|(...)"];
49 [label="Exit safe call"]; 49 [label="Exit safe call"];
50 [label="Access variable R|<local>/x|"]; 50 [label="Access variable R|<local>/x|"];
51 [label="Function call: R|<local>/x|.<Unresolved name: bool>#()"]; 51 [label="Function call: R|<local>/x|.<Unresolved name: bool>#()"];
@@ -202,12 +202,12 @@ digraph safeCalls_kt {
77 [label="Exit function anonymousFunction" style="filled" fillcolor=gray]; 77 [label="Exit function anonymousFunction" style="filled" fillcolor=gray];
} }
78 [label="Postponed exit from lambda"]; 78 [label="Postponed exit from lambda"];
79 [label="Function call: R|<local>/x|?.R|kotlin/let|<R|A|, R|kotlin/Nothing|>(<L> = let@fun <anonymous>(it: R|A|): R|kotlin/Nothing| <kind=EXACTLY_ONCE> )"]; 79 [label="Function call: R|<local>/x|?.R|kotlin/let|<R|A|, R|kotlin/Nothing|>(...)"];
80 [label="Exit safe call"]; 80 [label="Exit safe call"];
81 [label="Enter safe call"]; 81 [label="Enter safe call"];
82 [label="Access variable R|<local>/x|"]; 82 [label="Access variable R|<local>/x|"];
83 [label="Function call: R|<local>/x|.R|/A.bool|()"]; 83 [label="Function call: R|<local>/x|.R|/A.bool|()"];
84 [label="Function call: R|<local>/x|?.R|kotlin/let|<R|A|, R|kotlin/Nothing|>(<L> = let@fun <anonymous>(it: R|A|): R|kotlin/Nothing| <kind=EXACTLY_ONCE> )?.R|/boo|(R|<local>/x|.R|/A.bool|())"]; 84 [label="Function call: R|<local>/x|?.R|kotlin/let|<R|A|, R|kotlin/Nothing|>(...)?.R|/boo|(...)"];
85 [label="Exit safe call"]; 85 [label="Exit safe call"];
86 [label="Access variable R|<local>/x|"]; 86 [label="Access variable R|<local>/x|"];
87 [label="Function call: R|<local>/x|.<Inapplicable(WRONG_RECEIVER): [/A.id]>#()"]; 87 [label="Function call: R|<local>/x|.<Inapplicable(WRONG_RECEIVER): [/A.id]>#()"];
@@ -215,7 +215,7 @@ digraph smartcastToNothing_kt {
87 [label="Exit function anonymousFunction"]; 87 [label="Exit function anonymousFunction"];
} }
88 [label="Postponed exit from lambda"]; 88 [label="Postponed exit from lambda"];
89 [label="Function call: R|<local>/s|?.R|kotlin/let|<R|A|, R|kotlin/Int|>(<L> = let@fun <anonymous>(it: R|A|): R|kotlin/Int| <kind=EXACTLY_ONCE> )"]; 89 [label="Function call: R|<local>/s|?.R|kotlin/let|<R|A|, R|kotlin/Int|>(...)"];
90 [label="Exit safe call"]; 90 [label="Exit safe call"];
91 [label="Exit function test_0" style="filled" fillcolor=red]; 91 [label="Exit function test_0" style="filled" fillcolor=red];
} }
@@ -16,7 +16,7 @@ digraph callsInPlace_kt {
6 [label="Exit function anonymousFunction"]; 6 [label="Exit function anonymousFunction"];
} }
7 [label="Postponed exit from lambda"]; 7 [label="Postponed exit from lambda"];
8 [label="Function call: R|kotlin/run|<R|kotlin/Unit|>(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> )"]; 8 [label="Function call: R|kotlin/run|<R|kotlin/Unit|>(...)"];
9 [label="Access variable R|<local>/x|"]; 9 [label="Access variable R|<local>/x|"];
10 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"]; 10 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
11 [label="Exit function test" style="filled" fillcolor=red]; 11 [label="Exit function test" style="filled" fillcolor=red];
@@ -47,7 +47,7 @@ digraph callsInPlace_kt {
17 [label="Exit function anonymousFunction"]; 17 [label="Exit function anonymousFunction"];
} }
18 [label="Postponed exit from lambda"]; 18 [label="Postponed exit from lambda"];
19 [label="Function call: R|kotlin/repeat|(Int(10), <L> = repeat@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=UNKNOWN> )"]; 19 [label="Function call: R|kotlin/repeat|(...)"];
20 [label="Exit function test_2" style="filled" fillcolor=red]; 20 [label="Exit function test_2" style="filled" fillcolor=red];
} }
@@ -74,7 +74,7 @@ digraph callsInPlace_kt {
} }
26 [label="Postponed exit from lambda"]; 26 [label="Postponed exit from lambda"];
27 [label="Const: Int(10)"]; 27 [label="Const: Int(10)"];
28 [label="Function call: R|kotlin/repeat|(action = repeat@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=UNKNOWN> , times = Int(10))"]; 28 [label="Function call: R|kotlin/repeat|(...)"];
29 [label="Exit function test_3" style="filled" fillcolor=red]; 29 [label="Exit function test_3" style="filled" fillcolor=red];
} }
@@ -100,12 +100,12 @@ digraph callsInPlace_kt {
34 [label="Const: String(test_4)"]; 34 [label="Const: String(test_4)"];
35 [label="Access variable R|<local>/it|"]; 35 [label="Access variable R|<local>/it|"];
36 [label="Const: Int(0)"]; 36 [label="Const: Int(0)"];
37 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(Int(0))"]; 37 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(...)"];
38 [label="Comparison >"]; 38 [label="Comparison >"];
39 [label="Exit function anonymousFunction"]; 39 [label="Exit function anonymousFunction"];
} }
40 [label="Postponed exit from lambda"]; 40 [label="Postponed exit from lambda"];
41 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(<L> = takeUnless@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> )"]; 41 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(...)"];
42 [label="Exit function test_4" style="filled" fillcolor=red]; 42 [label="Exit function test_4" style="filled" fillcolor=red];
} }
@@ -134,12 +134,12 @@ digraph callsInPlace_kt {
47 [label="Const: String(test_5)"]; 47 [label="Const: String(test_5)"];
48 [label="Access variable R|<local>/it|"]; 48 [label="Access variable R|<local>/it|"];
49 [label="Const: Int(0)"]; 49 [label="Const: Int(0)"];
50 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(Int(0))"]; 50 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(...)"];
51 [label="Comparison >"]; 51 [label="Comparison >"];
52 [label="Exit function anonymousFunction"]; 52 [label="Exit function anonymousFunction"];
} }
53 [label="Postponed exit from lambda"]; 53 [label="Postponed exit from lambda"];
54 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(predicate = takeUnless@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> )"]; 54 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(...)"];
55 [label="Exit function test_5" style="filled" fillcolor=red]; 55 [label="Exit function test_5" style="filled" fillcolor=red];
} }
@@ -188,7 +188,7 @@ digraph callsInPlace_kt {
69 [label="Exit function anonymousFunction"]; 69 [label="Exit function anonymousFunction"];
} }
70 [label="Postponed exit from lambda"]; 70 [label="Postponed exit from lambda"];
71 [label="Function call: R|/myRun|(myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> , <L> = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"]; 71 [label="Function call: R|/myRun|(...)"];
72 [label="Exit function test_6" style="filled" fillcolor=red]; 72 [label="Exit function test_6" style="filled" fillcolor=red];
} }
@@ -228,7 +228,7 @@ digraph callsInPlace_kt {
82 [label="Exit function anonymousFunction"]; 82 [label="Exit function anonymousFunction"];
} }
83 [label="Postponed exit from lambda"]; 83 [label="Postponed exit from lambda"];
84 [label="Function call: R|/myRun|(block2 = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> , block1 = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"]; 84 [label="Function call: R|/myRun|(...)"];
85 [label="Exit function test_7" style="filled" fillcolor=red]; 85 [label="Exit function test_7" style="filled" fillcolor=red];
} }
@@ -264,7 +264,7 @@ digraph callsInPlace_kt {
89 [label="Enter function test_8" style="filled" fillcolor=red]; 89 [label="Enter function test_8" style="filled" fillcolor=red];
90 [label="Postponed enter to lambda"]; 90 [label="Postponed enter to lambda"];
91 [label="Postponed exit from lambda"]; 91 [label="Postponed exit from lambda"];
92 [label="Function call: R|/myDummyRun|(<L> = myDummyRun@fun <anonymous>(): R|kotlin/Unit|)"]; 92 [label="Function call: R|/myDummyRun|(...)"];
93 [label="Exit function test_8" style="filled" fillcolor=red]; 93 [label="Exit function test_8" style="filled" fillcolor=red];
} }
@@ -8,7 +8,7 @@ digraph conditionalEffects_kt {
0 [label="Enter function test_1" style="filled" fillcolor=red]; 0 [label="Enter function test_1" style="filled" fillcolor=red];
1 [label="Access variable R|<local>/x|"]; 1 [label="Access variable R|<local>/x|"];
2 [label="Type operator: (R|<local>/x| is R|kotlin/Int|)"]; 2 [label="Type operator: (R|<local>/x| is R|kotlin/Int|)"];
3 [label="Function call: R|kotlin/require|((R|<local>/x| is R|kotlin/Int|))"]; 3 [label="Function call: R|kotlin/require|(...)"];
subgraph cluster_1 { subgraph cluster_1 {
color=blue color=blue
4 [label="Enter contract"]; 4 [label="Enter contract"];
@@ -36,7 +36,7 @@ digraph conditionalEffects_kt {
color=red color=red
11 [label="Enter function test_2" style="filled" fillcolor=red]; 11 [label="Enter function test_2" style="filled" fillcolor=red];
12 [label="Access variable R|<local>/x|"]; 12 [label="Access variable R|<local>/x|"];
13 [label="Function call: R|kotlin/requireNotNull|<R|kotlin/String|>(R|<local>/x|)"]; 13 [label="Function call: R|kotlin/requireNotNull|<R|kotlin/String|>(...)"];
subgraph cluster_3 { subgraph cluster_3 {
color=blue color=blue
14 [label="Enter contract"]; 14 [label="Enter contract"];
@@ -67,7 +67,7 @@ digraph conditionalEffects_kt {
23 [label="Access variable R|<local>/x|"]; 23 [label="Access variable R|<local>/x|"];
24 [label="Const: Null(null)"]; 24 [label="Const: Null(null)"];
25 [label="Operator !="]; 25 [label="Operator !="];
26 [label="Function call: R|kotlin/require|(!=(R|<local>/x|, Null(null)))"]; 26 [label="Function call: R|kotlin/require|(...)"];
subgraph cluster_5 { subgraph cluster_5 {
color=blue color=blue
27 [label="Enter contract"]; 27 [label="Enter contract"];
@@ -109,7 +109,7 @@ digraph conditionalEffects_kt {
43 [label="Operator !="]; 43 [label="Operator !="];
44 [label="Exit &&"]; 44 [label="Exit &&"];
} }
45 [label="Function call: R|kotlin/require|((R|<local>/x| is R|kotlin/String|) && !=(R|<local>/y|, Null(null)))"]; 45 [label="Function call: R|kotlin/require|(...)"];
subgraph cluster_8 { subgraph cluster_8 {
color=blue color=blue
46 [label="Enter contract"]; 46 [label="Enter contract"];
@@ -193,7 +193,7 @@ digraph conditionalEffects_kt {
76 [label="Enter block"]; 76 [label="Enter block"];
77 [label="Access variable R|<local>/x|"]; 77 [label="Access variable R|<local>/x|"];
78 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"]; 78 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
79 [label="Function call: R|kotlin/require|((R|<local>/x| is R|kotlin/String|))"]; 79 [label="Function call: R|kotlin/require|(...)"];
subgraph cluster_16 { subgraph cluster_16 {
color=blue color=blue
80 [label="Enter contract"]; 80 [label="Enter contract"];
@@ -266,7 +266,7 @@ digraph conditionalEffects_kt {
100 [label="Enter block"]; 100 [label="Enter block"];
101 [label="Access variable R|<local>/x|"]; 101 [label="Access variable R|<local>/x|"];
102 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"]; 102 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
103 [label="Function call: R|kotlin/require|((R|<local>/x| is R|kotlin/String|))"]; 103 [label="Function call: R|kotlin/require|(...)"];
subgraph cluster_22 { subgraph cluster_22 {
color=blue color=blue
104 [label="Enter contract"]; 104 [label="Enter contract"];
@@ -285,7 +285,7 @@ digraph conditionalEffects_kt {
113 [label="Enter block"]; 113 [label="Enter block"];
114 [label="Access variable R|<local>/x|"]; 114 [label="Access variable R|<local>/x|"];
115 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"]; 115 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
116 [label="Function call: R|kotlin/require|((R|<local>/x| is R|kotlin/String|))"]; 116 [label="Function call: R|kotlin/require|(...)"];
subgraph cluster_24 { subgraph cluster_24 {
color=blue color=blue
117 [label="Enter contract"]; 117 [label="Enter contract"];
@@ -90,7 +90,7 @@ digraph delegateWithAnonymousObject_kt {
24 [label="Enter function setValue" style="filled" fillcolor=red]; 24 [label="Enter function setValue" style="filled" fillcolor=red];
25 [label="Function call: R|/IssueListView.IssueListView|()"]; 25 [label="Function call: R|/IssueListView.IssueListView|()"];
26 [label="Access variable R|<local>/value|"]; 26 [label="Access variable R|<local>/value|"];
27 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|<local>/value|)"]; 27 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)"];
28 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|<local>/value|)"]; 28 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|<local>/value|)"];
29 [label="Stub" style="filled" fillcolor=gray]; 29 [label="Stub" style="filled" fillcolor=gray];
30 [label="Exit function setValue" style="filled" fillcolor=red]; 30 [label="Exit function setValue" style="filled" fillcolor=red];
@@ -109,7 +109,7 @@ digraph delegateWithAnonymousObject_kt {
31 [label="Enter function getter" style="filled" fillcolor=red]; 31 [label="Enter function getter" style="filled" fillcolor=red];
32 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; 32 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
33 [label="Access variable this@R|/IssuesListUserProfile|"]; 33 [label="Access variable this@R|/IssuesListUserProfile|"];
34 [label="Function call: D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; 34 [label="Function call: D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(...)"];
35 [label="Jump: ^ D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; 35 [label="Jump: ^ D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"];
36 [label="Stub" style="filled" fillcolor=gray]; 36 [label="Stub" style="filled" fillcolor=gray];
37 [label="Exit function getter" style="filled" fillcolor=red]; 37 [label="Exit function getter" style="filled" fillcolor=red];
@@ -129,7 +129,7 @@ digraph delegateWithAnonymousObject_kt {
39 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; 39 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
40 [label="Access variable this@R|/IssuesListUserProfile|"]; 40 [label="Access variable this@R|/IssuesListUserProfile|"];
41 [label="Access variable R|<local>/issueListView|"]; 41 [label="Access variable R|<local>/issueListView|"];
42 [label="Function call: D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|, R|<local>/issueListView|)"]; 42 [label="Function call: D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(...)"];
43 [label="Exit function setter" style="filled" fillcolor=red]; 43 [label="Exit function setter" style="filled" fillcolor=red];
} }
@@ -144,14 +144,14 @@ digraph delegateWithAnonymousObject_kt {
44 [label="Enter property" style="filled" fillcolor=red]; 44 [label="Enter property" style="filled" fillcolor=red];
45 [label="Postponed enter to lambda"]; 45 [label="Postponed enter to lambda"];
46 [label="Postponed exit from lambda"]; 46 [label="Postponed exit from lambda"];
47 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(<L> = delegate@fun <anonymous>(): R|kotlin/properties/ReadWriteProperty<IssuesListUserProfile, IssueListView>|)"]; 47 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)"];
48 [label="Access variable this@R|/IssuesListUserProfile|"]; 48 [label="Access variable this@R|/IssuesListUserProfile|"];
49 [label="Access variable this@R|/IssuesListUserProfile|"]; 49 [label="Access variable this@R|/IssuesListUserProfile|"];
50 [label="Access variable this@R|/IssuesListUserProfile|"]; 50 [label="Access variable this@R|/IssuesListUserProfile|"];
51 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(<L> = delegate@fun <anonymous>(): R|kotlin/properties/ReadWriteProperty<IssuesListUserProfile, IssueListView>|).<Unresolved name: provideDelegate>#(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; 51 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...).<Unresolved name: provideDelegate>#(...)"];
52 [label="Postponed enter to lambda"]; 52 [label="Postponed enter to lambda"];
53 [label="Postponed exit from lambda"]; 53 [label="Postponed exit from lambda"];
54 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(<L> = delegate@fun <anonymous>(): R|kotlin/properties/ReadWriteProperty<IssuesListUserProfile, IssueListView>|)"]; 54 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)"];
55 [label="Exit property" style="filled" fillcolor=red]; 55 [label="Exit property" style="filled" fillcolor=red];
} }
@@ -47,7 +47,7 @@ digraph tryWithLambdaInside_kt {
15 [label="Exit function anonymousFunction"]; 15 [label="Exit function anonymousFunction"];
} }
16 [label="Postponed exit from lambda"]; 16 [label="Postponed exit from lambda"];
17 [label="Function call: R|<local>/list|.R|kotlin/collections/filter|<R|kotlin/Boolean|>(<L> = filter@fun <anonymous>(it: R|kotlin/Boolean|): R|kotlin/Boolean| <kind=UNKNOWN> )"]; 17 [label="Function call: R|<local>/list|.R|kotlin/collections/filter|<R|kotlin/Boolean|>(...)"];
18 [label="Exit block"]; 18 [label="Exit block"];
} }
19 [label="Try main block exit"]; 19 [label="Try main block exit"];
@@ -116,7 +116,7 @@ finally {
32 [label="Access variable R|<local>/list|"]; 32 [label="Access variable R|<local>/list|"];
33 [label="Postponed enter to lambda"]; 33 [label="Postponed enter to lambda"];
34 [label="Postponed exit from lambda"]; 34 [label="Postponed exit from lambda"];
35 [label="Function call: R|<local>/list|.R|/notInPlaceFilter|<R|kotlin/Boolean|>(<L> = notInPlaceFilter@fun <anonymous>(it: R|kotlin/Boolean|): R|kotlin/Boolean|)"]; 35 [label="Function call: R|<local>/list|.R|/notInPlaceFilter|<R|kotlin/Boolean|>(...)"];
36 [label="Exit block"]; 36 [label="Exit block"];
} }
37 [label="Try main block exit"]; 37 [label="Try main block exit"];
@@ -42,8 +42,8 @@ fun FirElement.render(mode: FirRenderer.RenderMode = FirRenderer.RenderMode.Norm
buildString { this@render.accept(FirRenderer(this, mode)) } buildString { this@render.accept(FirRenderer(this, mode)) }
class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderMode.Normal) : FirVisitorVoid() { class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderMode.Normal) : FirVisitorVoid() {
enum class RenderMode { abstract class RenderMode(val renderLambdaBodies: Boolean, val renderCallArguments: Boolean) {
Normal, DontRenderLambdaBodies object Normal : RenderMode(renderLambdaBodies = true, renderCallArguments = true)
} }
private val printer = Printer(builder) private val printer = Printer(builder)
@@ -427,7 +427,7 @@ class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderM
if (anonymousFunction.invocationKind != null) { if (anonymousFunction.invocationKind != null) {
print(" <kind=${anonymousFunction.invocationKind}> ") print(" <kind=${anonymousFunction.invocationKind}> ")
} }
if (mode != RenderMode.DontRenderLambdaBodies) { if (mode.renderLambdaBodies) {
anonymousFunction.body?.renderBody() anonymousFunction.body?.renderBody()
} }
} }
@@ -677,7 +677,13 @@ class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderM
override fun visitCall(call: FirCall) { override fun visitCall(call: FirCall) {
print("(") print("(")
call.arguments.renderSeparated() if (mode.renderCallArguments) {
call.arguments.renderSeparated()
} else {
if (call.arguments.isNotEmpty()) {
print("...")
}
}
print(")") print(")")
} }