diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/resolver/resolverUtils.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/resolver/resolverUtils.kt index 8fa9da2edd0..7913127c93c 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/resolver/resolverUtils.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/resolver/resolverUtils.kt @@ -58,7 +58,10 @@ internal open class StubBodyResolveTransformerComponents( override fun receiverUpdated(symbol: FirBasedSymbol<*>, info: TypeStatement?) = error("Should not be called") - override fun getTypeUsingSmartcastInfo(expression: FirExpression): Pair>? = + override fun getTypeUsingSmartcastInfo( + expression: FirExpression, + ignoreCallArguments: Boolean, + ): Pair>? = null } } \ No newline at end of file diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java index 35be4e38232..342d528a9f5 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java @@ -45238,6 +45238,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt"); } + @Test + @TestMetadata("invokeRecieverUnsafe.kt") + public void testInvokeRecieverUnsafe() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.kt"); + } + @Test @TestMetadata("kt10463.kt") public void testKt10463() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index b81af516888..d75315c95f4 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -51824,6 +51824,18 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java index b811c84e8b4..de03f1232c0 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java @@ -45238,6 +45238,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt"); } + @Test + @TestMetadata("invokeRecieverUnsafe.kt") + public void testInvokeRecieverUnsafe() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.kt"); + } + @Test @TestMetadata("kt10463.kt") public void testKt10463() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index 2fd3a59eb52..ac3757f9ca0 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -51824,6 +51824,18 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/compiler/fir/analysis-tests/testData/resolve/cfa/initializationInTry.dot b/compiler/fir/analysis-tests/testData/resolve/cfa/initializationInTry.dot index ef97481b820..7b45a697199 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfa/initializationInTry.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfa/initializationInTry.dot @@ -61,39 +61,54 @@ digraph initializationInTry_kt { subgraph cluster_9 { color=blue 18 [label="Enter block"]; - 19 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; - 20 [label="Check not null: R|/getNullableString|()!!" style="filled" fillcolor=yellow]; - 21 [label="Variable declaration: lval y: R|kotlin/String|"]; - 22 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; - 23 [label="Assignment: R|/x|"]; - 24 [label="Exit block"]; + subgraph cluster_10 { + color=blue + 19 [label="Function call arguments enter"]; + 20 [label="Function call arguments exit"]; + } + 21 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; + 22 [label="Check not null: R|/getNullableString|()!!" style="filled" fillcolor=yellow]; + 23 [label="Variable declaration: lval y: R|kotlin/String|"]; + subgraph cluster_11 { + color=blue + 24 [label="Function call arguments enter"]; + 25 [label="Function call arguments exit"]; + } + 26 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; + 27 [label="Assignment: R|/x|"]; + 28 [label="Exit block"]; } - 25 [label="Try main block exit"]; + 29 [label="Try main block exit"]; } - subgraph cluster_10 { + subgraph cluster_12 { color=blue - 26 [label="Enter finally"]; - subgraph cluster_11 { + 30 [label="Enter finally"]; + subgraph cluster_13 { color=blue - 27 [label="Enter block"]; - 28 [label="Access qualifier kotlin/Unit"]; - 29 [label="Exit block"]; + 31 [label="Enter block"]; + 32 [label="Access qualifier kotlin/Unit"]; + 33 [label="Exit block"]; } - 30 [label="Exit finally"]; + 34 [label="Exit finally"]; } - 31 [label="Try expression exit"]; + 35 [label="Try expression exit"]; } - 32 [label="Access variable R|/x|"]; - 33 [label="Function call: R|/takeNullableString|(...)" style="filled" fillcolor=yellow]; - 34 [label="Exit block"]; + subgraph cluster_14 { + color=blue + 36 [label="Function call arguments enter"]; + 37 [label="Access variable R|/x|"]; + 38 [label="Function call arguments exit"]; + } + 39 [label="Function call: R|/takeNullableString|(...)" style="filled" fillcolor=yellow]; + 40 [label="Exit block"]; } - 35 [label="Exit function test_1" style="filled" fillcolor=red]; + 41 [label="Exit function test_1" style="filled" fillcolor=red]; } 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 16 -> {26} [label="onUncaughtException"]; + 16 -> {30} [label="onUncaughtException"]; 17 -> {18}; 18 -> {19}; 19 -> {20}; @@ -101,11 +116,11 @@ digraph initializationInTry_kt { 21 -> {22}; 22 -> {23}; 23 -> {24}; - 23 -> {26} [label="onUncaughtException"]; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; + 27 -> {30} [label="onUncaughtException"]; 28 -> {29}; 29 -> {30}; 30 -> {31}; @@ -113,62 +128,76 @@ digraph initializationInTry_kt { 32 -> {33}; 33 -> {34}; 34 -> {35}; - - subgraph cluster_12 { - color=red - 36 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 37 [label="Enter block"]; - 38 [label="Variable declaration: lval x: R|kotlin/String?|"]; - subgraph cluster_14 { - color=blue - 39 [label="Try expression enter"]; - subgraph cluster_15 { - color=blue - 40 [label="Try main block enter"]; - subgraph cluster_16 { - color=blue - 41 [label="Enter block"]; - 42 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; - 43 [label="Variable declaration: lval y: R|kotlin/String?|"]; - 44 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; - 45 [label="Assignment: R|/x|"]; - 46 [label="Exit block"]; - } - 47 [label="Try main block exit"]; - } - subgraph cluster_17 { - color=blue - 48 [label="Enter finally"]; - subgraph cluster_18 { - color=blue - 49 [label="Enter block"]; - 50 [label="Access qualifier kotlin/Unit"]; - 51 [label="Exit block"]; - } - 52 [label="Exit finally"]; - } - 53 [label="Try expression exit"]; - } - 54 [label="Access variable R|/x|"]; - 55 [label="Function call: R|/takeNullableString|(...)" style="filled" fillcolor=yellow]; - 56 [label="Exit block"]; - } - 57 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; - 39 -> {48} [label="onUncaughtException"]; 40 -> {41}; - 41 -> {42}; + + subgraph cluster_15 { + color=red + 42 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 43 [label="Enter block"]; + 44 [label="Variable declaration: lval x: R|kotlin/String?|"]; + subgraph cluster_17 { + color=blue + 45 [label="Try expression enter"]; + subgraph cluster_18 { + color=blue + 46 [label="Try main block enter"]; + subgraph cluster_19 { + color=blue + 47 [label="Enter block"]; + subgraph cluster_20 { + color=blue + 48 [label="Function call arguments enter"]; + 49 [label="Function call arguments exit"]; + } + 50 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; + 51 [label="Variable declaration: lval y: R|kotlin/String?|"]; + subgraph cluster_21 { + color=blue + 52 [label="Function call arguments enter"]; + 53 [label="Function call arguments exit"]; + } + 54 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; + 55 [label="Assignment: R|/x|"]; + 56 [label="Exit block"]; + } + 57 [label="Try main block exit"]; + } + subgraph cluster_22 { + color=blue + 58 [label="Enter finally"]; + subgraph cluster_23 { + color=blue + 59 [label="Enter block"]; + 60 [label="Access qualifier kotlin/Unit"]; + 61 [label="Exit block"]; + } + 62 [label="Exit finally"]; + } + 63 [label="Try expression exit"]; + } + subgraph cluster_24 { + color=blue + 64 [label="Function call arguments enter"]; + 65 [label="Access variable R|/x|"]; + 66 [label="Function call arguments exit"]; + } + 67 [label="Function call: R|/takeNullableString|(...)" style="filled" fillcolor=yellow]; + 68 [label="Exit block"]; + } + 69 [label="Exit function test_2" style="filled" fillcolor=red]; + } 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 45 -> {48} [label="onUncaughtException"]; + 45 -> {58} [label="onUncaughtException"]; 46 -> {47}; 47 -> {48}; 48 -> {49}; @@ -179,6 +208,19 @@ digraph initializationInTry_kt { 53 -> {54}; 54 -> {55}; 55 -> {56}; + 55 -> {58} [label="onUncaughtException"]; 56 -> {57}; + 57 -> {58}; + 58 -> {59}; + 59 -> {60}; + 60 -> {61}; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; + 64 -> {65}; + 65 -> {66}; + 66 -> {67}; + 67 -> {68}; + 68 -> {69}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot index dcc29c5e74c..64483cac286 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot @@ -56,21 +56,26 @@ digraph annotatedLocalClass_kt { 20 [label="Exit when"]; } 21 [label="Local class declaration"]; - 22 [label="Function call: R|/bar|()" style="filled" fillcolor=yellow]; - 23 [label="Exit block"]; + subgraph cluster_8 { + color=blue + 22 [label="Function call arguments enter"]; + 23 [label="Function call arguments exit"]; + } + 24 [label="Function call: R|/bar|()" style="filled" fillcolor=yellow]; + 25 [label="Exit block"]; } - 24 [label="Exit function foo" style="filled" fillcolor=red]; + 26 [label="Exit function foo" style="filled" fillcolor=red]; } - subgraph cluster_8 { + subgraph cluster_9 { color=blue - 25 [label="Enter class Local" style="filled" fillcolor=red]; - subgraph cluster_9 { + 27 [label="Enter class Local" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 26 [label="Enter function " style="filled" fillcolor=red]; - 27 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 28 [label="Exit function " style="filled" fillcolor=red]; + 28 [label="Enter function " style="filled" fillcolor=red]; + 29 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 30 [label="Exit function " style="filled" fillcolor=red]; } - 29 [label="Exit class Local" style="filled" fillcolor=red]; + 31 [label="Exit class Local" style="filled" fillcolor=red]; } 7 -> {8}; 8 -> {9}; @@ -81,35 +86,37 @@ digraph annotatedLocalClass_kt { 13 -> {20}; 14 -> {15}; 15 -> {16}; - 16 -> {24}; + 16 -> {26}; 16 -> {17} [style=dotted]; 17 -> {18} [style=dotted]; 18 -> {19} [style=dotted]; 19 -> {20} [style=dotted]; 20 -> {21}; - 21 -> {22 25}; - 21 -> {25} [style=dashed]; + 21 -> {22 27}; + 21 -> {27} [style=dashed]; 22 -> {23}; 23 -> {24}; + 24 -> {25}; 25 -> {26}; - 25 -> {29} [style=dotted]; - 25 -> {26} [style=dashed]; - 26 -> {27}; 27 -> {28}; - 28 -> {29} [color=green]; + 27 -> {31} [style=dotted]; + 27 -> {28} [style=dashed]; + 28 -> {29}; + 29 -> {30}; + 30 -> {31} [color=green]; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 30 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_11 { + 32 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 31 [label="Enter block"]; - 32 [label="Exit block"]; + 33 [label="Enter block"]; + 34 [label="Exit block"]; } - 33 [label="Exit function bar" style="filled" fillcolor=red]; + 35 [label="Exit function bar" style="filled" fillcolor=red]; } - 30 -> {31}; - 31 -> {32}; 32 -> {33}; + 33 -> {34}; + 34 -> {35}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot index ac049010f1a..42c818a95a4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot @@ -67,49 +67,64 @@ digraph complex_kt { subgraph cluster_12 { color=blue 25 [label="Enter block"]; - 26 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; + subgraph cluster_13 { + color=blue + 26 [label="Function call arguments enter"]; + 27 [label="Function call arguments exit"]; + } + 28 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()" style="filled" fillcolor=yellow]; + 29 [label="Exit block"]; } - 28 [label="Try main block exit"]; + 30 [label="Try main block exit"]; } - subgraph cluster_13 { + subgraph cluster_14 { color=blue - 29 [label="Catch enter"]; - 30 [label="Variable declaration: closeException: R|kotlin/Throwable|"]; - subgraph cluster_14 { + 31 [label="Catch enter"]; + 32 [label="Variable declaration: closeException: R|kotlin/Throwable|"]; + subgraph cluster_15 { color=blue - 31 [label="Enter block"]; - 32 [label="Access variable R|/cause|"]; - 33 [label="Smart cast: R|/cause|"]; - 34 [label="Access variable R|/closeException|"]; - 35 [label="Function call: R|/cause|.R|kotlin/Throwable.addSuppressed|(...)" style="filled" fillcolor=yellow]; - 36 [label="Exit block"]; + 33 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 34 [label="Function call arguments enter"]; + 35 [label="Access variable R|/cause|"]; + 36 [label="Smart cast: R|/cause|"]; + 37 [label="Access variable R|/closeException|"]; + 38 [label="Function call arguments exit"]; + } + 39 [label="Function call: R|/cause|.R|kotlin/Throwable.addSuppressed|(...)" style="filled" fillcolor=yellow]; + 40 [label="Exit block"]; } - 37 [label="Catch exit"]; + 41 [label="Catch exit"]; } - 38 [label="Try expression exit"]; + 42 [label="Try expression exit"]; } - 39 [label="Exit block"]; + 43 [label="Exit block"]; } - 40 [label="Exit when branch result"]; - 41 [label="Enter when branch result"]; - subgraph cluster_15 { + 44 [label="Exit when branch result"]; + 45 [label="Enter when branch result"]; + subgraph cluster_17 { color=blue - 42 [label="Enter block"]; - 43 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()" style="filled" fillcolor=yellow]; - 44 [label="Exit block"]; + 46 [label="Enter block"]; + subgraph cluster_18 { + color=blue + 47 [label="Function call arguments enter"]; + 48 [label="Function call arguments exit"]; + } + 49 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()" style="filled" fillcolor=yellow]; + 50 [label="Exit block"]; } - 45 [label="Exit when branch result"]; - 46 [label="Enter when branch result"]; - subgraph cluster_16 { + 51 [label="Exit when branch result"]; + 52 [label="Enter when branch result"]; + subgraph cluster_19 { color=blue - 47 [label="Enter block"]; - 48 [label="Exit block"]; + 53 [label="Enter block"]; + 54 [label="Exit block"]; } - 49 [label="Exit when branch result"]; - 50 [label="Exit when"]; + 55 [label="Exit when branch result"]; + 56 [label="Exit when"]; } - 51 [label="Jump: ^closeFinally when () { + 57 [label="Jump: ^closeFinally when () { ==(this@R|/closeFinally|, Null(null)) -> { } ==(R|/cause|, Null(null)) -> { @@ -126,10 +141,10 @@ digraph complex_kt { } } "]; - 52 [label="Stub" style="filled" fillcolor=gray]; - 53 [label="Exit block" style="filled" fillcolor=gray]; + 58 [label="Stub" style="filled" fillcolor=gray]; + 59 [label="Exit block" style="filled" fillcolor=gray]; } - 54 [label="Exit function closeFinally" style="filled" fillcolor=red]; + 60 [label="Exit function closeFinally" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; @@ -138,24 +153,24 @@ digraph complex_kt { 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {14 46}; + 13 -> {14 52}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {19 41}; + 18 -> {19 45}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {24 29}; + 23 -> {24 31}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29 38}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {31 42}; 31 -> {32}; 32 -> {33}; 33 -> {34}; @@ -165,108 +180,123 @@ digraph complex_kt { 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {50}; + 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45}; - 45 -> {50}; + 44 -> {56}; + 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {54}; - 51 -> {52} [style=dotted]; - 52 -> {53} [style=dotted]; - 53 -> {54} [style=dotted]; - - subgraph cluster_17 { - color=red - 55 [label="Enter function firstIsInstanceOrNull" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 56 [label="Enter block"]; - subgraph cluster_19 { - color=blue - 57 [label="Enter block"]; - 58 [label="Access variable this@R|/firstIsInstanceOrNull|"]; - 59 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; - 60 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; - subgraph cluster_20 { - color=blue - 61 [label="Enter while loop"]; - subgraph cluster_21 { - color=blue - 62 [label="Enter loop condition"]; - 63 [label="Access variable R|/|"]; - 64 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 65 [label="Exit loop condition"]; - } - subgraph cluster_22 { - color=blue - 66 [label="Enter loop block"]; - subgraph cluster_23 { - color=blue - 67 [label="Enter block"]; - 68 [label="Access variable R|/|"]; - 69 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 70 [label="Variable declaration: lval element: R|kotlin/Any?|"]; - subgraph cluster_24 { - color=blue - 71 [label="Enter block"]; - subgraph cluster_25 { - color=blue - 72 [label="Enter when"]; - subgraph cluster_26 { - color=blue - 73 [label="Enter when branch condition "]; - 74 [label="Access variable R|/element|"]; - 75 [label="Type operator: (R|/element| is R|T|)"]; - 76 [label="Exit when branch condition"]; - } - 77 [label="Synthetic else branch"]; - 78 [label="Enter when branch result"]; - subgraph cluster_27 { - color=blue - 79 [label="Enter block"]; - 80 [label="Access variable R|/element|"]; - 81 [label="Smart cast: R|/element|"]; - 82 [label="Jump: ^firstIsInstanceOrNull R|/element|"]; - 83 [label="Stub" style="filled" fillcolor=gray]; - 84 [label="Exit block" style="filled" fillcolor=gray]; - } - 85 [label="Exit when branch result" style="filled" fillcolor=gray]; - 86 [label="Exit when"]; - } - 87 [label="Exit block"]; - } - 88 [label="Exit block"]; - } - 89 [label="Exit loop block"]; - } - 90 [label="Exit while loop"]; - } - 91 [label="Exit block"]; - } - 92 [label="Const: Null(null)"]; - 93 [label="Jump: ^firstIsInstanceOrNull Null(null)"]; - 94 [label="Stub" style="filled" fillcolor=gray]; - 95 [label="Exit block" style="filled" fillcolor=gray]; - } - 96 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red]; - } + 51 -> {56}; + 52 -> {53}; + 53 -> {54}; + 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58}; - 58 -> {59}; - 59 -> {60}; - 60 -> {61}; + 57 -> {60}; + 57 -> {58} [style=dotted]; + 58 -> {59} [style=dotted]; + 59 -> {60} [style=dotted]; + + subgraph cluster_20 { + color=red + 61 [label="Enter function firstIsInstanceOrNull" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 62 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 63 [label="Enter block"]; + subgraph cluster_23 { + color=blue + 64 [label="Function call arguments enter"]; + 65 [label="Access variable this@R|/firstIsInstanceOrNull|"]; + 66 [label="Function call arguments exit"]; + } + 67 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; + 68 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; + subgraph cluster_24 { + color=blue + 69 [label="Enter while loop"]; + subgraph cluster_25 { + color=blue + 70 [label="Enter loop condition"]; + subgraph cluster_26 { + color=blue + 71 [label="Function call arguments enter"]; + 72 [label="Access variable R|/|"]; + 73 [label="Function call arguments exit"]; + } + 74 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 75 [label="Exit loop condition"]; + } + subgraph cluster_27 { + color=blue + 76 [label="Enter loop block"]; + subgraph cluster_28 { + color=blue + 77 [label="Enter block"]; + subgraph cluster_29 { + color=blue + 78 [label="Function call arguments enter"]; + 79 [label="Access variable R|/|"]; + 80 [label="Function call arguments exit"]; + } + 81 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 82 [label="Variable declaration: lval element: R|kotlin/Any?|"]; + subgraph cluster_30 { + color=blue + 83 [label="Enter block"]; + subgraph cluster_31 { + color=blue + 84 [label="Enter when"]; + subgraph cluster_32 { + color=blue + 85 [label="Enter when branch condition "]; + 86 [label="Access variable R|/element|"]; + 87 [label="Type operator: (R|/element| is R|T|)"]; + 88 [label="Exit when branch condition"]; + } + 89 [label="Synthetic else branch"]; + 90 [label="Enter when branch result"]; + subgraph cluster_33 { + color=blue + 91 [label="Enter block"]; + 92 [label="Access variable R|/element|"]; + 93 [label="Smart cast: R|/element|"]; + 94 [label="Jump: ^firstIsInstanceOrNull R|/element|"]; + 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]; + 98 [label="Exit when"]; + } + 99 [label="Exit block"]; + } + 100 [label="Exit block"]; + } + 101 [label="Exit loop block"]; + } + 102 [label="Exit while loop"]; + } + 103 [label="Exit block"]; + } + 104 [label="Const: Null(null)"]; + 105 [label="Jump: ^firstIsInstanceOrNull Null(null)"]; + 106 [label="Stub" style="filled" fillcolor=gray]; + 107 [label="Exit block" style="filled" fillcolor=gray]; + } + 108 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red]; + } 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {66 90}; + 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; @@ -276,28 +306,40 @@ digraph complex_kt { 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76}; - 76 -> {77 78}; - 77 -> {86}; + 75 -> {76 102}; + 76 -> {77}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {96}; - 82 -> {83} [style=dotted]; - 83 -> {84} [style=dotted]; - 84 -> {85} [style=dotted]; - 85 -> {86} [style=dotted]; + 82 -> {83}; + 83 -> {84}; + 84 -> {85}; + 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {89}; - 89 -> {62} [color=green style=dashed]; + 88 -> {89 90}; + 89 -> {98}; 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {96}; - 93 -> {94} [style=dotted]; + 93 -> {94}; + 94 -> {108}; 94 -> {95} [style=dotted]; 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; + 97 -> {98} [style=dotted]; + 98 -> {99}; + 99 -> {100}; + 100 -> {101}; + 101 -> {70} [color=green style=dashed]; + 102 -> {103}; + 103 -> {104}; + 104 -> {105}; + 105 -> {108}; + 105 -> {106} [style=dotted]; + 106 -> {107} [style=dotted]; + 107 -> {108} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot index f2f53926557..c9b3e12bbc1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot @@ -47,30 +47,45 @@ digraph defaultArguments_kt { subgraph cluster_5 { color=blue 17 [label="Enter default value of z" style="filled" fillcolor=red]; - 18 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue - 19 [label="Enter function " style="filled" fillcolor=red]; + 18 [label="Function call arguments enter"]; + 19 [label="Postponed enter to lambda"]; subgraph cluster_7 { color=blue - 20 [label="Enter block"]; - 21 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; - 22 [label="Exit block"]; + 20 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 21 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 22 [label="Function call arguments enter"]; + 23 [label="Function call arguments exit"]; + } + 24 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; + 25 [label="Exit block"]; + } + 26 [label="Exit function " style="filled" fillcolor=red]; } - 23 [label="Exit function " style="filled" fillcolor=red]; + 27 [label="Function call arguments exit"]; } - 24 [label="Postponed exit from lambda"]; - 25 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 26 [label="Exit default value of z" style="filled" fillcolor=red]; + 28 [label="Postponed exit from lambda"]; + 29 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 30 [label="Exit default value of z" style="filled" fillcolor=red]; } - 27 [label="Exit default value of z"]; - subgraph cluster_8 { + 31 [label="Exit default value of z"]; + subgraph cluster_10 { color=blue - 28 [label="Enter block"]; - 29 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; + 32 [label="Enter block"]; + subgraph cluster_11 { + color=blue + 33 [label="Function call arguments enter"]; + 34 [label="Function call arguments exit"]; + } + 35 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; + 36 [label="Exit block"]; } - 31 [label="Exit function test" style="filled" fillcolor=red]; + 37 [label="Exit function test" style="filled" fillcolor=red]; } 9 -> {10}; 10 -> {11 15}; @@ -80,23 +95,29 @@ digraph defaultArguments_kt { 13 -> {14}; 14 -> {15}; 15 -> {16}; - 16 -> {17 27}; + 16 -> {17 31}; 16 -> {17} [style=dashed]; 17 -> {18}; - 18 -> {19 25}; - 18 -> {24} [style=dotted]; - 18 -> {19} [style=dashed]; - 19 -> {20}; + 18 -> {19}; + 19 -> {20 27}; + 19 -> {28} [style=dotted]; + 19 -> {20} [style=dashed]; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {27}; - 27 -> {28}; + 26 -> {28}; + 27 -> {29}; 28 -> {29}; 29 -> {30}; 30 -> {31}; + 31 -> {32}; + 32 -> {33}; + 33 -> {34}; + 34 -> {35}; + 35 -> {36}; + 36 -> {37}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot index cb0fa8545fc..db32b1aad0a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot @@ -21,407 +21,437 @@ digraph flowFromInplaceLambda_kt { 4 [label="Enter block"]; 5 [label="Exit block"]; } - 6 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 7 [label="Jump: ^unknown R|/x|.R|SubstitutionOverride|()"]; - 8 [label="Stub" style="filled" fillcolor=gray]; - 9 [label="Exit block" style="filled" fillcolor=gray]; + subgraph cluster_4 { + color=blue + 6 [label="Function call arguments enter"]; + 7 [label="Function call arguments exit"]; + } + 8 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 9 [label="Jump: ^unknown R|/x|.R|SubstitutionOverride|()"]; + 10 [label="Stub" style="filled" fillcolor=gray]; + 11 [label="Exit block" style="filled" fillcolor=gray]; } - 10 [label="Exit function unknown" style="filled" fillcolor=red]; + 12 [label="Exit function unknown" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {10}; - 7 -> {8} [style=dotted]; - 8 -> {9} [style=dotted]; + 7 -> {8}; + 8 -> {9}; + 9 -> {12}; 9 -> {10} [style=dotted]; + 10 -> {11} [style=dotted]; + 11 -> {12} [style=dotted]; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 11 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; - subgraph cluster_5 { + 13 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 12 [label="Enter block"]; - subgraph cluster_6 { + 14 [label="Enter block"]; + subgraph cluster_7 { color=blue - 13 [label="Enter block"]; - 14 [label="Exit block"]; + 15 [label="Enter block"]; + 16 [label="Exit block"]; } - 15 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 16 [label="Jump: ^atLeastOnce R|/x|.R|SubstitutionOverride|()"]; - 17 [label="Stub" style="filled" fillcolor=gray]; - 18 [label="Exit block" style="filled" fillcolor=gray]; + subgraph cluster_8 { + color=blue + 17 [label="Function call arguments enter"]; + 18 [label="Function call arguments exit"]; + } + 19 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 20 [label="Jump: ^atLeastOnce R|/x|.R|SubstitutionOverride|()"]; + 21 [label="Stub" style="filled" fillcolor=gray]; + 22 [label="Exit block" style="filled" fillcolor=gray]; } - 19 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; + 23 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; } - 11 -> {12}; - 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; - 16 -> {19}; - 16 -> {17} [style=dotted]; - 17 -> {18} [style=dotted]; - 18 -> {19} [style=dotted]; + 16 -> {17}; + 17 -> {18}; + 18 -> {19}; + 19 -> {20}; + 20 -> {23}; + 20 -> {21} [style=dotted]; + 21 -> {22} [style=dotted]; + 22 -> {23} [style=dotted]; - subgraph cluster_7 { + subgraph cluster_9 { color=red - 20 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_8 { + 24 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 21 [label="Enter block"]; - subgraph cluster_9 { + 25 [label="Enter block"]; + subgraph cluster_11 { color=blue - 22 [label="Enter block"]; - 23 [label="Exit block"]; + 26 [label="Enter block"]; + 27 [label="Exit block"]; } - 24 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 25 [label="Jump: ^exactlyOnce R|/x|.R|SubstitutionOverride|()"]; - 26 [label="Stub" style="filled" fillcolor=gray]; - 27 [label="Exit block" style="filled" fillcolor=gray]; - } - 28 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; - } - 20 -> {21}; - 21 -> {22}; - 22 -> {23}; - 23 -> {24}; - 24 -> {25}; - 25 -> {28}; - 25 -> {26} [style=dotted]; - 26 -> {27} [style=dotted]; - 27 -> {28} [style=dotted]; - - subgraph cluster_10 { - color=red - 29 [label="Enter function atMostOnce" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 30 [label="Enter block"]; subgraph cluster_12 { color=blue - 31 [label="Enter block"]; - 32 [label="Exit block"]; + 28 [label="Function call arguments enter"]; + 29 [label="Function call arguments exit"]; } - 33 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 34 [label="Jump: ^atMostOnce R|/x|.R|SubstitutionOverride|()"]; - 35 [label="Stub" style="filled" fillcolor=gray]; - 36 [label="Exit block" style="filled" fillcolor=gray]; + 30 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 31 [label="Jump: ^exactlyOnce R|/x|.R|SubstitutionOverride|()"]; + 32 [label="Stub" style="filled" fillcolor=gray]; + 33 [label="Exit block" style="filled" fillcolor=gray]; } - 37 [label="Exit function atMostOnce" style="filled" fillcolor=red]; + 34 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; } + 24 -> {25}; + 25 -> {26}; + 26 -> {27}; + 27 -> {28}; + 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32}; - 32 -> {33}; - 33 -> {34}; - 34 -> {37}; - 34 -> {35} [style=dotted]; - 35 -> {36} [style=dotted]; - 36 -> {37} [style=dotted]; + 31 -> {34}; + 31 -> {32} [style=dotted]; + 32 -> {33} [style=dotted]; + 33 -> {34} [style=dotted]; subgraph cluster_13 { color=red - 38 [label="Enter function noContract" style="filled" fillcolor=red]; + 35 [label="Enter function atMostOnce" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 39 [label="Enter block"]; - 40 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 41 [label="Jump: ^noContract R|/x|.R|SubstitutionOverride|()"]; - 42 [label="Stub" style="filled" fillcolor=gray]; - 43 [label="Exit block" style="filled" fillcolor=gray]; + 36 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 37 [label="Enter block"]; + 38 [label="Exit block"]; + } + subgraph cluster_16 { + color=blue + 39 [label="Function call arguments enter"]; + 40 [label="Function call arguments exit"]; + } + 41 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 42 [label="Jump: ^atMostOnce R|/x|.R|SubstitutionOverride|()"]; + 43 [label="Stub" style="filled" fillcolor=gray]; + 44 [label="Exit block" style="filled" fillcolor=gray]; } - 44 [label="Exit function noContract" style="filled" fillcolor=red]; + 45 [label="Exit function atMostOnce" style="filled" fillcolor=red]; } + 35 -> {36}; + 36 -> {37}; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {44}; - 41 -> {42} [style=dotted]; + 41 -> {42}; + 42 -> {45}; 42 -> {43} [style=dotted]; 43 -> {44} [style=dotted]; + 44 -> {45} [style=dotted]; - subgraph cluster_15 { + subgraph cluster_17 { color=red - 45 [label="Enter function select" style="filled" fillcolor=red]; - subgraph cluster_16 { + 46 [label="Enter function noContract" style="filled" fillcolor=red]; + subgraph cluster_18 { color=blue - 46 [label="Enter block"]; - 47 [label="Access variable R|/x|"]; - 48 [label="Const: Int(0)"]; - 49 [label="Function call: R|/x|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 50 [label="Jump: ^select R|/x|.R|SubstitutionOverride|(Int(0))"]; - 51 [label="Stub" style="filled" fillcolor=gray]; - 52 [label="Exit block" style="filled" fillcolor=gray]; + 47 [label="Enter block"]; + subgraph cluster_19 { + color=blue + 48 [label="Function call arguments enter"]; + 49 [label="Function call arguments exit"]; + } + 50 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 51 [label="Jump: ^noContract R|/x|.R|SubstitutionOverride|()"]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; } - 53 [label="Exit function select" style="filled" fillcolor=red]; + 54 [label="Exit function noContract" style="filled" fillcolor=red]; } - 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {53}; - 50 -> {51} [style=dotted]; + 50 -> {51}; + 51 -> {54}; 51 -> {52} [style=dotted]; 52 -> {53} [style=dotted]; + 53 -> {54} [style=dotted]; - subgraph cluster_17 { + subgraph cluster_20 { color=red - 54 [label="Enter function id" style="filled" fillcolor=red]; - subgraph cluster_18 { + 55 [label="Enter function select" style="filled" fillcolor=red]; + subgraph cluster_21 { color=blue - 55 [label="Enter block"]; - 56 [label="Access variable R|/x|"]; - 57 [label="Jump: ^id R|/x|"]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; + 56 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 57 [label="Function call arguments enter"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Const: Int(0)"]; + 60 [label="Function call arguments exit"]; + } + 61 [label="Function call: R|/x|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 62 [label="Jump: ^select R|/x|.R|SubstitutionOverride|(Int(0))"]; + 63 [label="Stub" style="filled" fillcolor=gray]; + 64 [label="Exit block" style="filled" fillcolor=gray]; } - 60 [label="Exit function id" style="filled" fillcolor=red]; + 65 [label="Exit function select" style="filled" fillcolor=red]; } - 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {60}; - 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; - 59 -> {60} [style=dotted]; - - subgraph cluster_19 { - color=red - 61 [label="Enter function materialize" style="filled" fillcolor=red]; - subgraph cluster_20 { - color=blue - 62 [label="Enter block"]; - 63 [label="Const: Null(null)"]; - 64 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 65 [label="Stub" style="filled" fillcolor=gray]; - 66 [label="Jump: ^materialize Null(null)!!" style="filled" fillcolor=gray]; - 67 [label="Stub" style="filled" fillcolor=gray]; - 68 [label="Exit block" style="filled" fillcolor=gray]; - } - 69 [label="Exit function materialize" style="filled" fillcolor=gray]; - } + 57 -> {58}; + 58 -> {59}; + 59 -> {60}; + 60 -> {61}; 61 -> {62}; - 62 -> {63}; - 63 -> {64}; + 62 -> {65}; + 62 -> {63} [style=dotted]; + 63 -> {64} [style=dotted]; 64 -> {65} [style=dotted]; - 65 -> {66} [style=dotted]; - 66 -> {67 69} [style=dotted]; - 67 -> {68} [style=dotted]; - 68 -> {69} [style=dotted]; - subgraph cluster_21 { + subgraph cluster_23 { color=red - 70 [label="Enter function basic" style="filled" fillcolor=red]; - subgraph cluster_22 { + 66 [label="Enter function id" style="filled" fillcolor=red]; + subgraph cluster_24 { color=blue - 71 [label="Enter block"]; - 72 [label="Postponed enter to lambda"]; - subgraph cluster_23 { - color=blue - 73 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 74 [label="Enter block"]; - 75 [label="Access variable R|/x|"]; - 76 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 77 [label="Exit block"]; - } - 78 [label="Exit function " style="filled" fillcolor=red]; - } - 79 [label="Postponed exit from lambda"]; - 80 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 81 [label="Access variable R|/x|"]; - 82 [label="Smart cast: R|/x|"]; - 83 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 84 [label="Exit block"]; + 67 [label="Enter block"]; + 68 [label="Access variable R|/x|"]; + 69 [label="Jump: ^id R|/x|"]; + 70 [label="Stub" style="filled" fillcolor=gray]; + 71 [label="Exit block" style="filled" fillcolor=gray]; } - 85 [label="Exit function basic" style="filled" fillcolor=red]; + 72 [label="Exit function id" style="filled" fillcolor=red]; } - 70 -> {71}; - 71 -> {72}; - 72 -> {73 80}; - 72 -> {79} [style=dotted]; - 72 -> {73} [style=dashed]; - 73 -> {74}; - 74 -> {75}; - 75 -> {76}; - 76 -> {77}; - 77 -> {78}; - 78 -> {79}; - 79 -> {80}; - 80 -> {81}; - 81 -> {82}; - 82 -> {83}; - 83 -> {84}; - 84 -> {85}; + 66 -> {67}; + 67 -> {68}; + 68 -> {69}; + 69 -> {72}; + 69 -> {70} [style=dotted]; + 70 -> {71} [style=dotted]; + 71 -> {72} [style=dotted]; subgraph cluster_25 { color=red - 86 [label="Enter function completedCallExactlyOnce" style="filled" fillcolor=red]; + 73 [label="Enter function materialize" style="filled" fillcolor=red]; subgraph cluster_26 { color=blue - 87 [label="Enter block"]; - 88 [label="Postponed enter to lambda"]; - subgraph cluster_27 { - color=blue - 89 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 90 [label="Enter block"]; - 91 [label="Access variable R|/y|"]; - 92 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 93 [label="Access variable R|/x|"]; - 94 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 95 [label="Exit block"]; - } - 96 [label="Exit function " style="filled" fillcolor=red]; - } - 97 [label="Postponed exit from lambda"]; - 98 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 99 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 100 [label="Access variable R|/y|"]; - 101 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 102 [label="Postponed enter to lambda"]; + 74 [label="Enter block"]; + 75 [label="Const: Null(null)"]; + 76 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; + 77 [label="Stub" style="filled" fillcolor=gray]; + 78 [label="Jump: ^materialize Null(null)!!" style="filled" fillcolor=gray]; + 79 [label="Stub" style="filled" fillcolor=gray]; + 80 [label="Exit block" style="filled" fillcolor=gray]; + } + 81 [label="Exit function materialize" style="filled" fillcolor=gray]; + } + 73 -> {74}; + 74 -> {75}; + 75 -> {76}; + 76 -> {77} [style=dotted]; + 77 -> {78} [style=dotted]; + 78 -> {79 81} [style=dotted]; + 79 -> {80} [style=dotted]; + 80 -> {81} [style=dotted]; + + subgraph cluster_27 { + color=red + 82 [label="Enter function basic" style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 83 [label="Enter block"]; subgraph cluster_29 { color=blue - 103 [label="Enter function " style="filled" fillcolor=red]; + 84 [label="Function call arguments enter"]; + 85 [label="Postponed enter to lambda"]; subgraph cluster_30 { color=blue - 104 [label="Enter block"]; - 105 [label="Access variable R|/x|"]; - 106 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 107 [label="Access variable R|/y|"]; - 108 [label="Smart cast: R|/y|"]; - 109 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 110 [label="Const: Int(1)"]; - 111 [label="Exit block"]; + 86 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 87 [label="Enter block"]; + 88 [label="Access variable R|/x|"]; + 89 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 90 [label="Exit block"]; + } + 91 [label="Exit function " style="filled" fillcolor=red]; } - 112 [label="Exit function " style="filled" fillcolor=red]; + 92 [label="Function call arguments exit"]; } - 113 [label="Postponed exit from lambda"]; - 114 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 115 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 116 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 117 [label="Access variable R|/x|"]; - 118 [label="Smart cast: R|/x|"]; - 119 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 120 [label="Access variable R|/y|"]; - 121 [label="Smart cast: R|/y|"]; - 122 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 123 [label="Exit block"]; + 93 [label="Postponed exit from lambda"]; + 94 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_32 { + color=blue + 95 [label="Function call arguments enter"]; + 96 [label="Access variable R|/x|"]; + 97 [label="Smart cast: R|/x|"]; + 98 [label="Function call arguments exit"]; + } + 99 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 100 [label="Exit block"]; } - 124 [label="Exit function completedCallExactlyOnce" style="filled" fillcolor=red]; + 101 [label="Exit function basic" style="filled" fillcolor=red]; } + 82 -> {83}; + 83 -> {84}; + 84 -> {85}; + 85 -> {86 92}; + 85 -> {93} [style=dotted]; + 85 -> {86} [style=dashed]; 86 -> {87}; 87 -> {88}; - 88 -> {89 98}; - 88 -> {97} [style=dotted]; - 88 -> {89} [style=dashed]; + 88 -> {89}; 89 -> {90}; 90 -> {91}; - 91 -> {92}; - 92 -> {93}; + 91 -> {93}; + 92 -> {94}; 93 -> {94}; 94 -> {95}; 95 -> {96}; 96 -> {97}; - 97 -> {98} [color=green]; - 97 -> {115} [color=red]; + 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {102}; - 102 -> {103 114}; - 102 -> {113} [style=dotted]; - 102 -> {103} [style=dashed]; + + subgraph cluster_33 { + color=red + 102 [label="Enter function completedCallExactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 103 [label="Enter block"]; + subgraph cluster_35 { + color=blue + 104 [label="Function call arguments enter"]; + subgraph cluster_36 { + color=blue + 105 [label="Function call arguments enter"]; + subgraph cluster_37 { + color=blue + 106 [label="Function call arguments enter"]; + subgraph cluster_38 { + color=blue + 107 [label="Function call arguments enter"]; + 108 [label="Postponed enter to lambda"]; + subgraph cluster_39 { + color=blue + 109 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_40 { + color=blue + 110 [label="Enter block"]; + subgraph cluster_41 { + color=blue + 111 [label="Function call arguments enter"]; + 112 [label="Access variable R|/y|"]; + 113 [label="Function call arguments exit"]; + } + 114 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 115 [label="Access variable R|/x|"]; + 116 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 117 [label="Exit block"]; + } + 118 [label="Exit function " style="filled" fillcolor=red]; + } + 119 [label="Function call arguments exit"]; + } + 120 [label="Postponed exit from lambda"]; + 121 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 122 [label="Function call arguments exit"]; + } + 123 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 124 [label="Access variable R|/y|"]; + 125 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + subgraph cluster_42 { + color=blue + 126 [label="Function call arguments enter"]; + 127 [label="Postponed enter to lambda"]; + subgraph cluster_43 { + color=blue + 128 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_44 { + color=blue + 129 [label="Enter block"]; + subgraph cluster_45 { + color=blue + 130 [label="Function call arguments enter"]; + 131 [label="Access variable R|/x|"]; + 132 [label="Function call arguments exit"]; + } + 133 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_46 { + color=blue + 134 [label="Function call arguments enter"]; + 135 [label="Access variable R|/y|"]; + 136 [label="Smart cast: R|/y|"]; + 137 [label="Function call arguments exit"]; + } + 138 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 139 [label="Const: Int(1)"]; + 140 [label="Exit block"]; + } + 141 [label="Exit function " style="filled" fillcolor=red]; + } + 142 [label="Function call arguments exit"]; + } + 143 [label="Postponed exit from lambda"]; + 144 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 145 [label="Function call arguments exit"]; + } + 146 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 147 [label="Function call arguments exit"]; + } + 148 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_47 { + color=blue + 149 [label="Function call arguments enter"]; + 150 [label="Access variable R|/x|"]; + 151 [label="Smart cast: R|/x|"]; + 152 [label="Function call arguments exit"]; + } + 153 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_48 { + color=blue + 154 [label="Function call arguments enter"]; + 155 [label="Access variable R|/y|"]; + 156 [label="Smart cast: R|/y|"]; + 157 [label="Function call arguments exit"]; + } + 158 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 159 [label="Exit block"]; + } + 160 [label="Exit function completedCallExactlyOnce" style="filled" fillcolor=red]; + } + 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {109}; + 108 -> {109 119}; + 108 -> {120} [style=dotted]; + 108 -> {109} [style=dashed]; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; - 113 -> {114} [color=green]; - 113 -> {115} [color=red]; + 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {119}; - 119 -> {120}; - 120 -> {121}; + 118 -> {120}; + 119 -> {121}; + 120 -> {121} [color=green]; + 120 -> {146} [color=red]; 121 -> {122}; 122 -> {123}; 123 -> {124}; - - subgraph cluster_31 { - color=red - 125 [label="Enter function completedCallAtLeastOnce" style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 126 [label="Enter block"]; - 127 [label="Postponed enter to lambda"]; - subgraph cluster_33 { - color=blue - 128 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_34 { - color=blue - 129 [label="Enter block"]; - 130 [label="Access variable R|/y|"]; - 131 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 132 [label="Access variable R|/x|"]; - 133 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 134 [label="Exit block"]; - } - 135 [label="Exit function " style="filled" fillcolor=red]; - } - 136 [label="Postponed exit from lambda"]; - 137 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 138 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 139 [label="Access variable R|/y|"]; - 140 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 141 [label="Postponed enter to lambda"]; - subgraph cluster_35 { - color=blue - 142 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_36 { - color=blue - 143 [label="Enter block"]; - 144 [label="Access variable R|/x|"]; - 145 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 146 [label="Access variable R|/y|"]; - 147 [label="Smart cast: R|/y|"]; - 148 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 149 [label="Const: Int(1)"]; - 150 [label="Exit block"]; - } - 151 [label="Exit function " style="filled" fillcolor=red]; - } - 152 [label="Postponed exit from lambda"]; - 153 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 154 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 155 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 156 [label="Access variable R|/x|"]; - 157 [label="Smart cast: R|/x|"]; - 158 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 159 [label="Access variable R|/y|"]; - 160 [label="Smart cast: R|/y|"]; - 161 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 162 [label="Exit block"]; - } - 163 [label="Exit function completedCallAtLeastOnce" style="filled" fillcolor=red]; - } + 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {128 137}; - 127 -> {136} [style=dotted]; + 127 -> {128 142}; + 127 -> {143} [style=dotted]; 127 -> {128} [style=dashed]; 128 -> {129}; 129 -> {130}; @@ -431,18 +461,15 @@ digraph flowFromInplaceLambda_kt { 133 -> {134}; 134 -> {135}; 135 -> {136}; - 136 -> {127} [color=green style=dashed]; - 136 -> {137} [color=green]; - 136 -> {154} [color=red]; + 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {142 153}; - 141 -> {152} [style=dotted]; - 141 -> {142} [style=dashed]; - 142 -> {143}; - 143 -> {144}; + 141 -> {143}; + 142 -> {144}; + 143 -> {144} [color=green]; + 143 -> {146} [color=red]; 144 -> {145}; 145 -> {146}; 146 -> {147}; @@ -451,9 +478,7 @@ digraph flowFromInplaceLambda_kt { 149 -> {150}; 150 -> {151}; 151 -> {152}; - 152 -> {141} [color=green style=dashed]; - 152 -> {153} [color=green]; - 152 -> {154} [color=red]; + 152 -> {153}; 153 -> {154}; 154 -> {155}; 155 -> {156}; @@ -461,71 +486,123 @@ digraph flowFromInplaceLambda_kt { 157 -> {158}; 158 -> {159}; 159 -> {160}; - 160 -> {161}; + + subgraph cluster_49 { + color=red + 161 [label="Enter function completedCallAtLeastOnce" style="filled" fillcolor=red]; + subgraph cluster_50 { + color=blue + 162 [label="Enter block"]; + subgraph cluster_51 { + color=blue + 163 [label="Function call arguments enter"]; + subgraph cluster_52 { + color=blue + 164 [label="Function call arguments enter"]; + subgraph cluster_53 { + color=blue + 165 [label="Function call arguments enter"]; + subgraph cluster_54 { + color=blue + 166 [label="Function call arguments enter"]; + 167 [label="Postponed enter to lambda"]; + subgraph cluster_55 { + color=blue + 168 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_56 { + color=blue + 169 [label="Enter block"]; + subgraph cluster_57 { + color=blue + 170 [label="Function call arguments enter"]; + 171 [label="Access variable R|/y|"]; + 172 [label="Function call arguments exit"]; + } + 173 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 174 [label="Access variable R|/x|"]; + 175 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 176 [label="Exit block"]; + } + 177 [label="Exit function " style="filled" fillcolor=red]; + } + 178 [label="Function call arguments exit"]; + } + 179 [label="Postponed exit from lambda"]; + 180 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 181 [label="Function call arguments exit"]; + } + 182 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 183 [label="Access variable R|/y|"]; + 184 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + subgraph cluster_58 { + color=blue + 185 [label="Function call arguments enter"]; + 186 [label="Postponed enter to lambda"]; + subgraph cluster_59 { + color=blue + 187 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_60 { + color=blue + 188 [label="Enter block"]; + subgraph cluster_61 { + color=blue + 189 [label="Function call arguments enter"]; + 190 [label="Access variable R|/x|"]; + 191 [label="Function call arguments exit"]; + } + 192 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_62 { + color=blue + 193 [label="Function call arguments enter"]; + 194 [label="Access variable R|/y|"]; + 195 [label="Smart cast: R|/y|"]; + 196 [label="Function call arguments exit"]; + } + 197 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 198 [label="Const: Int(1)"]; + 199 [label="Exit block"]; + } + 200 [label="Exit function " style="filled" fillcolor=red]; + } + 201 [label="Function call arguments exit"]; + } + 202 [label="Postponed exit from lambda"]; + 203 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 204 [label="Function call arguments exit"]; + } + 205 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 206 [label="Function call arguments exit"]; + } + 207 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_63 { + color=blue + 208 [label="Function call arguments enter"]; + 209 [label="Access variable R|/x|"]; + 210 [label="Smart cast: R|/x|"]; + 211 [label="Function call arguments exit"]; + } + 212 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_64 { + color=blue + 213 [label="Function call arguments enter"]; + 214 [label="Access variable R|/y|"]; + 215 [label="Smart cast: R|/y|"]; + 216 [label="Function call arguments exit"]; + } + 217 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 218 [label="Exit block"]; + } + 219 [label="Exit function completedCallAtLeastOnce" style="filled" fillcolor=red]; + } 161 -> {162}; 162 -> {163}; - - subgraph cluster_37 { - color=red - 164 [label="Enter function completedCallAtMostOnce" style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 165 [label="Enter block"]; - 166 [label="Postponed enter to lambda"]; - subgraph cluster_39 { - color=blue - 167 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_40 { - color=blue - 168 [label="Enter block"]; - 169 [label="Access variable R|/y|"]; - 170 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 171 [label="Access variable R|/x|"]; - 172 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 173 [label="Exit block"]; - } - 174 [label="Exit function " style="filled" fillcolor=red]; - } - 175 [label="Postponed exit from lambda"]; - 176 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 177 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 178 [label="Access variable R|/y|"]; - 179 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 180 [label="Postponed enter to lambda"]; - subgraph cluster_41 { - color=blue - 181 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_42 { - color=blue - 182 [label="Enter block"]; - 183 [label="Access variable R|/x|"]; - 184 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 185 [label="Access variable R|/y|"]; - 186 [label="Smart cast: R|/y|"]; - 187 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 188 [label="Const: Int(1)"]; - 189 [label="Exit block"]; - } - 190 [label="Exit function " style="filled" fillcolor=red]; - } - 191 [label="Postponed exit from lambda"]; - 192 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 193 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 194 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 195 [label="Access variable R|/x|"]; - 196 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 197 [label="Access variable R|/y|"]; - 198 [label="Smart cast: R|/y|"]; - 199 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 200 [label="Exit block"]; - } - 201 [label="Exit function completedCallAtMostOnce" style="filled" fillcolor=red]; - } + 163 -> {164}; 164 -> {165}; 165 -> {166}; - 166 -> {167 175 176}; - 166 -> {167} [style=dashed]; - 167 -> {168}; + 166 -> {167}; + 167 -> {168 178}; + 167 -> {179} [style=dotted]; + 167 -> {168} [style=dashed]; 168 -> {169}; 169 -> {170}; 170 -> {171}; @@ -533,26 +610,27 @@ digraph flowFromInplaceLambda_kt { 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {176} [color=green]; - 175 -> {193} [color=red]; + 175 -> {176}; 176 -> {177}; - 177 -> {178}; - 178 -> {179}; - 179 -> {180}; - 180 -> {181 191 192}; - 180 -> {181} [style=dashed]; + 177 -> {179}; + 178 -> {180}; + 179 -> {167} [color=green style=dashed]; + 179 -> {180} [color=green]; + 179 -> {205} [color=red]; + 180 -> {181}; 181 -> {182}; 182 -> {183}; 183 -> {184}; 184 -> {185}; 185 -> {186}; - 186 -> {187}; + 186 -> {187 201}; + 186 -> {202} [style=dotted]; + 186 -> {187} [style=dashed]; 187 -> {188}; 188 -> {189}; 189 -> {190}; 190 -> {191}; - 191 -> {192} [color=green]; - 191 -> {193} [color=red]; + 191 -> {192}; 192 -> {193}; 193 -> {194}; 194 -> {195}; @@ -561,68 +639,13 @@ digraph flowFromInplaceLambda_kt { 197 -> {198}; 198 -> {199}; 199 -> {200}; - 200 -> {201}; - - subgraph cluster_43 { - color=red - 202 [label="Enter function completedCallUnknown" style="filled" fillcolor=red]; - subgraph cluster_44 { - color=blue - 203 [label="Enter block"]; - 204 [label="Postponed enter to lambda"]; - subgraph cluster_45 { - color=blue - 205 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_46 { - color=blue - 206 [label="Enter block"]; - 207 [label="Access variable R|/y|"]; - 208 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 209 [label="Access variable R|/x|"]; - 210 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 211 [label="Exit block"]; - } - 212 [label="Exit function " style="filled" fillcolor=red]; - } - 213 [label="Postponed exit from lambda"]; - 214 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 215 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 216 [label="Access variable R|/y|"]; - 217 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 218 [label="Postponed enter to lambda"]; - subgraph cluster_47 { - color=blue - 219 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_48 { - color=blue - 220 [label="Enter block"]; - 221 [label="Access variable R|/x|"]; - 222 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 223 [label="Access variable R|/y|"]; - 224 [label="Smart cast: R|/y|"]; - 225 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 226 [label="Const: Int(1)"]; - 227 [label="Exit block"]; - } - 228 [label="Exit function " style="filled" fillcolor=red]; - } - 229 [label="Postponed exit from lambda"]; - 230 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 231 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 232 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 233 [label="Access variable R|/x|"]; - 234 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 235 [label="Access variable R|/y|"]; - 236 [label="Smart cast: R|/y|"]; - 237 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 238 [label="Exit block"]; - } - 239 [label="Exit function completedCallUnknown" style="filled" fillcolor=red]; - } - 202 -> {203}; + 200 -> {202}; + 201 -> {203}; + 202 -> {186} [color=green style=dashed]; + 202 -> {203} [color=green]; + 202 -> {205} [color=red]; 203 -> {204}; - 204 -> {205 213 214}; - 204 -> {205} [style=dashed]; + 204 -> {205}; 205 -> {206}; 206 -> {207}; 207 -> {208}; @@ -631,124 +654,171 @@ digraph flowFromInplaceLambda_kt { 210 -> {211}; 211 -> {212}; 212 -> {213}; - 213 -> {204} [color=green style=dashed]; - 213 -> {214} [color=green]; - 213 -> {231} [color=red]; + 213 -> {214}; 214 -> {215}; 215 -> {216}; 216 -> {217}; 217 -> {218}; - 218 -> {219 229 230}; - 218 -> {219} [style=dashed]; - 219 -> {220}; + 218 -> {219}; + + subgraph cluster_65 { + color=red + 220 [label="Enter function completedCallAtMostOnce" style="filled" fillcolor=red]; + subgraph cluster_66 { + color=blue + 221 [label="Enter block"]; + subgraph cluster_67 { + color=blue + 222 [label="Function call arguments enter"]; + subgraph cluster_68 { + color=blue + 223 [label="Function call arguments enter"]; + subgraph cluster_69 { + color=blue + 224 [label="Function call arguments enter"]; + subgraph cluster_70 { + color=blue + 225 [label="Function call arguments enter"]; + 226 [label="Postponed enter to lambda"]; + subgraph cluster_71 { + color=blue + 227 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_72 { + color=blue + 228 [label="Enter block"]; + subgraph cluster_73 { + color=blue + 229 [label="Function call arguments enter"]; + 230 [label="Access variable R|/y|"]; + 231 [label="Function call arguments exit"]; + } + 232 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 233 [label="Access variable R|/x|"]; + 234 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 235 [label="Exit block"]; + } + 236 [label="Exit function " style="filled" fillcolor=red]; + } + 237 [label="Function call arguments exit"]; + } + 238 [label="Postponed exit from lambda"]; + 239 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 240 [label="Function call arguments exit"]; + } + 241 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 242 [label="Access variable R|/y|"]; + 243 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + subgraph cluster_74 { + color=blue + 244 [label="Function call arguments enter"]; + 245 [label="Postponed enter to lambda"]; + subgraph cluster_75 { + color=blue + 246 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_76 { + color=blue + 247 [label="Enter block"]; + subgraph cluster_77 { + color=blue + 248 [label="Function call arguments enter"]; + 249 [label="Access variable R|/x|"]; + 250 [label="Function call arguments exit"]; + } + 251 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_78 { + color=blue + 252 [label="Function call arguments enter"]; + 253 [label="Access variable R|/y|"]; + 254 [label="Smart cast: R|/y|"]; + 255 [label="Function call arguments exit"]; + } + 256 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 257 [label="Const: Int(1)"]; + 258 [label="Exit block"]; + } + 259 [label="Exit function " style="filled" fillcolor=red]; + } + 260 [label="Function call arguments exit"]; + } + 261 [label="Postponed exit from lambda"]; + 262 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 263 [label="Function call arguments exit"]; + } + 264 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 265 [label="Function call arguments exit"]; + } + 266 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_79 { + color=blue + 267 [label="Function call arguments enter"]; + 268 [label="Access variable R|/x|"]; + 269 [label="Function call arguments exit"]; + } + 270 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_80 { + color=blue + 271 [label="Function call arguments enter"]; + 272 [label="Access variable R|/y|"]; + 273 [label="Smart cast: R|/y|"]; + 274 [label="Function call arguments exit"]; + } + 275 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 276 [label="Exit block"]; + } + 277 [label="Exit function completedCallAtMostOnce" style="filled" fillcolor=red]; + } 220 -> {221}; 221 -> {222}; 222 -> {223}; 223 -> {224}; 224 -> {225}; 225 -> {226}; - 226 -> {227}; + 226 -> {227 237 238}; + 226 -> {227} [style=dashed]; 227 -> {228}; 228 -> {229}; - 229 -> {218} [color=green style=dashed]; - 229 -> {230} [color=green]; - 229 -> {231} [color=red]; + 229 -> {230}; 230 -> {231}; 231 -> {232}; 232 -> {233}; 233 -> {234}; 234 -> {235}; 235 -> {236}; - 236 -> {237}; - 237 -> {238}; - 238 -> {239}; - - subgraph cluster_49 { - color=red - 240 [label="Enter function completedCallNoContract" style="filled" fillcolor=red]; - subgraph cluster_50 { - color=blue - 241 [label="Enter block"]; - 242 [label="Postponed enter to lambda"]; - subgraph cluster_51 { - color=blue - 243 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_52 { - color=blue - 244 [label="Enter block"]; - 245 [label="Access variable R|/y|"]; - 246 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 247 [label="Access variable R|/x|"]; - 248 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 249 [label="Exit block"]; - } - 250 [label="Exit function " style="filled" fillcolor=red]; - } - 251 [label="Postponed exit from lambda"]; - 252 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 253 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 254 [label="Access variable R|/y|"]; - 255 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 256 [label="Postponed enter to lambda"]; - subgraph cluster_53 { - color=blue - 257 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_54 { - color=blue - 258 [label="Enter block"]; - 259 [label="Access variable R|/x|"]; - 260 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 261 [label="Access variable R|/y|"]; - 262 [label="Smart cast: R|/y|"]; - 263 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 264 [label="Const: Int(1)"]; - 265 [label="Exit block"]; - } - 266 [label="Exit function " style="filled" fillcolor=red]; - } - 267 [label="Postponed exit from lambda"]; - 268 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 269 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 270 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 271 [label="Access variable R|/x|"]; - 272 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 273 [label="Access variable R|/y|"]; - 274 [label="Smart cast: R|/y|"]; - 275 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 276 [label="Exit block"]; - } - 277 [label="Exit function completedCallNoContract" style="filled" fillcolor=red]; - } + 236 -> {238}; + 237 -> {239}; + 238 -> {239} [color=green]; + 238 -> {264} [color=red]; + 239 -> {240}; 240 -> {241}; 241 -> {242}; - 242 -> {243 251 252}; - 242 -> {243} [style=dashed]; + 242 -> {243}; 243 -> {244}; 244 -> {245}; - 245 -> {246}; + 245 -> {246 260 261}; + 245 -> {246} [style=dashed]; 246 -> {247}; 247 -> {248}; 248 -> {249}; 249 -> {250}; - 251 -> {252} [color=green]; - 251 -> {269} [color=red]; + 250 -> {251}; + 251 -> {252}; 252 -> {253}; 253 -> {254}; 254 -> {255}; 255 -> {256}; - 256 -> {257 267 268}; - 256 -> {257} [style=dashed]; + 256 -> {257}; 257 -> {258}; 258 -> {259}; - 259 -> {260}; - 260 -> {261}; - 261 -> {262}; + 259 -> {261}; + 260 -> {262}; + 261 -> {262} [color=green]; + 261 -> {264} [color=red]; 262 -> {263}; 263 -> {264}; 264 -> {265}; 265 -> {266}; - 267 -> {268} [color=green]; - 267 -> {269} [color=red]; + 266 -> {267}; + 267 -> {268}; 268 -> {269}; 269 -> {270}; 270 -> {271}; @@ -759,76 +829,120 @@ digraph flowFromInplaceLambda_kt { 275 -> {276}; 276 -> {277}; - subgraph cluster_55 { + subgraph cluster_81 { color=red - 278 [label="Enter function incompleteCallExactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_56 { + 278 [label="Enter function completedCallUnknown" style="filled" fillcolor=red]; + subgraph cluster_82 { color=blue 279 [label="Enter block"]; - 280 [label="Postponed enter to lambda"]; - subgraph cluster_57 { + subgraph cluster_83 { color=blue - 281 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_58 { + 280 [label="Function call arguments enter"]; + subgraph cluster_84 { color=blue - 282 [label="Enter block"]; - 283 [label="Access variable R|/x|"]; - 284 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 285 [label="Access variable R|/y|"]; - 286 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 287 [label="Access variable R|/x|"]; - 288 [label="Smart cast: R|/x|"]; - 289 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 290 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 291 [label="Exit block"]; + 281 [label="Function call arguments enter"]; + subgraph cluster_85 { + color=blue + 282 [label="Function call arguments enter"]; + subgraph cluster_86 { + color=blue + 283 [label="Function call arguments enter"]; + 284 [label="Postponed enter to lambda"]; + subgraph cluster_87 { + color=blue + 285 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_88 { + color=blue + 286 [label="Enter block"]; + subgraph cluster_89 { + color=blue + 287 [label="Function call arguments enter"]; + 288 [label="Access variable R|/y|"]; + 289 [label="Function call arguments exit"]; + } + 290 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 291 [label="Access variable R|/x|"]; + 292 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 293 [label="Exit block"]; + } + 294 [label="Exit function " style="filled" fillcolor=red]; + } + 295 [label="Function call arguments exit"]; + } + 296 [label="Postponed exit from lambda"]; + 297 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 298 [label="Function call arguments exit"]; + } + 299 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 300 [label="Access variable R|/y|"]; + 301 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + subgraph cluster_90 { + color=blue + 302 [label="Function call arguments enter"]; + 303 [label="Postponed enter to lambda"]; + subgraph cluster_91 { + color=blue + 304 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_92 { + color=blue + 305 [label="Enter block"]; + subgraph cluster_93 { + color=blue + 306 [label="Function call arguments enter"]; + 307 [label="Access variable R|/x|"]; + 308 [label="Function call arguments exit"]; + } + 309 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_94 { + color=blue + 310 [label="Function call arguments enter"]; + 311 [label="Access variable R|/y|"]; + 312 [label="Smart cast: R|/y|"]; + 313 [label="Function call arguments exit"]; + } + 314 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 315 [label="Const: Int(1)"]; + 316 [label="Exit block"]; + } + 317 [label="Exit function " style="filled" fillcolor=red]; + } + 318 [label="Function call arguments exit"]; + } + 319 [label="Postponed exit from lambda"]; + 320 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 321 [label="Function call arguments exit"]; } - 292 [label="Exit function " style="filled" fillcolor=red]; + 322 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 323 [label="Function call arguments exit"]; } - 293 [label="Postponed exit from lambda"]; - 294 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 295 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 296 [label="Postponed enter to lambda"]; - subgraph cluster_59 { + 324 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_95 { color=blue - 297 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_60 { - color=blue - 298 [label="Enter block"]; - 299 [label="Access variable R|/y|"]; - 300 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 301 [label="Access variable R|/x|"]; - 302 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 303 [label="Access variable R|/y|"]; - 304 [label="Smart cast: R|/y|"]; - 305 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 306 [label="Const: Int(1)"]; - 307 [label="Exit block"]; - } - 308 [label="Exit function " style="filled" fillcolor=red]; + 325 [label="Function call arguments enter"]; + 326 [label="Access variable R|/x|"]; + 327 [label="Function call arguments exit"]; } - 309 [label="Postponed exit from lambda"]; - 310 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 311 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 312 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 313 [label="Access variable R|/x|"]; - 314 [label="Smart cast: R|/x|"]; - 315 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 316 [label="Access variable R|/y|"]; - 317 [label="Smart cast: R|/y|"]; - 318 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 319 [label="Exit block"]; + 328 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_96 { + color=blue + 329 [label="Function call arguments enter"]; + 330 [label="Access variable R|/y|"]; + 331 [label="Smart cast: R|/y|"]; + 332 [label="Function call arguments exit"]; + } + 333 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 334 [label="Exit block"]; } - 320 [label="Exit function incompleteCallExactlyOnce" style="filled" fillcolor=red]; + 335 [label="Exit function completedCallUnknown" style="filled" fillcolor=red]; } 278 -> {279}; 279 -> {280}; - 280 -> {281 294}; - 280 -> {293} [style=dotted]; - 280 -> {281} [style=dashed]; + 280 -> {281}; 281 -> {282}; 282 -> {283}; 283 -> {284}; - 284 -> {285}; + 284 -> {285 295 296}; + 284 -> {285} [style=dashed]; 285 -> {286}; 286 -> {287}; 287 -> {288}; @@ -837,27 +951,26 @@ digraph flowFromInplaceLambda_kt { 290 -> {291}; 291 -> {292}; 292 -> {293}; - 293 -> {294} [color=green]; - 293 -> {311} [color=red]; - 294 -> {295}; - 295 -> {296}; - 296 -> {297 310}; - 296 -> {309} [style=dotted]; - 296 -> {297} [style=dashed]; + 293 -> {294}; + 294 -> {296}; + 295 -> {297}; + 296 -> {284} [color=green style=dashed]; + 296 -> {297} [color=green]; + 296 -> {322} [color=red]; 297 -> {298}; 298 -> {299}; 299 -> {300}; 300 -> {301}; 301 -> {302}; 302 -> {303}; - 303 -> {304}; + 303 -> {304 318 319}; + 303 -> {304} [style=dashed]; 304 -> {305}; 305 -> {306}; 306 -> {307}; 307 -> {308}; 308 -> {309}; - 309 -> {310} [color=green]; - 309 -> {311} [color=red]; + 309 -> {310}; 310 -> {311}; 311 -> {312}; 312 -> {313}; @@ -865,76 +978,15 @@ digraph flowFromInplaceLambda_kt { 314 -> {315}; 315 -> {316}; 316 -> {317}; - 317 -> {318}; - 318 -> {319}; - 319 -> {320}; - - subgraph cluster_61 { - color=red - 321 [label="Enter function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; - subgraph cluster_62 { - color=blue - 322 [label="Enter block"]; - 323 [label="Postponed enter to lambda"]; - subgraph cluster_63 { - color=blue - 324 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_64 { - color=blue - 325 [label="Enter block"]; - 326 [label="Access variable R|/x|"]; - 327 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 328 [label="Access variable R|/y|"]; - 329 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 330 [label="Access variable R|/x|"]; - 331 [label="Smart cast: R|/x|"]; - 332 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 333 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 334 [label="Exit block"]; - } - 335 [label="Exit function " style="filled" fillcolor=red]; - } - 336 [label="Postponed exit from lambda"]; - 337 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 338 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 339 [label="Postponed enter to lambda"]; - subgraph cluster_65 { - color=blue - 340 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_66 { - color=blue - 341 [label="Enter block"]; - 342 [label="Access variable R|/y|"]; - 343 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 344 [label="Access variable R|/x|"]; - 345 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 346 [label="Access variable R|/y|"]; - 347 [label="Smart cast: R|/y|"]; - 348 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 349 [label="Const: Int(1)"]; - 350 [label="Exit block"]; - } - 351 [label="Exit function " style="filled" fillcolor=red]; - } - 352 [label="Postponed exit from lambda"]; - 353 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 354 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 355 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 356 [label="Access variable R|/x|"]; - 357 [label="Smart cast: R|/x|"]; - 358 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 359 [label="Access variable R|/y|"]; - 360 [label="Smart cast: R|/y|"]; - 361 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 362 [label="Exit block"]; - } - 363 [label="Exit function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; - } + 317 -> {319}; + 318 -> {320}; + 319 -> {303} [color=green style=dashed]; + 319 -> {320} [color=green]; + 319 -> {322} [color=red]; + 320 -> {321}; 321 -> {322}; 322 -> {323}; - 323 -> {324 337}; - 323 -> {336} [style=dotted]; - 323 -> {324} [style=dashed]; + 323 -> {324}; 324 -> {325}; 325 -> {326}; 326 -> {327}; @@ -946,18 +998,121 @@ digraph flowFromInplaceLambda_kt { 332 -> {333}; 333 -> {334}; 334 -> {335}; - 335 -> {336}; - 336 -> {323} [color=green style=dashed]; - 336 -> {337} [color=green]; - 336 -> {354} [color=red]; + + subgraph cluster_97 { + color=red + 336 [label="Enter function completedCallNoContract" style="filled" fillcolor=red]; + subgraph cluster_98 { + color=blue + 337 [label="Enter block"]; + subgraph cluster_99 { + color=blue + 338 [label="Function call arguments enter"]; + subgraph cluster_100 { + color=blue + 339 [label="Function call arguments enter"]; + subgraph cluster_101 { + color=blue + 340 [label="Function call arguments enter"]; + subgraph cluster_102 { + color=blue + 341 [label="Function call arguments enter"]; + 342 [label="Postponed enter to lambda"]; + subgraph cluster_103 { + color=blue + 343 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_104 { + color=blue + 344 [label="Enter block"]; + subgraph cluster_105 { + color=blue + 345 [label="Function call arguments enter"]; + 346 [label="Access variable R|/y|"]; + 347 [label="Function call arguments exit"]; + } + 348 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 349 [label="Access variable R|/x|"]; + 350 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 351 [label="Exit block"]; + } + 352 [label="Exit function " style="filled" fillcolor=red]; + } + 353 [label="Function call arguments exit"]; + } + 354 [label="Postponed exit from lambda"]; + 355 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 356 [label="Function call arguments exit"]; + } + 357 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 358 [label="Access variable R|/y|"]; + 359 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + subgraph cluster_106 { + color=blue + 360 [label="Function call arguments enter"]; + 361 [label="Postponed enter to lambda"]; + subgraph cluster_107 { + color=blue + 362 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_108 { + color=blue + 363 [label="Enter block"]; + subgraph cluster_109 { + color=blue + 364 [label="Function call arguments enter"]; + 365 [label="Access variable R|/x|"]; + 366 [label="Function call arguments exit"]; + } + 367 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_110 { + color=blue + 368 [label="Function call arguments enter"]; + 369 [label="Access variable R|/y|"]; + 370 [label="Smart cast: R|/y|"]; + 371 [label="Function call arguments exit"]; + } + 372 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 373 [label="Const: Int(1)"]; + 374 [label="Exit block"]; + } + 375 [label="Exit function " style="filled" fillcolor=red]; + } + 376 [label="Function call arguments exit"]; + } + 377 [label="Postponed exit from lambda"]; + 378 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 379 [label="Function call arguments exit"]; + } + 380 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 381 [label="Function call arguments exit"]; + } + 382 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_111 { + color=blue + 383 [label="Function call arguments enter"]; + 384 [label="Access variable R|/x|"]; + 385 [label="Function call arguments exit"]; + } + 386 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_112 { + color=blue + 387 [label="Function call arguments enter"]; + 388 [label="Access variable R|/y|"]; + 389 [label="Smart cast: R|/y|"]; + 390 [label="Function call arguments exit"]; + } + 391 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 392 [label="Exit block"]; + } + 393 [label="Exit function completedCallNoContract" style="filled" fillcolor=red]; + } + 336 -> {337}; 337 -> {338}; 338 -> {339}; - 339 -> {340 353}; - 339 -> {352} [style=dotted]; - 339 -> {340} [style=dashed]; + 339 -> {340}; 340 -> {341}; 341 -> {342}; - 342 -> {343}; + 342 -> {343 353 354}; + 342 -> {343} [style=dashed]; 343 -> {344}; 344 -> {345}; 345 -> {346}; @@ -967,83 +1122,22 @@ digraph flowFromInplaceLambda_kt { 349 -> {350}; 350 -> {351}; 351 -> {352}; - 352 -> {339} [color=green style=dashed]; - 352 -> {353} [color=green]; - 352 -> {354} [color=red]; - 353 -> {354}; - 354 -> {355}; + 353 -> {355}; + 354 -> {355} [color=green]; + 354 -> {380} [color=red]; 355 -> {356}; 356 -> {357}; 357 -> {358}; 358 -> {359}; 359 -> {360}; 360 -> {361}; - 361 -> {362}; + 361 -> {362 376 377}; + 361 -> {362} [style=dashed]; 362 -> {363}; - - subgraph cluster_67 { - color=red - 364 [label="Enter function incompleteCallAtMostOnce" style="filled" fillcolor=red]; - subgraph cluster_68 { - color=blue - 365 [label="Enter block"]; - 366 [label="Postponed enter to lambda"]; - subgraph cluster_69 { - color=blue - 367 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_70 { - color=blue - 368 [label="Enter block"]; - 369 [label="Access variable R|/x|"]; - 370 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 371 [label="Access variable R|/y|"]; - 372 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 373 [label="Access variable R|/x|"]; - 374 [label="Smart cast: R|/x|"]; - 375 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 376 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 377 [label="Exit block"]; - } - 378 [label="Exit function " style="filled" fillcolor=red]; - } - 379 [label="Postponed exit from lambda"]; - 380 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 381 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 382 [label="Postponed enter to lambda"]; - subgraph cluster_71 { - color=blue - 383 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_72 { - color=blue - 384 [label="Enter block"]; - 385 [label="Access variable R|/y|"]; - 386 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 387 [label="Access variable R|/x|"]; - 388 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 389 [label="Access variable R|/y|"]; - 390 [label="Smart cast: R|/y|"]; - 391 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 392 [label="Const: Int(1)"]; - 393 [label="Exit block"]; - } - 394 [label="Exit function " style="filled" fillcolor=red]; - } - 395 [label="Postponed exit from lambda"]; - 396 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 397 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 398 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 399 [label="Access variable R|/x|"]; - 400 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 401 [label="Access variable R|/y|"]; - 402 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 403 [label="Exit block"]; - } - 404 [label="Exit function incompleteCallAtMostOnce" style="filled" fillcolor=red]; - } + 363 -> {364}; 364 -> {365}; 365 -> {366}; - 366 -> {367 379 380}; - 366 -> {367} [style=dashed]; + 366 -> {367}; 367 -> {368}; 368 -> {369}; 369 -> {370}; @@ -1052,16 +1146,14 @@ digraph flowFromInplaceLambda_kt { 372 -> {373}; 373 -> {374}; 374 -> {375}; - 375 -> {376}; - 376 -> {377}; - 377 -> {378}; + 376 -> {378}; + 377 -> {378} [color=green]; + 377 -> {380} [color=red]; 378 -> {379}; - 379 -> {380} [color=green]; - 379 -> {397} [color=red]; + 379 -> {380}; 380 -> {381}; 381 -> {382}; - 382 -> {383 395 396}; - 382 -> {383} [style=dashed]; + 382 -> {383}; 383 -> {384}; 384 -> {385}; 385 -> {386}; @@ -1072,82 +1164,144 @@ digraph flowFromInplaceLambda_kt { 390 -> {391}; 391 -> {392}; 392 -> {393}; - 393 -> {394}; + + subgraph cluster_113 { + color=red + 394 [label="Enter function incompleteCallExactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_114 { + color=blue + 395 [label="Enter block"]; + subgraph cluster_115 { + color=blue + 396 [label="Function call arguments enter"]; + subgraph cluster_116 { + color=blue + 397 [label="Function call arguments enter"]; + subgraph cluster_117 { + color=blue + 398 [label="Function call arguments enter"]; + subgraph cluster_118 { + color=blue + 399 [label="Function call arguments enter"]; + 400 [label="Postponed enter to lambda"]; + subgraph cluster_119 { + color=blue + 401 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_120 { + color=blue + 402 [label="Enter block"]; + 403 [label="Access variable R|/x|"]; + 404 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + subgraph cluster_121 { + color=blue + 405 [label="Function call arguments enter"]; + 406 [label="Access variable R|/y|"]; + 407 [label="Function call arguments exit"]; + } + 408 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_122 { + color=blue + 409 [label="Function call arguments enter"]; + 410 [label="Access variable R|/x|"]; + 411 [label="Smart cast: R|/x|"]; + 412 [label="Function call arguments exit"]; + } + 413 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_123 { + color=blue + 414 [label="Function call arguments enter"]; + 415 [label="Function call arguments exit"]; + } + 416 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 417 [label="Exit block"]; + } + 418 [label="Exit function " style="filled" fillcolor=red]; + } + 419 [label="Function call arguments exit"]; + } + 420 [label="Postponed exit from lambda"]; + 421 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 422 [label="Function call arguments exit"]; + } + 423 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_124 { + color=blue + 424 [label="Function call arguments enter"]; + 425 [label="Postponed enter to lambda"]; + subgraph cluster_125 { + color=blue + 426 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_126 { + color=blue + 427 [label="Enter block"]; + 428 [label="Access variable R|/y|"]; + 429 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + subgraph cluster_127 { + color=blue + 430 [label="Function call arguments enter"]; + 431 [label="Access variable R|/x|"]; + 432 [label="Function call arguments exit"]; + } + 433 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_128 { + color=blue + 434 [label="Function call arguments enter"]; + 435 [label="Access variable R|/y|"]; + 436 [label="Smart cast: R|/y|"]; + 437 [label="Function call arguments exit"]; + } + 438 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 439 [label="Const: Int(1)"]; + 440 [label="Exit block"]; + } + 441 [label="Exit function " style="filled" fillcolor=red]; + } + 442 [label="Function call arguments exit"]; + } + 443 [label="Postponed exit from lambda"]; + 444 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 445 [label="Function call arguments exit"]; + } + 446 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 447 [label="Function call arguments exit"]; + } + 448 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_129 { + color=blue + 449 [label="Function call arguments enter"]; + 450 [label="Access variable R|/x|"]; + 451 [label="Smart cast: R|/x|"]; + 452 [label="Function call arguments exit"]; + } + 453 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_130 { + color=blue + 454 [label="Function call arguments enter"]; + 455 [label="Access variable R|/y|"]; + 456 [label="Smart cast: R|/y|"]; + 457 [label="Function call arguments exit"]; + } + 458 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 459 [label="Exit block"]; + } + 460 [label="Exit function incompleteCallExactlyOnce" style="filled" fillcolor=red]; + } 394 -> {395}; - 395 -> {396} [color=green]; - 395 -> {397} [color=red]; + 395 -> {396}; 396 -> {397}; 397 -> {398}; 398 -> {399}; 399 -> {400}; - 400 -> {401}; + 400 -> {401 419}; + 400 -> {420} [style=dotted]; + 400 -> {401} [style=dashed]; 401 -> {402}; 402 -> {403}; 403 -> {404}; - - subgraph cluster_73 { - color=red - 405 [label="Enter function incompleteCallUnknown" style="filled" fillcolor=red]; - subgraph cluster_74 { - color=blue - 406 [label="Enter block"]; - 407 [label="Postponed enter to lambda"]; - subgraph cluster_75 { - color=blue - 408 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_76 { - color=blue - 409 [label="Enter block"]; - 410 [label="Access variable R|/x|"]; - 411 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 412 [label="Access variable R|/y|"]; - 413 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 414 [label="Access variable R|/x|"]; - 415 [label="Smart cast: R|/x|"]; - 416 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 417 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 418 [label="Exit block"]; - } - 419 [label="Exit function " style="filled" fillcolor=red]; - } - 420 [label="Postponed exit from lambda"]; - 421 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 422 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 423 [label="Postponed enter to lambda"]; - subgraph cluster_77 { - color=blue - 424 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_78 { - color=blue - 425 [label="Enter block"]; - 426 [label="Access variable R|/y|"]; - 427 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 428 [label="Access variable R|/x|"]; - 429 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 430 [label="Access variable R|/y|"]; - 431 [label="Smart cast: R|/y|"]; - 432 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 433 [label="Const: Int(1)"]; - 434 [label="Exit block"]; - } - 435 [label="Exit function " style="filled" fillcolor=red]; - } - 436 [label="Postponed exit from lambda"]; - 437 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 438 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 439 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 440 [label="Access variable R|/x|"]; - 441 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 442 [label="Access variable R|/y|"]; - 443 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 444 [label="Exit block"]; - } - 445 [label="Exit function incompleteCallUnknown" style="filled" fillcolor=red]; - } + 404 -> {405}; 405 -> {406}; 406 -> {407}; - 407 -> {408 420 421}; - 407 -> {408} [style=dashed]; + 407 -> {408}; 408 -> {409}; 409 -> {410}; 410 -> {411}; @@ -1158,17 +1312,17 @@ digraph flowFromInplaceLambda_kt { 415 -> {416}; 416 -> {417}; 417 -> {418}; - 418 -> {419}; - 419 -> {420}; - 420 -> {407} [color=green style=dashed]; + 418 -> {420}; + 419 -> {421}; 420 -> {421} [color=green]; - 420 -> {438} [color=red]; + 420 -> {446} [color=red]; 421 -> {422}; 422 -> {423}; - 423 -> {424 436 437}; - 423 -> {424} [style=dashed]; + 423 -> {424}; 424 -> {425}; - 425 -> {426}; + 425 -> {426 442}; + 425 -> {443} [style=dotted]; + 425 -> {426} [style=dashed]; 426 -> {427}; 427 -> {428}; 428 -> {429}; @@ -1179,81 +1333,20 @@ digraph flowFromInplaceLambda_kt { 433 -> {434}; 434 -> {435}; 435 -> {436}; - 436 -> {423} [color=green style=dashed]; - 436 -> {437} [color=green]; - 436 -> {438} [color=red]; + 436 -> {437}; 437 -> {438}; 438 -> {439}; 439 -> {440}; 440 -> {441}; - 441 -> {442}; - 442 -> {443}; - 443 -> {444}; + 441 -> {443}; + 442 -> {444}; + 443 -> {444} [color=green]; + 443 -> {446} [color=red]; 444 -> {445}; - - subgraph cluster_79 { - color=red - 446 [label="Enter function incompleteCallNoContract" style="filled" fillcolor=red]; - subgraph cluster_80 { - color=blue - 447 [label="Enter block"]; - 448 [label="Postponed enter to lambda"]; - subgraph cluster_81 { - color=blue - 449 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_82 { - color=blue - 450 [label="Enter block"]; - 451 [label="Access variable R|/x|"]; - 452 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 453 [label="Access variable R|/y|"]; - 454 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 455 [label="Access variable R|/x|"]; - 456 [label="Smart cast: R|/x|"]; - 457 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 458 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 459 [label="Exit block"]; - } - 460 [label="Exit function " style="filled" fillcolor=red]; - } - 461 [label="Postponed exit from lambda"]; - 462 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 463 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 464 [label="Postponed enter to lambda"]; - subgraph cluster_83 { - color=blue - 465 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_84 { - color=blue - 466 [label="Enter block"]; - 467 [label="Access variable R|/y|"]; - 468 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 469 [label="Access variable R|/x|"]; - 470 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 471 [label="Access variable R|/y|"]; - 472 [label="Smart cast: R|/y|"]; - 473 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 474 [label="Const: Int(1)"]; - 475 [label="Exit block"]; - } - 476 [label="Exit function " style="filled" fillcolor=red]; - } - 477 [label="Postponed exit from lambda"]; - 478 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 479 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 480 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 481 [label="Access variable R|/x|"]; - 482 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 483 [label="Access variable R|/y|"]; - 484 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 485 [label="Exit block"]; - } - 486 [label="Exit function incompleteCallNoContract" style="filled" fillcolor=red]; - } + 445 -> {446}; 446 -> {447}; 447 -> {448}; - 448 -> {449 461 462}; - 448 -> {449} [style=dashed]; + 448 -> {449}; 449 -> {450}; 450 -> {451}; 451 -> {452}; @@ -1265,15 +1358,137 @@ digraph flowFromInplaceLambda_kt { 457 -> {458}; 458 -> {459}; 459 -> {460}; - 461 -> {462} [color=green]; - 461 -> {479} [color=red]; + + subgraph cluster_131 { + color=red + 461 [label="Enter function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; + subgraph cluster_132 { + color=blue + 462 [label="Enter block"]; + subgraph cluster_133 { + color=blue + 463 [label="Function call arguments enter"]; + subgraph cluster_134 { + color=blue + 464 [label="Function call arguments enter"]; + subgraph cluster_135 { + color=blue + 465 [label="Function call arguments enter"]; + subgraph cluster_136 { + color=blue + 466 [label="Function call arguments enter"]; + 467 [label="Postponed enter to lambda"]; + subgraph cluster_137 { + color=blue + 468 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_138 { + color=blue + 469 [label="Enter block"]; + 470 [label="Access variable R|/x|"]; + 471 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + subgraph cluster_139 { + color=blue + 472 [label="Function call arguments enter"]; + 473 [label="Access variable R|/y|"]; + 474 [label="Function call arguments exit"]; + } + 475 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_140 { + color=blue + 476 [label="Function call arguments enter"]; + 477 [label="Access variable R|/x|"]; + 478 [label="Smart cast: R|/x|"]; + 479 [label="Function call arguments exit"]; + } + 480 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_141 { + color=blue + 481 [label="Function call arguments enter"]; + 482 [label="Function call arguments exit"]; + } + 483 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 484 [label="Exit block"]; + } + 485 [label="Exit function " style="filled" fillcolor=red]; + } + 486 [label="Function call arguments exit"]; + } + 487 [label="Postponed exit from lambda"]; + 488 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 489 [label="Function call arguments exit"]; + } + 490 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_142 { + color=blue + 491 [label="Function call arguments enter"]; + 492 [label="Postponed enter to lambda"]; + subgraph cluster_143 { + color=blue + 493 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_144 { + color=blue + 494 [label="Enter block"]; + 495 [label="Access variable R|/y|"]; + 496 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + subgraph cluster_145 { + color=blue + 497 [label="Function call arguments enter"]; + 498 [label="Access variable R|/x|"]; + 499 [label="Function call arguments exit"]; + } + 500 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_146 { + color=blue + 501 [label="Function call arguments enter"]; + 502 [label="Access variable R|/y|"]; + 503 [label="Smart cast: R|/y|"]; + 504 [label="Function call arguments exit"]; + } + 505 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 506 [label="Const: Int(1)"]; + 507 [label="Exit block"]; + } + 508 [label="Exit function " style="filled" fillcolor=red]; + } + 509 [label="Function call arguments exit"]; + } + 510 [label="Postponed exit from lambda"]; + 511 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 512 [label="Function call arguments exit"]; + } + 513 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 514 [label="Function call arguments exit"]; + } + 515 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_147 { + color=blue + 516 [label="Function call arguments enter"]; + 517 [label="Access variable R|/x|"]; + 518 [label="Smart cast: R|/x|"]; + 519 [label="Function call arguments exit"]; + } + 520 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_148 { + color=blue + 521 [label="Function call arguments enter"]; + 522 [label="Access variable R|/y|"]; + 523 [label="Smart cast: R|/y|"]; + 524 [label="Function call arguments exit"]; + } + 525 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 526 [label="Exit block"]; + } + 527 [label="Exit function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; + } + 461 -> {462}; 462 -> {463}; 463 -> {464}; - 464 -> {465 477 478}; - 464 -> {465} [style=dashed]; + 464 -> {465}; 465 -> {466}; 466 -> {467}; - 467 -> {468}; + 467 -> {468 486}; + 467 -> {487} [style=dotted]; + 467 -> {468} [style=dashed]; 468 -> {469}; 469 -> {470}; 470 -> {471}; @@ -1282,8 +1497,8 @@ digraph flowFromInplaceLambda_kt { 473 -> {474}; 474 -> {475}; 475 -> {476}; - 477 -> {478} [color=green]; - 477 -> {479} [color=red]; + 476 -> {477}; + 477 -> {478}; 478 -> {479}; 479 -> {480}; 480 -> {481}; @@ -1291,146 +1506,834 @@ digraph flowFromInplaceLambda_kt { 482 -> {483}; 483 -> {484}; 484 -> {485}; - 485 -> {486}; - - subgraph cluster_85 { - color=red - 487 [label="Enter function expectedType" style="filled" fillcolor=red]; - subgraph cluster_86 { - color=blue - 488 [label="Enter block"]; - 489 [label="Postponed enter to lambda"]; - subgraph cluster_87 { - color=blue - 490 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_88 { - color=blue - 491 [label="Enter block"]; - 492 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 493 [label="Exit block"]; - } - 494 [label="Exit function " style="filled" fillcolor=red]; - } - 495 [label="Postponed exit from lambda"]; - 496 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 497 [label="Postponed enter to lambda"]; - subgraph cluster_89 { - color=blue - 498 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_90 { - color=blue - 499 [label="Enter block"]; - 500 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 501 [label="Exit block"]; - } - 502 [label="Exit function " style="filled" fillcolor=red]; - } - 503 [label="Postponed exit from lambda"]; - 504 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 505 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 506 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 507 [label="Access variable R|/x|"]; - 508 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 509 [label="Exit block"]; - } - 510 [label="Exit function expectedType" style="filled" fillcolor=red]; - } - 487 -> {488}; + 485 -> {487}; + 486 -> {488}; + 487 -> {467} [color=green style=dashed]; + 487 -> {488} [color=green]; + 487 -> {513} [color=red]; 488 -> {489}; - 489 -> {490 496}; - 489 -> {495} [style=dotted]; - 489 -> {490} [style=dashed]; + 489 -> {490}; 490 -> {491}; 491 -> {492}; - 492 -> {493}; + 492 -> {493 509}; + 492 -> {510} [style=dotted]; + 492 -> {493} [style=dashed]; 493 -> {494}; 494 -> {495}; - 495 -> {496} [color=green]; - 495 -> {505} [color=red]; + 495 -> {496}; 496 -> {497}; - 497 -> {498 504}; - 497 -> {503} [style=dotted]; - 497 -> {498} [style=dashed]; + 497 -> {498}; 498 -> {499}; 499 -> {500}; 500 -> {501}; 501 -> {502}; 502 -> {503}; - 503 -> {504} [color=green]; - 503 -> {505} [color=red]; + 503 -> {504}; 504 -> {505}; 505 -> {506}; 506 -> {507}; 507 -> {508}; - 508 -> {509}; - 509 -> {510}; - - subgraph cluster_91 { - color=red - 511 [label="Enter function expectedTypeNested" style="filled" fillcolor=red]; - subgraph cluster_92 { - color=blue - 512 [label="Enter block"]; - 513 [label="Postponed enter to lambda"]; - subgraph cluster_93 { - color=blue - 514 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_94 { - color=blue - 515 [label="Enter block"]; - 516 [label="Postponed enter to lambda"]; - subgraph cluster_95 { - color=blue - 517 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_96 { - color=blue - 518 [label="Enter block"]; - 519 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 520 [label="Exit block"]; - } - 521 [label="Exit function " style="filled" fillcolor=red]; - } - 522 [label="Postponed exit from lambda"]; - 523 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 524 [label="Exit block"]; - } - 525 [label="Exit function " style="filled" fillcolor=red]; - } - 526 [label="Postponed exit from lambda"]; - 527 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 528 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 529 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 530 [label="Access variable R|/x|"]; - 531 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 532 [label="Exit block"]; - } - 533 [label="Exit function expectedTypeNested" style="filled" fillcolor=red]; - } + 508 -> {510}; + 509 -> {511}; + 510 -> {492} [color=green style=dashed]; + 510 -> {511} [color=green]; + 510 -> {513} [color=red]; 511 -> {512}; 512 -> {513}; - 513 -> {514 526 527}; - 513 -> {514} [style=dashed]; + 513 -> {514}; 514 -> {515}; 515 -> {516}; - 516 -> {517 523}; - 516 -> {522} [style=dotted]; - 516 -> {517} [style=dashed]; + 516 -> {517}; 517 -> {518}; 518 -> {519}; 519 -> {520}; 520 -> {521}; 521 -> {522}; - 522 -> {523} [color=green]; - 522 -> {528} [color=red]; + 522 -> {523}; 523 -> {524}; 524 -> {525}; - 526 -> {527} [color=green]; - 526 -> {528} [color=red]; - 527 -> {528}; + 525 -> {526}; + 526 -> {527}; + + subgraph cluster_149 { + color=red + 528 [label="Enter function incompleteCallAtMostOnce" style="filled" fillcolor=red]; + subgraph cluster_150 { + color=blue + 529 [label="Enter block"]; + subgraph cluster_151 { + color=blue + 530 [label="Function call arguments enter"]; + subgraph cluster_152 { + color=blue + 531 [label="Function call arguments enter"]; + subgraph cluster_153 { + color=blue + 532 [label="Function call arguments enter"]; + subgraph cluster_154 { + color=blue + 533 [label="Function call arguments enter"]; + 534 [label="Postponed enter to lambda"]; + subgraph cluster_155 { + color=blue + 535 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_156 { + color=blue + 536 [label="Enter block"]; + 537 [label="Access variable R|/x|"]; + 538 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + subgraph cluster_157 { + color=blue + 539 [label="Function call arguments enter"]; + 540 [label="Access variable R|/y|"]; + 541 [label="Function call arguments exit"]; + } + 542 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_158 { + color=blue + 543 [label="Function call arguments enter"]; + 544 [label="Access variable R|/x|"]; + 545 [label="Smart cast: R|/x|"]; + 546 [label="Function call arguments exit"]; + } + 547 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_159 { + color=blue + 548 [label="Function call arguments enter"]; + 549 [label="Function call arguments exit"]; + } + 550 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 551 [label="Exit block"]; + } + 552 [label="Exit function " style="filled" fillcolor=red]; + } + 553 [label="Function call arguments exit"]; + } + 554 [label="Postponed exit from lambda"]; + 555 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 556 [label="Function call arguments exit"]; + } + 557 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_160 { + color=blue + 558 [label="Function call arguments enter"]; + 559 [label="Postponed enter to lambda"]; + subgraph cluster_161 { + color=blue + 560 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_162 { + color=blue + 561 [label="Enter block"]; + 562 [label="Access variable R|/y|"]; + 563 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + subgraph cluster_163 { + color=blue + 564 [label="Function call arguments enter"]; + 565 [label="Access variable R|/x|"]; + 566 [label="Function call arguments exit"]; + } + 567 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_164 { + color=blue + 568 [label="Function call arguments enter"]; + 569 [label="Access variable R|/y|"]; + 570 [label="Smart cast: R|/y|"]; + 571 [label="Function call arguments exit"]; + } + 572 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 573 [label="Const: Int(1)"]; + 574 [label="Exit block"]; + } + 575 [label="Exit function " style="filled" fillcolor=red]; + } + 576 [label="Function call arguments exit"]; + } + 577 [label="Postponed exit from lambda"]; + 578 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 579 [label="Function call arguments exit"]; + } + 580 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 581 [label="Function call arguments exit"]; + } + 582 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_165 { + color=blue + 583 [label="Function call arguments enter"]; + 584 [label="Access variable R|/x|"]; + 585 [label="Function call arguments exit"]; + } + 586 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_166 { + color=blue + 587 [label="Function call arguments enter"]; + 588 [label="Access variable R|/y|"]; + 589 [label="Function call arguments exit"]; + } + 590 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 591 [label="Exit block"]; + } + 592 [label="Exit function incompleteCallAtMostOnce" style="filled" fillcolor=red]; + } 528 -> {529}; 529 -> {530}; 530 -> {531}; 531 -> {532}; 532 -> {533}; + 533 -> {534}; + 534 -> {535 553 554}; + 534 -> {535} [style=dashed]; + 535 -> {536}; + 536 -> {537}; + 537 -> {538}; + 538 -> {539}; + 539 -> {540}; + 540 -> {541}; + 541 -> {542}; + 542 -> {543}; + 543 -> {544}; + 544 -> {545}; + 545 -> {546}; + 546 -> {547}; + 547 -> {548}; + 548 -> {549}; + 549 -> {550}; + 550 -> {551}; + 551 -> {552}; + 552 -> {554}; + 553 -> {555}; + 554 -> {555} [color=green]; + 554 -> {580} [color=red]; + 555 -> {556}; + 556 -> {557}; + 557 -> {558}; + 558 -> {559}; + 559 -> {560 576 577}; + 559 -> {560} [style=dashed]; + 560 -> {561}; + 561 -> {562}; + 562 -> {563}; + 563 -> {564}; + 564 -> {565}; + 565 -> {566}; + 566 -> {567}; + 567 -> {568}; + 568 -> {569}; + 569 -> {570}; + 570 -> {571}; + 571 -> {572}; + 572 -> {573}; + 573 -> {574}; + 574 -> {575}; + 575 -> {577}; + 576 -> {578}; + 577 -> {578} [color=green]; + 577 -> {580} [color=red]; + 578 -> {579}; + 579 -> {580}; + 580 -> {581}; + 581 -> {582}; + 582 -> {583}; + 583 -> {584}; + 584 -> {585}; + 585 -> {586}; + 586 -> {587}; + 587 -> {588}; + 588 -> {589}; + 589 -> {590}; + 590 -> {591}; + 591 -> {592}; + + subgraph cluster_167 { + color=red + 593 [label="Enter function incompleteCallUnknown" style="filled" fillcolor=red]; + subgraph cluster_168 { + color=blue + 594 [label="Enter block"]; + subgraph cluster_169 { + color=blue + 595 [label="Function call arguments enter"]; + subgraph cluster_170 { + color=blue + 596 [label="Function call arguments enter"]; + subgraph cluster_171 { + color=blue + 597 [label="Function call arguments enter"]; + subgraph cluster_172 { + color=blue + 598 [label="Function call arguments enter"]; + 599 [label="Postponed enter to lambda"]; + subgraph cluster_173 { + color=blue + 600 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_174 { + color=blue + 601 [label="Enter block"]; + 602 [label="Access variable R|/x|"]; + 603 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + subgraph cluster_175 { + color=blue + 604 [label="Function call arguments enter"]; + 605 [label="Access variable R|/y|"]; + 606 [label="Function call arguments exit"]; + } + 607 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_176 { + color=blue + 608 [label="Function call arguments enter"]; + 609 [label="Access variable R|/x|"]; + 610 [label="Smart cast: R|/x|"]; + 611 [label="Function call arguments exit"]; + } + 612 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_177 { + color=blue + 613 [label="Function call arguments enter"]; + 614 [label="Function call arguments exit"]; + } + 615 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 616 [label="Exit block"]; + } + 617 [label="Exit function " style="filled" fillcolor=red]; + } + 618 [label="Function call arguments exit"]; + } + 619 [label="Postponed exit from lambda"]; + 620 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 621 [label="Function call arguments exit"]; + } + 622 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_178 { + color=blue + 623 [label="Function call arguments enter"]; + 624 [label="Postponed enter to lambda"]; + subgraph cluster_179 { + color=blue + 625 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_180 { + color=blue + 626 [label="Enter block"]; + 627 [label="Access variable R|/y|"]; + 628 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + subgraph cluster_181 { + color=blue + 629 [label="Function call arguments enter"]; + 630 [label="Access variable R|/x|"]; + 631 [label="Function call arguments exit"]; + } + 632 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_182 { + color=blue + 633 [label="Function call arguments enter"]; + 634 [label="Access variable R|/y|"]; + 635 [label="Smart cast: R|/y|"]; + 636 [label="Function call arguments exit"]; + } + 637 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 638 [label="Const: Int(1)"]; + 639 [label="Exit block"]; + } + 640 [label="Exit function " style="filled" fillcolor=red]; + } + 641 [label="Function call arguments exit"]; + } + 642 [label="Postponed exit from lambda"]; + 643 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 644 [label="Function call arguments exit"]; + } + 645 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 646 [label="Function call arguments exit"]; + } + 647 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_183 { + color=blue + 648 [label="Function call arguments enter"]; + 649 [label="Access variable R|/x|"]; + 650 [label="Function call arguments exit"]; + } + 651 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_184 { + color=blue + 652 [label="Function call arguments enter"]; + 653 [label="Access variable R|/y|"]; + 654 [label="Function call arguments exit"]; + } + 655 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 656 [label="Exit block"]; + } + 657 [label="Exit function incompleteCallUnknown" style="filled" fillcolor=red]; + } + 593 -> {594}; + 594 -> {595}; + 595 -> {596}; + 596 -> {597}; + 597 -> {598}; + 598 -> {599}; + 599 -> {600 618 619}; + 599 -> {600} [style=dashed]; + 600 -> {601}; + 601 -> {602}; + 602 -> {603}; + 603 -> {604}; + 604 -> {605}; + 605 -> {606}; + 606 -> {607}; + 607 -> {608}; + 608 -> {609}; + 609 -> {610}; + 610 -> {611}; + 611 -> {612}; + 612 -> {613}; + 613 -> {614}; + 614 -> {615}; + 615 -> {616}; + 616 -> {617}; + 617 -> {619}; + 618 -> {620}; + 619 -> {599} [color=green style=dashed]; + 619 -> {620} [color=green]; + 619 -> {645} [color=red]; + 620 -> {621}; + 621 -> {622}; + 622 -> {623}; + 623 -> {624}; + 624 -> {625 641 642}; + 624 -> {625} [style=dashed]; + 625 -> {626}; + 626 -> {627}; + 627 -> {628}; + 628 -> {629}; + 629 -> {630}; + 630 -> {631}; + 631 -> {632}; + 632 -> {633}; + 633 -> {634}; + 634 -> {635}; + 635 -> {636}; + 636 -> {637}; + 637 -> {638}; + 638 -> {639}; + 639 -> {640}; + 640 -> {642}; + 641 -> {643}; + 642 -> {624} [color=green style=dashed]; + 642 -> {643} [color=green]; + 642 -> {645} [color=red]; + 643 -> {644}; + 644 -> {645}; + 645 -> {646}; + 646 -> {647}; + 647 -> {648}; + 648 -> {649}; + 649 -> {650}; + 650 -> {651}; + 651 -> {652}; + 652 -> {653}; + 653 -> {654}; + 654 -> {655}; + 655 -> {656}; + 656 -> {657}; + + subgraph cluster_185 { + color=red + 658 [label="Enter function incompleteCallNoContract" style="filled" fillcolor=red]; + subgraph cluster_186 { + color=blue + 659 [label="Enter block"]; + subgraph cluster_187 { + color=blue + 660 [label="Function call arguments enter"]; + subgraph cluster_188 { + color=blue + 661 [label="Function call arguments enter"]; + subgraph cluster_189 { + color=blue + 662 [label="Function call arguments enter"]; + subgraph cluster_190 { + color=blue + 663 [label="Function call arguments enter"]; + 664 [label="Postponed enter to lambda"]; + subgraph cluster_191 { + color=blue + 665 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_192 { + color=blue + 666 [label="Enter block"]; + 667 [label="Access variable R|/x|"]; + 668 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + subgraph cluster_193 { + color=blue + 669 [label="Function call arguments enter"]; + 670 [label="Access variable R|/y|"]; + 671 [label="Function call arguments exit"]; + } + 672 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_194 { + color=blue + 673 [label="Function call arguments enter"]; + 674 [label="Access variable R|/x|"]; + 675 [label="Smart cast: R|/x|"]; + 676 [label="Function call arguments exit"]; + } + 677 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_195 { + color=blue + 678 [label="Function call arguments enter"]; + 679 [label="Function call arguments exit"]; + } + 680 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 681 [label="Exit block"]; + } + 682 [label="Exit function " style="filled" fillcolor=red]; + } + 683 [label="Function call arguments exit"]; + } + 684 [label="Postponed exit from lambda"]; + 685 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 686 [label="Function call arguments exit"]; + } + 687 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_196 { + color=blue + 688 [label="Function call arguments enter"]; + 689 [label="Postponed enter to lambda"]; + subgraph cluster_197 { + color=blue + 690 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_198 { + color=blue + 691 [label="Enter block"]; + 692 [label="Access variable R|/y|"]; + 693 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + subgraph cluster_199 { + color=blue + 694 [label="Function call arguments enter"]; + 695 [label="Access variable R|/x|"]; + 696 [label="Function call arguments exit"]; + } + 697 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_200 { + color=blue + 698 [label="Function call arguments enter"]; + 699 [label="Access variable R|/y|"]; + 700 [label="Smart cast: R|/y|"]; + 701 [label="Function call arguments exit"]; + } + 702 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 703 [label="Const: Int(1)"]; + 704 [label="Exit block"]; + } + 705 [label="Exit function " style="filled" fillcolor=red]; + } + 706 [label="Function call arguments exit"]; + } + 707 [label="Postponed exit from lambda"]; + 708 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 709 [label="Function call arguments exit"]; + } + 710 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 711 [label="Function call arguments exit"]; + } + 712 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_201 { + color=blue + 713 [label="Function call arguments enter"]; + 714 [label="Access variable R|/x|"]; + 715 [label="Function call arguments exit"]; + } + 716 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_202 { + color=blue + 717 [label="Function call arguments enter"]; + 718 [label="Access variable R|/y|"]; + 719 [label="Function call arguments exit"]; + } + 720 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 721 [label="Exit block"]; + } + 722 [label="Exit function incompleteCallNoContract" style="filled" fillcolor=red]; + } + 658 -> {659}; + 659 -> {660}; + 660 -> {661}; + 661 -> {662}; + 662 -> {663}; + 663 -> {664}; + 664 -> {665 683 684}; + 664 -> {665} [style=dashed]; + 665 -> {666}; + 666 -> {667}; + 667 -> {668}; + 668 -> {669}; + 669 -> {670}; + 670 -> {671}; + 671 -> {672}; + 672 -> {673}; + 673 -> {674}; + 674 -> {675}; + 675 -> {676}; + 676 -> {677}; + 677 -> {678}; + 678 -> {679}; + 679 -> {680}; + 680 -> {681}; + 681 -> {682}; + 683 -> {685}; + 684 -> {685} [color=green]; + 684 -> {710} [color=red]; + 685 -> {686}; + 686 -> {687}; + 687 -> {688}; + 688 -> {689}; + 689 -> {690 706 707}; + 689 -> {690} [style=dashed]; + 690 -> {691}; + 691 -> {692}; + 692 -> {693}; + 693 -> {694}; + 694 -> {695}; + 695 -> {696}; + 696 -> {697}; + 697 -> {698}; + 698 -> {699}; + 699 -> {700}; + 700 -> {701}; + 701 -> {702}; + 702 -> {703}; + 703 -> {704}; + 704 -> {705}; + 706 -> {708}; + 707 -> {708} [color=green]; + 707 -> {710} [color=red]; + 708 -> {709}; + 709 -> {710}; + 710 -> {711}; + 711 -> {712}; + 712 -> {713}; + 713 -> {714}; + 714 -> {715}; + 715 -> {716}; + 716 -> {717}; + 717 -> {718}; + 718 -> {719}; + 719 -> {720}; + 720 -> {721}; + 721 -> {722}; + + subgraph cluster_203 { + color=red + 723 [label="Enter function expectedType" style="filled" fillcolor=red]; + subgraph cluster_204 { + color=blue + 724 [label="Enter block"]; + subgraph cluster_205 { + color=blue + 725 [label="Function call arguments enter"]; + subgraph cluster_206 { + color=blue + 726 [label="Function call arguments enter"]; + 727 [label="Postponed enter to lambda"]; + subgraph cluster_207 { + color=blue + 728 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_208 { + color=blue + 729 [label="Enter block"]; + subgraph cluster_209 { + color=blue + 730 [label="Function call arguments enter"]; + 731 [label="Function call arguments exit"]; + } + 732 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 733 [label="Exit block"]; + } + 734 [label="Exit function " style="filled" fillcolor=red]; + } + 735 [label="Function call arguments exit"]; + } + 736 [label="Postponed exit from lambda"]; + 737 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_210 { + color=blue + 738 [label="Function call arguments enter"]; + 739 [label="Postponed enter to lambda"]; + subgraph cluster_211 { + color=blue + 740 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_212 { + color=blue + 741 [label="Enter block"]; + subgraph cluster_213 { + color=blue + 742 [label="Function call arguments enter"]; + 743 [label="Function call arguments exit"]; + } + 744 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 745 [label="Exit block"]; + } + 746 [label="Exit function " style="filled" fillcolor=red]; + } + 747 [label="Function call arguments exit"]; + } + 748 [label="Postponed exit from lambda"]; + 749 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 750 [label="Function call arguments exit"]; + } + 751 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 752 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_214 { + color=blue + 753 [label="Function call arguments enter"]; + 754 [label="Access variable R|/x|"]; + 755 [label="Function call arguments exit"]; + } + 756 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 757 [label="Exit block"]; + } + 758 [label="Exit function expectedType" style="filled" fillcolor=red]; + } + 723 -> {724}; + 724 -> {725}; + 725 -> {726}; + 726 -> {727}; + 727 -> {728 735}; + 727 -> {736} [style=dotted]; + 727 -> {728} [style=dashed]; + 728 -> {729}; + 729 -> {730}; + 730 -> {731}; + 731 -> {732}; + 732 -> {733}; + 733 -> {734}; + 734 -> {736}; + 735 -> {737}; + 736 -> {737} [color=green]; + 736 -> {751} [color=red]; + 737 -> {738}; + 738 -> {739}; + 739 -> {740 747}; + 739 -> {748} [style=dotted]; + 739 -> {740} [style=dashed]; + 740 -> {741}; + 741 -> {742}; + 742 -> {743}; + 743 -> {744}; + 744 -> {745}; + 745 -> {746}; + 746 -> {748}; + 747 -> {749}; + 748 -> {749} [color=green]; + 748 -> {751} [color=red]; + 749 -> {750}; + 750 -> {751}; + 751 -> {752}; + 752 -> {753}; + 753 -> {754}; + 754 -> {755}; + 755 -> {756}; + 756 -> {757}; + 757 -> {758}; + + subgraph cluster_215 { + color=red + 759 [label="Enter function expectedTypeNested" style="filled" fillcolor=red]; + subgraph cluster_216 { + color=blue + 760 [label="Enter block"]; + subgraph cluster_217 { + color=blue + 761 [label="Function call arguments enter"]; + subgraph cluster_218 { + color=blue + 762 [label="Function call arguments enter"]; + 763 [label="Postponed enter to lambda"]; + subgraph cluster_219 { + color=blue + 764 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_220 { + color=blue + 765 [label="Enter block"]; + subgraph cluster_221 { + color=blue + 766 [label="Function call arguments enter"]; + 767 [label="Postponed enter to lambda"]; + subgraph cluster_222 { + color=blue + 768 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_223 { + color=blue + 769 [label="Enter block"]; + subgraph cluster_224 { + color=blue + 770 [label="Function call arguments enter"]; + 771 [label="Function call arguments exit"]; + } + 772 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 773 [label="Exit block"]; + } + 774 [label="Exit function " style="filled" fillcolor=red]; + } + 775 [label="Function call arguments exit"]; + } + 776 [label="Postponed exit from lambda"]; + 777 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 778 [label="Exit block"]; + } + 779 [label="Exit function " style="filled" fillcolor=red]; + } + 780 [label="Function call arguments exit"]; + } + 781 [label="Postponed exit from lambda"]; + 782 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 783 [label="Function call arguments exit"]; + } + 784 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 785 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_225 { + color=blue + 786 [label="Function call arguments enter"]; + 787 [label="Access variable R|/x|"]; + 788 [label="Function call arguments exit"]; + } + 789 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 790 [label="Exit block"]; + } + 791 [label="Exit function expectedTypeNested" style="filled" fillcolor=red]; + } + 759 -> {760}; + 760 -> {761}; + 761 -> {762}; + 762 -> {763}; + 763 -> {764 780 781}; + 763 -> {764} [style=dashed]; + 764 -> {765}; + 765 -> {766}; + 766 -> {767}; + 767 -> {768 775}; + 767 -> {776} [style=dotted]; + 767 -> {768} [style=dashed]; + 768 -> {769}; + 769 -> {770}; + 770 -> {771}; + 771 -> {772}; + 772 -> {773}; + 773 -> {774}; + 774 -> {776}; + 775 -> {777}; + 776 -> {777} [color=green]; + 776 -> {784} [color=red]; + 777 -> {778}; + 778 -> {779}; + 780 -> {782}; + 781 -> {782} [color=green]; + 781 -> {784} [color=red]; + 782 -> {783}; + 783 -> {784}; + 784 -> {785}; + 785 -> {786}; + 786 -> {787}; + 787 -> {788}; + 788 -> {789}; + 789 -> {790}; + 790 -> {791}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot index a4594859584..f4008011c9f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot @@ -93,153 +93,205 @@ digraph flowFromInplaceLambda2_kt { subgraph cluster_10 { color=blue 28 [label="Enter block"]; - 29 [label="Postponed enter to lambda"]; subgraph cluster_11 { color=blue - 30 [label="Enter function " style="filled" fillcolor=red]; + 29 [label="Function call arguments enter"]; subgraph cluster_12 { color=blue - 31 [label="Enter block"]; - 32 [label="Access variable R|/x|"]; - 33 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 34 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 35 [label="Exit block"]; + 30 [label="Function call arguments enter"]; + subgraph cluster_13 { + color=blue + 31 [label="Function call arguments enter"]; + 32 [label="Postponed enter to lambda"]; + subgraph cluster_14 { + color=blue + 33 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 34 [label="Enter block"]; + 35 [label="Access variable R|/x|"]; + 36 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + subgraph cluster_16 { + color=blue + 37 [label="Function call arguments enter"]; + 38 [label="Function call arguments exit"]; + } + 39 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 40 [label="Exit block"]; + } + 41 [label="Exit function " style="filled" fillcolor=red]; + } + 42 [label="Function call arguments exit"]; + } + 43 [label="Postponed exit from lambda"]; + 44 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 45 [label="Function call arguments exit"]; } - 36 [label="Exit function " style="filled" fillcolor=red]; - } - 37 [label="Postponed exit from lambda"]; - 38 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 39 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 40 [label="Const: Int(1)"]; - 41 [label="Postponed enter to lambda"]; - subgraph cluster_13 { - color=blue - 42 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_14 { + 46 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 47 [label="Const: Int(1)"]; + subgraph cluster_17 { color=blue - 43 [label="Enter block"]; - 44 [label="Access variable R|/x|"]; - 45 [label="Access variable R|kotlin/String.length#|"]; - 46 [label="Const: Int(123)"]; - 47 [label="Exit block"]; + 48 [label="Function call arguments enter"]; + 49 [label="Postponed enter to lambda"]; + subgraph cluster_18 { + color=blue + 50 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_19 { + color=blue + 51 [label="Enter block"]; + 52 [label="Access variable R|/x|"]; + 53 [label="Access variable R|kotlin/String.length#|"]; + 54 [label="Const: Int(123)"]; + 55 [label="Exit block"]; + } + 56 [label="Exit function " style="filled" fillcolor=red]; + } + 57 [label="Function call arguments exit"]; } - 48 [label="Exit function " style="filled" fillcolor=red]; + 58 [label="Postponed exit from lambda"]; + 59 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 60 [label="Function call arguments exit"]; } - 49 [label="Postponed exit from lambda"]; - 50 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 51 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 52 [label="Access variable R|/x|"]; - 53 [label="Smart cast: R|/x|"]; - 54 [label="Access variable R|kotlin/String.length|"]; - 55 [label="Exit block"]; + 61 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 62 [label="Access variable R|/x|"]; + 63 [label="Smart cast: R|/x|"]; + 64 [label="Access variable R|kotlin/String.length|"]; + 65 [label="Exit block"]; } - 56 [label="Exit function test1" style="filled" fillcolor=red]; + 66 [label="Exit function test1" style="filled" fillcolor=red]; } 27 -> {28}; 28 -> {29}; - 29 -> {30 38}; - 29 -> {37} [style=dotted]; - 29 -> {30} [style=dashed]; + 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {33}; + 32 -> {33 42}; + 32 -> {43} [style=dotted]; + 32 -> {33} [style=dashed]; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38} [color=green]; - 37 -> {51} [color=red]; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {42 50}; - 41 -> {49} [style=dotted]; - 41 -> {42} [style=dashed]; - 42 -> {43}; - 43 -> {44}; + 41 -> {43}; + 42 -> {44}; + 43 -> {44} [color=green]; + 43 -> {61} [color=red]; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {50} [color=green]; - 49 -> {51} [color=red]; + 49 -> {50 57}; + 49 -> {58} [style=dotted]; + 49 -> {50} [style=dashed]; 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - - subgraph cluster_15 { - color=red - 57 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 58 [label="Enter block"]; - 59 [label="Postponed enter to lambda"]; - subgraph cluster_17 { - color=blue - 60 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 61 [label="Enter block"]; - 62 [label="Access variable R|/x|"]; - 63 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 64 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 65 [label="Exit block"]; - } - 66 [label="Exit function " style="filled" fillcolor=red]; - } - 67 [label="Postponed exit from lambda"]; - 68 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 69 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 70 [label="Const: Int(1)"]; - 71 [label="Function call: R|/someCompletedCall|(...)" style="filled" fillcolor=yellow]; - 72 [label="Postponed enter to lambda"]; - subgraph cluster_19 { - color=blue - 73 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_20 { - color=blue - 74 [label="Enter block"]; - 75 [label="Access variable R|/x|"]; - 76 [label="Access variable R|kotlin/String.length#|"]; - 77 [label="Const: Int(123)"]; - 78 [label="Exit block"]; - } - 79 [label="Exit function " style="filled" fillcolor=red]; - } - 80 [label="Postponed exit from lambda"]; - 81 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 82 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 83 [label="Access variable R|/x|"]; - 84 [label="Smart cast: R|/x|"]; - 85 [label="Access variable R|kotlin/String.length|"]; - 86 [label="Exit block"]; - } - 87 [label="Exit function test2" style="filled" fillcolor=red]; - } - 57 -> {58}; - 58 -> {59}; - 59 -> {60 68}; - 59 -> {67} [style=dotted]; - 59 -> {60} [style=dashed]; + 56 -> {58}; + 57 -> {59}; + 58 -> {59} [color=green]; + 58 -> {61} [color=red]; + 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {67}; - 67 -> {68} [color=green]; - 67 -> {82} [color=red]; + + subgraph cluster_20 { + color=red + 67 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 68 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 69 [label="Function call arguments enter"]; + subgraph cluster_23 { + color=blue + 70 [label="Function call arguments enter"]; + subgraph cluster_24 { + color=blue + 71 [label="Function call arguments enter"]; + 72 [label="Postponed enter to lambda"]; + subgraph cluster_25 { + color=blue + 73 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 74 [label="Enter block"]; + 75 [label="Access variable R|/x|"]; + 76 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + subgraph cluster_27 { + color=blue + 77 [label="Function call arguments enter"]; + 78 [label="Function call arguments exit"]; + } + 79 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 80 [label="Exit block"]; + } + 81 [label="Exit function " style="filled" fillcolor=red]; + } + 82 [label="Function call arguments exit"]; + } + 83 [label="Postponed exit from lambda"]; + 84 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 85 [label="Function call arguments exit"]; + } + 86 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_28 { + color=blue + 87 [label="Function call arguments enter"]; + 88 [label="Const: Int(1)"]; + 89 [label="Function call arguments exit"]; + } + 90 [label="Function call: R|/someCompletedCall|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_29 { + color=blue + 91 [label="Function call arguments enter"]; + 92 [label="Postponed enter to lambda"]; + subgraph cluster_30 { + color=blue + 93 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 94 [label="Enter block"]; + 95 [label="Access variable R|/x|"]; + 96 [label="Access variable R|kotlin/String.length#|"]; + 97 [label="Const: Int(123)"]; + 98 [label="Exit block"]; + } + 99 [label="Exit function " style="filled" fillcolor=red]; + } + 100 [label="Function call arguments exit"]; + } + 101 [label="Postponed exit from lambda"]; + 102 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 103 [label="Function call arguments exit"]; + } + 104 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 105 [label="Access variable R|/x|"]; + 106 [label="Smart cast: R|/x|"]; + 107 [label="Access variable R|kotlin/String.length|"]; + 108 [label="Exit block"]; + } + 109 [label="Exit function test2" style="filled" fillcolor=red]; + } + 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {73 81}; - 72 -> {80} [style=dotted]; + 72 -> {73 82}; + 72 -> {83} [style=dotted]; 72 -> {73} [style=dashed]; 73 -> {74}; 74 -> {75}; @@ -248,301 +300,359 @@ digraph flowFromInplaceLambda2_kt { 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {81} [color=green]; - 80 -> {82} [color=red]; - 81 -> {82}; - 82 -> {83}; - 83 -> {84}; + 80 -> {81}; + 81 -> {83}; + 82 -> {84}; + 83 -> {84} [color=green]; + 83 -> {104} [color=red]; 84 -> {85}; 85 -> {86}; 86 -> {87}; - - subgraph cluster_21 { - color=red - 88 [label="Enter function test3" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 89 [label="Enter block"]; - 90 [label="Postponed enter to lambda"]; - subgraph cluster_23 { - color=blue - 91 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 92 [label="Enter block"]; - 93 [label="Access variable R|/x|"]; - 94 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 95 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 96 [label="Exit block"]; - } - 97 [label="Exit function " style="filled" fillcolor=red]; - } - 98 [label="Postponed exit from lambda"]; - 99 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 100 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - subgraph cluster_25 { - color=blue - 101 [label="Enter when"]; - subgraph cluster_26 { - color=blue - 102 [label="Enter when branch condition "]; - 103 [label="Const: Boolean(true)"]; - 104 [label="Exit when branch condition"]; - } - subgraph cluster_27 { - color=blue - 105 [label="Enter when branch condition else"]; - 106 [label="Exit when branch condition"]; - } - 107 [label="Enter when branch result"]; - subgraph cluster_28 { - color=blue - 108 [label="Enter block"]; - 109 [label="Const: Int(2)"]; - 110 [label="Exit block"]; - } - 111 [label="Exit when branch result"]; - 112 [label="Enter when branch result"]; - subgraph cluster_29 { - color=blue - 113 [label="Enter block"]; - 114 [label="Const: Int(1)"]; - 115 [label="Exit block"]; - } - 116 [label="Exit when branch result"]; - 117 [label="Exit when"]; - } - 118 [label="Postponed enter to lambda"]; - subgraph cluster_30 { - color=blue - 119 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 120 [label="Enter block"]; - 121 [label="Access variable R|/x|"]; - 122 [label="Access variable R|kotlin/String.length#|"]; - 123 [label="Const: Int(123)"]; - 124 [label="Exit block"]; - } - 125 [label="Exit function " style="filled" fillcolor=red]; - } - 126 [label="Postponed exit from lambda"]; - 127 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 128 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 129 [label="Access variable R|/x|"]; - 130 [label="Smart cast: R|/x|"]; - 131 [label="Access variable R|kotlin/String.length|"]; - 132 [label="Exit block"]; - } - 133 [label="Exit function test3" style="filled" fillcolor=red]; - } + 87 -> {88}; 88 -> {89}; 89 -> {90}; - 90 -> {91 99}; - 90 -> {98} [style=dotted]; - 90 -> {91} [style=dashed]; + 90 -> {91}; 91 -> {92}; - 92 -> {93}; + 92 -> {93 100}; + 92 -> {101} [style=dotted]; + 92 -> {93} [style=dashed]; 93 -> {94}; 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {99} [color=green]; - 98 -> {128} [color=red]; - 99 -> {100}; - 100 -> {101}; - 101 -> {102}; + 98 -> {99}; + 99 -> {101}; + 100 -> {102}; + 101 -> {102} [color=green]; + 101 -> {104} [color=red]; 102 -> {103}; 103 -> {104}; - 104 -> {105 112}; + 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {110}; + + subgraph cluster_32 { + color=red + 110 [label="Enter function test3" style="filled" fillcolor=red]; + subgraph cluster_33 { + color=blue + 111 [label="Enter block"]; + subgraph cluster_34 { + color=blue + 112 [label="Function call arguments enter"]; + subgraph cluster_35 { + color=blue + 113 [label="Function call arguments enter"]; + subgraph cluster_36 { + color=blue + 114 [label="Function call arguments enter"]; + 115 [label="Postponed enter to lambda"]; + subgraph cluster_37 { + color=blue + 116 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 117 [label="Enter block"]; + 118 [label="Access variable R|/x|"]; + 119 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + subgraph cluster_39 { + color=blue + 120 [label="Function call arguments enter"]; + 121 [label="Function call arguments exit"]; + } + 122 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 123 [label="Exit block"]; + } + 124 [label="Exit function " style="filled" fillcolor=red]; + } + 125 [label="Function call arguments exit"]; + } + 126 [label="Postponed exit from lambda"]; + 127 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 128 [label="Function call arguments exit"]; + } + 129 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_40 { + color=blue + 130 [label="Enter when"]; + subgraph cluster_41 { + color=blue + 131 [label="Enter when branch condition "]; + 132 [label="Const: Boolean(true)"]; + 133 [label="Exit when branch condition"]; + } + subgraph cluster_42 { + color=blue + 134 [label="Enter when branch condition else"]; + 135 [label="Exit when branch condition"]; + } + 136 [label="Enter when branch result"]; + subgraph cluster_43 { + color=blue + 137 [label="Enter block"]; + 138 [label="Const: Int(2)"]; + 139 [label="Exit block"]; + } + 140 [label="Exit when branch result"]; + 141 [label="Enter when branch result"]; + subgraph cluster_44 { + color=blue + 142 [label="Enter block"]; + 143 [label="Const: Int(1)"]; + 144 [label="Exit block"]; + } + 145 [label="Exit when branch result"]; + 146 [label="Exit when"]; + } + subgraph cluster_45 { + color=blue + 147 [label="Function call arguments enter"]; + 148 [label="Postponed enter to lambda"]; + subgraph cluster_46 { + color=blue + 149 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_47 { + color=blue + 150 [label="Enter block"]; + 151 [label="Access variable R|/x|"]; + 152 [label="Access variable R|kotlin/String.length#|"]; + 153 [label="Const: Int(123)"]; + 154 [label="Exit block"]; + } + 155 [label="Exit function " style="filled" fillcolor=red]; + } + 156 [label="Function call arguments exit"]; + } + 157 [label="Postponed exit from lambda"]; + 158 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 159 [label="Function call arguments exit"]; + } + 160 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 161 [label="Access variable R|/x|"]; + 162 [label="Smart cast: R|/x|"]; + 163 [label="Access variable R|kotlin/String.length|"]; + 164 [label="Exit block"]; + } + 165 [label="Exit function test3" style="filled" fillcolor=red]; + } 110 -> {111}; - 111 -> {117}; + 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; - 115 -> {116}; + 115 -> {116 125}; + 115 -> {126} [style=dotted]; + 115 -> {116} [style=dashed]; 116 -> {117}; 117 -> {118}; - 118 -> {119 127}; - 118 -> {126} [style=dotted]; - 118 -> {119} [style=dashed]; + 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; - 124 -> {125}; - 125 -> {126}; + 124 -> {126}; + 125 -> {127}; 126 -> {127} [color=green]; - 126 -> {128} [color=red]; + 126 -> {160} [color=red]; 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - - subgraph cluster_32 { - color=red - 134 [label="Enter function test4" style="filled" fillcolor=red]; - subgraph cluster_33 { - color=blue - 135 [label="Enter block"]; - 136 [label="Access variable R|/x|"]; - 137 [label="Variable declaration: lvar p: R|kotlin/String?|"]; - subgraph cluster_34 { - color=blue - 138 [label="Enter when"]; - subgraph cluster_35 { - color=blue - 139 [label="Enter when branch condition "]; - 140 [label="Access variable R|/p|"]; - 141 [label="Const: Null(null)"]; - 142 [label="Equality operator !="]; - 143 [label="Exit when branch condition"]; - } - 144 [label="Synthetic else branch"]; - 145 [label="Enter when branch result"]; - subgraph cluster_36 { - color=blue - 146 [label="Enter block"]; - subgraph cluster_37 { - color=blue - 147 [label="Enter when"]; - subgraph cluster_38 { - color=blue - 148 [label="Enter when branch condition "]; - 149 [label="Const: Boolean(true)"]; - 150 [label="Exit when branch condition"]; - } - subgraph cluster_39 { - color=blue - 151 [label="Enter when branch condition else"]; - 152 [label="Exit when branch condition"]; - } - 153 [label="Enter when branch result"]; - subgraph cluster_40 { - color=blue - 154 [label="Enter block"]; - 155 [label="Postponed enter to lambda"]; - subgraph cluster_41 { - color=blue - 156 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_42 { - color=blue - 157 [label="Enter block"]; - 158 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 159 [label="Exit block"]; - } - 160 [label="Exit function " style="filled" fillcolor=red]; - } - 161 [label="Postponed exit from lambda"]; - 162 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 163 [label="Exit block"]; - } - 164 [label="Exit when branch result"]; - 165 [label="Enter when branch result"]; - subgraph cluster_43 { - color=blue - 166 [label="Enter block"]; - 167 [label="Postponed enter to lambda"]; - subgraph cluster_44 { - color=blue - 168 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_45 { - color=blue - 169 [label="Enter block"]; - 170 [label="Const: Null(null)"]; - 171 [label="Assignment: R|/p|"]; - 172 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 173 [label="Exit block"]; - } - 174 [label="Exit function " style="filled" fillcolor=red]; - } - 175 [label="Postponed exit from lambda"]; - 176 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 177 [label="Exit block"]; - } - 178 [label="Exit when branch result"]; - 179 [label="Exit when"]; - } - 180 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 181 [label="Const: Int(1)"]; - 182 [label="Postponed enter to lambda"]; - subgraph cluster_46 { - color=blue - 183 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_47 { - color=blue - 184 [label="Enter block"]; - 185 [label="Access variable R|/p|"]; - 186 [label="Smart cast: R|/p|"]; - 187 [label="Access variable R|kotlin/String.length#|"]; - 188 [label="Const: Int(123)"]; - 189 [label="Exit block"]; - } - 190 [label="Exit function " style="filled" fillcolor=red]; - } - 191 [label="Postponed exit from lambda"]; - 192 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 193 [label="Merge postponed lambda exits"]; - 194 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 195 [label="Access variable R|/p|"]; - 196 [label="Access variable R|kotlin/String.length#|"]; - 197 [label="Exit block"]; - } - 198 [label="Exit when branch result"]; - 199 [label="Exit when"]; - } - 200 [label="Exit block"]; - } - 201 [label="Exit function test4" style="filled" fillcolor=red]; - } + 133 -> {134 141}; 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; - 140 -> {141}; + 140 -> {146}; 141 -> {142}; 142 -> {143}; - 143 -> {144 145}; - 144 -> {199}; + 143 -> {144}; + 144 -> {145}; 145 -> {146}; 146 -> {147}; 147 -> {148}; - 148 -> {149}; + 148 -> {149 156}; + 148 -> {157} [style=dotted]; + 148 -> {149} [style=dashed]; 149 -> {150}; - 150 -> {151 165}; + 150 -> {151}; 151 -> {152}; 152 -> {153}; 153 -> {154}; 154 -> {155}; - 155 -> {156 162}; - 155 -> {161} [style=dotted]; - 155 -> {156} [style=dashed]; - 156 -> {157}; - 157 -> {158}; + 155 -> {157}; + 156 -> {158}; + 157 -> {158} [color=green]; + 157 -> {160} [color=red]; 158 -> {159}; 159 -> {160}; 160 -> {161}; - 161 -> {162} [color=green]; - 161 -> {193} [color=red]; + 161 -> {162}; 162 -> {163}; 163 -> {164}; - 164 -> {179}; - 165 -> {166}; + 164 -> {165}; + + subgraph cluster_48 { + color=red + 166 [label="Enter function test4" style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 167 [label="Enter block"]; + 168 [label="Access variable R|/x|"]; + 169 [label="Variable declaration: lvar p: R|kotlin/String?|"]; + subgraph cluster_50 { + color=blue + 170 [label="Enter when"]; + subgraph cluster_51 { + color=blue + 171 [label="Enter when branch condition "]; + 172 [label="Access variable R|/p|"]; + 173 [label="Const: Null(null)"]; + 174 [label="Equality operator !="]; + 175 [label="Exit when branch condition"]; + } + 176 [label="Synthetic else branch"]; + 177 [label="Enter when branch result"]; + subgraph cluster_52 { + color=blue + 178 [label="Enter block"]; + subgraph cluster_53 { + color=blue + 179 [label="Function call arguments enter"]; + subgraph cluster_54 { + color=blue + 180 [label="Function call arguments enter"]; + subgraph cluster_55 { + color=blue + 181 [label="Enter when"]; + subgraph cluster_56 { + color=blue + 182 [label="Enter when branch condition "]; + 183 [label="Const: Boolean(true)"]; + 184 [label="Exit when branch condition"]; + } + subgraph cluster_57 { + color=blue + 185 [label="Enter when branch condition else"]; + 186 [label="Exit when branch condition"]; + } + 187 [label="Enter when branch result"]; + subgraph cluster_58 { + color=blue + 188 [label="Enter block"]; + subgraph cluster_59 { + color=blue + 189 [label="Function call arguments enter"]; + 190 [label="Postponed enter to lambda"]; + subgraph cluster_60 { + color=blue + 191 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_61 { + color=blue + 192 [label="Enter block"]; + subgraph cluster_62 { + color=blue + 193 [label="Function call arguments enter"]; + 194 [label="Function call arguments exit"]; + } + 195 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 196 [label="Exit block"]; + } + 197 [label="Exit function " style="filled" fillcolor=red]; + } + 198 [label="Function call arguments exit"]; + } + 199 [label="Postponed exit from lambda"]; + 200 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 201 [label="Exit block"]; + } + 202 [label="Exit when branch result"]; + 203 [label="Enter when branch result"]; + subgraph cluster_63 { + color=blue + 204 [label="Enter block"]; + subgraph cluster_64 { + color=blue + 205 [label="Function call arguments enter"]; + 206 [label="Postponed enter to lambda"]; + subgraph cluster_65 { + color=blue + 207 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_66 { + color=blue + 208 [label="Enter block"]; + 209 [label="Const: Null(null)"]; + 210 [label="Assignment: R|/p|"]; + subgraph cluster_67 { + color=blue + 211 [label="Function call arguments enter"]; + 212 [label="Function call arguments exit"]; + } + 213 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 214 [label="Exit block"]; + } + 215 [label="Exit function " style="filled" fillcolor=red]; + } + 216 [label="Function call arguments exit"]; + } + 217 [label="Postponed exit from lambda"]; + 218 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 219 [label="Exit block"]; + } + 220 [label="Exit when branch result"]; + 221 [label="Exit when"]; + } + 222 [label="Function call arguments exit"]; + } + 223 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 224 [label="Const: Int(1)"]; + subgraph cluster_68 { + color=blue + 225 [label="Function call arguments enter"]; + 226 [label="Postponed enter to lambda"]; + subgraph cluster_69 { + color=blue + 227 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_70 { + color=blue + 228 [label="Enter block"]; + 229 [label="Access variable R|/p|"]; + 230 [label="Smart cast: R|/p|"]; + 231 [label="Access variable R|kotlin/String.length#|"]; + 232 [label="Const: Int(123)"]; + 233 [label="Exit block"]; + } + 234 [label="Exit function " style="filled" fillcolor=red]; + } + 235 [label="Function call arguments exit"]; + } + 236 [label="Postponed exit from lambda"]; + 237 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 238 [label="Function call arguments exit"]; + } + 239 [label="Merge postponed lambda exits"]; + 240 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 241 [label="Access variable R|/p|"]; + 242 [label="Access variable R|kotlin/String.length#|"]; + 243 [label="Exit block"]; + } + 244 [label="Exit when branch result"]; + 245 [label="Exit when"]; + } + 246 [label="Exit block"]; + } + 247 [label="Exit function test4" style="filled" fillcolor=red]; + } 166 -> {167}; - 167 -> {168 176}; - 167 -> {175} [style=dotted]; - 167 -> {168} [style=dashed]; + 167 -> {168}; 168 -> {169}; 169 -> {170}; 170 -> {171}; @@ -550,91 +660,42 @@ digraph flowFromInplaceLambda2_kt { 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {176} [color=green]; - 175 -> {193} [color=red]; - 176 -> {177}; + 175 -> {176 177}; + 176 -> {245}; 177 -> {178}; 178 -> {179}; - 179 -> {180 193}; + 179 -> {180}; 180 -> {181}; 181 -> {182}; - 182 -> {183 192}; - 182 -> {191} [style=dotted]; - 182 -> {183} [style=dashed]; + 182 -> {183}; 183 -> {184}; - 184 -> {185}; + 184 -> {185 203}; 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; 189 -> {190}; - 190 -> {191}; - 191 -> {192} [color=green]; - 191 -> {194} [color=red]; - 192 -> {194}; - 193 -> {194} [color=red]; + 190 -> {191 198}; + 190 -> {199} [style=dotted]; + 190 -> {191} [style=dashed]; + 191 -> {192}; + 192 -> {193}; + 193 -> {194}; 194 -> {195}; 195 -> {196}; 196 -> {197}; - 197 -> {198}; - 198 -> {199}; - 199 -> {200}; + 197 -> {199}; + 198 -> {200}; + 199 -> {200} [color=green]; + 199 -> {239} [color=red]; 200 -> {201}; - - subgraph cluster_48 { - color=red - 202 [label="Enter function test5" style="filled" fillcolor=red]; - subgraph cluster_49 { - color=blue - 203 [label="Enter block"]; - 204 [label="Access variable R|/y|"]; - 205 [label="Enter safe call"]; - 206 [label="Postponed enter to lambda"]; - subgraph cluster_50 { - color=blue - 207 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_51 { - color=blue - 208 [label="Enter block"]; - 209 [label="Access variable R|/x|"]; - 210 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 211 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 212 [label="Exit block"]; - } - 213 [label="Exit function " style="filled" fillcolor=red]; - } - 214 [label="Postponed exit from lambda"]; - 215 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 216 [label="Exit safe call"]; - 217 [label="Const: Int(1)"]; - 218 [label="Postponed enter to lambda"]; - subgraph cluster_52 { - color=blue - 219 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_53 { - color=blue - 220 [label="Enter block"]; - 221 [label="Const: String()"]; - 222 [label="Exit block"]; - } - 223 [label="Exit function " style="filled" fillcolor=red]; - } - 224 [label="Postponed exit from lambda"]; - 225 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 226 [label="Merge postponed lambda exits"]; - 227 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 228 [label="Access variable R|/x|"]; - 229 [label="Access variable R|kotlin/String.length#|"]; - 230 [label="Exit block"]; - } - 231 [label="Exit function test5" style="filled" fillcolor=red]; - } - 202 -> {203}; + 201 -> {202}; + 202 -> {221}; 203 -> {204}; - 204 -> {205 216}; + 204 -> {205}; 205 -> {206}; - 206 -> {207 215}; - 206 -> {214} [style=dotted]; + 206 -> {207 216}; + 206 -> {217} [style=dotted]; 206 -> {207} [style=dashed]; 207 -> {208}; 208 -> {209}; @@ -643,274 +704,302 @@ digraph flowFromInplaceLambda2_kt { 211 -> {212}; 212 -> {213}; 213 -> {214}; - 214 -> {215} [color=green]; - 214 -> {226} [color=red]; - 215 -> {216}; - 216 -> {217 226}; - 217 -> {218}; - 218 -> {219 225}; - 218 -> {224} [style=dotted]; - 218 -> {219} [style=dashed]; + 214 -> {215}; + 215 -> {217}; + 216 -> {218}; + 217 -> {218} [color=green]; + 217 -> {239} [color=red]; + 218 -> {219}; 219 -> {220}; 220 -> {221}; - 221 -> {222}; + 221 -> {222 239}; 222 -> {223}; 223 -> {224}; - 224 -> {225} [color=green]; - 224 -> {227} [color=red]; - 225 -> {227}; - 226 -> {227} [color=red]; + 224 -> {225}; + 225 -> {226}; + 226 -> {227 235}; + 226 -> {236} [style=dotted]; + 226 -> {227} [style=dashed]; 227 -> {228}; 228 -> {229}; 229 -> {230}; 230 -> {231}; - - subgraph cluster_54 { - color=red - 232 [label="Enter function test6" style="filled" fillcolor=red]; - subgraph cluster_55 { - color=blue - 233 [label="Enter block"]; - subgraph cluster_56 { - color=blue - 234 [label="Enter when"]; - subgraph cluster_57 { - color=blue - 235 [label="Enter when branch condition "]; - 236 [label="Const: Boolean(true)"]; - 237 [label="Exit when branch condition"]; - } - subgraph cluster_58 { - color=blue - 238 [label="Enter when branch condition else"]; - 239 [label="Exit when branch condition"]; - } - 240 [label="Enter when branch result"]; - subgraph cluster_59 { - color=blue - 241 [label="Enter block"]; - 242 [label="Postponed enter to lambda"]; - subgraph cluster_60 { - color=blue - 243 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_61 { - color=blue - 244 [label="Enter block"]; - 245 [label="Access variable R|/x|"]; - 246 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 247 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 248 [label="Exit block"]; - } - 249 [label="Exit function " style="filled" fillcolor=red]; - } - 250 [label="Postponed exit from lambda"]; - 251 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 252 [label="Exit block"]; - } - 253 [label="Exit when branch result"]; - 254 [label="Enter when branch result"]; - subgraph cluster_62 { - color=blue - 255 [label="Enter block"]; - 256 [label="Postponed enter to lambda"]; - subgraph cluster_63 { - color=blue - 257 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_64 { - color=blue - 258 [label="Enter block"]; - 259 [label="Access variable R|/x|"]; - 260 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 261 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 262 [label="Exit block"]; - } - 263 [label="Exit function " style="filled" fillcolor=red]; - } - 264 [label="Postponed exit from lambda"]; - 265 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 266 [label="Exit block"]; - } - 267 [label="Exit when branch result"]; - 268 [label="Exit when"]; - } - 269 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 270 [label="Const: Int(1)"]; - 271 [label="Postponed enter to lambda"]; - subgraph cluster_65 { - color=blue - 272 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_66 { - color=blue - 273 [label="Enter block"]; - 274 [label="Access variable R|/x|"]; - 275 [label="Access variable R|kotlin/String.length#|"]; - 276 [label="Const: Int(123)"]; - 277 [label="Exit block"]; - } - 278 [label="Exit function " style="filled" fillcolor=red]; - } - 279 [label="Postponed exit from lambda"]; - 280 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 281 [label="Merge postponed lambda exits"]; - 282 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 283 [label="Access variable R|/x|"]; - 284 [label="Access variable R|kotlin/String.length#|"]; - 285 [label="Exit block"]; - } - 286 [label="Exit function test6" style="filled" fillcolor=red]; - } + 231 -> {232}; 232 -> {233}; 233 -> {234}; - 234 -> {235}; - 235 -> {236}; - 236 -> {237}; - 237 -> {238 254}; - 238 -> {239}; - 239 -> {240}; + 234 -> {236}; + 235 -> {237}; + 236 -> {237} [color=green]; + 236 -> {240} [color=red]; + 237 -> {238}; + 238 -> {240}; + 239 -> {240} [color=red]; 240 -> {241}; 241 -> {242}; - 242 -> {243 251}; - 242 -> {250} [style=dotted]; - 242 -> {243} [style=dashed]; + 242 -> {243}; 243 -> {244}; 244 -> {245}; 245 -> {246}; 246 -> {247}; - 247 -> {248}; + + subgraph cluster_71 { + color=red + 248 [label="Enter function test5" style="filled" fillcolor=red]; + subgraph cluster_72 { + color=blue + 249 [label="Enter block"]; + subgraph cluster_73 { + color=blue + 250 [label="Function call arguments enter"]; + 251 [label="Access variable R|/y|"]; + 252 [label="Enter safe call"]; + subgraph cluster_74 { + color=blue + 253 [label="Function call arguments enter"]; + 254 [label="Postponed enter to lambda"]; + subgraph cluster_75 { + color=blue + 255 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_76 { + color=blue + 256 [label="Enter block"]; + 257 [label="Access variable R|/x|"]; + 258 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + subgraph cluster_77 { + color=blue + 259 [label="Function call arguments enter"]; + 260 [label="Function call arguments exit"]; + } + 261 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 262 [label="Exit block"]; + } + 263 [label="Exit function " style="filled" fillcolor=red]; + } + 264 [label="Function call arguments exit"]; + } + 265 [label="Postponed exit from lambda"]; + 266 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 267 [label="Exit safe call"]; + 268 [label="Const: Int(1)"]; + subgraph cluster_78 { + color=blue + 269 [label="Function call arguments enter"]; + 270 [label="Postponed enter to lambda"]; + subgraph cluster_79 { + color=blue + 271 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_80 { + color=blue + 272 [label="Enter block"]; + 273 [label="Const: String()"]; + 274 [label="Exit block"]; + } + 275 [label="Exit function " style="filled" fillcolor=red]; + } + 276 [label="Function call arguments exit"]; + } + 277 [label="Postponed exit from lambda"]; + 278 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 279 [label="Function call arguments exit"]; + } + 280 [label="Merge postponed lambda exits"]; + 281 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 282 [label="Access variable R|/x|"]; + 283 [label="Access variable R|kotlin/String.length#|"]; + 284 [label="Exit block"]; + } + 285 [label="Exit function test5" style="filled" fillcolor=red]; + } 248 -> {249}; 249 -> {250}; - 250 -> {251} [color=green]; - 250 -> {281} [color=red]; - 251 -> {252}; + 250 -> {251}; + 251 -> {252 267}; 252 -> {253}; - 253 -> {268}; - 254 -> {255}; + 253 -> {254}; + 254 -> {255 264}; + 254 -> {265} [style=dotted]; + 254 -> {255} [style=dashed]; 255 -> {256}; - 256 -> {257 265}; - 256 -> {264} [style=dotted]; - 256 -> {257} [style=dashed]; + 256 -> {257}; 257 -> {258}; 258 -> {259}; 259 -> {260}; 260 -> {261}; 261 -> {262}; 262 -> {263}; - 263 -> {264}; - 264 -> {265} [color=green]; - 264 -> {281} [color=red]; - 265 -> {266}; + 263 -> {265}; + 264 -> {266}; + 265 -> {266} [color=green]; + 265 -> {280} [color=red]; 266 -> {267}; - 267 -> {268}; - 268 -> {269 281}; + 267 -> {268 280}; + 268 -> {269}; 269 -> {270}; - 270 -> {271}; - 271 -> {272 280}; - 271 -> {279} [style=dotted]; - 271 -> {272} [style=dashed]; + 270 -> {271 276}; + 270 -> {277} [style=dotted]; + 270 -> {271} [style=dashed]; + 271 -> {272}; 272 -> {273}; 273 -> {274}; 274 -> {275}; - 275 -> {276}; - 276 -> {277}; - 277 -> {278}; + 275 -> {277}; + 276 -> {278}; + 277 -> {278} [color=green]; + 277 -> {281} [color=red]; 278 -> {279}; - 279 -> {280} [color=green]; - 279 -> {282} [color=red]; - 280 -> {282}; - 281 -> {282} [color=red]; + 279 -> {281}; + 280 -> {281} [color=red]; + 281 -> {282}; 282 -> {283}; 283 -> {284}; 284 -> {285}; - 285 -> {286}; - subgraph cluster_67 { + subgraph cluster_81 { color=red - 287 [label="Enter function test7" style="filled" fillcolor=red]; - subgraph cluster_68 { + 286 [label="Enter function test6" style="filled" fillcolor=red]; + subgraph cluster_82 { color=blue - 288 [label="Enter block"]; - 289 [label="Access variable R|/x|"]; - 290 [label="Variable declaration: lvar p: R|kotlin/String?|"]; - subgraph cluster_69 { + 287 [label="Enter block"]; + subgraph cluster_83 { color=blue - 291 [label="Enter when"]; - subgraph cluster_70 { + 288 [label="Function call arguments enter"]; + subgraph cluster_84 { color=blue - 292 [label="Enter when branch condition "]; - 293 [label="Access variable R|/p|"]; - 294 [label="Const: Null(null)"]; - 295 [label="Equality operator !="]; - 296 [label="Exit when branch condition"]; + 289 [label="Function call arguments enter"]; + subgraph cluster_85 { + color=blue + 290 [label="Enter when"]; + subgraph cluster_86 { + color=blue + 291 [label="Enter when branch condition "]; + 292 [label="Const: Boolean(true)"]; + 293 [label="Exit when branch condition"]; + } + subgraph cluster_87 { + color=blue + 294 [label="Enter when branch condition else"]; + 295 [label="Exit when branch condition"]; + } + 296 [label="Enter when branch result"]; + subgraph cluster_88 { + color=blue + 297 [label="Enter block"]; + subgraph cluster_89 { + color=blue + 298 [label="Function call arguments enter"]; + 299 [label="Postponed enter to lambda"]; + subgraph cluster_90 { + color=blue + 300 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_91 { + color=blue + 301 [label="Enter block"]; + 302 [label="Access variable R|/x|"]; + 303 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + subgraph cluster_92 { + color=blue + 304 [label="Function call arguments enter"]; + 305 [label="Function call arguments exit"]; + } + 306 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 307 [label="Exit block"]; + } + 308 [label="Exit function " style="filled" fillcolor=red]; + } + 309 [label="Function call arguments exit"]; + } + 310 [label="Postponed exit from lambda"]; + 311 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 312 [label="Exit block"]; + } + 313 [label="Exit when branch result"]; + 314 [label="Enter when branch result"]; + subgraph cluster_93 { + color=blue + 315 [label="Enter block"]; + subgraph cluster_94 { + color=blue + 316 [label="Function call arguments enter"]; + 317 [label="Postponed enter to lambda"]; + subgraph cluster_95 { + color=blue + 318 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_96 { + color=blue + 319 [label="Enter block"]; + 320 [label="Access variable R|/x|"]; + 321 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + subgraph cluster_97 { + color=blue + 322 [label="Function call arguments enter"]; + 323 [label="Function call arguments exit"]; + } + 324 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 325 [label="Exit block"]; + } + 326 [label="Exit function " style="filled" fillcolor=red]; + } + 327 [label="Function call arguments exit"]; + } + 328 [label="Postponed exit from lambda"]; + 329 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 330 [label="Exit block"]; + } + 331 [label="Exit when branch result"]; + 332 [label="Exit when"]; + } + 333 [label="Function call arguments exit"]; } - 297 [label="Synthetic else branch"]; - 298 [label="Enter when branch result"]; - subgraph cluster_71 { + 334 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 335 [label="Const: Int(1)"]; + subgraph cluster_98 { color=blue - 299 [label="Enter block"]; - 300 [label="Postponed enter to lambda"]; - subgraph cluster_72 { + 336 [label="Function call arguments enter"]; + 337 [label="Postponed enter to lambda"]; + subgraph cluster_99 { color=blue - 301 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_73 { + 338 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_100 { color=blue - 302 [label="Enter block"]; - 303 [label="Const: Null(null)"]; - 304 [label="Assignment: R|/p|"]; - 305 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 306 [label="Exit block"]; + 339 [label="Enter block"]; + 340 [label="Access variable R|/x|"]; + 341 [label="Access variable R|kotlin/String.length#|"]; + 342 [label="Const: Int(123)"]; + 343 [label="Exit block"]; } - 307 [label="Exit function " style="filled" fillcolor=red]; + 344 [label="Exit function " style="filled" fillcolor=red]; } - 308 [label="Postponed exit from lambda"]; - 309 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 310 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 311 [label="Const: Int(1)"]; - 312 [label="Postponed enter to lambda"]; - subgraph cluster_74 { - color=blue - 313 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_75 { - color=blue - 314 [label="Enter block"]; - 315 [label="Access variable R|/p|"]; - 316 [label="Smart cast: R|/p|"]; - 317 [label="Access variable R|kotlin/String.length#|"]; - 318 [label="Const: Int(123)"]; - 319 [label="Exit block"]; - } - 320 [label="Exit function " style="filled" fillcolor=red]; - } - 321 [label="Postponed exit from lambda"]; - 322 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 323 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 324 [label="Access variable R|/p|"]; - 325 [label="Smart cast: R|/p|"]; - 326 [label="Access variable R|kotlin/String.length#|"]; - 327 [label="Exit block"]; + 345 [label="Function call arguments exit"]; } - 328 [label="Exit when branch result"]; - 329 [label="Exit when"]; + 346 [label="Postponed exit from lambda"]; + 347 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 348 [label="Function call arguments exit"]; } - 330 [label="Exit block"]; + 349 [label="Merge postponed lambda exits"]; + 350 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 351 [label="Access variable R|/x|"]; + 352 [label="Access variable R|kotlin/String.length#|"]; + 353 [label="Exit block"]; } - 331 [label="Exit function test7" style="filled" fillcolor=red]; + 354 [label="Exit function test6" style="filled" fillcolor=red]; } + 286 -> {287}; 287 -> {288}; 288 -> {289}; 289 -> {290}; 290 -> {291}; 291 -> {292}; 292 -> {293}; - 293 -> {294}; + 293 -> {294 314}; 294 -> {295}; 295 -> {296}; - 296 -> {297 298}; - 297 -> {329}; + 296 -> {297}; + 297 -> {298}; 298 -> {299}; - 299 -> {300}; - 300 -> {301 309}; - 300 -> {308} [style=dotted]; - 300 -> {301} [style=dashed]; + 299 -> {300 309}; + 299 -> {310} [style=dotted]; + 299 -> {300} [style=dashed]; + 300 -> {301}; 301 -> {302}; 302 -> {303}; 303 -> {304}; @@ -918,32 +1007,216 @@ digraph flowFromInplaceLambda2_kt { 305 -> {306}; 306 -> {307}; 307 -> {308}; - 308 -> {309} [color=green]; - 308 -> {323} [color=red]; - 309 -> {310}; - 310 -> {311}; + 308 -> {310}; + 309 -> {311}; + 310 -> {311} [color=green]; + 310 -> {349} [color=red]; 311 -> {312}; - 312 -> {313 322}; - 312 -> {321} [style=dotted]; - 312 -> {313} [style=dashed]; - 313 -> {314}; + 312 -> {313}; + 313 -> {332}; 314 -> {315}; 315 -> {316}; 316 -> {317}; - 317 -> {318}; + 317 -> {318 327}; + 317 -> {328} [style=dotted]; + 317 -> {318} [style=dashed]; 318 -> {319}; 319 -> {320}; 320 -> {321}; - 321 -> {322} [color=green]; - 321 -> {323} [color=red]; + 321 -> {322}; 322 -> {323}; 323 -> {324}; 324 -> {325}; 325 -> {326}; - 326 -> {327}; - 327 -> {328}; - 328 -> {329}; + 326 -> {328}; + 327 -> {329}; + 328 -> {329} [color=green]; + 328 -> {349} [color=red]; 329 -> {330}; 330 -> {331}; + 331 -> {332}; + 332 -> {333 349}; + 333 -> {334}; + 334 -> {335}; + 335 -> {336}; + 336 -> {337}; + 337 -> {338 345}; + 337 -> {346} [style=dotted]; + 337 -> {338} [style=dashed]; + 338 -> {339}; + 339 -> {340}; + 340 -> {341}; + 341 -> {342}; + 342 -> {343}; + 343 -> {344}; + 344 -> {346}; + 345 -> {347}; + 346 -> {347} [color=green]; + 346 -> {350} [color=red]; + 347 -> {348}; + 348 -> {350}; + 349 -> {350} [color=red]; + 350 -> {351}; + 351 -> {352}; + 352 -> {353}; + 353 -> {354}; + + subgraph cluster_101 { + color=red + 355 [label="Enter function test7" style="filled" fillcolor=red]; + subgraph cluster_102 { + color=blue + 356 [label="Enter block"]; + 357 [label="Access variable R|/x|"]; + 358 [label="Variable declaration: lvar p: R|kotlin/String?|"]; + subgraph cluster_103 { + color=blue + 359 [label="Enter when"]; + subgraph cluster_104 { + color=blue + 360 [label="Enter when branch condition "]; + 361 [label="Access variable R|/p|"]; + 362 [label="Const: Null(null)"]; + 363 [label="Equality operator !="]; + 364 [label="Exit when branch condition"]; + } + 365 [label="Synthetic else branch"]; + 366 [label="Enter when branch result"]; + subgraph cluster_105 { + color=blue + 367 [label="Enter block"]; + subgraph cluster_106 { + color=blue + 368 [label="Function call arguments enter"]; + subgraph cluster_107 { + color=blue + 369 [label="Function call arguments enter"]; + subgraph cluster_108 { + color=blue + 370 [label="Function call arguments enter"]; + 371 [label="Postponed enter to lambda"]; + subgraph cluster_109 { + color=blue + 372 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_110 { + color=blue + 373 [label="Enter block"]; + 374 [label="Const: Null(null)"]; + 375 [label="Assignment: R|/p|"]; + subgraph cluster_111 { + color=blue + 376 [label="Function call arguments enter"]; + 377 [label="Function call arguments exit"]; + } + 378 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 379 [label="Exit block"]; + } + 380 [label="Exit function " style="filled" fillcolor=red]; + } + 381 [label="Function call arguments exit"]; + } + 382 [label="Postponed exit from lambda"]; + 383 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 384 [label="Function call arguments exit"]; + } + 385 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 386 [label="Const: Int(1)"]; + subgraph cluster_112 { + color=blue + 387 [label="Function call arguments enter"]; + 388 [label="Postponed enter to lambda"]; + subgraph cluster_113 { + color=blue + 389 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_114 { + color=blue + 390 [label="Enter block"]; + 391 [label="Access variable R|/p|"]; + 392 [label="Smart cast: R|/p|"]; + 393 [label="Access variable R|kotlin/String.length#|"]; + 394 [label="Const: Int(123)"]; + 395 [label="Exit block"]; + } + 396 [label="Exit function " style="filled" fillcolor=red]; + } + 397 [label="Function call arguments exit"]; + } + 398 [label="Postponed exit from lambda"]; + 399 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 400 [label="Function call arguments exit"]; + } + 401 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 402 [label="Access variable R|/p|"]; + 403 [label="Smart cast: R|/p|"]; + 404 [label="Access variable R|kotlin/String.length#|"]; + 405 [label="Exit block"]; + } + 406 [label="Exit when branch result"]; + 407 [label="Exit when"]; + } + 408 [label="Exit block"]; + } + 409 [label="Exit function test7" style="filled" fillcolor=red]; + } + 355 -> {356}; + 356 -> {357}; + 357 -> {358}; + 358 -> {359}; + 359 -> {360}; + 360 -> {361}; + 361 -> {362}; + 362 -> {363}; + 363 -> {364}; + 364 -> {365 366}; + 365 -> {407}; + 366 -> {367}; + 367 -> {368}; + 368 -> {369}; + 369 -> {370}; + 370 -> {371}; + 371 -> {372 381}; + 371 -> {382} [style=dotted]; + 371 -> {372} [style=dashed]; + 372 -> {373}; + 373 -> {374}; + 374 -> {375}; + 375 -> {376}; + 376 -> {377}; + 377 -> {378}; + 378 -> {379}; + 379 -> {380}; + 380 -> {382}; + 381 -> {383}; + 382 -> {383} [color=green]; + 382 -> {401} [color=red]; + 383 -> {384}; + 384 -> {385}; + 385 -> {386}; + 386 -> {387}; + 387 -> {388}; + 388 -> {389 397}; + 388 -> {398} [style=dotted]; + 388 -> {389} [style=dashed]; + 389 -> {390}; + 390 -> {391}; + 391 -> {392}; + 392 -> {393}; + 393 -> {394}; + 394 -> {395}; + 395 -> {396}; + 396 -> {398}; + 397 -> {399}; + 398 -> {399} [color=green]; + 398 -> {401} [color=red]; + 399 -> {400}; + 400 -> {401}; + 401 -> {402}; + 402 -> {403}; + 403 -> {404}; + 404 -> {405}; + 405 -> {406}; + 406 -> {407}; + 407 -> {408}; + 408 -> {409}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot index d39c99907bd..66fb7c6cfe3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot @@ -21,10 +21,15 @@ digraph flowFromInplaceLambda3_kt { 4 [label="Enter block"]; 5 [label="Exit block"]; } - 6 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 7 [label="Exit block"]; + subgraph cluster_4 { + color=blue + 6 [label="Function call arguments enter"]; + 7 [label="Function call arguments exit"]; + } + 8 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 9 [label="Exit block"]; } - 8 [label="Exit function unknown" style="filled" fillcolor=red]; + 10 [label="Exit function unknown" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -32,68 +37,63 @@ digraph flowFromInplaceLambda3_kt { 5 -> {6}; 6 -> {7}; 7 -> {8}; - - subgraph cluster_4 { - color=red - 9 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 10 [label="Enter block"]; - subgraph cluster_6 { - color=blue - 11 [label="Enter block"]; - 12 [label="Exit block"]; - } - 13 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; - } - 15 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; - } + 8 -> {9}; 9 -> {10}; - 10 -> {11}; + + subgraph cluster_5 { + color=red + 11 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 12 [label="Enter block"]; + subgraph cluster_7 { + color=blue + 13 [label="Enter block"]; + 14 [label="Exit block"]; + } + subgraph cluster_8 { + color=blue + 15 [label="Function call arguments enter"]; + 16 [label="Function call arguments exit"]; + } + 17 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 18 [label="Exit block"]; + } + 19 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; + } 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - - subgraph cluster_7 { - color=red - 16 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 17 [label="Enter block"]; - subgraph cluster_9 { - color=blue - 18 [label="Enter block"]; - 19 [label="Exit block"]; - } - 20 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 21 [label="Exit block"]; - } - 22 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; - } + 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20}; - 20 -> {21}; - 21 -> {22}; - subgraph cluster_10 { + subgraph cluster_9 { color=red - 23 [label="Enter function atMostOnce" style="filled" fillcolor=red]; - subgraph cluster_11 { + 20 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 24 [label="Enter block"]; + 21 [label="Enter block"]; + subgraph cluster_11 { + color=blue + 22 [label="Enter block"]; + 23 [label="Exit block"]; + } subgraph cluster_12 { color=blue - 25 [label="Enter block"]; - 26 [label="Exit block"]; + 24 [label="Function call arguments enter"]; + 25 [label="Function call arguments exit"]; } + 26 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; 27 [label="Exit block"]; } - 28 [label="Exit function atMostOnce" style="filled" fillcolor=red]; + 28 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; } + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; @@ -102,102 +102,93 @@ digraph flowFromInplaceLambda3_kt { subgraph cluster_13 { color=red - 29 [label="Enter function test1" style="filled" fillcolor=red]; + 29 [label="Enter function atMostOnce" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue 30 [label="Enter block"]; - 31 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 32 [label="Const: String()"]; - 33 [label="Assignment: R|/x|"]; - 34 [label="Access variable R|/x|"]; - 35 [label="Smart cast: R|/x|"]; - 36 [label="Access variable R|kotlin/String.length|"]; - 37 [label="Postponed enter to lambda"]; subgraph cluster_15 { color=blue - 38 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 39 [label="Enter block"]; - 40 [label="Const: Int(1)"]; - 41 [label="Assignment: R|/x|"]; - 42 [label="Exit block"]; - } - 43 [label="Exit function " style="filled" fillcolor=red]; + 31 [label="Enter block"]; + 32 [label="Exit block"]; } - 44 [label="Postponed exit from lambda"]; - 45 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 46 [label="Access variable R|/x|"]; - 47 [label="Smart cast: R|/x|"]; - 48 [label="Access variable #"]; - 49 [label="Access variable R|/x|"]; - 50 [label="Smart cast: R|/x|"]; - 51 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 52 [label="Exit block"]; + 33 [label="Exit block"]; } - 53 [label="Exit function test1" style="filled" fillcolor=red]; + 34 [label="Exit function atMostOnce" style="filled" fillcolor=red]; } 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {35}; + + subgraph cluster_16 { + color=red + 35 [label="Enter function test1" style="filled" fillcolor=red]; + subgraph cluster_17 { + color=blue + 36 [label="Enter block"]; + 37 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 38 [label="Const: String()"]; + 39 [label="Assignment: R|/x|"]; + 40 [label="Access variable R|/x|"]; + 41 [label="Smart cast: R|/x|"]; + 42 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_18 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Postponed enter to lambda"]; + subgraph cluster_19 { + color=blue + 45 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 46 [label="Enter block"]; + 47 [label="Const: Int(1)"]; + 48 [label="Assignment: R|/x|"]; + 49 [label="Exit block"]; + } + 50 [label="Exit function " style="filled" fillcolor=red]; + } + 51 [label="Function call arguments exit"]; + } + 52 [label="Postponed exit from lambda"]; + 53 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 54 [label="Access variable R|/x|"]; + 55 [label="Smart cast: R|/x|"]; + 56 [label="Access variable #"]; + subgraph cluster_21 { + color=blue + 57 [label="Function call arguments enter"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Smart cast: R|/x|"]; + 60 [label="Function call arguments exit"]; + } + 61 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 62 [label="Exit block"]; + } + 63 [label="Exit function test1" style="filled" fillcolor=red]; + } 35 -> {36}; 36 -> {37}; - 37 -> {38 44 45}; - 37 -> {38} [style=dashed]; + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45}; - 44 -> {37} [color=green style=dashed]; + 44 -> {45 51 52}; + 44 -> {45} [style=dashed]; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {51}; - 51 -> {52}; + 50 -> {52}; + 51 -> {53}; 52 -> {53}; - - subgraph cluster_17 { - color=red - 54 [label="Enter function test1m" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 55 [label="Enter block"]; - 56 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 57 [label="Const: String()"]; - 58 [label="Assignment: R|/x|"]; - 59 [label="Access variable R|/x|"]; - 60 [label="Smart cast: R|/x|"]; - 61 [label="Access variable R|kotlin/String.length|"]; - 62 [label="Postponed enter to lambda"]; - subgraph cluster_19 { - color=blue - 63 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_20 { - color=blue - 64 [label="Enter block"]; - 65 [label="Const: String()"]; - 66 [label="Assignment: R|/x|"]; - 67 [label="Exit block"]; - } - 68 [label="Exit function " style="filled" fillcolor=red]; - } - 69 [label="Postponed exit from lambda"]; - 70 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 71 [label="Access variable R|/x|"]; - 72 [label="Smart cast: R|/x|"]; - 73 [label="Access variable R|kotlin/String.length|"]; - 74 [label="Exit block"]; - } - 75 [label="Exit function test1m" style="filled" fillcolor=red]; - } + 52 -> {44} [color=green style=dashed]; + 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; @@ -206,142 +197,199 @@ digraph flowFromInplaceLambda3_kt { 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {63 69 70}; - 62 -> {63} [style=dashed]; - 63 -> {64}; + 62 -> {63}; + + subgraph cluster_22 { + color=red + 64 [label="Enter function test1m" style="filled" fillcolor=red]; + subgraph cluster_23 { + color=blue + 65 [label="Enter block"]; + 66 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 67 [label="Const: String()"]; + 68 [label="Assignment: R|/x|"]; + 69 [label="Access variable R|/x|"]; + 70 [label="Smart cast: R|/x|"]; + 71 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_24 { + color=blue + 72 [label="Function call arguments enter"]; + 73 [label="Postponed enter to lambda"]; + subgraph cluster_25 { + color=blue + 74 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 75 [label="Enter block"]; + 76 [label="Const: String()"]; + 77 [label="Assignment: R|/x|"]; + 78 [label="Exit block"]; + } + 79 [label="Exit function " style="filled" fillcolor=red]; + } + 80 [label="Function call arguments exit"]; + } + 81 [label="Postponed exit from lambda"]; + 82 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 83 [label="Access variable R|/x|"]; + 84 [label="Smart cast: R|/x|"]; + 85 [label="Access variable R|kotlin/String.length|"]; + 86 [label="Exit block"]; + } + 87 [label="Exit function test1m" style="filled" fillcolor=red]; + } 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 69 -> {62} [color=green style=dashed]; 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {74}; + 73 -> {74 80 81}; + 73 -> {74} [style=dashed]; 74 -> {75}; - - subgraph cluster_21 { - color=red - 76 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 77 [label="Enter block"]; - 78 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 79 [label="Const: String()"]; - 80 [label="Assignment: R|/x|"]; - 81 [label="Access variable R|/x|"]; - 82 [label="Smart cast: R|/x|"]; - 83 [label="Access variable R|kotlin/String.length|"]; - 84 [label="Postponed enter to lambda"]; - subgraph cluster_23 { - color=blue - 85 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 86 [label="Enter block"]; - 87 [label="Const: Int(1)"]; - 88 [label="Assignment: R|/x|"]; - 89 [label="Exit block"]; - } - 90 [label="Exit function " style="filled" fillcolor=red]; - } - 91 [label="Postponed exit from lambda"]; - 92 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 93 [label="Access variable R|/x|"]; - 94 [label="Smart cast: R|/x|"]; - 95 [label="Access variable #"]; - 96 [label="Access variable R|/x|"]; - 97 [label="Smart cast: R|/x|"]; - 98 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 99 [label="Exit block"]; - } - 100 [label="Exit function test2" style="filled" fillcolor=red]; - } + 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {80}; - 80 -> {81}; + 79 -> {81}; + 80 -> {82}; 81 -> {82}; + 81 -> {73} [color=green style=dashed]; 82 -> {83}; 83 -> {84}; - 84 -> {85 92}; - 84 -> {91} [style=dotted]; - 84 -> {85} [style=dashed]; + 84 -> {85}; 85 -> {86}; 86 -> {87}; - 87 -> {88}; + + subgraph cluster_27 { + color=red + 88 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 89 [label="Enter block"]; + 90 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 91 [label="Const: String()"]; + 92 [label="Assignment: R|/x|"]; + 93 [label="Access variable R|/x|"]; + 94 [label="Smart cast: R|/x|"]; + 95 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_29 { + color=blue + 96 [label="Function call arguments enter"]; + 97 [label="Postponed enter to lambda"]; + subgraph cluster_30 { + color=blue + 98 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 99 [label="Enter block"]; + 100 [label="Const: Int(1)"]; + 101 [label="Assignment: R|/x|"]; + 102 [label="Exit block"]; + } + 103 [label="Exit function " style="filled" fillcolor=red]; + } + 104 [label="Function call arguments exit"]; + } + 105 [label="Postponed exit from lambda"]; + 106 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 107 [label="Access variable R|/x|"]; + 108 [label="Smart cast: R|/x|"]; + 109 [label="Access variable #"]; + subgraph cluster_32 { + color=blue + 110 [label="Function call arguments enter"]; + 111 [label="Access variable R|/x|"]; + 112 [label="Smart cast: R|/x|"]; + 113 [label="Function call arguments exit"]; + } + 114 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 115 [label="Exit block"]; + } + 116 [label="Exit function test2" style="filled" fillcolor=red]; + } 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; - 91 -> {84} [color=green style=dashed]; 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; 96 -> {97}; - 97 -> {98}; + 97 -> {98 104}; + 97 -> {105} [style=dotted]; + 97 -> {98} [style=dashed]; 98 -> {99}; 99 -> {100}; - - subgraph cluster_25 { - color=red - 101 [label="Enter function test3" style="filled" fillcolor=red]; - subgraph cluster_26 { - color=blue - 102 [label="Enter block"]; - 103 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 104 [label="Const: String()"]; - 105 [label="Assignment: R|/x|"]; - 106 [label="Access variable R|/x|"]; - 107 [label="Smart cast: R|/x|"]; - 108 [label="Access variable R|kotlin/String.length|"]; - 109 [label="Postponed enter to lambda"]; - subgraph cluster_27 { - color=blue - 110 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 111 [label="Enter block"]; - 112 [label="Const: Int(1)"]; - 113 [label="Assignment: R|/x|"]; - 114 [label="Exit block"]; - } - 115 [label="Exit function " style="filled" fillcolor=red]; - } - 116 [label="Postponed exit from lambda"]; - 117 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 118 [label="Access variable R|/x|"]; - 119 [label="Smart cast: R|/x|"]; - 120 [label="Access variable #"]; - 121 [label="Access variable R|/x|"]; - 122 [label="Smart cast: R|/x|"]; - 123 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 124 [label="Exit block"]; - } - 125 [label="Exit function test3" style="filled" fillcolor=red]; - } + 100 -> {101}; 101 -> {102}; 102 -> {103}; - 103 -> {104}; - 104 -> {105}; + 103 -> {105}; + 104 -> {106}; 105 -> {106}; + 105 -> {97} [color=green style=dashed]; 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {110 117}; - 109 -> {116} [style=dotted]; - 109 -> {110} [style=dashed]; + 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; - 116 -> {117}; + + subgraph cluster_33 { + color=red + 117 [label="Enter function test3" style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 118 [label="Enter block"]; + 119 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 120 [label="Const: String()"]; + 121 [label="Assignment: R|/x|"]; + 122 [label="Access variable R|/x|"]; + 123 [label="Smart cast: R|/x|"]; + 124 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_35 { + color=blue + 125 [label="Function call arguments enter"]; + 126 [label="Postponed enter to lambda"]; + subgraph cluster_36 { + color=blue + 127 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_37 { + color=blue + 128 [label="Enter block"]; + 129 [label="Const: Int(1)"]; + 130 [label="Assignment: R|/x|"]; + 131 [label="Exit block"]; + } + 132 [label="Exit function " style="filled" fillcolor=red]; + } + 133 [label="Function call arguments exit"]; + } + 134 [label="Postponed exit from lambda"]; + 135 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 136 [label="Access variable R|/x|"]; + 137 [label="Smart cast: R|/x|"]; + 138 [label="Access variable #"]; + subgraph cluster_38 { + color=blue + 139 [label="Function call arguments enter"]; + 140 [label="Access variable R|/x|"]; + 141 [label="Smart cast: R|/x|"]; + 142 [label="Function call arguments exit"]; + } + 143 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 144 [label="Exit block"]; + } + 145 [label="Exit function test3" style="filled" fillcolor=red]; + } 117 -> {118}; 118 -> {119}; 119 -> {120}; @@ -350,54 +398,18 @@ digraph flowFromInplaceLambda3_kt { 122 -> {123}; 123 -> {124}; 124 -> {125}; - - subgraph cluster_29 { - color=red - 126 [label="Enter function test4" style="filled" fillcolor=red]; - subgraph cluster_30 { - color=blue - 127 [label="Enter block"]; - 128 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 129 [label="Const: String()"]; - 130 [label="Assignment: R|/x|"]; - 131 [label="Access variable R|/x|"]; - 132 [label="Smart cast: R|/x|"]; - 133 [label="Access variable R|kotlin/String.length|"]; - 134 [label="Postponed enter to lambda"]; - subgraph cluster_31 { - color=blue - 135 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 136 [label="Enter block"]; - 137 [label="Const: Int(1)"]; - 138 [label="Assignment: R|/x|"]; - 139 [label="Exit block"]; - } - 140 [label="Exit function " style="filled" fillcolor=red]; - } - 141 [label="Postponed exit from lambda"]; - 142 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 143 [label="Access variable R|/x|"]; - 144 [label="Smart cast: R|/x|"]; - 145 [label="Access variable #"]; - 146 [label="Access variable R|/x|"]; - 147 [label="Smart cast: R|/x|"]; - 148 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 149 [label="Exit block"]; - } - 150 [label="Exit function test4" style="filled" fillcolor=red]; - } - 126 -> {127}; + 125 -> {126}; + 126 -> {127 133}; + 126 -> {134} [style=dotted]; + 126 -> {127} [style=dashed]; 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; - 132 -> {133}; - 133 -> {134}; - 134 -> {135 141 142}; - 134 -> {135} [style=dashed]; + 132 -> {134}; + 133 -> {135}; + 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; @@ -408,10 +420,82 @@ digraph flowFromInplaceLambda3_kt { 142 -> {143}; 143 -> {144}; 144 -> {145}; - 145 -> {146}; + + subgraph cluster_39 { + color=red + 146 [label="Enter function test4" style="filled" fillcolor=red]; + subgraph cluster_40 { + color=blue + 147 [label="Enter block"]; + 148 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 149 [label="Const: String()"]; + 150 [label="Assignment: R|/x|"]; + 151 [label="Access variable R|/x|"]; + 152 [label="Smart cast: R|/x|"]; + 153 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_41 { + color=blue + 154 [label="Function call arguments enter"]; + 155 [label="Postponed enter to lambda"]; + subgraph cluster_42 { + color=blue + 156 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_43 { + color=blue + 157 [label="Enter block"]; + 158 [label="Const: Int(1)"]; + 159 [label="Assignment: R|/x|"]; + 160 [label="Exit block"]; + } + 161 [label="Exit function " style="filled" fillcolor=red]; + } + 162 [label="Function call arguments exit"]; + } + 163 [label="Postponed exit from lambda"]; + 164 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 165 [label="Access variable R|/x|"]; + 166 [label="Smart cast: R|/x|"]; + 167 [label="Access variable #"]; + subgraph cluster_44 { + color=blue + 168 [label="Function call arguments enter"]; + 169 [label="Access variable R|/x|"]; + 170 [label="Smart cast: R|/x|"]; + 171 [label="Function call arguments exit"]; + } + 172 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 173 [label="Exit block"]; + } + 174 [label="Exit function test4" style="filled" fillcolor=red]; + } 146 -> {147}; 147 -> {148}; 148 -> {149}; 149 -> {150}; + 150 -> {151}; + 151 -> {152}; + 152 -> {153}; + 153 -> {154}; + 154 -> {155}; + 155 -> {156 162 163}; + 155 -> {156} [style=dashed]; + 156 -> {157}; + 157 -> {158}; + 158 -> {159}; + 159 -> {160}; + 160 -> {161}; + 161 -> {163}; + 162 -> {164}; + 163 -> {164}; + 164 -> {165}; + 165 -> {166}; + 166 -> {167}; + 167 -> {168}; + 168 -> {169}; + 169 -> {170}; + 170 -> {171}; + 171 -> {172}; + 172 -> {173}; + 173 -> {174}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot index c872529bdc8..8b4c9ec9bd5 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot @@ -42,11 +42,21 @@ digraph flowFromTwoInplaceLambdas_kt { 11 [label="Enter block"]; 12 [label="Exit block"]; } - 13 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 14 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 15 [label="Exit block"]; + subgraph cluster_6 { + color=blue + 13 [label="Function call arguments enter"]; + 14 [label="Function call arguments exit"]; + } + 15 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + subgraph cluster_7 { + color=blue + 16 [label="Function call arguments enter"]; + 17 [label="Function call arguments exit"]; + } + 18 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 19 [label="Exit block"]; } - 16 [label="Exit function run2" style="filled" fillcolor=red]; + 20 [label="Exit function run2" style="filled" fillcolor=red]; } 9 -> {10}; 10 -> {11}; @@ -55,183 +65,126 @@ digraph flowFromTwoInplaceLambdas_kt { 13 -> {14}; 14 -> {15}; 15 -> {16}; - - subgraph cluster_6 { - color=red - 17 [label="Enter function test1" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 18 [label="Enter block"]; - 19 [label="Access variable R|/x|"]; - 20 [label="Variable declaration: lvar p: R|kotlin/String?|"]; - subgraph cluster_8 { - color=blue - 21 [label="Enter when"]; - subgraph cluster_9 { - color=blue - 22 [label="Enter when branch condition "]; - 23 [label="Access variable R|/p|"]; - 24 [label="Const: Null(null)"]; - 25 [label="Equality operator !="]; - 26 [label="Exit when branch condition"]; - } - 27 [label="Synthetic else branch"]; - 28 [label="Enter when branch result"]; - subgraph cluster_10 { - color=blue - 29 [label="Enter block"]; - 30 [label="Postponed enter to lambda"]; - subgraph cluster_11 { - color=blue - 31 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 32 [label="Enter block"]; - 33 [label="Access variable R|/p|"]; - 34 [label="Smart cast: R|/p|"]; - 35 [label="Access variable R|kotlin/String.length#|"]; - 36 [label="Const: Int(123)"]; - 37 [label="Exit block"]; - } - 38 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_13 { - color=blue - 39 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 40 [label="Enter block"]; - 41 [label="Const: Null(null)"]; - 42 [label="Assignment: R|/p|"]; - 43 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 44 [label="Exit block"]; - } - 45 [label="Exit function " style="filled" fillcolor=red]; - } - 46 [label="Postponed exit from lambda"]; - 47 [label="Postponed exit from lambda"]; - 48 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 49 [label="Access variable R|/p|"]; - 50 [label="Smart cast: R|/p|"]; - 51 [label="Access variable R|kotlin/String.length#|"]; - 52 [label="Exit block"]; - } - 53 [label="Exit when branch result"]; - 54 [label="Exit when"]; - } - 55 [label="Exit block"]; - } - 56 [label="Exit function test1" style="filled" fillcolor=red]; - } + 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21}; + + subgraph cluster_8 { + color=red + 21 [label="Enter function test1" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 22 [label="Enter block"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Variable declaration: lvar p: R|kotlin/String?|"]; + subgraph cluster_10 { + color=blue + 25 [label="Enter when"]; + subgraph cluster_11 { + color=blue + 26 [label="Enter when branch condition "]; + 27 [label="Access variable R|/p|"]; + 28 [label="Const: Null(null)"]; + 29 [label="Equality operator !="]; + 30 [label="Exit when branch condition"]; + } + 31 [label="Synthetic else branch"]; + 32 [label="Enter when branch result"]; + subgraph cluster_12 { + color=blue + 33 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 34 [label="Function call arguments enter"]; + 35 [label="Postponed enter to lambda"]; + subgraph cluster_14 { + color=blue + 36 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 37 [label="Enter block"]; + 38 [label="Access variable R|/p|"]; + 39 [label="Smart cast: R|/p|"]; + 40 [label="Access variable R|kotlin/String.length#|"]; + 41 [label="Const: Int(123)"]; + 42 [label="Exit block"]; + } + 43 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_16 { + color=blue + 44 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_17 { + color=blue + 45 [label="Enter block"]; + 46 [label="Const: Null(null)"]; + 47 [label="Assignment: R|/p|"]; + subgraph cluster_18 { + color=blue + 48 [label="Function call arguments enter"]; + 49 [label="Function call arguments exit"]; + } + 50 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 51 [label="Exit block"]; + } + 52 [label="Exit function " style="filled" fillcolor=red]; + } + 53 [label="Function call arguments exit"]; + } + 54 [label="Postponed exit from lambda"]; + 55 [label="Postponed exit from lambda"]; + 56 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 57 [label="Access variable R|/p|"]; + 58 [label="Smart cast: R|/p|"]; + 59 [label="Access variable R|kotlin/String.length#|"]; + 60 [label="Exit block"]; + } + 61 [label="Exit when branch result"]; + 62 [label="Exit when"]; + } + 63 [label="Exit block"]; + } + 64 [label="Exit function test1" style="filled" fillcolor=red]; + } 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {27 28}; - 27 -> {54}; + 26 -> {27}; + 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31 39 48}; - 30 -> {46 47} [style=dotted]; - 30 -> {31 39} [style=dashed]; - 31 -> {32}; + 30 -> {31 32}; + 31 -> {62}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {36 44 53}; + 35 -> {54 55} [style=dotted]; + 35 -> {36 44} [style=dashed]; 36 -> {37}; 37 -> {38}; - 38 -> {46}; + 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {44}; + 43 -> {54}; 44 -> {45}; - 45 -> {47}; - 46 -> {48}; + 45 -> {46}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {53}; - 53 -> {54}; - 54 -> {55}; + 52 -> {55}; + 53 -> {56}; + 54 -> {56}; 55 -> {56}; - - subgraph cluster_15 { - color=red - 57 [label="Enter function test1_tail" style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 58 [label="Enter block"]; - 59 [label="Access variable R|/x|"]; - 60 [label="Variable declaration: lvar p: R|kotlin/String?|"]; - subgraph cluster_17 { - color=blue - 61 [label="Enter when"]; - subgraph cluster_18 { - color=blue - 62 [label="Enter when branch condition "]; - 63 [label="Access variable R|/p|"]; - 64 [label="Const: Null(null)"]; - 65 [label="Equality operator !="]; - 66 [label="Exit when branch condition"]; - } - 67 [label="Synthetic else branch"]; - 68 [label="Enter when branch result"]; - subgraph cluster_19 { - color=blue - 69 [label="Enter block"]; - 70 [label="Postponed enter to lambda"]; - subgraph cluster_20 { - color=blue - 71 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 72 [label="Enter block"]; - 73 [label="Access variable R|/p|"]; - 74 [label="Smart cast: R|/p|"]; - 75 [label="Access variable R|kotlin/String.length#|"]; - 76 [label="Const: Int(123)"]; - 77 [label="Exit block"]; - } - 78 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_22 { - color=blue - 79 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 80 [label="Enter block"]; - 81 [label="Const: Null(null)"]; - 82 [label="Assignment: R|/p|"]; - 83 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 84 [label="Exit block"]; - } - 85 [label="Exit function " style="filled" fillcolor=red]; - } - 86 [label="Postponed exit from lambda"]; - 87 [label="Postponed exit from lambda"]; - 88 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 89 [label="Access variable R|/p|"]; - 90 [label="Smart cast: R|/p|"]; - 91 [label="Access variable R|kotlin/String.length#|"]; - 92 [label="Exit block"]; - } - 93 [label="Exit when branch result"]; - 94 [label="Exit when"]; - } - 95 [label="Exit block"]; - } - 96 [label="Exit function test1_tail" style="filled" fillcolor=red]; - } + 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; @@ -239,32 +192,109 @@ digraph flowFromTwoInplaceLambdas_kt { 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {65}; + + subgraph cluster_19 { + color=red + 65 [label="Enter function test1_tail" style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 66 [label="Enter block"]; + 67 [label="Access variable R|/x|"]; + 68 [label="Variable declaration: lvar p: R|kotlin/String?|"]; + subgraph cluster_21 { + color=blue + 69 [label="Enter when"]; + subgraph cluster_22 { + color=blue + 70 [label="Enter when branch condition "]; + 71 [label="Access variable R|/p|"]; + 72 [label="Const: Null(null)"]; + 73 [label="Equality operator !="]; + 74 [label="Exit when branch condition"]; + } + 75 [label="Synthetic else branch"]; + 76 [label="Enter when branch result"]; + subgraph cluster_23 { + color=blue + 77 [label="Enter block"]; + subgraph cluster_24 { + color=blue + 78 [label="Function call arguments enter"]; + 79 [label="Postponed enter to lambda"]; + subgraph cluster_25 { + color=blue + 80 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 81 [label="Enter block"]; + 82 [label="Access variable R|/p|"]; + 83 [label="Smart cast: R|/p|"]; + 84 [label="Access variable R|kotlin/String.length#|"]; + 85 [label="Const: Int(123)"]; + 86 [label="Exit block"]; + } + 87 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_27 { + color=blue + 88 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 89 [label="Enter block"]; + 90 [label="Const: Null(null)"]; + 91 [label="Assignment: R|/p|"]; + subgraph cluster_29 { + color=blue + 92 [label="Function call arguments enter"]; + 93 [label="Function call arguments exit"]; + } + 94 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 95 [label="Exit block"]; + } + 96 [label="Exit function " style="filled" fillcolor=red]; + } + 97 [label="Function call arguments exit"]; + } + 98 [label="Postponed exit from lambda"]; + 99 [label="Postponed exit from lambda"]; + 100 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 101 [label="Access variable R|/p|"]; + 102 [label="Smart cast: R|/p|"]; + 103 [label="Access variable R|kotlin/String.length#|"]; + 104 [label="Exit block"]; + } + 105 [label="Exit when branch result"]; + 106 [label="Exit when"]; + } + 107 [label="Exit block"]; + } + 108 [label="Exit function test1_tail" style="filled" fillcolor=red]; + } 65 -> {66}; - 66 -> {67 68}; - 67 -> {94}; + 66 -> {67}; + 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71 79 88}; - 70 -> {86 87} [style=dotted]; - 70 -> {71 79} [style=dashed]; + 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; - 74 -> {75}; - 75 -> {76}; + 74 -> {75 76}; + 75 -> {106}; 76 -> {77}; 77 -> {78}; - 78 -> {86}; - 79 -> {80}; + 78 -> {79}; + 79 -> {80 88 97}; + 79 -> {98 99} [style=dotted]; + 79 -> {80 88} [style=dashed]; 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; - 85 -> {87}; - 86 -> {88}; - 87 -> {88}; + 85 -> {86}; + 86 -> {87}; + 87 -> {98}; 88 -> {89}; 89 -> {90}; 90 -> {91}; @@ -273,283 +303,313 @@ digraph flowFromTwoInplaceLambdas_kt { 93 -> {94}; 94 -> {95}; 95 -> {96}; - - subgraph cluster_24 { - color=red - 97 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 98 [label="Enter block"]; - 99 [label="Access variable R|/x|"]; - 100 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; - 101 [label="Access variable R|/p|"]; - 102 [label="Access variable #"]; - 103 [label="Postponed enter to lambda"]; - subgraph cluster_26 { - color=blue - 104 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 105 [label="Enter block"]; - 106 [label="Access variable R|/p|"]; - 107 [label="Type operator: (R|/p| as R|kotlin/String|)"]; - 108 [label="Const: Int(123)"]; - 109 [label="Exit block"]; - } - 110 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_28 { - color=blue - 111 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 112 [label="Enter block"]; - 113 [label="Const: Null(null)"]; - 114 [label="Assignment: R|/p|"]; - 115 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 116 [label="Exit block"]; - } - 117 [label="Exit function " style="filled" fillcolor=red]; - } - 118 [label="Postponed exit from lambda"]; - 119 [label="Postponed exit from lambda"]; - 120 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 121 [label="Access variable R|/p|"]; - 122 [label="Smart cast: R|/p|"]; - 123 [label="Access variable #"]; - 124 [label="Access variable R|/p|"]; - 125 [label="Smart cast: R|/p|"]; - 126 [label="Enter safe call"]; - 127 [label="Access variable #"]; - 128 [label="Exit safe call"]; - 129 [label="Exit block"]; - } - 130 [label="Exit function test2" style="filled" fillcolor=red]; - } - 97 -> {98}; - 98 -> {99}; + 96 -> {99}; + 97 -> {100}; + 98 -> {100}; 99 -> {100}; 100 -> {101}; 101 -> {102}; 102 -> {103}; - 103 -> {104 111 120}; - 103 -> {118 119} [style=dotted]; - 103 -> {104 111} [style=dashed]; + 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {109}; + + subgraph cluster_30 { + color=red + 109 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 110 [label="Enter block"]; + 111 [label="Access variable R|/x|"]; + 112 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; + 113 [label="Access variable R|/p|"]; + 114 [label="Access variable #"]; + subgraph cluster_32 { + color=blue + 115 [label="Function call arguments enter"]; + 116 [label="Postponed enter to lambda"]; + subgraph cluster_33 { + color=blue + 117 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 118 [label="Enter block"]; + 119 [label="Access variable R|/p|"]; + 120 [label="Type operator: (R|/p| as R|kotlin/String|)"]; + 121 [label="Const: Int(123)"]; + 122 [label="Exit block"]; + } + 123 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_35 { + color=blue + 124 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_36 { + color=blue + 125 [label="Enter block"]; + 126 [label="Const: Null(null)"]; + 127 [label="Assignment: R|/p|"]; + subgraph cluster_37 { + color=blue + 128 [label="Function call arguments enter"]; + 129 [label="Function call arguments exit"]; + } + 130 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 131 [label="Exit block"]; + } + 132 [label="Exit function " style="filled" fillcolor=red]; + } + 133 [label="Function call arguments exit"]; + } + 134 [label="Postponed exit from lambda"]; + 135 [label="Postponed exit from lambda"]; + 136 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 137 [label="Access variable R|/p|"]; + 138 [label="Smart cast: R|/p|"]; + 139 [label="Access variable #"]; + 140 [label="Access variable R|/p|"]; + 141 [label="Smart cast: R|/p|"]; + 142 [label="Enter safe call"]; + 143 [label="Access variable #"]; + 144 [label="Exit safe call"]; + 145 [label="Exit block"]; + } + 146 [label="Exit function test2" style="filled" fillcolor=red]; + } 109 -> {110}; - 110 -> {118}; + 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; - 116 -> {117}; - 117 -> {119}; - 118 -> {120}; + 116 -> {117 124 133}; + 116 -> {134 135} [style=dotted]; + 116 -> {117 124} [style=dashed]; + 117 -> {118}; + 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124}; + 123 -> {134}; 124 -> {125}; - 125 -> {126 128}; + 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; 129 -> {130}; - - subgraph cluster_30 { - color=red - 131 [label="Enter function test3" style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 132 [label="Enter block"]; - 133 [label="Access variable R|/x|"]; - 134 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; - 135 [label="Access variable R|/p|"]; - 136 [label="Access variable #"]; - 137 [label="Postponed enter to lambda"]; - subgraph cluster_32 { - color=blue - 138 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_33 { - color=blue - 139 [label="Enter block"]; - 140 [label="Const: String()"]; - 141 [label="Assignment: R|/p|"]; - 142 [label="Const: Int(123)"]; - 143 [label="Exit block"]; - } - 144 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_34 { - color=blue - 145 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_35 { - color=blue - 146 [label="Enter block"]; - 147 [label="Const: Null(null)"]; - 148 [label="Assignment: R|/p|"]; - 149 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 150 [label="Exit block"]; - } - 151 [label="Exit function " style="filled" fillcolor=red]; - } - 152 [label="Postponed exit from lambda"]; - 153 [label="Postponed exit from lambda"]; - 154 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 155 [label="Access variable R|/p|"]; - 156 [label="Smart cast: R|/p|"]; - 157 [label="Access variable R|kotlin/String.length#|"]; - 158 [label="Access variable R|/p|"]; - 159 [label="Smart cast: R|/p|"]; - 160 [label="Enter safe call"]; - 161 [label="Access variable R|kotlin/String.length|"]; - 162 [label="Exit safe call"]; - 163 [label="Exit block"]; - } - 164 [label="Exit function test3" style="filled" fillcolor=red]; - } + 130 -> {131}; 131 -> {132}; - 132 -> {133}; - 133 -> {134}; - 134 -> {135}; + 132 -> {135}; + 133 -> {136}; + 134 -> {136}; 135 -> {136}; 136 -> {137}; - 137 -> {138 145 154}; - 137 -> {152 153} [style=dotted]; - 137 -> {138 145} [style=dashed]; + 137 -> {138}; 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {142}; + 141 -> {142 144}; 142 -> {143}; 143 -> {144}; - 144 -> {152}; + 144 -> {145}; 145 -> {146}; - 146 -> {147}; + + subgraph cluster_38 { + color=red + 147 [label="Enter function test3" style="filled" fillcolor=red]; + subgraph cluster_39 { + color=blue + 148 [label="Enter block"]; + 149 [label="Access variable R|/x|"]; + 150 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; + 151 [label="Access variable R|/p|"]; + 152 [label="Access variable #"]; + subgraph cluster_40 { + color=blue + 153 [label="Function call arguments enter"]; + 154 [label="Postponed enter to lambda"]; + subgraph cluster_41 { + color=blue + 155 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_42 { + color=blue + 156 [label="Enter block"]; + 157 [label="Const: String()"]; + 158 [label="Assignment: R|/p|"]; + 159 [label="Const: Int(123)"]; + 160 [label="Exit block"]; + } + 161 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_43 { + color=blue + 162 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_44 { + color=blue + 163 [label="Enter block"]; + 164 [label="Const: Null(null)"]; + 165 [label="Assignment: R|/p|"]; + subgraph cluster_45 { + color=blue + 166 [label="Function call arguments enter"]; + 167 [label="Function call arguments exit"]; + } + 168 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 169 [label="Exit block"]; + } + 170 [label="Exit function " style="filled" fillcolor=red]; + } + 171 [label="Function call arguments exit"]; + } + 172 [label="Postponed exit from lambda"]; + 173 [label="Postponed exit from lambda"]; + 174 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 175 [label="Access variable R|/p|"]; + 176 [label="Smart cast: R|/p|"]; + 177 [label="Access variable R|kotlin/String.length#|"]; + 178 [label="Access variable R|/p|"]; + 179 [label="Smart cast: R|/p|"]; + 180 [label="Enter safe call"]; + 181 [label="Access variable R|kotlin/String.length|"]; + 182 [label="Exit safe call"]; + 183 [label="Exit block"]; + } + 184 [label="Exit function test3" style="filled" fillcolor=red]; + } 147 -> {148}; 148 -> {149}; 149 -> {150}; 150 -> {151}; - 151 -> {153}; - 152 -> {154}; + 151 -> {152}; + 152 -> {153}; 153 -> {154}; - 154 -> {155}; + 154 -> {155 162 171}; + 154 -> {172 173} [style=dotted]; + 154 -> {155 162} [style=dashed]; 155 -> {156}; 156 -> {157}; 157 -> {158}; 158 -> {159}; - 159 -> {160 162}; + 159 -> {160}; 160 -> {161}; - 161 -> {162}; + 161 -> {172}; 162 -> {163}; 163 -> {164}; - - subgraph cluster_36 { - color=red - 165 [label="Enter class I1" style="filled" fillcolor=red]; - 166 [label="Exit class I1" style="filled" fillcolor=red]; - } - 165 -> {166} [color=green]; - - subgraph cluster_37 { - color=red - 167 [label="Enter class I2" style="filled" fillcolor=red]; - 168 [label="Exit class I2" style="filled" fillcolor=red]; - } - 167 -> {168} [color=green]; - - subgraph cluster_38 { - color=red - 169 [label="Enter function test4" style="filled" fillcolor=red]; - subgraph cluster_39 { - color=blue - 170 [label="Enter block"]; - 171 [label="Access variable R|/x|"]; - 172 [label="Access variable #"]; - 173 [label="Access variable R|/x|"]; - 174 [label="Access variable #"]; - 175 [label="Postponed enter to lambda"]; - subgraph cluster_40 { - color=blue - 176 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_41 { - color=blue - 177 [label="Enter block"]; - 178 [label="Access variable R|/x|"]; - 179 [label="Type operator: (R|/x| as R|I2|)"]; - 180 [label="Access variable R|/x|"]; - 181 [label="Smart cast: R|/x|"]; - 182 [label="Access variable #"]; - 183 [label="Const: Int(123)"]; - 184 [label="Exit block"]; - } - 185 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_42 { - color=blue - 186 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_43 { - color=blue - 187 [label="Enter block"]; - 188 [label="Access variable R|/x|"]; - 189 [label="Type operator: (R|/x| as R|I1|)"]; - 190 [label="Access variable R|/x|"]; - 191 [label="Smart cast: R|/x|"]; - 192 [label="Access variable #"]; - 193 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 194 [label="Exit block"]; - } - 195 [label="Exit function " style="filled" fillcolor=red]; - } - 196 [label="Postponed exit from lambda"]; - 197 [label="Postponed exit from lambda"]; - 198 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 199 [label="Access variable R|/x|"]; - 200 [label="Smart cast: R|/x|"]; - 201 [label="Access variable R|/I1.x|"]; - 202 [label="Access variable R|/x|"]; - 203 [label="Smart cast: R|/x|"]; - 204 [label="Access variable R|/I2.y|"]; - 205 [label="Exit block"]; - } - 206 [label="Exit function test4" style="filled" fillcolor=red]; - } + 164 -> {165}; + 165 -> {166}; + 166 -> {167}; + 167 -> {168}; + 168 -> {169}; 169 -> {170}; - 170 -> {171}; - 171 -> {172}; - 172 -> {173}; + 170 -> {173}; + 171 -> {174}; + 172 -> {174}; 173 -> {174}; 174 -> {175}; - 175 -> {176 186 198}; - 175 -> {196 197} [style=dotted]; - 175 -> {176 186} [style=dashed]; + 175 -> {176}; 176 -> {177}; 177 -> {178}; 178 -> {179}; - 179 -> {180}; + 179 -> {180 182}; 180 -> {181}; 181 -> {182}; 182 -> {183}; 183 -> {184}; - 184 -> {185}; - 185 -> {196}; - 186 -> {187}; - 187 -> {188}; - 188 -> {189}; + + subgraph cluster_46 { + color=red + 185 [label="Enter class I1" style="filled" fillcolor=red]; + 186 [label="Exit class I1" style="filled" fillcolor=red]; + } + 185 -> {186} [color=green]; + + subgraph cluster_47 { + color=red + 187 [label="Enter class I2" style="filled" fillcolor=red]; + 188 [label="Exit class I2" style="filled" fillcolor=red]; + } + 187 -> {188} [color=green]; + + subgraph cluster_48 { + color=red + 189 [label="Enter function test4" style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 190 [label="Enter block"]; + 191 [label="Access variable R|/x|"]; + 192 [label="Access variable #"]; + 193 [label="Access variable R|/x|"]; + 194 [label="Access variable #"]; + subgraph cluster_50 { + color=blue + 195 [label="Function call arguments enter"]; + 196 [label="Postponed enter to lambda"]; + subgraph cluster_51 { + color=blue + 197 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_52 { + color=blue + 198 [label="Enter block"]; + 199 [label="Access variable R|/x|"]; + 200 [label="Type operator: (R|/x| as R|I2|)"]; + 201 [label="Access variable R|/x|"]; + 202 [label="Smart cast: R|/x|"]; + 203 [label="Access variable #"]; + 204 [label="Const: Int(123)"]; + 205 [label="Exit block"]; + } + 206 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_53 { + color=blue + 207 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_54 { + color=blue + 208 [label="Enter block"]; + 209 [label="Access variable R|/x|"]; + 210 [label="Type operator: (R|/x| as R|I1|)"]; + 211 [label="Access variable R|/x|"]; + 212 [label="Smart cast: R|/x|"]; + 213 [label="Access variable #"]; + subgraph cluster_55 { + color=blue + 214 [label="Function call arguments enter"]; + 215 [label="Function call arguments exit"]; + } + 216 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 217 [label="Exit block"]; + } + 218 [label="Exit function " style="filled" fillcolor=red]; + } + 219 [label="Function call arguments exit"]; + } + 220 [label="Postponed exit from lambda"]; + 221 [label="Postponed exit from lambda"]; + 222 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 223 [label="Access variable R|/x|"]; + 224 [label="Smart cast: R|/x|"]; + 225 [label="Access variable R|/I1.x|"]; + 226 [label="Access variable R|/x|"]; + 227 [label="Smart cast: R|/x|"]; + 228 [label="Access variable R|/I2.y|"]; + 229 [label="Exit block"]; + } + 230 [label="Exit function test4" style="filled" fillcolor=red]; + } 189 -> {190}; 190 -> {191}; 191 -> {192}; 192 -> {193}; 193 -> {194}; 194 -> {195}; - 195 -> {197}; - 196 -> {198}; + 195 -> {196}; + 196 -> {197 207 219}; + 196 -> {220 221} [style=dotted]; + 196 -> {197 207} [style=dashed]; 197 -> {198}; 198 -> {199}; 199 -> {200}; @@ -559,267 +619,319 @@ digraph flowFromTwoInplaceLambdas_kt { 203 -> {204}; 204 -> {205}; 205 -> {206}; - - subgraph cluster_44 { - color=red - 207 [label="Enter function test5" style="filled" fillcolor=red]; - subgraph cluster_45 { - color=blue - 208 [label="Enter block"]; - 209 [label="Access variable R|/x|"]; - 210 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; - 211 [label="Access variable R|/p|"]; - 212 [label="Access variable #"]; - 213 [label="Postponed enter to lambda"]; - subgraph cluster_46 { - color=blue - 214 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_47 { - color=blue - 215 [label="Enter block"]; - 216 [label="Access variable R|/q|"]; - 217 [label="Assignment: R|/p|"]; - 218 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 219 [label="Exit block"]; - } - 220 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_48 { - color=blue - 221 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_49 { - color=blue - 222 [label="Enter block"]; - 223 [label="Access variable R|/p|"]; - 224 [label="Type operator: (R|/p| as R|kotlin/Int|)"]; - 225 [label="Const: Int(123)"]; - 226 [label="Exit block"]; - } - 227 [label="Exit function " style="filled" fillcolor=red]; - } - 228 [label="Postponed exit from lambda"]; - 229 [label="Postponed exit from lambda"]; - 230 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 231 [label="Access variable R|/p|"]; - 232 [label="Smart cast: R|/p|"]; - 233 [label="Access variable R|kotlin/String.length#|"]; - 234 [label="Access variable R|/p|"]; - 235 [label="Smart cast: R|/p|"]; - 236 [label="Enter safe call"]; - 237 [label="Access variable R|kotlin/String.length|"]; - 238 [label="Exit safe call"]; - 239 [label="Exit block"]; - } - 240 [label="Exit function test5" style="filled" fillcolor=red]; - } + 206 -> {220}; 207 -> {208}; 208 -> {209}; 209 -> {210}; 210 -> {211}; 211 -> {212}; 212 -> {213}; - 213 -> {214 221 230}; - 213 -> {228 229} [style=dotted]; - 213 -> {214 221} [style=dashed]; + 213 -> {214}; 214 -> {215}; 215 -> {216}; 216 -> {217}; 217 -> {218}; - 218 -> {219}; - 219 -> {220}; - 220 -> {228}; + 218 -> {221}; + 219 -> {222}; + 220 -> {222}; 221 -> {222}; 222 -> {223}; 223 -> {224}; 224 -> {225}; 225 -> {226}; 226 -> {227}; - 227 -> {229}; - 228 -> {230}; + 227 -> {228}; + 228 -> {229}; 229 -> {230}; - 230 -> {231}; + + subgraph cluster_56 { + color=red + 231 [label="Enter function test5" style="filled" fillcolor=red]; + subgraph cluster_57 { + color=blue + 232 [label="Enter block"]; + 233 [label="Access variable R|/x|"]; + 234 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; + 235 [label="Access variable R|/p|"]; + 236 [label="Access variable #"]; + subgraph cluster_58 { + color=blue + 237 [label="Function call arguments enter"]; + 238 [label="Postponed enter to lambda"]; + subgraph cluster_59 { + color=blue + 239 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_60 { + color=blue + 240 [label="Enter block"]; + 241 [label="Access variable R|/q|"]; + 242 [label="Assignment: R|/p|"]; + subgraph cluster_61 { + color=blue + 243 [label="Function call arguments enter"]; + 244 [label="Function call arguments exit"]; + } + 245 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 246 [label="Exit block"]; + } + 247 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_62 { + color=blue + 248 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_63 { + color=blue + 249 [label="Enter block"]; + 250 [label="Access variable R|/p|"]; + 251 [label="Type operator: (R|/p| as R|kotlin/Int|)"]; + 252 [label="Const: Int(123)"]; + 253 [label="Exit block"]; + } + 254 [label="Exit function " style="filled" fillcolor=red]; + } + 255 [label="Function call arguments exit"]; + } + 256 [label="Postponed exit from lambda"]; + 257 [label="Postponed exit from lambda"]; + 258 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 259 [label="Access variable R|/p|"]; + 260 [label="Smart cast: R|/p|"]; + 261 [label="Access variable R|kotlin/String.length#|"]; + 262 [label="Access variable R|/p|"]; + 263 [label="Smart cast: R|/p|"]; + 264 [label="Enter safe call"]; + 265 [label="Access variable R|kotlin/String.length|"]; + 266 [label="Exit safe call"]; + 267 [label="Exit block"]; + } + 268 [label="Exit function test5" style="filled" fillcolor=red]; + } 231 -> {232}; 232 -> {233}; 233 -> {234}; 234 -> {235}; - 235 -> {236 238}; + 235 -> {236}; 236 -> {237}; 237 -> {238}; - 238 -> {239}; + 238 -> {239 248 255}; + 238 -> {256 257} [style=dotted]; + 238 -> {239 248} [style=dashed]; 239 -> {240}; - - subgraph cluster_50 { - color=red - 241 [label="Enter function test6" style="filled" fillcolor=red]; - subgraph cluster_51 { - color=blue - 242 [label="Enter block"]; - 243 [label="Variable declaration: lval x: R|kotlin/String|"]; - 244 [label="Postponed enter to lambda"]; - subgraph cluster_52 { - color=blue - 245 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_53 { - color=blue - 246 [label="Enter block"]; - 247 [label="Access variable R|/x|"]; - 248 [label="Access variable R|kotlin/String.length|"]; - 249 [label="Exit block"]; - } - 250 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_54 { - color=blue - 251 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_55 { - color=blue - 252 [label="Enter block"]; - 253 [label="Const: String()"]; - 254 [label="Assignment: R|/x|"]; - 255 [label="Access variable R|/x|"]; - 256 [label="Access variable R|kotlin/String.length|"]; - 257 [label="Exit block"]; - } - 258 [label="Exit function " style="filled" fillcolor=red]; - } - 259 [label="Postponed exit from lambda"]; - 260 [label="Postponed exit from lambda"]; - 261 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 262 [label="Access variable R|/x|"]; - 263 [label="Access variable R|kotlin/String.length|"]; - 264 [label="Exit block"]; - } - 265 [label="Exit function test6" style="filled" fillcolor=red]; - } + 240 -> {241}; 241 -> {242}; 242 -> {243}; 243 -> {244}; - 244 -> {245 251 261}; - 244 -> {259 260} [style=dotted]; - 244 -> {245 251} [style=dashed]; + 244 -> {245}; 245 -> {246}; 246 -> {247}; - 247 -> {248}; + 247 -> {256}; 248 -> {249}; 249 -> {250}; - 250 -> {259}; + 250 -> {251}; 251 -> {252}; 252 -> {253}; 253 -> {254}; - 254 -> {255}; - 255 -> {256}; - 256 -> {257}; + 254 -> {257}; + 255 -> {258}; + 256 -> {258}; 257 -> {258}; - 258 -> {260}; - 259 -> {261}; + 258 -> {259}; + 259 -> {260}; 260 -> {261}; 261 -> {262}; 262 -> {263}; - 263 -> {264}; + 263 -> {264 266}; 264 -> {265}; - - subgraph cluster_56 { - color=red - 266 [label="Enter function test7" style="filled" fillcolor=red]; - subgraph cluster_57 { - color=blue - 267 [label="Enter block"]; - 268 [label="Const: String()"]; - 269 [label="Variable declaration: lval x: R|kotlin/Any?|"]; - 270 [label="Variable declaration: lval y: R|kotlin/Any?|"]; - 271 [label="Postponed enter to lambda"]; - subgraph cluster_58 { - color=blue - 272 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_59 { - color=blue - 273 [label="Enter block"]; - 274 [label="Jump: ^@run2 Unit"]; - 275 [label="Stub" style="filled" fillcolor=gray]; - 276 [label="Exit block" style="filled" fillcolor=gray]; - } - 277 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_60 { - color=blue - 278 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_61 { - color=blue - 279 [label="Enter block"]; - 280 [label="Access variable R|/x|"]; - 281 [label="Assignment: R|/y|"]; - 282 [label="Exit block"]; - } - 283 [label="Exit function " style="filled" fillcolor=red]; - } - 284 [label="Postponed exit from lambda"]; - 285 [label="Postponed exit from lambda"]; - 286 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - subgraph cluster_62 { - color=blue - 287 [label="Enter when"]; - subgraph cluster_63 { - color=blue - 288 [label="Enter when branch condition "]; - 289 [label="Access variable R|/y|"]; - 290 [label="Type operator: (R|/y| is R|kotlin/String|)"]; - 291 [label="Exit when branch condition"]; - } - 292 [label="Synthetic else branch"]; - 293 [label="Enter when branch result"]; - subgraph cluster_64 { - color=blue - 294 [label="Enter block"]; - 295 [label="Access variable R|/x|"]; - 296 [label="Smart cast: R|/x|"]; - 297 [label="Access variable R|kotlin/String.length|"]; - 298 [label="Exit block"]; - } - 299 [label="Exit when branch result"]; - 300 [label="Exit when"]; - } - 301 [label="Exit block"]; - } - 302 [label="Exit function test7" style="filled" fillcolor=red]; - } + 265 -> {266}; 266 -> {267}; 267 -> {268}; - 268 -> {269}; + + subgraph cluster_64 { + color=red + 269 [label="Enter function test6" style="filled" fillcolor=red]; + subgraph cluster_65 { + color=blue + 270 [label="Enter block"]; + 271 [label="Variable declaration: lval x: R|kotlin/String|"]; + subgraph cluster_66 { + color=blue + 272 [label="Function call arguments enter"]; + 273 [label="Postponed enter to lambda"]; + subgraph cluster_67 { + color=blue + 274 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_68 { + color=blue + 275 [label="Enter block"]; + 276 [label="Access variable R|/x|"]; + 277 [label="Access variable R|kotlin/String.length|"]; + 278 [label="Exit block"]; + } + 279 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_69 { + color=blue + 280 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_70 { + color=blue + 281 [label="Enter block"]; + 282 [label="Const: String()"]; + 283 [label="Assignment: R|/x|"]; + 284 [label="Access variable R|/x|"]; + 285 [label="Access variable R|kotlin/String.length|"]; + 286 [label="Exit block"]; + } + 287 [label="Exit function " style="filled" fillcolor=red]; + } + 288 [label="Function call arguments exit"]; + } + 289 [label="Postponed exit from lambda"]; + 290 [label="Postponed exit from lambda"]; + 291 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 292 [label="Access variable R|/x|"]; + 293 [label="Access variable R|kotlin/String.length|"]; + 294 [label="Exit block"]; + } + 295 [label="Exit function test6" style="filled" fillcolor=red]; + } 269 -> {270}; 270 -> {271}; - 271 -> {272 278 286}; - 271 -> {284 285} [style=dotted]; - 271 -> {272 278} [style=dashed]; + 271 -> {272}; 272 -> {273}; - 273 -> {274}; - 274 -> {277}; - 274 -> {275} [style=dotted]; - 275 -> {276} [style=dotted]; - 276 -> {277} [style=dotted]; - 277 -> {284}; + 273 -> {274 280 288}; + 273 -> {289 290} [style=dotted]; + 273 -> {274 280} [style=dashed]; + 274 -> {275}; + 275 -> {276}; + 276 -> {277}; + 277 -> {278}; 278 -> {279}; - 279 -> {280}; + 279 -> {289}; 280 -> {281}; 281 -> {282}; 282 -> {283}; - 283 -> {285}; - 284 -> {286}; + 283 -> {284}; + 284 -> {285}; 285 -> {286}; 286 -> {287}; - 287 -> {288}; - 288 -> {289}; - 289 -> {290}; + 287 -> {290}; + 288 -> {291}; + 289 -> {291}; 290 -> {291}; - 291 -> {292 293}; - 292 -> {300}; + 291 -> {292}; + 292 -> {293}; 293 -> {294}; 294 -> {295}; - 295 -> {296}; + + subgraph cluster_71 { + color=red + 296 [label="Enter function test7" style="filled" fillcolor=red]; + subgraph cluster_72 { + color=blue + 297 [label="Enter block"]; + 298 [label="Const: String()"]; + 299 [label="Variable declaration: lval x: R|kotlin/Any?|"]; + 300 [label="Variable declaration: lval y: R|kotlin/Any?|"]; + subgraph cluster_73 { + color=blue + 301 [label="Function call arguments enter"]; + 302 [label="Postponed enter to lambda"]; + subgraph cluster_74 { + color=blue + 303 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_75 { + color=blue + 304 [label="Enter block"]; + 305 [label="Jump: ^@run2 Unit"]; + 306 [label="Stub" style="filled" fillcolor=gray]; + 307 [label="Exit block" style="filled" fillcolor=gray]; + } + 308 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_76 { + color=blue + 309 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_77 { + color=blue + 310 [label="Enter block"]; + 311 [label="Access variable R|/x|"]; + 312 [label="Assignment: R|/y|"]; + 313 [label="Exit block"]; + } + 314 [label="Exit function " style="filled" fillcolor=red]; + } + 315 [label="Function call arguments exit"]; + } + 316 [label="Postponed exit from lambda"]; + 317 [label="Postponed exit from lambda"]; + 318 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_78 { + color=blue + 319 [label="Enter when"]; + subgraph cluster_79 { + color=blue + 320 [label="Enter when branch condition "]; + 321 [label="Access variable R|/y|"]; + 322 [label="Type operator: (R|/y| is R|kotlin/String|)"]; + 323 [label="Exit when branch condition"]; + } + 324 [label="Synthetic else branch"]; + 325 [label="Enter when branch result"]; + subgraph cluster_80 { + color=blue + 326 [label="Enter block"]; + 327 [label="Access variable R|/x|"]; + 328 [label="Smart cast: R|/x|"]; + 329 [label="Access variable R|kotlin/String.length|"]; + 330 [label="Exit block"]; + } + 331 [label="Exit when branch result"]; + 332 [label="Exit when"]; + } + 333 [label="Exit block"]; + } + 334 [label="Exit function test7" style="filled" fillcolor=red]; + } 296 -> {297}; 297 -> {298}; 298 -> {299}; 299 -> {300}; 300 -> {301}; 301 -> {302}; + 302 -> {303 309 315}; + 302 -> {316 317} [style=dotted]; + 302 -> {303 309} [style=dashed]; + 303 -> {304}; + 304 -> {305}; + 305 -> {308}; + 305 -> {306} [style=dotted]; + 306 -> {307} [style=dotted]; + 307 -> {308} [style=dotted]; + 308 -> {316}; + 309 -> {310}; + 310 -> {311}; + 311 -> {312}; + 312 -> {313}; + 313 -> {314}; + 314 -> {317}; + 315 -> {318}; + 316 -> {318}; + 317 -> {318}; + 318 -> {319}; + 319 -> {320}; + 320 -> {321}; + 321 -> {322}; + 322 -> {323}; + 323 -> {324 325}; + 324 -> {332}; + 325 -> {326}; + 326 -> {327}; + 327 -> {328}; + 328 -> {329}; + 329 -> {330}; + 330 -> {331}; + 331 -> {332}; + 332 -> {333}; + 333 -> {334}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot index 71c8b44de20..99222657da2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot @@ -57,33 +57,38 @@ digraph initBlock_kt { 15 [label="Enter block"]; 16 [label="Const: Int(1)"]; 17 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 18 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 19 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 20 [label="Stub" style="filled" fillcolor=gray]; - 21 [label="Const: Int(2)" style="filled" fillcolor=gray]; - 22 [label="Variable declaration: lval y: R|kotlin/Int|" style="filled" fillcolor=gray]; - 23 [label="Exit block" style="filled" fillcolor=gray]; + subgraph cluster_8 { + color=blue + 18 [label="Function call arguments enter"]; + 19 [label="Function call arguments exit"]; + } + 20 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 21 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 22 [label="Stub" style="filled" fillcolor=gray]; + 23 [label="Const: Int(2)" style="filled" fillcolor=gray]; + 24 [label="Variable declaration: lval y: R|kotlin/Int|" style="filled" fillcolor=gray]; + 25 [label="Exit block" style="filled" fillcolor=gray]; } - 24 [label="Exit init block" style="filled" fillcolor=gray]; + 26 [label="Exit init block" style="filled" fillcolor=gray]; } - subgraph cluster_8 { + subgraph cluster_9 { color=blue - 25 [label="Enter function " style="filled" fillcolor=gray]; - 26 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; - 27 [label="Exit function " style="filled" fillcolor=gray]; + 27 [label="Enter function " style="filled" fillcolor=gray]; + 28 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; + 29 [label="Exit function " style="filled" fillcolor=gray]; } - 28 [label="Exit class Bar" style="filled" fillcolor=gray]; + 30 [label="Exit class Bar" style="filled" fillcolor=gray]; } 13 -> {14} [color=green]; - 13 -> {28} [style=dotted]; - 13 -> {14 25} [style=dashed]; + 13 -> {30} [style=dotted]; + 13 -> {14 27} [style=dashed]; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20} [style=dotted]; - 20 -> {21} [style=dotted]; + 19 -> {20}; + 20 -> {21}; 21 -> {22} [style=dotted]; 22 -> {23} [style=dotted]; 23 -> {24} [style=dotted]; @@ -91,5 +96,7 @@ digraph initBlock_kt { 25 -> {26} [style=dotted]; 26 -> {27} [style=dotted]; 27 -> {28} [style=dotted]; + 28 -> {29} [style=dotted]; + 29 -> {30} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot index 97a1172a3ed..ba326aecc24 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot @@ -36,48 +36,58 @@ digraph initBlockAndInPlaceLambda_kt { 9 [label="Access variable R|/a|"]; 10 [label="Access variable R|/A.b|"]; 11 [label="Enter safe call"]; - 12 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue - 13 [label="Enter function " style="filled" fillcolor=red]; + 12 [label="Function call arguments enter"]; + 13 [label="Postponed enter to lambda"]; subgraph cluster_7 { color=blue - 14 [label="Enter block"]; - 15 [label="Access variable R|/a|"]; - 16 [label="Access variable R|/it|"]; - 17 [label="Function call: R|/C.C|(...)" style="filled" fillcolor=yellow]; - 18 [label="Exit block"]; + 14 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 15 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 16 [label="Function call arguments enter"]; + 17 [label="Access variable R|/a|"]; + 18 [label="Access variable R|/it|"]; + 19 [label="Function call arguments exit"]; + } + 20 [label="Function call: R|/C.C|(...)" style="filled" fillcolor=yellow]; + 21 [label="Exit block"]; + } + 22 [label="Exit function " style="filled" fillcolor=red]; } - 19 [label="Exit function " style="filled" fillcolor=red]; + 23 [label="Function call arguments exit"]; } - 20 [label="Postponed exit from lambda"]; - 21 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 22 [label="Exit safe call"]; - 23 [label="Variable declaration: lval c: R|C?|"]; - 24 [label="Exit block"]; + 24 [label="Postponed exit from lambda"]; + 25 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 26 [label="Exit safe call"]; + 27 [label="Variable declaration: lval c: R|C?|"]; + 28 [label="Exit block"]; } - 25 [label="Exit init block" style="filled" fillcolor=red]; + 29 [label="Exit init block" style="filled" fillcolor=red]; } - subgraph cluster_8 { + subgraph cluster_10 { color=blue - 26 [label="Enter function " style="filled" fillcolor=red]; - 27 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 28 [label="Exit function " style="filled" fillcolor=red]; + 30 [label="Enter function " style="filled" fillcolor=red]; + 31 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 32 [label="Exit function " style="filled" fillcolor=red]; } - 29 [label="Exit class C" style="filled" fillcolor=red]; + 33 [label="Exit class C" style="filled" fillcolor=red]; } 6 -> {7} [color=green]; - 6 -> {29} [style=dotted]; - 6 -> {7 26} [style=dashed]; + 6 -> {33} [style=dotted]; + 6 -> {7 30} [style=dashed]; 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {11 22}; + 10 -> {11 26}; 11 -> {12}; - 12 -> {13 21}; - 12 -> {20} [style=dotted]; - 12 -> {13} [style=dashed]; - 13 -> {14}; + 12 -> {13}; + 13 -> {14 23}; + 13 -> {24} [style=dotted]; + 13 -> {14} [style=dashed]; 14 -> {15}; 15 -> {16}; 16 -> {17}; @@ -86,12 +96,16 @@ digraph initBlockAndInPlaceLambda_kt { 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {23}; - 23 -> {24}; + 22 -> {24}; + 23 -> {25}; 24 -> {25}; - 25 -> {26} [color=green]; + 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29} [color=green]; + 28 -> {29}; + 29 -> {30} [color=green]; + 30 -> {31}; + 31 -> {32}; + 32 -> {33} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot index 9782f5f9904..409702f157f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot @@ -66,29 +66,39 @@ digraph inplaceLambdaInControlFlowExpressions_kt { subgraph cluster_9 { color=blue 25 [label="Enter block"]; - 26 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue - 27 [label="Enter function " style="filled" fillcolor=red]; + 26 [label="Function call arguments enter"]; + 27 [label="Postponed enter to lambda"]; subgraph cluster_11 { color=blue - 28 [label="Enter block"]; - 29 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; + 28 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 29 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 30 [label="Function call arguments enter"]; + 31 [label="Function call arguments exit"]; + } + 32 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 33 [label="Exit block"]; + } + 34 [label="Exit function " style="filled" fillcolor=red]; } - 31 [label="Exit function " style="filled" fillcolor=red]; + 35 [label="Function call arguments exit"]; } - 32 [label="Postponed exit from lambda"]; - 33 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 34 [label="Exit block"]; + 36 [label="Postponed exit from lambda"]; + 37 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; } - 35 [label="Exit when branch result"]; - 36 [label="Exit when"]; + 39 [label="Exit when branch result"]; + 40 [label="Exit when"]; } - 37 [label="Variable declaration: lval x: R|kotlin/String|"]; - 38 [label="Exit block"]; + 41 [label="Variable declaration: lval x: R|kotlin/String|"]; + 42 [label="Exit block"]; } - 39 [label="Exit function test_1" style="filled" fillcolor=red]; + 43 [label="Exit function test_1" style="filled" fillcolor=red]; } 11 -> {12}; 12 -> {13}; @@ -102,147 +112,179 @@ digraph inplaceLambdaInControlFlowExpressions_kt { 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {36}; + 23 -> {40}; 24 -> {25}; 25 -> {26}; - 26 -> {27 33}; - 26 -> {32} [style=dotted]; - 26 -> {27} [style=dashed]; - 27 -> {28}; + 26 -> {27}; + 27 -> {28 35}; + 27 -> {36} [style=dotted]; + 27 -> {28} [style=dashed]; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {33} [color=green]; - 32 -> {36} [color=red]; + 32 -> {33}; 33 -> {34}; - 34 -> {35}; - 35 -> {36}; - 36 -> {37}; + 34 -> {36}; + 35 -> {37}; + 36 -> {37} [color=green]; + 36 -> {40} [color=red]; 37 -> {38}; 38 -> {39}; - - subgraph cluster_12 { - color=red - 40 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 41 [label="Enter block"]; - subgraph cluster_14 { - color=blue - 42 [label="Try expression enter"]; - subgraph cluster_15 { - color=blue - 43 [label="Try main block enter"]; - subgraph cluster_16 { - color=blue - 44 [label="Enter block"]; - 45 [label="Postponed enter to lambda"]; - subgraph cluster_17 { - color=blue - 46 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 47 [label="Enter block"]; - 48 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 49 [label="Exit block"]; - } - 50 [label="Exit function " style="filled" fillcolor=red]; - } - 51 [label="Postponed exit from lambda"]; - 52 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 53 [label="Exit block"]; - } - 54 [label="Try main block exit"]; - } - subgraph cluster_19 { - color=blue - 55 [label="Catch enter"]; - 56 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_20 { - color=blue - 57 [label="Enter block"]; - 58 [label="Const: String()"]; - 59 [label="Exit block"]; - } - 60 [label="Catch exit"]; - } - 61 [label="Try expression exit"]; - } - 62 [label="Variable declaration: lval x: R|kotlin/String|"]; - 63 [label="Exit block"]; - } - 64 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43 55}; - 43 -> {44}; + 42 -> {43}; + + subgraph cluster_14 { + color=red + 44 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 45 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 46 [label="Try expression enter"]; + subgraph cluster_17 { + color=blue + 47 [label="Try main block enter"]; + subgraph cluster_18 { + color=blue + 48 [label="Enter block"]; + subgraph cluster_19 { + color=blue + 49 [label="Function call arguments enter"]; + 50 [label="Postponed enter to lambda"]; + subgraph cluster_20 { + color=blue + 51 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 52 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 53 [label="Function call arguments enter"]; + 54 [label="Function call arguments exit"]; + } + 55 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 56 [label="Exit block"]; + } + 57 [label="Exit function " style="filled" fillcolor=red]; + } + 58 [label="Function call arguments exit"]; + } + 59 [label="Postponed exit from lambda"]; + 60 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 61 [label="Exit block"]; + } + 62 [label="Try main block exit"]; + } + subgraph cluster_23 { + color=blue + 63 [label="Catch enter"]; + 64 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_24 { + color=blue + 65 [label="Enter block"]; + 66 [label="Const: String()"]; + 67 [label="Exit block"]; + } + 68 [label="Catch exit"]; + } + 69 [label="Try expression exit"]; + } + 70 [label="Variable declaration: lval x: R|kotlin/String|"]; + 71 [label="Exit block"]; + } + 72 [label="Exit function test_2" style="filled" fillcolor=red]; + } 44 -> {45}; - 45 -> {46 52}; - 45 -> {51} [style=dotted]; - 45 -> {46} [style=dashed]; - 46 -> {47}; + 45 -> {46}; + 46 -> {47 63}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {51}; - 51 -> {52} [color=green]; - 51 -> {61} [color=red]; + 50 -> {51 58}; + 50 -> {59} [style=dotted]; + 50 -> {51} [style=dashed]; + 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {55 61}; + 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58}; - 58 -> {59}; - 59 -> {60}; + 57 -> {59}; + 58 -> {60}; + 59 -> {60} [color=green]; + 59 -> {69} [color=red]; 60 -> {61}; 61 -> {62}; - 62 -> {63}; + 62 -> {63 69}; 63 -> {64}; - - subgraph cluster_21 { - color=red - 65 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 66 [label="Enter block"]; - 67 [label="Postponed enter to lambda"]; - subgraph cluster_23 { - color=blue - 68 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 69 [label="Enter block"]; - 70 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 71 [label="Exit block"]; - } - 72 [label="Exit function " style="filled" fillcolor=red]; - } - 73 [label="Postponed exit from lambda"]; - 74 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 75 [label="Check not null: R|kotlin/run|(...)!!" style="filled" fillcolor=yellow]; - 76 [label="Variable declaration: lval x: R|kotlin/String|"]; - 77 [label="Exit block"]; - } - 78 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {68 74}; - 67 -> {73} [style=dotted]; - 67 -> {68} [style=dashed]; + 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {73}; - 73 -> {74} [color=green]; - 73 -> {75} [color=red]; + + subgraph cluster_25 { + color=red + 73 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 74 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 75 [label="Function call arguments enter"]; + 76 [label="Postponed enter to lambda"]; + subgraph cluster_28 { + color=blue + 77 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 78 [label="Enter block"]; + subgraph cluster_30 { + color=blue + 79 [label="Function call arguments enter"]; + 80 [label="Function call arguments exit"]; + } + 81 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 82 [label="Exit block"]; + } + 83 [label="Exit function " style="filled" fillcolor=red]; + } + 84 [label="Function call arguments exit"]; + } + 85 [label="Postponed exit from lambda"]; + 86 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 87 [label="Check not null: R|kotlin/run|(...)!!" style="filled" fillcolor=yellow]; + 88 [label="Variable declaration: lval x: R|kotlin/String|"]; + 89 [label="Exit block"]; + } + 90 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {77}; + 76 -> {77 84}; + 76 -> {85} [style=dotted]; + 76 -> {77} [style=dashed]; 77 -> {78}; + 78 -> {79}; + 79 -> {80}; + 80 -> {81}; + 81 -> {82}; + 82 -> {83}; + 83 -> {85}; + 84 -> {86}; + 85 -> {86} [color=green]; + 85 -> {87} [color=red]; + 86 -> {87}; + 87 -> {88}; + 88 -> {89}; + 89 -> {90}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot index d442ca45883..d70fa412179 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot @@ -45,23 +45,38 @@ digraph jumps_kt { subgraph cluster_7 { color=blue 19 [label="Enter block"]; - 20 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 21 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 22 [label="Stub" style="filled" fillcolor=gray]; - 23 [label="Exit block" style="filled" fillcolor=gray]; + subgraph cluster_8 { + color=blue + 20 [label="Function call arguments enter"]; + 21 [label="Function call arguments exit"]; + } + 22 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 23 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 24 [label="Stub" style="filled" fillcolor=gray]; + 25 [label="Exit block" style="filled" fillcolor=gray]; } - 24 [label="Exit when branch result" style="filled" fillcolor=gray]; - 25 [label="Exit when"]; + 26 [label="Exit when branch result" style="filled" fillcolor=gray]; + 27 [label="Exit when"]; } - 26 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 27 [label="Access variable R|/y|"]; - 28 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 29 [label="Access variable R|/x|"]; - 30 [label="Smart cast: R|/x|"]; - 31 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; + 28 [label="Variable declaration: lval y: R|kotlin/Int|"]; + subgraph cluster_9 { + color=blue + 29 [label="Function call arguments enter"]; + 30 [label="Access variable R|/y|"]; + 31 [label="Function call arguments exit"]; + } + 32 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_10 { + color=blue + 33 [label="Function call arguments enter"]; + 34 [label="Access variable R|/x|"]; + 35 [label="Smart cast: R|/x|"]; + 36 [label="Function call arguments exit"]; + } + 37 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; } - 33 [label="Exit function test_1" style="filled" fillcolor=red]; + 39 [label="Exit function test_1" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -78,56 +93,53 @@ digraph jumps_kt { 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {25}; + 17 -> {27}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22} [style=dotted]; - 22 -> {23} [style=dotted]; + 21 -> {22}; + 22 -> {23}; 23 -> {24} [style=dotted]; 24 -> {25} [style=dotted]; - 25 -> {26}; - 26 -> {27}; + 25 -> {26} [style=dotted]; + 26 -> {27} [style=dotted]; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; + 33 -> {34}; + 34 -> {35}; + 35 -> {36}; + 36 -> {37}; + 37 -> {38}; + 38 -> {39}; - subgraph cluster_8 { + subgraph cluster_11 { color=red - 34 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_9 { + 40 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 35 [label="Enter block"]; - subgraph cluster_10 { + 41 [label="Enter block"]; + subgraph cluster_13 { color=blue - 36 [label="Enter when"]; - subgraph cluster_11 { - color=blue - 37 [label="Enter when branch condition "]; - 38 [label="Access variable R|/x|"]; - 39 [label="Const: Null(null)"]; - 40 [label="Equality operator =="]; - 41 [label="Exit when branch condition"]; - } - subgraph cluster_12 { - color=blue - 42 [label="Enter when branch condition else"]; - 43 [label="Exit when branch condition"]; - } - 44 [label="Enter when branch result"]; - subgraph cluster_13 { - color=blue - 45 [label="Enter block"]; - 46 [label="Access variable R|/x|"]; - 47 [label="Smart cast: R|/x|"]; - 48 [label="Exit block"]; - } - 49 [label="Exit when branch result"]; - 50 [label="Enter when branch result"]; + 42 [label="Enter when"]; subgraph cluster_14 { + color=blue + 43 [label="Enter when branch condition "]; + 44 [label="Access variable R|/x|"]; + 45 [label="Const: Null(null)"]; + 46 [label="Equality operator =="]; + 47 [label="Exit when branch condition"]; + } + subgraph cluster_15 { + color=blue + 48 [label="Enter when branch condition else"]; + 49 [label="Exit when branch condition"]; + } + 50 [label="Enter when branch result"]; + subgraph cluster_16 { color=blue 51 [label="Enter block"]; 52 [label="Access variable R|/x|"]; @@ -135,296 +147,340 @@ digraph jumps_kt { 54 [label="Exit block"]; } 55 [label="Exit when branch result"]; - 56 [label="Exit when"]; + 56 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 57 [label="Enter block"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Smart cast: R|/x|"]; + 60 [label="Exit block"]; + } + 61 [label="Exit when branch result"]; + 62 [label="Exit when"]; } - 57 [label="Variable declaration: lval y: R|kotlin/Int?|"]; - 58 [label="Access variable R|/y|"]; - 59 [label="Function call: R|/y|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 60 [label="Exit block"]; + 63 [label="Variable declaration: lval y: R|kotlin/Int?|"]; + subgraph cluster_18 { + color=blue + 64 [label="Function call arguments enter"]; + 65 [label="Access variable R|/y|"]; + 66 [label="Function call arguments exit"]; + } + 67 [label="Function call: R|/y|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 68 [label="Exit block"]; } - 61 [label="Exit function test_2" style="filled" fillcolor=red]; + 69 [label="Exit function test_2" style="filled" fillcolor=red]; } - 34 -> {35}; - 35 -> {36}; - 36 -> {37}; - 37 -> {38}; - 38 -> {39}; - 39 -> {40}; 40 -> {41}; - 41 -> {42 50}; + 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; + 47 -> {48 56}; 48 -> {49}; - 49 -> {56}; + 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {56}; + 55 -> {62}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; - - subgraph cluster_15 { - color=red - 62 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 63 [label="Enter block"]; - subgraph cluster_17 { - color=blue - 64 [label="Enter while loop"]; - subgraph cluster_18 { - color=blue - 65 [label="Enter loop condition"]; - 66 [label="Const: Boolean(true)"]; - 67 [label="Exit loop condition"]; - } - subgraph cluster_19 { - color=blue - 68 [label="Enter loop block"]; - subgraph cluster_20 { - color=blue - 69 [label="Enter block"]; - 70 [label="Access variable R|/x|"]; - 71 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 72 [label="Jump: break@@@[Boolean(true)] "]; - 73 [label="Stub" style="filled" fillcolor=gray]; - 74 [label="Exit block" style="filled" fillcolor=gray]; - } - 75 [label="Exit loop block" style="filled" fillcolor=gray]; - } - 76 [label="Exit while loop"]; - } - 77 [label="Access variable R|/x|"]; - 78 [label="Smart cast: R|/x|"]; - 79 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 80 [label="Exit block"]; - } - 81 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - 67 -> {76} [style=dotted]; 68 -> {69}; - 69 -> {70}; + + subgraph cluster_19 { + color=red + 70 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 71 [label="Enter block"]; + subgraph cluster_21 { + color=blue + 72 [label="Enter while loop"]; + subgraph cluster_22 { + color=blue + 73 [label="Enter loop condition"]; + 74 [label="Const: Boolean(true)"]; + 75 [label="Exit loop condition"]; + } + subgraph cluster_23 { + color=blue + 76 [label="Enter loop block"]; + subgraph cluster_24 { + color=blue + 77 [label="Enter block"]; + 78 [label="Access variable R|/x|"]; + 79 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 80 [label="Jump: break@@@[Boolean(true)] "]; + 81 [label="Stub" style="filled" fillcolor=gray]; + 82 [label="Exit block" style="filled" fillcolor=gray]; + } + 83 [label="Exit loop block" style="filled" fillcolor=gray]; + } + 84 [label="Exit while loop"]; + } + subgraph cluster_25 { + color=blue + 85 [label="Function call arguments enter"]; + 86 [label="Access variable R|/x|"]; + 87 [label="Smart cast: R|/x|"]; + 88 [label="Function call arguments exit"]; + } + 89 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 90 [label="Exit block"]; + } + 91 [label="Exit function test_3" style="filled" fillcolor=red]; + } 70 -> {71}; 71 -> {72}; - 72 -> {76}; - 72 -> {73} [style=dotted]; - 73 -> {74} [style=dotted]; - 74 -> {75} [style=dotted]; - 75 -> {65} [color=green style=dotted]; + 72 -> {73}; + 73 -> {74}; + 74 -> {75}; + 75 -> {76}; + 75 -> {84} [style=dotted]; 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {81}; - - subgraph cluster_21 { - color=red - 82 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 83 [label="Enter block"]; - subgraph cluster_23 { - color=blue - 84 [label="Enter do-while loop"]; - subgraph cluster_24 { - color=blue - 85 [label="Enter loop block"]; - subgraph cluster_25 { - color=blue - 86 [label="Enter block"]; - 87 [label="Access variable R|/x|"]; - 88 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 89 [label="Jump: break@@@[Boolean(true)] "]; - 90 [label="Stub" style="filled" fillcolor=gray]; - 91 [label="Exit block" style="filled" fillcolor=gray]; - } - 92 [label="Exit loop block" style="filled" fillcolor=gray]; - } - subgraph cluster_26 { - color=blue - 93 [label="Enter loop condition" style="filled" fillcolor=gray]; - 94 [label="Const: Boolean(true)" style="filled" fillcolor=gray]; - 95 [label="Exit loop condition" style="filled" fillcolor=gray]; - } - 96 [label="Exit do-while loop"]; - } - 97 [label="Access variable R|/x|"]; - 98 [label="Smart cast: R|/x|"]; - 99 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 100 [label="Exit block"]; - } - 101 [label="Exit function test_4" style="filled" fillcolor=red]; - } - 82 -> {83}; - 83 -> {84}; + 80 -> {84}; + 80 -> {81} [style=dotted]; + 81 -> {82} [style=dotted]; + 82 -> {83} [style=dotted]; + 83 -> {73} [color=green style=dotted]; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; - 89 -> {96}; - 89 -> {90} [style=dotted]; - 90 -> {91} [style=dotted]; - 91 -> {92} [style=dotted]; - 92 -> {93} [style=dotted]; - 93 -> {94} [style=dotted]; - 94 -> {95} [style=dotted]; - 95 -> {85} [color=green style=dotted]; - 95 -> {96} [style=dotted]; - 96 -> {97}; - 97 -> {98}; - 98 -> {99}; - 99 -> {100}; - 100 -> {101}; + 89 -> {90}; + 90 -> {91}; - subgraph cluster_27 { + subgraph cluster_26 { color=red - 102 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_28 { + 92 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_27 { color=blue - 103 [label="Enter block"]; - subgraph cluster_29 { + 93 [label="Enter block"]; + subgraph cluster_28 { color=blue - 104 [label="Enter while loop"]; - subgraph cluster_30 { + 94 [label="Enter do-while loop"]; + subgraph cluster_29 { color=blue - 105 [label="Enter loop condition"]; - 106 [label="Access variable R|/b|"]; - 107 [label="Exit loop condition"]; + 95 [label="Enter loop block"]; + subgraph cluster_30 { + color=blue + 96 [label="Enter block"]; + 97 [label="Access variable R|/x|"]; + 98 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 99 [label="Jump: break@@@[Boolean(true)] "]; + 100 [label="Stub" style="filled" fillcolor=gray]; + 101 [label="Exit block" style="filled" fillcolor=gray]; + } + 102 [label="Exit loop block" style="filled" fillcolor=gray]; } subgraph cluster_31 { color=blue - 108 [label="Enter loop block"]; - subgraph cluster_32 { - color=blue - 109 [label="Enter block"]; - subgraph cluster_33 { - color=blue - 110 [label="Enter when"]; - subgraph cluster_34 { - color=blue - 111 [label="Enter when branch condition "]; - 112 [label="Access variable R|/b|"]; - 113 [label="Exit when branch condition"]; - } - 114 [label="Synthetic else branch"]; - 115 [label="Enter when branch result"]; - subgraph cluster_35 { - color=blue - 116 [label="Enter block"]; - 117 [label="Jump: continue@@@[R|/b|] "]; - 118 [label="Stub" style="filled" fillcolor=gray]; - 119 [label="Exit block" style="filled" fillcolor=gray]; - } - 120 [label="Exit when branch result" style="filled" fillcolor=gray]; - 121 [label="Exit when"]; - } - 122 [label="Exit block"]; - } - 123 [label="Exit loop block"]; + 103 [label="Enter loop condition" style="filled" fillcolor=gray]; + 104 [label="Const: Boolean(true)" style="filled" fillcolor=gray]; + 105 [label="Exit loop condition" style="filled" fillcolor=gray]; } - 124 [label="Exit while loop"]; + 106 [label="Exit do-while loop"]; } - 125 [label="Exit block"]; + subgraph cluster_32 { + color=blue + 107 [label="Function call arguments enter"]; + 108 [label="Access variable R|/x|"]; + 109 [label="Smart cast: R|/x|"]; + 110 [label="Function call arguments exit"]; + } + 111 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 112 [label="Exit block"]; } - 126 [label="Exit function test_5" style="filled" fillcolor=red]; + 113 [label="Exit function test_4" style="filled" fillcolor=red]; } - 102 -> {103}; - 103 -> {104}; - 104 -> {105}; - 105 -> {106}; + 92 -> {93}; + 93 -> {94}; + 94 -> {95}; + 95 -> {96}; + 96 -> {97}; + 97 -> {98}; + 98 -> {99}; + 99 -> {106}; + 99 -> {100} [style=dotted]; + 100 -> {101} [style=dotted]; + 101 -> {102} [style=dotted]; + 102 -> {103} [style=dotted]; + 103 -> {104} [style=dotted]; + 104 -> {105} [style=dotted]; + 105 -> {95} [color=green style=dotted]; + 105 -> {106} [style=dotted]; 106 -> {107}; - 107 -> {108 124}; + 107 -> {108}; 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; - 113 -> {114 115}; - 114 -> {121}; + + subgraph cluster_33 { + color=red + 114 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 115 [label="Enter block"]; + subgraph cluster_35 { + color=blue + 116 [label="Enter while loop"]; + subgraph cluster_36 { + color=blue + 117 [label="Enter loop condition"]; + 118 [label="Access variable R|/b|"]; + 119 [label="Exit loop condition"]; + } + subgraph cluster_37 { + color=blue + 120 [label="Enter loop block"]; + subgraph cluster_38 { + color=blue + 121 [label="Enter block"]; + subgraph cluster_39 { + color=blue + 122 [label="Enter when"]; + subgraph cluster_40 { + color=blue + 123 [label="Enter when branch condition "]; + 124 [label="Access variable R|/b|"]; + 125 [label="Exit when branch condition"]; + } + 126 [label="Synthetic else branch"]; + 127 [label="Enter when branch result"]; + subgraph cluster_41 { + color=blue + 128 [label="Enter block"]; + 129 [label="Jump: continue@@@[R|/b|] "]; + 130 [label="Stub" style="filled" fillcolor=gray]; + 131 [label="Exit block" style="filled" fillcolor=gray]; + } + 132 [label="Exit when branch result" style="filled" fillcolor=gray]; + 133 [label="Exit when"]; + } + 134 [label="Exit block"]; + } + 135 [label="Exit loop block"]; + } + 136 [label="Exit while loop"]; + } + 137 [label="Exit block"]; + } + 138 [label="Exit function test_5" style="filled" fillcolor=red]; + } + 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {105} [color=green style=dashed]; - 117 -> {118} [style=dotted]; - 118 -> {119} [style=dotted]; - 119 -> {120} [style=dotted]; - 120 -> {121} [style=dotted]; + 117 -> {118}; + 118 -> {119}; + 119 -> {120 136}; + 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {105} [color=green style=dashed]; + 123 -> {124}; 124 -> {125}; - 125 -> {126}; - - subgraph cluster_36 { - color=red - 127 [label="Enter function run" style="filled" fillcolor=red]; - subgraph cluster_37 { - color=blue - 128 [label="Enter block"]; - 129 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 130 [label="Exit block"]; - } - 131 [label="Exit function run" style="filled" fillcolor=red]; - } + 125 -> {126 127}; + 126 -> {133}; 127 -> {128}; 128 -> {129}; - 129 -> {130}; - 130 -> {131}; - - subgraph cluster_38 { - color=red - 132 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_39 { - color=blue - 133 [label="Enter block"]; - 134 [label="Postponed enter to lambda"]; - subgraph cluster_40 { - color=blue - 135 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_41 { - color=blue - 136 [label="Enter block"]; - 137 [label="Jump: ^@run Unit"]; - 138 [label="Stub" style="filled" fillcolor=gray]; - 139 [label="Exit block" style="filled" fillcolor=gray]; - } - 140 [label="Exit function " style="filled" fillcolor=red]; - } - 141 [label="Postponed exit from lambda"]; - 142 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; - 143 [label="Exit block"]; - } - 144 [label="Exit function test_6" style="filled" fillcolor=red]; - } - 132 -> {133}; + 129 -> {117} [color=green style=dashed]; + 129 -> {130} [style=dotted]; + 130 -> {131} [style=dotted]; + 131 -> {132} [style=dotted]; + 132 -> {133} [style=dotted]; 133 -> {134}; - 134 -> {135 141 142}; - 134 -> {135} [style=dashed]; - 135 -> {136}; + 134 -> {135}; + 135 -> {117} [color=green style=dashed]; 136 -> {137}; - 137 -> {140}; - 137 -> {138} [style=dotted]; - 138 -> {139} [style=dotted]; - 139 -> {140} [style=dotted]; + 137 -> {138}; + + subgraph cluster_42 { + color=red + 139 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_43 { + color=blue + 140 [label="Enter block"]; + subgraph cluster_44 { + color=blue + 141 [label="Function call arguments enter"]; + 142 [label="Function call arguments exit"]; + } + 143 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 144 [label="Exit block"]; + } + 145 [label="Exit function run" style="filled" fillcolor=red]; + } + 139 -> {140}; 140 -> {141}; 141 -> {142}; - 141 -> {134} [color=green style=dashed]; 142 -> {143}; 143 -> {144}; + 144 -> {145}; + + subgraph cluster_45 { + color=red + 146 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_46 { + color=blue + 147 [label="Enter block"]; + subgraph cluster_47 { + color=blue + 148 [label="Function call arguments enter"]; + 149 [label="Postponed enter to lambda"]; + subgraph cluster_48 { + color=blue + 150 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 151 [label="Enter block"]; + 152 [label="Jump: ^@run Unit"]; + 153 [label="Stub" style="filled" fillcolor=gray]; + 154 [label="Exit block" style="filled" fillcolor=gray]; + } + 155 [label="Exit function " style="filled" fillcolor=red]; + } + 156 [label="Function call arguments exit"]; + } + 157 [label="Postponed exit from lambda"]; + 158 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; + 159 [label="Exit block"]; + } + 160 [label="Exit function test_6" style="filled" fillcolor=red]; + } + 146 -> {147}; + 147 -> {148}; + 148 -> {149}; + 149 -> {150 156 157}; + 149 -> {150} [style=dashed]; + 150 -> {151}; + 151 -> {152}; + 152 -> {155}; + 152 -> {153} [style=dotted]; + 153 -> {154} [style=dotted]; + 154 -> {155} [style=dotted]; + 155 -> {157}; + 156 -> {158}; + 157 -> {158}; + 157 -> {149} [color=green style=dashed]; + 158 -> {159}; + 159 -> {160}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot index 07f8069d6e5..3a12c895308 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot @@ -9,97 +9,118 @@ digraph lambdaAsReturnOfLambda_kt { subgraph cluster_1 { color=blue 1 [label="Enter property" style="filled" fillcolor=red]; - 2 [label="Postponed enter to lambda"]; subgraph cluster_2 { color=blue - 3 [label="Enter function " style="filled" fillcolor=red]; + 2 [label="Function call arguments enter"]; + 3 [label="Postponed enter to lambda"]; subgraph cluster_3 { color=blue - 4 [label="Enter block"]; - 5 [label="Exit anonymous function expression"]; + 4 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 6 [label="Enter function " style="filled" fillcolor=red]; + 5 [label="Enter block"]; + 6 [label="Exit anonymous function expression"]; subgraph cluster_5 { color=blue - 7 [label="Enter block"]; - 8 [label="Access variable R|/foo|"]; - 9 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 10 [label="Exit block"]; + 7 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 8 [label="Enter block"]; + subgraph cluster_7 { + color=blue + 9 [label="Function call arguments enter"]; + 10 [label="Access variable R|/foo|"]; + 11 [label="Function call arguments exit"]; + } + 12 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 13 [label="Exit block"]; + } + 14 [label="Exit function " style="filled" fillcolor=red]; } - 11 [label="Exit function " style="filled" fillcolor=red]; - } - 12 [label="Jump: ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { + 15 [label="Jump: ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { R|/bar|(R|/foo|) } "]; - 13 [label="Stub" style="filled" fillcolor=gray]; - 14 [label="Exit block" style="filled" fillcolor=gray]; + 16 [label="Stub" style="filled" fillcolor=gray]; + 17 [label="Exit block" style="filled" fillcolor=gray]; + } + 18 [label="Exit function " style="filled" fillcolor=red]; } - 15 [label="Exit function " style="filled" fillcolor=red]; + 19 [label="Function call arguments exit"]; } - 16 [label="Postponed exit from lambda"]; - 17 [label="Function call: R|/run| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; - 18 [label="Exit property" style="filled" fillcolor=red]; + 20 [label="Postponed exit from lambda"]; + 21 [label="Function call: R|/run| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; + 22 [label="Exit property" style="filled" fillcolor=red]; } - 19 [label="Exit file lambdaAsReturnOfLambda.kt" style="filled" fillcolor=red]; + 23 [label="Exit file lambdaAsReturnOfLambda.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {19} [style=dotted]; + 0 -> {23} [style=dotted]; 0 -> {1} [style=dashed]; 1 -> {2}; - 2 -> {3 16 17}; - 2 -> {3} [style=dashed]; - 3 -> {4}; + 2 -> {3}; + 3 -> {4 19 20}; + 3 -> {4} [style=dashed]; 4 -> {5}; - 5 -> {6 12}; - 5 -> {6} [style=dashed]; - 6 -> {7}; + 5 -> {6}; + 6 -> {7 15}; + 6 -> {7} [style=dashed]; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 12 -> {15}; - 12 -> {13} [style=dotted]; - 13 -> {14} [style=dotted]; - 14 -> {15} [style=dotted]; - 16 -> {17}; - 17 -> {18}; - 18 -> {19} [color=green]; - - subgraph cluster_6 { - color=red - 20 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 21 [label="Enter block"]; - 22 [label="Exit block"]; - } - 23 [label="Exit function bar" style="filled" fillcolor=red]; - } + 11 -> {12}; + 12 -> {13}; + 13 -> {14}; + 15 -> {18}; + 15 -> {16} [style=dotted]; + 16 -> {17} [style=dotted]; + 17 -> {18} [style=dotted]; + 19 -> {21}; 20 -> {21}; 21 -> {22}; - 22 -> {23}; + 22 -> {23} [color=green]; subgraph cluster_8 { color=red - 24 [label="Enter function run" style="filled" fillcolor=red]; + 24 [label="Enter function bar" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue 25 [label="Enter block"]; - 26 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 27 [label="Jump: ^run R|/block|.R|SubstitutionOverride|()"]; - 28 [label="Stub" style="filled" fillcolor=gray]; - 29 [label="Exit block" style="filled" fillcolor=gray]; + 26 [label="Exit block"]; } - 30 [label="Exit function run" style="filled" fillcolor=red]; + 27 [label="Exit function bar" style="filled" fillcolor=red]; } 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {30}; - 27 -> {28} [style=dotted]; - 28 -> {29} [style=dotted]; - 29 -> {30} [style=dotted]; + + subgraph cluster_10 { + color=red + 28 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 29 [label="Enter block"]; + subgraph cluster_12 { + color=blue + 30 [label="Function call arguments enter"]; + 31 [label="Function call arguments exit"]; + } + 32 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 33 [label="Jump: ^run R|/block|.R|SubstitutionOverride|()"]; + 34 [label="Stub" style="filled" fillcolor=gray]; + 35 [label="Exit block" style="filled" fillcolor=gray]; + } + 36 [label="Exit function run" style="filled" fillcolor=red]; + } + 28 -> {29}; + 29 -> {30}; + 30 -> {31}; + 31 -> {32}; + 32 -> {33}; + 33 -> {36}; + 33 -> {34} [style=dotted]; + 34 -> {35} [style=dotted]; + 35 -> {36} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot index 0402dc71aa0..74ba6f92abc 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot @@ -62,59 +62,80 @@ digraph lambdaReturningObject_kt { subgraph cluster_8 { color=blue 16 [label="Enter block"]; - 17 [label="Function call: R|kotlin/TODO|()" style="filled" fillcolor=yellow]; - 18 [label="Stub" style="filled" fillcolor=gray]; - 19 [label="Jump: ^MyOut R|kotlin/TODO|()" style="filled" fillcolor=gray]; + subgraph cluster_9 { + color=blue + 17 [label="Function call arguments enter"]; + 18 [label="Function call arguments exit"]; + } + 19 [label="Function call: R|kotlin/TODO|()" style="filled" fillcolor=yellow]; 20 [label="Stub" style="filled" fillcolor=gray]; - 21 [label="Exit block" style="filled" fillcolor=gray]; + 21 [label="Jump: ^MyOut R|kotlin/TODO|()" style="filled" fillcolor=gray]; + 22 [label="Stub" style="filled" fillcolor=gray]; + 23 [label="Exit block" style="filled" fillcolor=gray]; } - 22 [label="Exit function MyOut" style="filled" fillcolor=gray]; + 24 [label="Exit function MyOut" style="filled" fillcolor=gray]; } 15 -> {16}; 16 -> {17}; - 17 -> {18} [style=dotted]; - 18 -> {19} [style=dotted]; - 19 -> {20 22} [style=dotted]; + 17 -> {18}; + 18 -> {19}; + 19 -> {20} [style=dotted]; 20 -> {21} [style=dotted]; - 21 -> {22} [style=dotted]; + 21 -> {22 24} [style=dotted]; + 22 -> {23} [style=dotted]; + 23 -> {24} [style=dotted]; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 23 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_10 { + 25 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 24 [label="Enter block"]; - 25 [label="Postponed enter to lambda"]; - subgraph cluster_11 { + 26 [label="Enter block"]; + subgraph cluster_12 { color=blue - 26 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_12 { + 27 [label="Function call arguments enter"]; + subgraph cluster_13 { color=blue - 27 [label="Enter block"]; - 28 [label="Access qualifier /IrStarProjectionImpl"]; - 29 [label="Exit block"]; + 28 [label="Function call arguments enter"]; + 29 [label="Postponed enter to lambda"]; + subgraph cluster_14 { + color=blue + 30 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 31 [label="Enter block"]; + 32 [label="Access qualifier /IrStarProjectionImpl"]; + 33 [label="Exit block"]; + } + 34 [label="Exit function " style="filled" fillcolor=red]; + } + 35 [label="Function call arguments exit"]; } - 30 [label="Exit function " style="filled" fillcolor=red]; + 36 [label="Postponed exit from lambda"]; + 37 [label="Function call: R|/MyOut|(...)" style="filled" fillcolor=yellow]; + 38 [label="Function call arguments exit"]; } - 31 [label="Postponed exit from lambda"]; - 32 [label="Function call: R|/MyOut|(...)" style="filled" fillcolor=yellow]; - 33 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 34 [label="Exit block"]; + 39 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 40 [label="Exit block"]; } - 35 [label="Exit function foo" style="filled" fillcolor=red]; + 41 [label="Exit function foo" style="filled" fillcolor=red]; } - 23 -> {24}; - 24 -> {25}; - 25 -> {26 31 32}; - 25 -> {26} [style=dashed]; + 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {30}; - 31 -> {32} [color=green]; - 31 -> {33} [color=red]; + 29 -> {30 35 36}; + 29 -> {30} [style=dashed]; + 30 -> {31}; + 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {35}; + 35 -> {37}; + 36 -> {37} [color=green]; + 36 -> {39} [color=red]; + 37 -> {38}; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot index 1217302d612..3abfb9a45cd 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot @@ -16,281 +16,330 @@ digraph lambdas_kt { subgraph cluster_2 { color=blue 3 [label="Enter block"]; - 4 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 5 [label="Exit block"]; + subgraph cluster_3 { + color=blue + 4 [label="Function call arguments enter"]; + 5 [label="Function call arguments exit"]; + } + 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 7 [label="Exit block"]; } - 6 [label="Exit function run" style="filled" fillcolor=red]; + 8 [label="Exit function run" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; + 6 -> {7}; + 7 -> {8}; - subgraph cluster_3 { + subgraph cluster_4 { color=red - 7 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_4 { + 9 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 8 [label="Enter block"]; - subgraph cluster_5 { + 10 [label="Enter block"]; + subgraph cluster_6 { color=blue - 9 [label="Enter when"]; - subgraph cluster_6 { - color=blue - 10 [label="Enter when branch condition "]; - 11 [label="Access variable R|/x|"]; - 12 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 13 [label="Exit when branch condition"]; - } - 14 [label="Synthetic else branch"]; - 15 [label="Enter when branch result"]; + 11 [label="Enter when"]; subgraph cluster_7 { color=blue - 16 [label="Enter block"]; - 17 [label="Postponed enter to lambda"]; - subgraph cluster_8 { - color=blue - 18 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 19 [label="Enter block"]; - 20 [label="Access variable R|/x|"]; - 21 [label="Smart cast: R|/x|"]; - 22 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 23 [label="Exit block"]; - } - 24 [label="Exit function " style="filled" fillcolor=red]; - } - 25 [label="Postponed exit from lambda"]; - 26 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; + 12 [label="Enter when branch condition "]; + 13 [label="Access variable R|/x|"]; + 14 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 15 [label="Exit when branch condition"]; } - 28 [label="Exit when branch result"]; - 29 [label="Exit when"]; + 16 [label="Synthetic else branch"]; + 17 [label="Enter when branch result"]; + subgraph cluster_8 { + color=blue + 18 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 19 [label="Function call arguments enter"]; + 20 [label="Postponed enter to lambda"]; + subgraph cluster_10 { + color=blue + 21 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 22 [label="Enter block"]; + subgraph cluster_12 { + color=blue + 23 [label="Function call arguments enter"]; + 24 [label="Access variable R|/x|"]; + 25 [label="Smart cast: R|/x|"]; + 26 [label="Function call arguments exit"]; + } + 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; + } + 29 [label="Exit function " style="filled" fillcolor=red]; + } + 30 [label="Function call arguments exit"]; + } + 31 [label="Postponed exit from lambda"]; + 32 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; + 33 [label="Exit block"]; + } + 34 [label="Exit when branch result"]; + 35 [label="Exit when"]; } - 30 [label="Exit block"]; + 36 [label="Exit block"]; } - 31 [label="Exit function test_1" style="filled" fillcolor=red]; + 37 [label="Exit function test_1" style="filled" fillcolor=red]; } - 7 -> {8}; - 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {14 15}; - 14 -> {29}; - 15 -> {16}; - 16 -> {17}; - 17 -> {18 25 26}; - 17 -> {18} [style=dashed]; + 13 -> {14}; + 14 -> {15}; + 15 -> {16 17}; + 16 -> {35}; + 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21}; + 20 -> {21 30 31}; + 20 -> {21} [style=dashed]; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 25 -> {17} [color=green style=dashed]; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {30}; - 30 -> {31}; - - subgraph cluster_10 { - color=red - 32 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 33 [label="Enter block"]; - subgraph cluster_12 { - color=blue - 34 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 35 [label="Enter when branch condition "]; - 36 [label="Access variable R|/x|"]; - 37 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 38 [label="Exit when branch condition"]; - } - 39 [label="Synthetic else branch"]; - 40 [label="Enter when branch result"]; - subgraph cluster_14 { - color=blue - 41 [label="Enter block"]; - 42 [label="Exit anonymous function expression"]; - 43 [label="Variable declaration: lval lambda: R|() -> kotlin/Int|"]; - 44 [label="Exit block"]; - } - 45 [label="Exit when branch result"]; - 46 [label="Exit when"]; - } - 47 [label="Exit block"]; - } - 48 [label="Exit function test_2" style="filled" fillcolor=red]; - } - subgraph cluster_15 { - color=blue - 49 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 50 [label="Enter block"]; - 51 [label="Access variable R|/x|"]; - 52 [label="Smart cast: R|/x|"]; - 53 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 54 [label="Exit block"]; - } - 55 [label="Exit function " style="filled" fillcolor=red]; - } + 29 -> {31}; + 30 -> {32}; + 31 -> {32}; + 31 -> {20} [color=green style=dashed]; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38}; - 38 -> {39 40}; - 39 -> {46}; + + subgraph cluster_13 { + color=red + 38 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 39 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 40 [label="Enter when"]; + subgraph cluster_16 { + color=blue + 41 [label="Enter when branch condition "]; + 42 [label="Access variable R|/x|"]; + 43 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 44 [label="Exit when branch condition"]; + } + 45 [label="Synthetic else branch"]; + 46 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 47 [label="Enter block"]; + 48 [label="Exit anonymous function expression"]; + 49 [label="Variable declaration: lval lambda: R|() -> kotlin/Int|"]; + 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]; + } + subgraph cluster_18 { + color=blue + 55 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_19 { + color=blue + 56 [label="Enter block"]; + subgraph cluster_20 { + color=blue + 57 [label="Function call arguments enter"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Smart cast: R|/x|"]; + 60 [label="Function call arguments exit"]; + } + 61 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 62 [label="Exit block"]; + } + 63 [label="Exit function " style="filled" fillcolor=red]; + } + 38 -> {39}; + 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43 49}; - 42 -> {49} [style=dashed]; + 42 -> {43}; 43 -> {44}; - 44 -> {45}; - 45 -> {46}; + 44 -> {45 46}; + 45 -> {52}; 46 -> {47}; 47 -> {48}; + 48 -> {49 55}; + 48 -> {55} [style=dashed]; 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {55}; - - subgraph cluster_17 { - color=red - 56 [label="Enter function getInt" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 57 [label="Enter block"]; - 58 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 59 [label="Const: Int(1)"]; - 60 [label="Jump: ^getInt Int(1)"]; - 61 [label="Stub" style="filled" fillcolor=gray]; - 62 [label="Exit block" style="filled" fillcolor=gray]; - } - 63 [label="Exit function getInt" style="filled" fillcolor=red]; - } + 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {63}; - 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; - 62 -> {63} [style=dotted]; + 60 -> {61}; + 61 -> {62}; + 62 -> {63}; - subgraph cluster_19 { + subgraph cluster_21 { color=red - 64 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_20 { + 64 [label="Enter function getInt" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue 65 [label="Enter block"]; - 66 [label="Postponed enter to lambda"]; - subgraph cluster_21 { + subgraph cluster_23 { color=blue - 67 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 68 [label="Enter block"]; - 69 [label="Const: Int(1)"]; - 70 [label="Jump: ^test_3 Int(1)"]; - 71 [label="Stub" style="filled" fillcolor=gray]; - 72 [label="Exit block" style="filled" fillcolor=gray]; - } - 73 [label="Exit function " style="filled" fillcolor=gray]; + 66 [label="Function call arguments enter"]; + 67 [label="Function call arguments exit"]; } - 74 [label="Postponed exit from lambda"]; - 75 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; - 76 [label="Jump: ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { - ^test_3 Int(1) -} -)"]; - 77 [label="Stub" style="filled" fillcolor=gray]; - 78 [label="Exit block" style="filled" fillcolor=gray]; + 68 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 69 [label="Const: Int(1)"]; + 70 [label="Jump: ^getInt Int(1)"]; + 71 [label="Stub" style="filled" fillcolor=gray]; + 72 [label="Exit block" style="filled" fillcolor=gray]; } - 79 [label="Exit function test_3" style="filled" fillcolor=red]; + 73 [label="Exit function getInt" style="filled" fillcolor=red]; } 64 -> {65}; 65 -> {66}; - 66 -> {67 74 75}; - 66 -> {67} [style=dashed]; + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {79}; + 70 -> {73}; 70 -> {71} [style=dotted]; 71 -> {72} [style=dotted]; 72 -> {73} [style=dotted]; - 73 -> {74} [style=dotted]; - 74 -> {75}; - 74 -> {66} [color=green style=dashed]; - 75 -> {76}; - 76 -> {79}; - 76 -> {77} [style=dotted]; - 77 -> {78} [style=dotted]; - 78 -> {79} [style=dotted]; - subgraph cluster_23 { + subgraph cluster_24 { color=red - 80 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_24 { + 74 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_25 { color=blue - 81 [label="Enter block"]; - 82 [label="Postponed enter to lambda"]; - subgraph cluster_25 { + 75 [label="Enter block"]; + subgraph cluster_26 { color=blue - 83 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_26 { + 76 [label="Function call arguments enter"]; + 77 [label="Postponed enter to lambda"]; + subgraph cluster_27 { color=blue - 84 [label="Enter block"]; - 85 [label="Const: Int(1)"]; - 86 [label="Jump: ^test_4 Int(1)"]; - 87 [label="Stub" style="filled" fillcolor=gray]; - 88 [label="Exit block" style="filled" fillcolor=gray]; + 78 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 79 [label="Enter block"]; + 80 [label="Const: Int(1)"]; + 81 [label="Jump: ^test_3 Int(1)"]; + 82 [label="Stub" style="filled" fillcolor=gray]; + 83 [label="Exit block" style="filled" fillcolor=gray]; + } + 84 [label="Exit function " style="filled" fillcolor=gray]; } - 89 [label="Exit function " style="filled" fillcolor=gray]; + 85 [label="Function call arguments exit"]; } - 90 [label="Postponed exit from lambda"]; - 91 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; - 92 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { + 86 [label="Postponed exit from lambda"]; + 87 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; + 88 [label="Jump: ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { + ^test_3 Int(1) +} +)"]; + 89 [label="Stub" style="filled" fillcolor=gray]; + 90 [label="Exit block" style="filled" fillcolor=gray]; + } + 91 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 74 -> {75}; + 75 -> {76}; + 76 -> {77}; + 77 -> {78 85 86}; + 77 -> {78} [style=dashed]; + 78 -> {79}; + 79 -> {80}; + 80 -> {81}; + 81 -> {91}; + 81 -> {82} [style=dotted]; + 82 -> {83} [style=dotted]; + 83 -> {84} [style=dotted]; + 84 -> {86} [style=dotted]; + 85 -> {87}; + 86 -> {87}; + 86 -> {77} [color=green style=dashed]; + 87 -> {88}; + 88 -> {91}; + 88 -> {89} [style=dotted]; + 89 -> {90} [style=dotted]; + 90 -> {91} [style=dotted]; + + subgraph cluster_29 { + color=red + 92 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 93 [label="Enter block"]; + subgraph cluster_31 { + color=blue + 94 [label="Function call arguments enter"]; + 95 [label="Postponed enter to lambda"]; + subgraph cluster_32 { + color=blue + 96 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_33 { + color=blue + 97 [label="Enter block"]; + 98 [label="Const: Int(1)"]; + 99 [label="Jump: ^test_4 Int(1)"]; + 100 [label="Stub" style="filled" fillcolor=gray]; + 101 [label="Exit block" style="filled" fillcolor=gray]; + } + 102 [label="Exit function " style="filled" fillcolor=gray]; + } + 103 [label="Function call arguments exit"]; + } + 104 [label="Postponed exit from lambda"]; + 105 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; + 106 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { ^test_4 Int(1) } )"]; - 93 [label="Stub" style="filled" fillcolor=gray]; - 94 [label="Exit block" style="filled" fillcolor=gray]; + 107 [label="Stub" style="filled" fillcolor=gray]; + 108 [label="Exit block" style="filled" fillcolor=gray]; } - 95 [label="Exit function test_4" style="filled" fillcolor=red]; + 109 [label="Exit function test_4" style="filled" fillcolor=red]; } - 80 -> {81}; - 81 -> {82}; - 82 -> {83 90 91}; - 82 -> {83} [style=dashed]; - 83 -> {84}; - 84 -> {85}; - 85 -> {86}; - 86 -> {95}; - 86 -> {87} [style=dotted]; - 87 -> {88} [style=dotted]; - 88 -> {89} [style=dotted]; - 89 -> {90} [style=dotted]; - 90 -> {91}; - 90 -> {82} [color=green style=dashed]; - 91 -> {92}; - 92 -> {95}; - 92 -> {93} [style=dotted]; - 93 -> {94} [style=dotted]; - 94 -> {95} [style=dotted]; + 92 -> {93}; + 93 -> {94}; + 94 -> {95}; + 95 -> {96 103 104}; + 95 -> {96} [style=dashed]; + 96 -> {97}; + 97 -> {98}; + 98 -> {99}; + 99 -> {109}; + 99 -> {100} [style=dotted]; + 100 -> {101} [style=dotted]; + 101 -> {102} [style=dotted]; + 102 -> {104} [style=dotted]; + 103 -> {105}; + 104 -> {105}; + 104 -> {95} [color=green style=dashed]; + 105 -> {106}; + 106 -> {109}; + 106 -> {107} [style=dotted]; + 107 -> {108} [style=dotted]; + 108 -> {109} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot index 12b09900119..220e286361e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot @@ -16,176 +16,203 @@ digraph localClassesWithImplicit_kt { subgraph cluster_2 { color=blue 3 [label="Enter block"]; - 4 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 5 [label="Jump: ^myRun R|/block|.R|SubstitutionOverride|()"]; - 6 [label="Stub" style="filled" fillcolor=gray]; - 7 [label="Exit block" style="filled" fillcolor=gray]; + subgraph cluster_3 { + color=blue + 4 [label="Function call arguments enter"]; + 5 [label="Function call arguments exit"]; + } + 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 7 [label="Jump: ^myRun R|/block|.R|SubstitutionOverride|()"]; + 8 [label="Stub" style="filled" fillcolor=gray]; + 9 [label="Exit block" style="filled" fillcolor=gray]; } - 8 [label="Exit function myRun" style="filled" fillcolor=red]; + 10 [label="Exit function myRun" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; - 5 -> {8}; - 5 -> {6} [style=dotted]; - 6 -> {7} [style=dotted]; + 5 -> {6}; + 6 -> {7}; + 7 -> {10}; 7 -> {8} [style=dotted]; + 8 -> {9} [style=dotted]; + 9 -> {10} [style=dotted]; - subgraph cluster_3 { + subgraph cluster_4 { color=red - 9 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_4 { + 11 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - subgraph cluster_5 { + 12 [label="Enter block"]; + subgraph cluster_6 { color=blue - 11 [label="Enter when"]; - subgraph cluster_6 { - color=blue - 12 [label="Enter when branch condition "]; - 13 [label="Access variable R|/a|"]; - 14 [label="Type operator: (R|/a| !is R|kotlin/String|)"]; - 15 [label="Exit when branch condition"]; - } - 16 [label="Synthetic else branch"]; - 17 [label="Enter when branch result"]; + 13 [label="Enter when"]; subgraph cluster_7 { color=blue - 18 [label="Enter block"]; - 19 [label="Jump: ^test Unit"]; - 20 [label="Stub" style="filled" fillcolor=gray]; - 21 [label="Exit block" style="filled" fillcolor=gray]; + 14 [label="Enter when branch condition "]; + 15 [label="Access variable R|/a|"]; + 16 [label="Type operator: (R|/a| !is R|kotlin/String|)"]; + 17 [label="Exit when branch condition"]; } - 22 [label="Exit when branch result" style="filled" fillcolor=gray]; - 23 [label="Exit when"]; - } - 24 [label="Local class declaration"]; - 25 [label="Enter anonymous object"]; - subgraph cluster_8 { - color=blue - 26 [label="Enter class " style="filled" fillcolor=red]; - subgraph cluster_9 { + 18 [label="Synthetic else branch"]; + 19 [label="Enter when branch result"]; + subgraph cluster_8 { color=blue - 27 [label="Enter function " style="filled" fillcolor=red]; - 28 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 29 [label="Exit function " style="filled" fillcolor=red]; + 20 [label="Enter block"]; + 21 [label="Jump: ^test Unit"]; + 22 [label="Stub" style="filled" fillcolor=gray]; + 23 [label="Exit block" style="filled" fillcolor=gray]; } - 30 [label="Exit class " style="filled" fillcolor=red]; + 24 [label="Exit when branch result" style="filled" fillcolor=gray]; + 25 [label="Exit when"]; } - 31 [label="Exit anonymous object expression"]; - 32 [label="Variable declaration: lval x: R||"]; - 33 [label="Exit block"]; - } - 34 [label="Exit function test" style="filled" fillcolor=red]; - } - subgraph cluster_10 { - color=blue - 35 [label="Enter function baz" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 36 [label="Enter block"]; - 37 [label="Const: Int(1)"]; - 38 [label="Jump: ^baz Int(1)"]; - 39 [label="Stub" style="filled" fillcolor=gray]; - 40 [label="Exit block" style="filled" fillcolor=gray]; - } - 41 [label="Exit function baz" style="filled" fillcolor=red]; - } - subgraph cluster_12 { - color=blue - 42 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 43 [label="Enter block"]; - 44 [label="Postponed enter to lambda"]; - subgraph cluster_14 { + 26 [label="Local class declaration"]; + 27 [label="Enter anonymous object"]; + subgraph cluster_9 { color=blue - 45 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_15 { + 28 [label="Enter class " style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 46 [label="Enter block"]; - 47 [label="Access variable R|/a|"]; - 48 [label="Smart cast: R|/a|"]; - 49 [label="Access variable R|kotlin/String.length|"]; - 50 [label="Access variable R|/b|"]; - 51 [label="Access variable #"]; - 52 [label="Function call: this@R|/|.R|/.baz|()" style="filled" fillcolor=yellow]; - 53 [label="Exit block"]; + 29 [label="Enter function " style="filled" fillcolor=red]; + 30 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 31 [label="Exit function " style="filled" fillcolor=red]; } - 54 [label="Exit function " style="filled" fillcolor=red]; + 32 [label="Exit class " style="filled" fillcolor=red]; } - 55 [label="Postponed exit from lambda"]; - 56 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 57 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 33 [label="Exit anonymous object expression"]; + 34 [label="Variable declaration: lval x: R||"]; + 35 [label="Exit block"]; + } + 36 [label="Exit function test" style="filled" fillcolor=red]; + } + subgraph cluster_11 { + color=blue + 37 [label="Enter function baz" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 38 [label="Enter block"]; + 39 [label="Const: Int(1)"]; + 40 [label="Jump: ^baz Int(1)"]; + 41 [label="Stub" style="filled" fillcolor=gray]; + 42 [label="Exit block" style="filled" fillcolor=gray]; + } + 43 [label="Exit function baz" style="filled" fillcolor=red]; + } + subgraph cluster_13 { + color=blue + 44 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 45 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 46 [label="Function call arguments enter"]; + 47 [label="Postponed enter to lambda"]; + subgraph cluster_16 { + color=blue + 48 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_17 { + color=blue + 49 [label="Enter block"]; + 50 [label="Access variable R|/a|"]; + 51 [label="Smart cast: R|/a|"]; + 52 [label="Access variable R|kotlin/String.length|"]; + 53 [label="Access variable R|/b|"]; + 54 [label="Access variable #"]; + subgraph cluster_18 { + color=blue + 55 [label="Function call arguments enter"]; + 56 [label="Function call arguments exit"]; + } + 57 [label="Function call: this@R|/|.R|/.baz|()" style="filled" fillcolor=yellow]; + 58 [label="Exit block"]; + } + 59 [label="Exit function " style="filled" fillcolor=red]; + } + 60 [label="Function call arguments exit"]; + } + 61 [label="Postponed exit from lambda"]; + 62 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 63 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| R|/b|.# ^ this@R|/|.R|/.baz|() } )"]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; + 64 [label="Stub" style="filled" fillcolor=gray]; + 65 [label="Exit block" style="filled" fillcolor=gray]; } - 60 [label="Exit function bar" style="filled" fillcolor=red]; + 66 [label="Exit function bar" style="filled" fillcolor=red]; } - subgraph cluster_16 { + subgraph cluster_19 { color=blue - 61 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_17 { + 67 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_20 { color=blue - 62 [label="Enter block"]; - 63 [label="Postponed enter to lambda"]; - subgraph cluster_18 { + 68 [label="Enter block"]; + subgraph cluster_21 { color=blue - 64 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_19 { + 69 [label="Function call arguments enter"]; + 70 [label="Postponed enter to lambda"]; + subgraph cluster_22 { color=blue - 65 [label="Enter block"]; - 66 [label="Access variable R|/a|"]; - 67 [label="Smart cast: R|/a|"]; - 68 [label="Access variable R|kotlin/String.length|"]; - subgraph cluster_20 { + 71 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_23 { color=blue - 69 [label="Enter when"]; - subgraph cluster_21 { - color=blue - 70 [label="Enter when branch condition "]; - 71 [label="Access variable R|/b|"]; - 72 [label="Type operator: (R|/b| is R|kotlin/String|)"]; - 73 [label="Exit when branch condition"]; - } - subgraph cluster_22 { - color=blue - 74 [label="Enter when branch condition else"]; - 75 [label="Exit when branch condition"]; - } - 76 [label="Enter when branch result"]; - subgraph cluster_23 { - color=blue - 77 [label="Enter block"]; - 78 [label="Const: Int(1)"]; - 79 [label="Exit block"]; - } - 80 [label="Exit when branch result"]; - 81 [label="Enter when branch result"]; + 72 [label="Enter block"]; + 73 [label="Access variable R|/a|"]; + 74 [label="Smart cast: R|/a|"]; + 75 [label="Access variable R|kotlin/String.length|"]; subgraph cluster_24 { color=blue - 82 [label="Enter block"]; - 83 [label="Access variable R|/b|"]; - 84 [label="Smart cast: R|/b|"]; - 85 [label="Access variable R|kotlin/String.length|"]; - 86 [label="Function call: this@R|/|.R|/.bar|()" style="filled" fillcolor=yellow]; - 87 [label="Exit block"]; + 76 [label="Enter when"]; + subgraph cluster_25 { + color=blue + 77 [label="Enter when branch condition "]; + 78 [label="Access variable R|/b|"]; + 79 [label="Type operator: (R|/b| is R|kotlin/String|)"]; + 80 [label="Exit when branch condition"]; + } + subgraph cluster_26 { + color=blue + 81 [label="Enter when branch condition else"]; + 82 [label="Exit when branch condition"]; + } + 83 [label="Enter when branch result"]; + subgraph cluster_27 { + color=blue + 84 [label="Enter block"]; + 85 [label="Const: Int(1)"]; + 86 [label="Exit block"]; + } + 87 [label="Exit when branch result"]; + 88 [label="Enter when branch result"]; + subgraph cluster_28 { + color=blue + 89 [label="Enter block"]; + 90 [label="Access variable R|/b|"]; + 91 [label="Smart cast: R|/b|"]; + 92 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_29 { + color=blue + 93 [label="Function call arguments enter"]; + 94 [label="Function call arguments exit"]; + } + 95 [label="Function call: this@R|/|.R|/.bar|()" style="filled" fillcolor=yellow]; + 96 [label="Exit block"]; + } + 97 [label="Exit when branch result"]; + 98 [label="Exit when"]; } - 88 [label="Exit when branch result"]; - 89 [label="Exit when"]; + 99 [label="Exit block"]; } - 90 [label="Exit block"]; + 100 [label="Exit function " style="filled" fillcolor=red]; } - 91 [label="Exit function " style="filled" fillcolor=red]; + 101 [label="Function call arguments exit"]; } - 92 [label="Postponed exit from lambda"]; - 93 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 94 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 102 [label="Postponed exit from lambda"]; + 103 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 104 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -199,130 +226,150 @@ digraph localClassesWithImplicit_kt { } )"]; - 95 [label="Stub" style="filled" fillcolor=gray]; - 96 [label="Exit block" style="filled" fillcolor=gray]; + 105 [label="Stub" style="filled" fillcolor=gray]; + 106 [label="Exit block" style="filled" fillcolor=gray]; } - 97 [label="Exit function foo" style="filled" fillcolor=red]; + 107 [label="Exit function foo" style="filled" fillcolor=red]; } - subgraph cluster_25 { + subgraph cluster_30 { color=blue - 98 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_26 { + 108 [label="Enter class A" style="filled" fillcolor=red]; + subgraph cluster_31 { color=blue - 99 [label="Enter function " style="filled" fillcolor=red]; - 100 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 101 [label="Exit function " style="filled" fillcolor=red]; + 109 [label="Enter function " style="filled" fillcolor=red]; + 110 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 111 [label="Exit function " style="filled" fillcolor=red]; } - 102 [label="Exit class A" style="filled" fillcolor=red]; + 112 [label="Exit class A" style="filled" fillcolor=red]; } - subgraph cluster_27 { + subgraph cluster_32 { color=blue - 103 [label="Enter function baz" style="filled" fillcolor=red]; - subgraph cluster_28 { + 113 [label="Enter function baz" style="filled" fillcolor=red]; + subgraph cluster_33 { color=blue - 104 [label="Enter block"]; - 105 [label="Const: Int(1)"]; - 106 [label="Jump: ^baz Int(1)"]; - 107 [label="Stub" style="filled" fillcolor=gray]; - 108 [label="Exit block" style="filled" fillcolor=gray]; + 114 [label="Enter block"]; + 115 [label="Const: Int(1)"]; + 116 [label="Jump: ^baz Int(1)"]; + 117 [label="Stub" style="filled" fillcolor=gray]; + 118 [label="Exit block" style="filled" fillcolor=gray]; } - 109 [label="Exit function baz" style="filled" fillcolor=red]; + 119 [label="Exit function baz" style="filled" fillcolor=red]; } - subgraph cluster_29 { + subgraph cluster_34 { color=blue - 110 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_30 { + 120 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_35 { color=blue - 111 [label="Enter block"]; - 112 [label="Postponed enter to lambda"]; - subgraph cluster_31 { + 121 [label="Enter block"]; + subgraph cluster_36 { color=blue - 113 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_32 { + 122 [label="Function call arguments enter"]; + 123 [label="Postponed enter to lambda"]; + subgraph cluster_37 { color=blue - 114 [label="Enter block"]; - 115 [label="Access variable R|/b|"]; - 116 [label="Access variable #"]; - 117 [label="Access variable R|/a|"]; - 118 [label="Smart cast: R|/a|"]; - 119 [label="Access variable R|kotlin/String.length|"]; - 120 [label="Function call: this@R|/A|.R|/baz|()" style="filled" fillcolor=yellow]; - 121 [label="Exit block"]; + 124 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 125 [label="Enter block"]; + 126 [label="Access variable R|/b|"]; + 127 [label="Access variable #"]; + 128 [label="Access variable R|/a|"]; + 129 [label="Smart cast: R|/a|"]; + 130 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_39 { + color=blue + 131 [label="Function call arguments enter"]; + 132 [label="Function call arguments exit"]; + } + 133 [label="Function call: this@R|/A|.R|/baz|()" style="filled" fillcolor=yellow]; + 134 [label="Exit block"]; + } + 135 [label="Exit function " style="filled" fillcolor=red]; } - 122 [label="Exit function " style="filled" fillcolor=red]; + 136 [label="Function call arguments exit"]; } - 123 [label="Postponed exit from lambda"]; - 124 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 125 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 137 [label="Postponed exit from lambda"]; + 138 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 139 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/b|.# R|/a|.R|kotlin/String.length| ^ this@R|/A|.R|/baz|() } )"]; - 126 [label="Stub" style="filled" fillcolor=gray]; - 127 [label="Exit block" style="filled" fillcolor=gray]; + 140 [label="Stub" style="filled" fillcolor=gray]; + 141 [label="Exit block" style="filled" fillcolor=gray]; } - 128 [label="Exit function bar" style="filled" fillcolor=red]; + 142 [label="Exit function bar" style="filled" fillcolor=red]; } - subgraph cluster_33 { + subgraph cluster_40 { color=blue - 129 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_34 { + 143 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_41 { color=blue - 130 [label="Enter block"]; - 131 [label="Postponed enter to lambda"]; - subgraph cluster_35 { + 144 [label="Enter block"]; + subgraph cluster_42 { color=blue - 132 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_36 { + 145 [label="Function call arguments enter"]; + 146 [label="Postponed enter to lambda"]; + subgraph cluster_43 { color=blue - 133 [label="Enter block"]; - 134 [label="Access variable R|/a|"]; - 135 [label="Smart cast: R|/a|"]; - 136 [label="Access variable R|kotlin/String.length|"]; - subgraph cluster_37 { + 147 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_44 { color=blue - 137 [label="Enter when"]; - subgraph cluster_38 { + 148 [label="Enter block"]; + 149 [label="Access variable R|/a|"]; + 150 [label="Smart cast: R|/a|"]; + 151 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_45 { color=blue - 138 [label="Enter when branch condition "]; - 139 [label="Access variable R|/b|"]; - 140 [label="Type operator: (R|/b| is R|kotlin/String|)"]; - 141 [label="Exit when branch condition"]; + 152 [label="Enter when"]; + subgraph cluster_46 { + color=blue + 153 [label="Enter when branch condition "]; + 154 [label="Access variable R|/b|"]; + 155 [label="Type operator: (R|/b| is R|kotlin/String|)"]; + 156 [label="Exit when branch condition"]; + } + subgraph cluster_47 { + color=blue + 157 [label="Enter when branch condition else"]; + 158 [label="Exit when branch condition"]; + } + 159 [label="Enter when branch result"]; + subgraph cluster_48 { + color=blue + 160 [label="Enter block"]; + 161 [label="Const: Int(1)"]; + 162 [label="Exit block"]; + } + 163 [label="Exit when branch result"]; + 164 [label="Enter when branch result"]; + subgraph cluster_49 { + color=blue + 165 [label="Enter block"]; + 166 [label="Access variable R|/b|"]; + 167 [label="Smart cast: R|/b|"]; + 168 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_50 { + color=blue + 169 [label="Function call arguments enter"]; + 170 [label="Function call arguments exit"]; + } + 171 [label="Function call: this@R|/A|.R|/bar|()" style="filled" fillcolor=yellow]; + 172 [label="Exit block"]; + } + 173 [label="Exit when branch result"]; + 174 [label="Exit when"]; } - subgraph cluster_39 { - color=blue - 142 [label="Enter when branch condition else"]; - 143 [label="Exit when branch condition"]; - } - 144 [label="Enter when branch result"]; - subgraph cluster_40 { - color=blue - 145 [label="Enter block"]; - 146 [label="Const: Int(1)"]; - 147 [label="Exit block"]; - } - 148 [label="Exit when branch result"]; - 149 [label="Enter when branch result"]; - subgraph cluster_41 { - color=blue - 150 [label="Enter block"]; - 151 [label="Access variable R|/b|"]; - 152 [label="Smart cast: R|/b|"]; - 153 [label="Access variable R|kotlin/String.length|"]; - 154 [label="Function call: this@R|/A|.R|/bar|()" style="filled" fillcolor=yellow]; - 155 [label="Exit block"]; - } - 156 [label="Exit when branch result"]; - 157 [label="Exit when"]; + 175 [label="Exit block"]; } - 158 [label="Exit block"]; + 176 [label="Exit function " style="filled" fillcolor=red]; } - 159 [label="Exit function " style="filled" fillcolor=red]; + 177 [label="Function call arguments exit"]; } - 160 [label="Postponed exit from lambda"]; - 161 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 162 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 178 [label="Postponed exit from lambda"]; + 179 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 180 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -336,59 +383,57 @@ digraph localClassesWithImplicit_kt { } )"]; - 163 [label="Stub" style="filled" fillcolor=gray]; - 164 [label="Exit block" style="filled" fillcolor=gray]; + 181 [label="Stub" style="filled" fillcolor=gray]; + 182 [label="Exit block" style="filled" fillcolor=gray]; } - 165 [label="Exit function foo" style="filled" fillcolor=red]; + 183 [label="Exit function foo" style="filled" fillcolor=red]; } - 9 -> {10}; - 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16 17}; - 16 -> {23}; - 17 -> {18}; - 18 -> {19}; - 19 -> {34}; - 19 -> {20} [style=dotted]; - 20 -> {21} [style=dotted]; + 15 -> {16}; + 16 -> {17}; + 17 -> {18 19}; + 18 -> {25}; + 19 -> {20}; + 20 -> {21}; + 21 -> {36}; 21 -> {22} [style=dotted]; 22 -> {23} [style=dotted]; - 23 -> {24}; - 24 -> {25 98}; - 24 -> {98} [style=dashed]; + 23 -> {24} [style=dotted]; + 24 -> {25} [style=dotted]; 25 -> {26}; - 25 -> {31} [style=dotted]; - 25 -> {26} [style=dashed]; - 26 -> {27}; - 26 -> {35 42 61} [color=red]; - 26 -> {30} [style=dotted]; - 26 -> {27} [style=dashed]; + 26 -> {27 108}; + 26 -> {108} [style=dashed]; 27 -> {28}; + 27 -> {33} [style=dotted]; + 27 -> {28} [style=dashed]; 28 -> {29}; + 28 -> {37 44 67} [color=red]; + 28 -> {32} [style=dotted]; + 28 -> {29} [style=dashed]; 29 -> {30}; 30 -> {31}; - 30 -> {35 42 61} [color=green]; - 30 -> {35 42 61} [style=dashed]; 31 -> {32}; 32 -> {33}; + 32 -> {37 44 67} [color=green]; + 32 -> {37 44 67} [style=dashed]; 33 -> {34}; + 34 -> {35}; 35 -> {36}; - 36 -> {37}; 37 -> {38}; - 38 -> {41}; - 38 -> {39} [style=dotted]; - 39 -> {40} [style=dotted]; + 38 -> {39}; + 39 -> {40}; + 40 -> {43}; 40 -> {41} [style=dotted]; - 42 -> {43}; - 43 -> {44}; - 44 -> {45 55 56}; - 44 -> {45} [style=dashed]; + 41 -> {42} [style=dotted]; + 42 -> {43} [style=dotted]; + 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; + 47 -> {48 60 61}; + 47 -> {48} [style=dashed]; 48 -> {49}; 49 -> {50}; 50 -> {51}; @@ -397,109 +442,109 @@ digraph localClassesWithImplicit_kt { 53 -> {54}; 54 -> {55}; 55 -> {56}; - 55 -> {44} [color=green style=dashed]; 56 -> {57}; - 57 -> {60}; - 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; - 59 -> {60} [style=dotted]; + 57 -> {58}; + 58 -> {59}; + 59 -> {61}; + 60 -> {62}; 61 -> {62}; + 61 -> {47} [color=green style=dashed]; 62 -> {63}; - 63 -> {64 92 93}; - 63 -> {64} [style=dashed]; - 64 -> {65}; - 65 -> {66}; - 66 -> {67}; + 63 -> {66}; + 63 -> {64} [style=dotted]; + 64 -> {65} [style=dotted]; + 65 -> {66} [style=dotted]; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; + 70 -> {71 101 102}; + 70 -> {71} [style=dashed]; 71 -> {72}; 72 -> {73}; - 73 -> {74 81}; + 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {89}; + 80 -> {81 88}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; - 87 -> {88}; + 87 -> {98}; 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; - 92 -> {63} [color=green style=dashed]; 93 -> {94}; - 94 -> {97}; - 94 -> {95} [style=dotted]; - 95 -> {96} [style=dotted]; - 96 -> {97} [style=dotted]; + 94 -> {95}; + 95 -> {96}; + 96 -> {97}; + 97 -> {98}; 98 -> {99}; - 98 -> {103 110 129} [color=red]; - 98 -> {102} [style=dotted]; - 98 -> {99} [style=dashed]; 99 -> {100}; - 100 -> {101}; - 101 -> {102} [color=green]; - 102 -> {103 110 129} [color=green]; - 102 -> {103 110 129} [style=dashed]; + 100 -> {102}; + 101 -> {103}; + 102 -> {103}; + 102 -> {70} [color=green style=dashed]; 103 -> {104}; - 104 -> {105}; - 105 -> {106}; - 106 -> {109}; + 104 -> {107}; + 104 -> {105} [style=dotted]; + 105 -> {106} [style=dotted]; 106 -> {107} [style=dotted]; - 107 -> {108} [style=dotted]; - 108 -> {109} [style=dotted]; + 108 -> {109}; + 108 -> {113 120 143} [color=red]; + 108 -> {112} [style=dotted]; + 108 -> {109} [style=dashed]; + 109 -> {110}; 110 -> {111}; - 111 -> {112}; - 112 -> {113 123 124}; - 112 -> {113} [style=dashed]; + 111 -> {112} [color=green]; + 112 -> {113 120 143} [color=green]; + 112 -> {113 120 143} [style=dashed]; 113 -> {114}; 114 -> {115}; 115 -> {116}; - 116 -> {117}; - 117 -> {118}; - 118 -> {119}; - 119 -> {120}; + 116 -> {119}; + 116 -> {117} [style=dotted]; + 117 -> {118} [style=dotted]; + 118 -> {119} [style=dotted]; 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124}; - 123 -> {112} [color=green style=dashed]; + 123 -> {124 136 137}; + 123 -> {124} [style=dashed]; 124 -> {125}; - 125 -> {128}; - 125 -> {126} [style=dotted]; - 126 -> {127} [style=dotted]; - 127 -> {128} [style=dotted]; + 125 -> {126}; + 126 -> {127}; + 127 -> {128}; + 128 -> {129}; 129 -> {130}; 130 -> {131}; - 131 -> {132 160 161}; - 131 -> {132} [style=dashed]; + 131 -> {132}; 132 -> {133}; 133 -> {134}; 134 -> {135}; - 135 -> {136}; - 136 -> {137}; + 135 -> {137}; + 136 -> {138}; 137 -> {138}; + 137 -> {123} [color=green style=dashed]; 138 -> {139}; - 139 -> {140}; - 140 -> {141}; - 141 -> {142 149}; - 142 -> {143}; + 139 -> {142}; + 139 -> {140} [style=dotted]; + 140 -> {141} [style=dotted]; + 141 -> {142} [style=dotted]; 143 -> {144}; 144 -> {145}; 145 -> {146}; - 146 -> {147}; + 146 -> {147 177 178}; + 146 -> {147} [style=dashed]; 147 -> {148}; - 148 -> {157}; + 148 -> {149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; @@ -507,16 +552,34 @@ digraph localClassesWithImplicit_kt { 153 -> {154}; 154 -> {155}; 155 -> {156}; - 156 -> {157}; + 156 -> {157 164}; 157 -> {158}; 158 -> {159}; 159 -> {160}; 160 -> {161}; - 160 -> {131} [color=green style=dashed]; 161 -> {162}; - 162 -> {165}; - 162 -> {163} [style=dotted]; - 163 -> {164} [style=dotted]; - 164 -> {165} [style=dotted]; + 162 -> {163}; + 163 -> {174}; + 164 -> {165}; + 165 -> {166}; + 166 -> {167}; + 167 -> {168}; + 168 -> {169}; + 169 -> {170}; + 170 -> {171}; + 171 -> {172}; + 172 -> {173}; + 173 -> {174}; + 174 -> {175}; + 175 -> {176}; + 176 -> {178}; + 177 -> {179}; + 178 -> {179}; + 178 -> {146} [color=green style=dashed]; + 179 -> {180}; + 180 -> {183}; + 180 -> {181} [style=dotted]; + 181 -> {182} [style=dotted]; + 182 -> {183} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot index 68ca9f235e5..bef481376ec 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot @@ -128,51 +128,71 @@ digraph loops_kt { subgraph cluster_15 { color=blue 40 [label="Enter block"]; - 41 [label="Const: Int(0)"]; - 42 [label="Const: Int(5)"]; - 43 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)" style="filled" fillcolor=yellow]; - 44 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()" style="filled" fillcolor=yellow]; - 45 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; subgraph cluster_16 { color=blue - 46 [label="Enter while loop"]; + 41 [label="Function call arguments enter"]; subgraph cluster_17 { color=blue - 47 [label="Enter loop condition"]; - 48 [label="Access variable R|/|"]; - 49 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 50 [label="Exit loop condition"]; + 42 [label="Function call arguments enter"]; + 43 [label="Const: Int(0)"]; + 44 [label="Const: Int(5)"]; + 45 [label="Function call arguments exit"]; } - subgraph cluster_18 { - color=blue - 51 [label="Enter loop block"]; - subgraph cluster_19 { - color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/|"]; - 54 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()" style="filled" fillcolor=yellow]; - 55 [label="Variable declaration: lval i: R|kotlin/Int|"]; - subgraph cluster_20 { - color=blue - 56 [label="Enter block"]; - 57 [label="Access variable R|/x|"]; - 58 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 59 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; - 60 [label="Exit block"]; - } - 61 [label="Exit block"]; - } - 62 [label="Exit loop block"]; - } - 63 [label="Exit while loop"]; + 46 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)" style="filled" fillcolor=yellow]; + 47 [label="Function call arguments exit"]; } - 64 [label="Exit block"]; + 48 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()" style="filled" fillcolor=yellow]; + 49 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; + subgraph cluster_18 { + color=blue + 50 [label="Enter while loop"]; + subgraph cluster_19 { + color=blue + 51 [label="Enter loop condition"]; + subgraph cluster_20 { + color=blue + 52 [label="Function call arguments enter"]; + 53 [label="Access variable R|/|"]; + 54 [label="Function call arguments exit"]; + } + 55 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 56 [label="Exit loop condition"]; + } + subgraph cluster_21 { + color=blue + 57 [label="Enter loop block"]; + subgraph cluster_22 { + color=blue + 58 [label="Enter block"]; + subgraph cluster_23 { + color=blue + 59 [label="Function call arguments enter"]; + 60 [label="Access variable R|/|"]; + 61 [label="Function call arguments exit"]; + } + 62 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()" style="filled" fillcolor=yellow]; + 63 [label="Variable declaration: lval i: R|kotlin/Int|"]; + subgraph cluster_24 { + color=blue + 64 [label="Enter block"]; + 65 [label="Access variable R|/x|"]; + 66 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 67 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; + 68 [label="Exit block"]; + } + 69 [label="Exit block"]; + } + 70 [label="Exit loop block"]; + } + 71 [label="Exit while loop"]; + } + 72 [label="Exit block"]; } - 65 [label="Access variable R|/x|"]; - 66 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 67 [label="Exit block"]; + 73 [label="Access variable R|/x|"]; + 74 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 75 [label="Exit block"]; } - 68 [label="Exit function testFor" style="filled" fillcolor=red]; + 76 [label="Exit function testFor" style="filled" fillcolor=red]; } 38 -> {39}; 39 -> {40}; @@ -186,381 +206,389 @@ digraph loops_kt { 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {51 63}; + 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57}; + 56 -> {57 71}; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {47} [color=green style=dashed]; + 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - - subgraph cluster_21 { - color=red - 69 [label="Enter function testWhileTrue" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 70 [label="Enter block"]; - subgraph cluster_23 { - color=blue - 71 [label="Enter while loop"]; - subgraph cluster_24 { - color=blue - 72 [label="Enter loop condition"]; - 73 [label="Const: Boolean(true)"]; - 74 [label="Exit loop condition"]; - } - subgraph cluster_25 { - color=blue - 75 [label="Enter loop block"]; - subgraph cluster_26 { - color=blue - 76 [label="Enter block"]; - 77 [label="Const: Int(1)"]; - 78 [label="Exit block"]; - } - 79 [label="Exit loop block"]; - } - 80 [label="Exit while loop" style="filled" fillcolor=gray]; - } - 81 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 82 [label="Exit block" style="filled" fillcolor=gray]; - } - 83 [label="Exit function testWhileTrue" style="filled" fillcolor=gray]; - } + 68 -> {69}; 69 -> {70}; - 70 -> {71}; + 70 -> {51} [color=green style=dashed]; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 74 -> {80} [style=dotted]; 75 -> {76}; - 76 -> {77}; + + subgraph cluster_25 { + color=red + 77 [label="Enter function testWhileTrue" style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 78 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 79 [label="Enter while loop"]; + subgraph cluster_28 { + color=blue + 80 [label="Enter loop condition"]; + 81 [label="Const: Boolean(true)"]; + 82 [label="Exit loop condition"]; + } + subgraph cluster_29 { + color=blue + 83 [label="Enter loop block"]; + subgraph cluster_30 { + color=blue + 84 [label="Enter block"]; + 85 [label="Const: Int(1)"]; + 86 [label="Exit block"]; + } + 87 [label="Exit loop block"]; + } + 88 [label="Exit while loop" style="filled" fillcolor=gray]; + } + 89 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 90 [label="Exit block" style="filled" fillcolor=gray]; + } + 91 [label="Exit function testWhileTrue" style="filled" fillcolor=gray]; + } 77 -> {78}; 78 -> {79}; - 79 -> {72} [color=green style=dashed]; - 80 -> {81} [style=dotted]; - 81 -> {82} [style=dotted]; - 82 -> {83} [style=dotted]; - - subgraph cluster_27 { - color=red - 84 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 85 [label="Enter block"]; - subgraph cluster_29 { - color=blue - 86 [label="Enter while loop"]; - subgraph cluster_30 { - color=blue - 87 [label="Enter loop condition"]; - 88 [label="Const: Boolean(true)"]; - 89 [label="Exit loop condition"]; - } - subgraph cluster_31 { - color=blue - 90 [label="Enter loop block"]; - subgraph cluster_32 { - color=blue - 91 [label="Enter block"]; - subgraph cluster_33 { - color=blue - 92 [label="Enter when"]; - subgraph cluster_34 { - color=blue - 93 [label="Enter when branch condition "]; - 94 [label="Access variable R|/b|"]; - 95 [label="Exit when branch condition"]; - } - 96 [label="Synthetic else branch"]; - 97 [label="Enter when branch result"]; - subgraph cluster_35 { - color=blue - 98 [label="Enter block"]; - 99 [label="Jump: break@@@[Boolean(true)] "]; - 100 [label="Stub" style="filled" fillcolor=gray]; - 101 [label="Exit block" style="filled" fillcolor=gray]; - } - 102 [label="Exit when branch result" style="filled" fillcolor=gray]; - 103 [label="Exit when"]; - } - 104 [label="Exit block"]; - } - 105 [label="Exit loop block"]; - } - 106 [label="Exit while loop"]; - } - 107 [label="Const: Int(1)"]; - 108 [label="Exit block"]; - } - 109 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red]; - } + 79 -> {80}; + 80 -> {81}; + 81 -> {82}; + 82 -> {83}; + 82 -> {88} [style=dotted]; + 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; - 87 -> {88}; - 88 -> {89}; - 89 -> {90}; - 89 -> {106} [style=dotted]; - 90 -> {91}; - 91 -> {92}; + 87 -> {80} [color=green style=dashed]; + 88 -> {89} [style=dotted]; + 89 -> {90} [style=dotted]; + 90 -> {91} [style=dotted]; + + subgraph cluster_31 { + color=red + 92 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 93 [label="Enter block"]; + subgraph cluster_33 { + color=blue + 94 [label="Enter while loop"]; + subgraph cluster_34 { + color=blue + 95 [label="Enter loop condition"]; + 96 [label="Const: Boolean(true)"]; + 97 [label="Exit loop condition"]; + } + subgraph cluster_35 { + color=blue + 98 [label="Enter loop block"]; + subgraph cluster_36 { + color=blue + 99 [label="Enter block"]; + subgraph cluster_37 { + color=blue + 100 [label="Enter when"]; + subgraph cluster_38 { + color=blue + 101 [label="Enter when branch condition "]; + 102 [label="Access variable R|/b|"]; + 103 [label="Exit when branch condition"]; + } + 104 [label="Synthetic else branch"]; + 105 [label="Enter when branch result"]; + subgraph cluster_39 { + color=blue + 106 [label="Enter block"]; + 107 [label="Jump: break@@@[Boolean(true)] "]; + 108 [label="Stub" style="filled" fillcolor=gray]; + 109 [label="Exit block" style="filled" fillcolor=gray]; + } + 110 [label="Exit when branch result" style="filled" fillcolor=gray]; + 111 [label="Exit when"]; + } + 112 [label="Exit block"]; + } + 113 [label="Exit loop block"]; + } + 114 [label="Exit while loop"]; + } + 115 [label="Const: Int(1)"]; + 116 [label="Exit block"]; + } + 117 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red]; + } 92 -> {93}; 93 -> {94}; 94 -> {95}; - 95 -> {96 97}; - 96 -> {103}; + 95 -> {96}; + 96 -> {97}; 97 -> {98}; + 97 -> {114} [style=dotted]; 98 -> {99}; - 99 -> {106}; - 99 -> {100} [style=dotted]; - 100 -> {101} [style=dotted]; - 101 -> {102} [style=dotted]; - 102 -> {103} [style=dotted]; - 103 -> {104}; - 104 -> {105}; - 105 -> {87} [color=green style=dashed]; + 99 -> {100}; + 100 -> {101}; + 101 -> {102}; + 102 -> {103}; + 103 -> {104 105}; + 104 -> {111}; + 105 -> {106}; 106 -> {107}; - 107 -> {108}; - 108 -> {109}; - - subgraph cluster_36 { - color=red - 110 [label="Enter function testWhileFalse" style="filled" fillcolor=red]; - subgraph cluster_37 { - color=blue - 111 [label="Enter block"]; - subgraph cluster_38 { - color=blue - 112 [label="Enter while loop"]; - subgraph cluster_39 { - color=blue - 113 [label="Enter loop condition"]; - 114 [label="Const: Boolean(false)"]; - 115 [label="Exit loop condition"]; - } - subgraph cluster_40 { - color=blue - 116 [label="Enter loop block" style="filled" fillcolor=gray]; - subgraph cluster_41 { - color=blue - 117 [label="Enter block" style="filled" fillcolor=gray]; - 118 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 119 [label="Exit block" style="filled" fillcolor=gray]; - } - 120 [label="Exit loop block" style="filled" fillcolor=gray]; - } - 121 [label="Exit while loop"]; - } - 122 [label="Const: Int(1)"]; - 123 [label="Exit block"]; - } - 124 [label="Exit function testWhileFalse" style="filled" fillcolor=red]; - } - 110 -> {111}; + 107 -> {114}; + 107 -> {108} [style=dotted]; + 108 -> {109} [style=dotted]; + 109 -> {110} [style=dotted]; + 110 -> {111} [style=dotted]; 111 -> {112}; 112 -> {113}; - 113 -> {114}; + 113 -> {95} [color=green style=dashed]; 114 -> {115}; - 115 -> {121}; - 115 -> {116} [style=dotted]; - 116 -> {117} [style=dotted]; - 117 -> {118} [style=dotted]; - 118 -> {119} [style=dotted]; - 119 -> {120} [style=dotted]; - 120 -> {113} [color=green style=dotted]; + 115 -> {116}; + 116 -> {117}; + + subgraph cluster_40 { + color=red + 118 [label="Enter function testWhileFalse" style="filled" fillcolor=red]; + subgraph cluster_41 { + color=blue + 119 [label="Enter block"]; + subgraph cluster_42 { + color=blue + 120 [label="Enter while loop"]; + subgraph cluster_43 { + color=blue + 121 [label="Enter loop condition"]; + 122 [label="Const: Boolean(false)"]; + 123 [label="Exit loop condition"]; + } + subgraph cluster_44 { + color=blue + 124 [label="Enter loop block" style="filled" fillcolor=gray]; + subgraph cluster_45 { + color=blue + 125 [label="Enter block" style="filled" fillcolor=gray]; + 126 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 127 [label="Exit block" style="filled" fillcolor=gray]; + } + 128 [label="Exit loop block" style="filled" fillcolor=gray]; + } + 129 [label="Exit while loop"]; + } + 130 [label="Const: Int(1)"]; + 131 [label="Exit block"]; + } + 132 [label="Exit function testWhileFalse" style="filled" fillcolor=red]; + } + 118 -> {119}; + 119 -> {120}; + 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124}; - - subgraph cluster_42 { - color=red - 125 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red]; - subgraph cluster_43 { - color=blue - 126 [label="Enter block"]; - subgraph cluster_44 { - color=blue - 127 [label="Enter do-while loop"]; - subgraph cluster_45 { - color=blue - 128 [label="Enter loop block"]; - subgraph cluster_46 { - color=blue - 129 [label="Enter block"]; - 130 [label="Const: Int(1)"]; - 131 [label="Exit block"]; - } - 132 [label="Exit loop block"]; - } - subgraph cluster_47 { - color=blue - 133 [label="Enter loop condition"]; - 134 [label="Const: Boolean(true)"]; - 135 [label="Exit loop condition"]; - } - 136 [label="Exit do-while loop" style="filled" fillcolor=gray]; - } - 137 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 138 [label="Exit block" style="filled" fillcolor=gray]; - } - 139 [label="Exit function testDoWhileTrue" style="filled" fillcolor=gray]; - } - 125 -> {126}; - 126 -> {127}; - 127 -> {128}; - 128 -> {129}; + 123 -> {129}; + 123 -> {124} [style=dotted]; + 124 -> {125} [style=dotted]; + 125 -> {126} [style=dotted]; + 126 -> {127} [style=dotted]; + 127 -> {128} [style=dotted]; + 128 -> {121} [color=green style=dotted]; 129 -> {130}; 130 -> {131}; 131 -> {132}; - 132 -> {133}; - 133 -> {134}; - 134 -> {135}; - 135 -> {128} [color=green style=dashed]; - 135 -> {136} [style=dotted]; - 136 -> {137} [style=dotted]; - 137 -> {138} [style=dotted]; - 138 -> {139} [style=dotted]; - subgraph cluster_48 { + subgraph cluster_46 { color=red - 140 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; - subgraph cluster_49 { + 133 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red]; + subgraph cluster_47 { color=blue - 141 [label="Enter block"]; - subgraph cluster_50 { + 134 [label="Enter block"]; + subgraph cluster_48 { color=blue - 142 [label="Enter do-while loop"]; + 135 [label="Enter do-while loop"]; + subgraph cluster_49 { + color=blue + 136 [label="Enter loop block"]; + subgraph cluster_50 { + color=blue + 137 [label="Enter block"]; + 138 [label="Const: Int(1)"]; + 139 [label="Exit block"]; + } + 140 [label="Exit loop block"]; + } subgraph cluster_51 { color=blue - 143 [label="Enter loop block"]; - subgraph cluster_52 { - color=blue - 144 [label="Enter block"]; - subgraph cluster_53 { - color=blue - 145 [label="Enter when"]; - subgraph cluster_54 { - color=blue - 146 [label="Enter when branch condition "]; - 147 [label="Access variable R|/b|"]; - 148 [label="Exit when branch condition"]; - } - 149 [label="Synthetic else branch"]; - 150 [label="Enter when branch result"]; - subgraph cluster_55 { - color=blue - 151 [label="Enter block"]; - 152 [label="Jump: break@@@[Boolean(true)] "]; - 153 [label="Stub" style="filled" fillcolor=gray]; - 154 [label="Exit block" style="filled" fillcolor=gray]; - } - 155 [label="Exit when branch result" style="filled" fillcolor=gray]; - 156 [label="Exit when"]; - } - 157 [label="Exit block"]; - } - 158 [label="Exit loop block"]; + 141 [label="Enter loop condition"]; + 142 [label="Const: Boolean(true)"]; + 143 [label="Exit loop condition"]; } - subgraph cluster_56 { - color=blue - 159 [label="Enter loop condition"]; - 160 [label="Const: Boolean(true)"]; - 161 [label="Exit loop condition"]; - } - 162 [label="Exit do-while loop"]; + 144 [label="Exit do-while loop" style="filled" fillcolor=gray]; } - 163 [label="Const: Int(1)"]; - 164 [label="Exit block"]; + 145 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 146 [label="Exit block" style="filled" fillcolor=gray]; } - 165 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; + 147 [label="Exit function testDoWhileTrue" style="filled" fillcolor=gray]; } + 133 -> {134}; + 134 -> {135}; + 135 -> {136}; + 136 -> {137}; + 137 -> {138}; + 138 -> {139}; + 139 -> {140}; 140 -> {141}; 141 -> {142}; 142 -> {143}; - 143 -> {144}; - 144 -> {145}; - 145 -> {146}; - 146 -> {147}; - 147 -> {148}; - 148 -> {149 150}; - 149 -> {156}; - 150 -> {151}; - 151 -> {152}; - 152 -> {162}; - 152 -> {153} [style=dotted]; - 153 -> {154} [style=dotted]; - 154 -> {155} [style=dotted]; - 155 -> {156} [style=dotted]; - 156 -> {157}; - 157 -> {158}; - 158 -> {159}; - 159 -> {160}; - 160 -> {161}; - 161 -> {143} [color=green style=dashed]; - 161 -> {162} [style=dotted]; - 162 -> {163}; - 163 -> {164}; - 164 -> {165}; + 143 -> {136} [color=green style=dashed]; + 143 -> {144} [style=dotted]; + 144 -> {145} [style=dotted]; + 145 -> {146} [style=dotted]; + 146 -> {147} [style=dotted]; - subgraph cluster_57 { + subgraph cluster_52 { color=red - 166 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red]; - subgraph cluster_58 { + 148 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; + subgraph cluster_53 { color=blue - 167 [label="Enter block"]; - subgraph cluster_59 { + 149 [label="Enter block"]; + subgraph cluster_54 { color=blue - 168 [label="Enter do-while loop"]; + 150 [label="Enter do-while loop"]; + subgraph cluster_55 { + color=blue + 151 [label="Enter loop block"]; + subgraph cluster_56 { + color=blue + 152 [label="Enter block"]; + subgraph cluster_57 { + color=blue + 153 [label="Enter when"]; + subgraph cluster_58 { + color=blue + 154 [label="Enter when branch condition "]; + 155 [label="Access variable R|/b|"]; + 156 [label="Exit when branch condition"]; + } + 157 [label="Synthetic else branch"]; + 158 [label="Enter when branch result"]; + subgraph cluster_59 { + color=blue + 159 [label="Enter block"]; + 160 [label="Jump: break@@@[Boolean(true)] "]; + 161 [label="Stub" style="filled" fillcolor=gray]; + 162 [label="Exit block" style="filled" fillcolor=gray]; + } + 163 [label="Exit when branch result" style="filled" fillcolor=gray]; + 164 [label="Exit when"]; + } + 165 [label="Exit block"]; + } + 166 [label="Exit loop block"]; + } subgraph cluster_60 { color=blue - 169 [label="Enter loop block"]; - subgraph cluster_61 { - color=blue - 170 [label="Enter block"]; - 171 [label="Const: Int(1)"]; - 172 [label="Exit block"]; - } - 173 [label="Exit loop block"]; + 167 [label="Enter loop condition"]; + 168 [label="Const: Boolean(true)"]; + 169 [label="Exit loop condition"]; } - subgraph cluster_62 { - color=blue - 174 [label="Enter loop condition"]; - 175 [label="Const: Boolean(false)"]; - 176 [label="Exit loop condition"]; - } - 177 [label="Exit do-while loop"]; + 170 [label="Exit do-while loop"]; } - 178 [label="Const: Int(1)"]; - 179 [label="Exit block"]; + 171 [label="Const: Int(1)"]; + 172 [label="Exit block"]; } - 180 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red]; + 173 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; } + 148 -> {149}; + 149 -> {150}; + 150 -> {151}; + 151 -> {152}; + 152 -> {153}; + 153 -> {154}; + 154 -> {155}; + 155 -> {156}; + 156 -> {157 158}; + 157 -> {164}; + 158 -> {159}; + 159 -> {160}; + 160 -> {170}; + 160 -> {161} [style=dotted]; + 161 -> {162} [style=dotted]; + 162 -> {163} [style=dotted]; + 163 -> {164} [style=dotted]; + 164 -> {165}; + 165 -> {166}; 166 -> {167}; 167 -> {168}; 168 -> {169}; - 169 -> {170}; + 169 -> {151} [color=green style=dashed]; + 169 -> {170} [style=dotted]; 170 -> {171}; 171 -> {172}; 172 -> {173}; - 173 -> {174}; + + subgraph cluster_61 { + color=red + 174 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red]; + subgraph cluster_62 { + color=blue + 175 [label="Enter block"]; + subgraph cluster_63 { + color=blue + 176 [label="Enter do-while loop"]; + subgraph cluster_64 { + color=blue + 177 [label="Enter loop block"]; + subgraph cluster_65 { + color=blue + 178 [label="Enter block"]; + 179 [label="Const: Int(1)"]; + 180 [label="Exit block"]; + } + 181 [label="Exit loop block"]; + } + subgraph cluster_66 { + color=blue + 182 [label="Enter loop condition"]; + 183 [label="Const: Boolean(false)"]; + 184 [label="Exit loop condition"]; + } + 185 [label="Exit do-while loop"]; + } + 186 [label="Const: Int(1)"]; + 187 [label="Exit block"]; + } + 188 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red]; + } 174 -> {175}; 175 -> {176}; 176 -> {177}; - 176 -> {169} [color=green style=dotted]; 177 -> {178}; 178 -> {179}; 179 -> {180}; + 180 -> {181}; + 181 -> {182}; + 182 -> {183}; + 183 -> {184}; + 184 -> {185}; + 184 -> {177} [color=green style=dotted]; + 185 -> {186}; + 186 -> {187}; + 187 -> {188}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot index 677ee08df63..2b96608af18 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot @@ -40,78 +40,92 @@ digraph postponedLambdaInConstructor_kt { subgraph cluster_5 { color=blue 11 [label="Enter function " style="filled" fillcolor=red]; - 12 [label="Access variable R|/s|"]; - 13 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue - 14 [label="Enter function " style="filled" fillcolor=red]; + 12 [label="Function call arguments enter"]; + 13 [label="Access variable R|/s|"]; + 14 [label="Postponed enter to lambda"]; subgraph cluster_7 { color=blue - 15 [label="Enter block"]; - 16 [label="Exit anonymous function expression"]; + 15 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 17 [label="Enter function " style="filled" fillcolor=red]; + 16 [label="Enter block"]; + 17 [label="Exit anonymous function expression"]; subgraph cluster_9 { color=blue - 18 [label="Enter block"]; - 19 [label="Access variable R|/it|"]; - 20 [label="Exit block"]; + 18 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 19 [label="Enter block"]; + 20 [label="Access variable R|/it|"]; + 21 [label="Exit block"]; + } + 22 [label="Exit function " style="filled" fillcolor=red]; } - 21 [label="Exit function " style="filled" fillcolor=red]; + 23 [label="Exit block"]; } - 22 [label="Exit block"]; + 24 [label="Exit function " style="filled" fillcolor=red]; } - 23 [label="Exit function " style="filled" fillcolor=red]; + 25 [label="Function call arguments exit"]; } - 24 [label="Postponed exit from lambda"]; - 25 [label="Function call: R|/s|.R|kotlin/let| kotlin/String|>(...)" style="filled" fillcolor=yellow]; - 26 [label="Delegated constructor call: super(...)" style="filled" fillcolor=yellow]; - 27 [label="Exit function " style="filled" fillcolor=red]; + 26 [label="Postponed exit from lambda"]; + 27 [label="Function call: R|/s|.R|kotlin/let| kotlin/String|>(...)" style="filled" fillcolor=yellow]; + 28 [label="Delegated constructor call: super(...)" style="filled" fillcolor=yellow]; + 29 [label="Exit function " style="filled" fillcolor=red]; } - 28 [label="Exit class B" style="filled" fillcolor=red]; + 30 [label="Exit class B" style="filled" fillcolor=red]; } 7 -> {8} [color=green]; - 7 -> {28} [style=dotted]; + 7 -> {30} [style=dotted]; 7 -> {8 11} [style=dashed]; 8 -> {9}; 9 -> {10}; 10 -> {11} [color=green]; 11 -> {12}; 12 -> {13}; - 13 -> {14 25}; - 13 -> {24} [style=dotted]; - 13 -> {14} [style=dashed]; - 14 -> {15}; + 13 -> {14}; + 14 -> {15 25}; + 14 -> {26} [style=dotted]; + 14 -> {15} [style=dashed]; 15 -> {16}; - 16 -> {17 22}; - 16 -> {17} [style=dashed]; - 17 -> {18}; + 16 -> {17}; + 17 -> {18 23}; + 17 -> {18} [style=dashed]; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 22 -> {23}; + 21 -> {22}; 23 -> {24}; - 24 -> {25} [color=green]; - 24 -> {26} [color=red]; - 25 -> {26}; - 26 -> {27}; - 27 -> {28} [color=green]; + 24 -> {26}; + 25 -> {27}; + 26 -> {27} [color=green]; + 26 -> {28} [color=red]; + 27 -> {28}; + 28 -> {29}; + 29 -> {30} [color=green]; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 29 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_11 { + 31 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 30 [label="Enter block"]; - 31 [label="Function call: this@R|/B|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; + 32 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 33 [label="Function call arguments enter"]; + 34 [label="Function call arguments exit"]; + } + 35 [label="Function call: this@R|/B|.R|/B.foo|()" style="filled" fillcolor=yellow]; + 36 [label="Exit block"]; } - 33 [label="Exit function foo" style="filled" fillcolor=red]; + 37 [label="Exit function foo" style="filled" fillcolor=red]; } - 29 -> {30}; - 30 -> {31}; 31 -> {32}; 32 -> {33}; + 33 -> {34}; + 34 -> {35}; + 35 -> {36}; + 36 -> {37}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot index 78948324536..868b021b9e4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot @@ -50,15 +50,25 @@ digraph postponedLambdaInReturn_kt { 12 [label="Enter block"]; 13 [label="Exit block"]; } - 14 [label="Function call: R|/Lateinit.Lateinit|()" style="filled" fillcolor=yellow]; - 15 [label="Access variable R|/builder|"]; - 16 [label="Function call: R|/Lateinit.Lateinit|().R|kotlin/apply||>(...)" style="filled" fillcolor=yellow]; - 17 [label="Access variable R|SubstitutionOverride|"]; - 18 [label="Jump: ^build R|/Lateinit.Lateinit|().R|kotlin/apply||>(R|/builder|).R|SubstitutionOverride|"]; - 19 [label="Stub" style="filled" fillcolor=gray]; - 20 [label="Exit block" style="filled" fillcolor=gray]; + subgraph cluster_7 { + color=blue + 14 [label="Function call arguments enter"]; + subgraph cluster_8 { + color=blue + 15 [label="Function call arguments enter"]; + 16 [label="Function call arguments exit"]; + } + 17 [label="Function call: R|/Lateinit.Lateinit|()" style="filled" fillcolor=yellow]; + 18 [label="Access variable R|/builder|"]; + 19 [label="Function call arguments exit"]; + } + 20 [label="Function call: R|/Lateinit.Lateinit|().R|kotlin/apply||>(...)" style="filled" fillcolor=yellow]; + 21 [label="Access variable R|SubstitutionOverride|"]; + 22 [label="Jump: ^build R|/Lateinit.Lateinit|().R|kotlin/apply||>(R|/builder|).R|SubstitutionOverride|"]; + 23 [label="Stub" style="filled" fillcolor=gray]; + 24 [label="Exit block" style="filled" fillcolor=gray]; } - 21 [label="Exit function build" style="filled" fillcolor=red]; + 25 [label="Exit function build" style="filled" fillcolor=red]; } 10 -> {11}; 11 -> {12}; @@ -68,439 +78,499 @@ digraph postponedLambdaInReturn_kt { 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {21}; - 18 -> {19} [style=dotted]; - 19 -> {20} [style=dotted]; - 20 -> {21} [style=dotted]; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {22}; + 22 -> {25}; + 22 -> {23} [style=dotted]; + 23 -> {24} [style=dotted]; + 24 -> {25} [style=dotted]; - subgraph cluster_7 { + subgraph cluster_9 { color=red - 22 [label="Enter function test1" style="filled" fillcolor=red]; - subgraph cluster_8 { + 26 [label="Enter function test1" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 23 [label="Enter block"]; - 24 [label="Const: Null(null)"]; - 25 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 26 [label="Postponed enter to lambda"]; - subgraph cluster_9 { + 27 [label="Enter block"]; + 28 [label="Const: Null(null)"]; + 29 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + subgraph cluster_11 { color=blue - 27 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { + 30 [label="Function call arguments enter"]; + 31 [label="Postponed enter to lambda"]; + subgraph cluster_12 { color=blue - 28 [label="Enter block"]; - subgraph cluster_11 { + 32 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_13 { color=blue - 29 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 30 [label="Enter when branch condition "]; - 31 [label="Access variable R|/p|"]; - 32 [label="Exit when branch condition"]; - } - subgraph cluster_13 { - color=blue - 33 [label="Enter when branch condition else"]; - 34 [label="Exit when branch condition"]; - } - 35 [label="Enter when branch result"]; + 33 [label="Enter block"]; subgraph cluster_14 { color=blue - 36 [label="Enter block"]; - 37 [label="Const: String()"]; - 38 [label="Jump: ^@run String()"]; - 39 [label="Stub" style="filled" fillcolor=gray]; - 40 [label="Exit block" style="filled" fillcolor=gray]; - } - 41 [label="Exit when branch result" style="filled" fillcolor=gray]; - 42 [label="Enter when branch result"]; - subgraph cluster_15 { - color=blue - 43 [label="Enter block"]; - 44 [label="Postponed enter to lambda"]; + 34 [label="Enter when"]; + subgraph cluster_15 { + color=blue + 35 [label="Enter when branch condition "]; + 36 [label="Access variable R|/p|"]; + 37 [label="Exit when branch condition"]; + } subgraph cluster_16 { color=blue - 45 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 46 [label="Enter block"]; - 47 [label="Access variable R|/y|"]; - 48 [label="Type operator: (R|/y| as R|kotlin/String|)"]; - 49 [label="Const: String(...)"]; - 50 [label="Assignment: R|SubstitutionOverride|"]; - 51 [label="Exit block"]; - } - 52 [label="Exit function " style="filled" fillcolor=red]; + 38 [label="Enter when branch condition else"]; + 39 [label="Exit when branch condition"]; } - 53 [label="Postponed exit from lambda"]; - 54 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; - 55 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { + 40 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 41 [label="Enter block"]; + 42 [label="Const: String()"]; + 43 [label="Jump: ^@run String()"]; + 44 [label="Stub" style="filled" fillcolor=gray]; + 45 [label="Exit block" style="filled" fillcolor=gray]; + } + 46 [label="Exit when branch result" style="filled" fillcolor=gray]; + 47 [label="Enter when branch result"]; + subgraph cluster_18 { + color=blue + 48 [label="Enter block"]; + subgraph cluster_19 { + color=blue + 49 [label="Function call arguments enter"]; + 50 [label="Postponed enter to lambda"]; + subgraph cluster_20 { + color=blue + 51 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 52 [label="Enter block"]; + 53 [label="Access variable R|/y|"]; + 54 [label="Type operator: (R|/y| as R|kotlin/String|)"]; + 55 [label="Const: String(...)"]; + 56 [label="Assignment: R|SubstitutionOverride|"]; + 57 [label="Exit block"]; + } + 58 [label="Exit function " style="filled" fillcolor=red]; + } + 59 [label="Function call arguments exit"]; + } + 60 [label="Postponed exit from lambda"]; + 61 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; + 62 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { (R|/y| as R|kotlin/String|) this@R|special/anonymous|.R|SubstitutionOverride| = String(...) } )"]; - 56 [label="Stub" style="filled" fillcolor=gray]; - 57 [label="Exit block" style="filled" fillcolor=gray]; + 63 [label="Stub" style="filled" fillcolor=gray]; + 64 [label="Exit block" style="filled" fillcolor=gray]; + } + 65 [label="Exit when branch result" style="filled" fillcolor=gray]; + 66 [label="Exit when" style="filled" fillcolor=gray]; } - 58 [label="Exit when branch result" style="filled" fillcolor=gray]; - 59 [label="Exit when" style="filled" fillcolor=gray]; + 67 [label="Exit block" style="filled" fillcolor=gray]; } - 60 [label="Exit block" style="filled" fillcolor=gray]; + 68 [label="Exit function " style="filled" fillcolor=red]; } - 61 [label="Exit function " style="filled" fillcolor=red]; + 69 [label="Function call arguments exit"]; } - 62 [label="Postponed exit from lambda"]; - 63 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 64 [label="Variable declaration: lval x: R|kotlin/String|"]; - 65 [label="Access variable R|/y|"]; - 66 [label="Access variable R|kotlin/String.length#|"]; - 67 [label="Exit block"]; + 70 [label="Postponed exit from lambda"]; + 71 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 72 [label="Variable declaration: lval x: R|kotlin/String|"]; + 73 [label="Access variable R|/y|"]; + 74 [label="Access variable R|kotlin/String.length#|"]; + 75 [label="Exit block"]; } - 68 [label="Exit function test1" style="filled" fillcolor=red]; + 76 [label="Exit function test1" style="filled" fillcolor=red]; } - 22 -> {23}; - 23 -> {24}; - 24 -> {25}; - 25 -> {26}; - 26 -> {27 63}; - 26 -> {62} [style=dotted]; - 26 -> {27} [style=dashed]; + 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32}; - 32 -> {33 42}; + 31 -> {32 69}; + 31 -> {70} [style=dotted]; + 31 -> {32} [style=dashed]; + 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38}; - 38 -> {61}; - 38 -> {39} [style=dotted]; - 39 -> {40} [style=dotted]; - 40 -> {41} [style=dotted]; - 41 -> {59} [style=dotted]; + 37 -> {38 47}; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; + 41 -> {42}; 42 -> {43}; - 43 -> {44}; - 44 -> {45 54}; - 44 -> {53} [style=dotted]; - 44 -> {45} [style=dashed]; - 45 -> {46}; - 46 -> {47}; + 43 -> {68}; + 43 -> {44} [style=dotted]; + 44 -> {45} [style=dotted]; + 45 -> {46} [style=dotted]; + 46 -> {66} [style=dotted]; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {51 59}; + 50 -> {60} [style=dotted]; + 50 -> {51} [style=dashed]; 51 -> {52}; 52 -> {53}; - 53 -> {54} [color=green]; + 53 -> {54}; 54 -> {55}; - 55 -> {61}; - 55 -> {56} [style=dotted]; - 56 -> {57} [style=dotted]; - 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; - 59 -> {60} [style=dotted]; - 60 -> {61} [style=dotted]; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {60}; + 59 -> {61}; + 60 -> {61} [color=green]; 61 -> {62}; - 62 -> {63}; - 63 -> {64}; - 64 -> {65}; - 65 -> {66}; - 66 -> {67}; - 67 -> {68}; - - subgraph cluster_18 { - color=red - 69 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 70 [label="Enter block"]; - 71 [label="Postponed enter to lambda"]; - subgraph cluster_20 { - color=blue - 72 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 73 [label="Enter block"]; - subgraph cluster_22 { - color=blue - 74 [label="Enter while loop"]; - subgraph cluster_23 { - color=blue - 75 [label="Enter loop condition"]; - 76 [label="Const: Boolean(true)"]; - 77 [label="Exit loop condition"]; - } - subgraph cluster_24 { - color=blue - 78 [label="Enter loop block"]; - subgraph cluster_25 { - color=blue - 79 [label="Enter block"]; - subgraph cluster_26 { - color=blue - 80 [label="Try expression enter"]; - subgraph cluster_27 { - color=blue - 81 [label="Try main block enter"]; - subgraph cluster_28 { - color=blue - 82 [label="Enter block"]; - 83 [label="Postponed enter to lambda"]; - subgraph cluster_29 { - color=blue - 84 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_30 { - color=blue - 85 [label="Enter block"]; - 86 [label="Const: String(...)"]; - 87 [label="Assignment: R|SubstitutionOverride|"]; - 88 [label="Exit block"]; - } - 89 [label="Exit function " style="filled" fillcolor=red]; - } - 90 [label="Postponed exit from lambda"]; - 91 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; - 92 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { - this@R|special/anonymous|.R|SubstitutionOverride| = String(...) -} -)"]; - 93 [label="Stub" style="filled" fillcolor=gray]; - 94 [label="Exit block" style="filled" fillcolor=gray]; - } - 95 [label="Try main block exit" style="filled" fillcolor=gray]; - } - subgraph cluster_31 { - color=blue - 96 [label="Catch enter"]; - 97 [label="Variable declaration: e: R|kotlin/Throwable|"]; - subgraph cluster_32 { - color=blue - 98 [label="Enter block"]; - 99 [label="Exit block"]; - } - 100 [label="Catch exit"]; - } - 101 [label="Try expression exit"]; - } - 102 [label="Exit block"]; - } - 103 [label="Exit loop block"]; - } - 104 [label="Exit while loop" style="filled" fillcolor=gray]; - } - 105 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; - 106 [label="Throw: throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; - 107 [label="Stub" style="filled" fillcolor=gray]; - 108 [label="Exit block" style="filled" fillcolor=gray]; - } - 109 [label="Exit function " style="filled" fillcolor=red]; - } - 110 [label="Postponed exit from lambda"]; - 111 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 112 [label="Variable declaration: lval x: R|kotlin/String|"]; - 113 [label="Access variable R|/x|"]; - 114 [label="Access variable R|kotlin/String.length|"]; - 115 [label="Exit block"]; - } - 116 [label="Exit function test2" style="filled" fillcolor=red]; - } - 69 -> {70}; + 62 -> {68}; + 62 -> {63} [style=dotted]; + 63 -> {64} [style=dotted]; + 64 -> {65} [style=dotted]; + 65 -> {66} [style=dotted]; + 66 -> {67} [style=dotted]; + 67 -> {68} [style=dotted]; + 68 -> {70}; + 69 -> {71}; 70 -> {71}; - 71 -> {72 111}; - 71 -> {110} [style=dotted]; - 71 -> {72} [style=dashed]; + 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {77}; + + subgraph cluster_22 { + color=red + 77 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_23 { + color=blue + 78 [label="Enter block"]; + subgraph cluster_24 { + color=blue + 79 [label="Function call arguments enter"]; + 80 [label="Postponed enter to lambda"]; + subgraph cluster_25 { + color=blue + 81 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 82 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 83 [label="Enter while loop"]; + subgraph cluster_28 { + color=blue + 84 [label="Enter loop condition"]; + 85 [label="Const: Boolean(true)"]; + 86 [label="Exit loop condition"]; + } + subgraph cluster_29 { + color=blue + 87 [label="Enter loop block"]; + subgraph cluster_30 { + color=blue + 88 [label="Enter block"]; + subgraph cluster_31 { + color=blue + 89 [label="Try expression enter"]; + subgraph cluster_32 { + color=blue + 90 [label="Try main block enter"]; + subgraph cluster_33 { + color=blue + 91 [label="Enter block"]; + subgraph cluster_34 { + color=blue + 92 [label="Function call arguments enter"]; + 93 [label="Postponed enter to lambda"]; + subgraph cluster_35 { + color=blue + 94 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_36 { + color=blue + 95 [label="Enter block"]; + 96 [label="Const: String(...)"]; + 97 [label="Assignment: R|SubstitutionOverride|"]; + 98 [label="Exit block"]; + } + 99 [label="Exit function " style="filled" fillcolor=red]; + } + 100 [label="Function call arguments exit"]; + } + 101 [label="Postponed exit from lambda"]; + 102 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; + 103 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|SubstitutionOverride| = String(...) +} +)"]; + 104 [label="Stub" style="filled" fillcolor=gray]; + 105 [label="Exit block" style="filled" fillcolor=gray]; + } + 106 [label="Try main block exit" style="filled" fillcolor=gray]; + } + subgraph cluster_37 { + color=blue + 107 [label="Catch enter"]; + 108 [label="Variable declaration: e: R|kotlin/Throwable|"]; + subgraph cluster_38 { + color=blue + 109 [label="Enter block"]; + 110 [label="Exit block"]; + } + 111 [label="Catch exit"]; + } + 112 [label="Try expression exit"]; + } + 113 [label="Exit block"]; + } + 114 [label="Exit loop block"]; + } + 115 [label="Exit while loop" style="filled" fillcolor=gray]; + } + subgraph cluster_39 { + color=blue + 116 [label="Function call arguments enter" style="filled" fillcolor=gray]; + 117 [label="Function call arguments exit" style="filled" fillcolor=gray]; + } + 118 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + 119 [label="Throw: throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + 120 [label="Stub" style="filled" fillcolor=gray]; + 121 [label="Exit block" style="filled" fillcolor=gray]; + } + 122 [label="Exit function " style="filled" fillcolor=red]; + } + 123 [label="Function call arguments exit"]; + } + 124 [label="Postponed exit from lambda"]; + 125 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 126 [label="Variable declaration: lval x: R|kotlin/String|"]; + 127 [label="Access variable R|/x|"]; + 128 [label="Access variable R|kotlin/String.length|"]; + 129 [label="Exit block"]; + } + 130 [label="Exit function test2" style="filled" fillcolor=red]; + } 77 -> {78}; - 77 -> {104} [style=dotted]; 78 -> {79}; 79 -> {80}; - 80 -> {81 96}; + 80 -> {81 123}; + 80 -> {124} [style=dotted]; + 80 -> {81} [style=dashed]; 81 -> {82}; 82 -> {83}; - 83 -> {84 91}; - 83 -> {90} [style=dotted]; - 83 -> {84} [style=dashed]; + 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; + 86 -> {115} [style=dotted]; 87 -> {88}; 88 -> {89}; - 89 -> {90}; - 90 -> {91} [color=green]; + 89 -> {90 107}; + 90 -> {91}; 91 -> {92}; - 92 -> {109}; - 92 -> {93} [style=dotted]; - 93 -> {94} [style=dotted]; - 94 -> {95} [style=dotted]; - 95 -> {96 101} [style=dotted]; + 92 -> {93}; + 93 -> {94 100}; + 93 -> {101} [style=dotted]; + 93 -> {94} [style=dashed]; + 94 -> {95}; + 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; - 99 -> {100}; - 100 -> {101}; - 101 -> {102}; + 99 -> {101}; + 100 -> {102}; + 101 -> {102} [color=green]; 102 -> {103}; - 103 -> {75} [color=green style=dashed]; + 103 -> {122}; + 103 -> {104} [style=dotted]; 104 -> {105} [style=dotted]; 105 -> {106} [style=dotted]; - 106 -> {107} [style=dotted]; - 107 -> {108} [style=dotted]; - 108 -> {109} [style=dotted]; + 106 -> {107 112} [style=dotted]; + 107 -> {108}; + 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; - 114 -> {115}; - 115 -> {116}; - - subgraph cluster_33 { - color=red - 117 [label="Enter function test3" style="filled" fillcolor=red]; - subgraph cluster_34 { - color=blue - 118 [label="Enter block"]; - 119 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 120 [label="Const: String()"]; - 121 [label="Assignment: R|/y|"]; - 122 [label="Postponed enter to lambda"]; - subgraph cluster_35 { - color=blue - 123 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_36 { - color=blue - 124 [label="Enter block"]; - subgraph cluster_37 { - color=blue - 125 [label="Enter when"]; - subgraph cluster_38 { - color=blue - 126 [label="Enter when branch condition "]; - 127 [label="Access variable R|/p|"]; - 128 [label="Function call: R|/p|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 129 [label="Exit when branch condition"]; - } - subgraph cluster_39 { - color=blue - 130 [label="Enter when branch condition else"]; - 131 [label="Exit when branch condition"]; - } - 132 [label="Enter when branch result"]; - subgraph cluster_40 { - color=blue - 133 [label="Enter block"]; - 134 [label="Const: String()"]; - 135 [label="Jump: ^@run String()"]; - 136 [label="Stub" style="filled" fillcolor=gray]; - 137 [label="Exit block" style="filled" fillcolor=gray]; - } - 138 [label="Exit when branch result" style="filled" fillcolor=gray]; - 139 [label="Enter when branch result"]; - subgraph cluster_41 { - color=blue - 140 [label="Enter block"]; - 141 [label="Postponed enter to lambda"]; - subgraph cluster_42 { - color=blue - 142 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_43 { - color=blue - 143 [label="Enter block"]; - 144 [label="Const: Null(null)"]; - 145 [label="Assignment: R|/y|"]; - 146 [label="Const: String(...)"]; - 147 [label="Assignment: R|SubstitutionOverride|"]; - 148 [label="Exit block"]; - } - 149 [label="Exit function " style="filled" fillcolor=red]; - } - 150 [label="Postponed exit from lambda"]; - 151 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; - 152 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { - R|/y| = Null(null) - this@R|special/anonymous|.R|SubstitutionOverride| = String(...) -} -)"]; - 153 [label="Stub" style="filled" fillcolor=gray]; - 154 [label="Exit block" style="filled" fillcolor=gray]; - } - 155 [label="Exit when branch result" style="filled" fillcolor=gray]; - 156 [label="Exit when" style="filled" fillcolor=gray]; - } - 157 [label="Exit block" style="filled" fillcolor=gray]; - } - 158 [label="Exit function " style="filled" fillcolor=red]; - } - 159 [label="Postponed exit from lambda"]; - 160 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 161 [label="Variable declaration: lval x: R|kotlin/String|"]; - 162 [label="Access variable R|/y|"]; - 163 [label="Smart cast: R|/y|"]; - 164 [label="Access variable R|kotlin/String.length|"]; - 165 [label="Exit block"]; - } - 166 [label="Exit function test3" style="filled" fillcolor=red]; - } - 117 -> {118}; - 118 -> {119}; - 119 -> {120}; - 120 -> {121}; - 121 -> {122}; - 122 -> {123 160}; - 122 -> {159} [style=dotted]; - 122 -> {123} [style=dashed]; - 123 -> {124}; + 114 -> {84} [color=green style=dashed]; + 115 -> {116} [style=dotted]; + 116 -> {117} [style=dotted]; + 117 -> {118} [style=dotted]; + 118 -> {119} [style=dotted]; + 119 -> {120} [style=dotted]; + 120 -> {121} [style=dotted]; + 121 -> {122} [style=dotted]; + 122 -> {124}; + 123 -> {125}; 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; - 129 -> {130 139}; - 130 -> {131}; + 129 -> {130}; + + subgraph cluster_40 { + color=red + 131 [label="Enter function test3" style="filled" fillcolor=red]; + subgraph cluster_41 { + color=blue + 132 [label="Enter block"]; + 133 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + 134 [label="Const: String()"]; + 135 [label="Assignment: R|/y|"]; + subgraph cluster_42 { + color=blue + 136 [label="Function call arguments enter"]; + 137 [label="Postponed enter to lambda"]; + subgraph cluster_43 { + color=blue + 138 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_44 { + color=blue + 139 [label="Enter block"]; + subgraph cluster_45 { + color=blue + 140 [label="Enter when"]; + subgraph cluster_46 { + color=blue + 141 [label="Enter when branch condition "]; + subgraph cluster_47 { + color=blue + 142 [label="Function call arguments enter"]; + 143 [label="Access variable R|/p|"]; + 144 [label="Function call arguments exit"]; + } + 145 [label="Function call: R|/p|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 146 [label="Exit when branch condition"]; + } + subgraph cluster_48 { + color=blue + 147 [label="Enter when branch condition else"]; + 148 [label="Exit when branch condition"]; + } + 149 [label="Enter when branch result"]; + subgraph cluster_49 { + color=blue + 150 [label="Enter block"]; + 151 [label="Const: String()"]; + 152 [label="Jump: ^@run String()"]; + 153 [label="Stub" style="filled" fillcolor=gray]; + 154 [label="Exit block" style="filled" fillcolor=gray]; + } + 155 [label="Exit when branch result" style="filled" fillcolor=gray]; + 156 [label="Enter when branch result"]; + subgraph cluster_50 { + color=blue + 157 [label="Enter block"]; + subgraph cluster_51 { + color=blue + 158 [label="Function call arguments enter"]; + 159 [label="Postponed enter to lambda"]; + subgraph cluster_52 { + color=blue + 160 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_53 { + color=blue + 161 [label="Enter block"]; + 162 [label="Const: Null(null)"]; + 163 [label="Assignment: R|/y|"]; + 164 [label="Const: String(...)"]; + 165 [label="Assignment: R|SubstitutionOverride|"]; + 166 [label="Exit block"]; + } + 167 [label="Exit function " style="filled" fillcolor=red]; + } + 168 [label="Function call arguments exit"]; + } + 169 [label="Postponed exit from lambda"]; + 170 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; + 171 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { + R|/y| = Null(null) + this@R|special/anonymous|.R|SubstitutionOverride| = String(...) +} +)"]; + 172 [label="Stub" style="filled" fillcolor=gray]; + 173 [label="Exit block" style="filled" fillcolor=gray]; + } + 174 [label="Exit when branch result" style="filled" fillcolor=gray]; + 175 [label="Exit when" style="filled" fillcolor=gray]; + } + 176 [label="Exit block" style="filled" fillcolor=gray]; + } + 177 [label="Exit function " style="filled" fillcolor=red]; + } + 178 [label="Function call arguments exit"]; + } + 179 [label="Postponed exit from lambda"]; + 180 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 181 [label="Variable declaration: lval x: R|kotlin/String|"]; + 182 [label="Access variable R|/y|"]; + 183 [label="Smart cast: R|/y|"]; + 184 [label="Access variable R|kotlin/String.length|"]; + 185 [label="Exit block"]; + } + 186 [label="Exit function test3" style="filled" fillcolor=red]; + } 131 -> {132}; 132 -> {133}; 133 -> {134}; 134 -> {135}; - 135 -> {158}; - 135 -> {136} [style=dotted]; - 136 -> {137} [style=dotted]; - 137 -> {138} [style=dotted]; - 138 -> {156} [style=dotted]; + 135 -> {136}; + 136 -> {137}; + 137 -> {138 178}; + 137 -> {179} [style=dotted]; + 137 -> {138} [style=dashed]; + 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {142 151}; - 141 -> {150} [style=dotted]; - 141 -> {142} [style=dashed]; + 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; - 146 -> {147}; + 146 -> {147 156}; 147 -> {148}; 148 -> {149}; 149 -> {150}; - 150 -> {151} [color=green]; + 150 -> {151}; 151 -> {152}; - 152 -> {158}; + 152 -> {177}; 152 -> {153} [style=dotted]; 153 -> {154} [style=dotted]; 154 -> {155} [style=dotted]; - 155 -> {156} [style=dotted]; - 156 -> {157} [style=dotted]; - 157 -> {158} [style=dotted]; + 155 -> {175} [style=dotted]; + 156 -> {157}; + 157 -> {158}; 158 -> {159}; - 159 -> {160}; + 159 -> {160 168}; + 159 -> {169} [style=dotted]; + 159 -> {160} [style=dashed]; 160 -> {161}; 161 -> {162}; 162 -> {163}; 163 -> {164}; 164 -> {165}; 165 -> {166}; + 166 -> {167}; + 167 -> {169}; + 168 -> {170}; + 169 -> {170} [color=green]; + 170 -> {171}; + 171 -> {177}; + 171 -> {172} [style=dotted]; + 172 -> {173} [style=dotted]; + 173 -> {174} [style=dotted]; + 174 -> {175} [style=dotted]; + 175 -> {176} [style=dotted]; + 176 -> {177} [style=dotted]; + 177 -> {179}; + 178 -> {180}; + 179 -> {180}; + 180 -> {181}; + 181 -> {182}; + 182 -> {183}; + 183 -> {184}; + 184 -> {185}; + 185 -> {186}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot index 834ed400386..1ebbb656ede 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot @@ -30,38 +30,45 @@ digraph postponedLambdas_kt { subgraph cluster_4 { color=blue 7 [label="Enter block"]; - 8 [label="Access variable R|/a|"]; - 9 [label="Access variable R|/b|"]; - 10 [label="Postponed enter to lambda"]; subgraph cluster_5 { color=blue - 11 [label="Enter function " style="filled" fillcolor=red]; + 8 [label="Function call arguments enter"]; + 9 [label="Access variable R|/a|"]; + 10 [label="Access variable R|/b|"]; + 11 [label="Postponed enter to lambda"]; subgraph cluster_6 { color=blue - 12 [label="Enter block"]; - 13 [label="Const: String()"]; - 14 [label="Exit block"]; + 12 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 13 [label="Enter block"]; + 14 [label="Const: String()"]; + 15 [label="Exit block"]; + } + 16 [label="Exit function " style="filled" fillcolor=red]; } - 15 [label="Exit function " style="filled" fillcolor=red]; + 17 [label="Function call arguments exit"]; } - 16 [label="Postponed exit from lambda"]; - 17 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 18 [label="Exit block"]; + 18 [label="Postponed exit from lambda"]; + 19 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 20 [label="Exit block"]; } - 19 [label="Exit function test" style="filled" fillcolor=red]; + 21 [label="Exit function test" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {11 16 17}; - 10 -> {11} [style=dashed]; - 11 -> {12}; + 10 -> {11}; + 11 -> {12 17 18}; + 11 -> {12} [style=dashed]; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 16 -> {17}; - 17 -> {18}; + 15 -> {16}; + 17 -> {19}; 18 -> {19}; + 19 -> {20}; + 20 -> {21}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot index 933407d250a..e4db48e914a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot @@ -21,117 +21,142 @@ digraph propertiesAndInitBlocks_kt { subgraph cluster_3 { color=blue 7 [label="Enter property" style="filled" fillcolor=red]; - 8 [label="Postponed enter to lambda"]; subgraph cluster_4 { color=blue - 9 [label="Enter function " style="filled" fillcolor=red]; + 8 [label="Function call arguments enter"]; + 9 [label="Postponed enter to lambda"]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Local function declaration"]; - 12 [label="Local class declaration"]; - 13 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 14 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 15 [label="Stub" style="filled" fillcolor=gray]; - 16 [label="Exit block" style="filled" fillcolor=gray]; - } - 17 [label="Exit function " style="filled" fillcolor=gray]; - } - subgraph cluster_6 { - color=blue - 18 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 19 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_8 { + 10 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 20 [label="Enter block"]; - 21 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 22 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 23 [label="Stub" style="filled" fillcolor=gray]; - 24 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 25 [label="Exit block" style="filled" fillcolor=gray]; + 11 [label="Enter block"]; + 12 [label="Local function declaration"]; + 13 [label="Local class declaration"]; + subgraph cluster_7 { + color=blue + 14 [label="Function call arguments enter"]; + 15 [label="Function call arguments exit"]; + } + 16 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 17 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 18 [label="Stub" style="filled" fillcolor=gray]; + 19 [label="Exit block" style="filled" fillcolor=gray]; } - 26 [label="Exit init block" style="filled" fillcolor=gray]; + 20 [label="Exit function " style="filled" fillcolor=gray]; } - subgraph cluster_9 { + subgraph cluster_8 { color=blue - 27 [label="Enter function " style="filled" fillcolor=gray]; - 28 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; - 29 [label="Exit function " style="filled" fillcolor=gray]; + 21 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 22 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 23 [label="Enter block"]; + subgraph cluster_11 { + color=blue + 24 [label="Function call arguments enter"]; + 25 [label="Function call arguments exit"]; + } + 26 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 27 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 28 [label="Stub" style="filled" fillcolor=gray]; + 29 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 30 [label="Exit block" style="filled" fillcolor=gray]; + } + 31 [label="Exit init block" style="filled" fillcolor=gray]; + } + subgraph cluster_12 { + color=blue + 32 [label="Enter function " style="filled" fillcolor=gray]; + 33 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; + 34 [label="Exit function " style="filled" fillcolor=gray]; + } + 35 [label="Exit class InitializerLocalClass" style="filled" fillcolor=gray]; } - 30 [label="Exit class InitializerLocalClass" style="filled" fillcolor=gray]; - } - subgraph cluster_10 { - color=blue - 31 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_11 { + subgraph cluster_13 { color=blue - 32 [label="Enter block"]; - 33 [label="Const: Int(1)"]; - 34 [label="Const: Int(1)"]; - 35 [label="Function call: Int(1).R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; - 36 [label="Variable declaration: lval c: R|kotlin/Int|"]; - 37 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 38 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 39 [label="Stub" style="filled" fillcolor=gray]; - 40 [label="Exit block" style="filled" fillcolor=gray]; + 36 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 37 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 38 [label="Function call arguments enter"]; + 39 [label="Const: Int(1)"]; + 40 [label="Const: Int(1)"]; + 41 [label="Function call arguments exit"]; + } + 42 [label="Function call: Int(1).R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; + 43 [label="Variable declaration: lval c: R|kotlin/Int|"]; + subgraph cluster_16 { + color=blue + 44 [label="Function call arguments enter"]; + 45 [label="Function call arguments exit"]; + } + 46 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 47 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 48 [label="Stub" style="filled" fillcolor=gray]; + 49 [label="Exit block" style="filled" fillcolor=gray]; + } + 50 [label="Exit function foo" style="filled" fillcolor=gray]; } - 41 [label="Exit function foo" style="filled" fillcolor=gray]; + 51 [label="Function call arguments exit"]; } - 42 [label="Postponed exit from lambda"]; - 43 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; - 44 [label="Exit property" style="filled" fillcolor=red]; + 52 [label="Postponed exit from lambda"]; + 53 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; + 54 [label="Exit property" style="filled" fillcolor=red]; } - subgraph cluster_12 { + subgraph cluster_17 { color=blue - 45 [label="Enter property" style="filled" fillcolor=red]; - subgraph cluster_13 { + 55 [label="Enter property" style="filled" fillcolor=red]; + subgraph cluster_18 { color=blue - 46 [label="Try expression enter"]; - subgraph cluster_14 { + 56 [label="Try expression enter"]; + subgraph cluster_19 { color=blue - 47 [label="Try main block enter"]; - subgraph cluster_15 { + 57 [label="Try main block enter"]; + subgraph cluster_20 { color=blue - 48 [label="Enter block"]; - 49 [label="Const: Int(1)"]; - 50 [label="Exit block"]; + 58 [label="Enter block"]; + 59 [label="Const: Int(1)"]; + 60 [label="Exit block"]; } - 51 [label="Try main block exit"]; + 61 [label="Try main block exit"]; } - subgraph cluster_16 { + subgraph cluster_21 { color=blue - 52 [label="Catch enter"]; - 53 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_17 { + 62 [label="Catch enter"]; + 63 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_22 { color=blue - 54 [label="Enter block"]; - 55 [label="Const: Int(2)"]; - 56 [label="Exit block"]; + 64 [label="Enter block"]; + 65 [label="Const: Int(2)"]; + 66 [label="Exit block"]; } - 57 [label="Catch exit"]; + 67 [label="Catch exit"]; } - subgraph cluster_18 { + subgraph cluster_23 { color=blue - 58 [label="Enter finally"]; - subgraph cluster_19 { + 68 [label="Enter finally"]; + subgraph cluster_24 { color=blue - 59 [label="Enter block"]; - 60 [label="Const: Int(0)"]; - 61 [label="Exit block"]; + 69 [label="Enter block"]; + 70 [label="Const: Int(0)"]; + 71 [label="Exit block"]; } - 62 [label="Exit finally"]; + 72 [label="Exit finally"]; } - 63 [label="Try expression exit"]; + 73 [label="Try expression exit"]; } - 64 [label="Exit property" style="filled" fillcolor=red]; + 74 [label="Exit property" style="filled" fillcolor=red]; } - 65 [label="Exit file propertiesAndInitBlocks.kt" style="filled" fillcolor=red]; + 75 [label="Exit file propertiesAndInitBlocks.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {65} [style=dotted]; - 0 -> {1 4 7 45} [style=dashed]; + 0 -> {75} [style=dotted]; + 0 -> {1 4 7 55} [style=dashed]; 1 -> {2}; 2 -> {3}; 3 -> {4} [color=green]; @@ -139,179 +164,203 @@ digraph propertiesAndInitBlocks_kt { 5 -> {6}; 6 -> {7} [color=green]; 7 -> {8}; - 8 -> {9 42 43}; - 8 -> {9} [style=dashed]; - 9 -> {10}; + 8 -> {9}; + 9 -> {10 51 52}; + 9 -> {10} [style=dashed]; 10 -> {11}; - 11 -> {12 31}; - 11 -> {31} [style=dashed]; - 12 -> {13 18}; - 12 -> {18} [style=dashed]; - 13 -> {14}; - 14 -> {15} [style=dotted]; - 15 -> {16} [style=dotted]; - 16 -> {17} [style=dotted]; - 17 -> {42} [style=dotted]; - 18 -> {19}; - 18 -> {27} [color=red]; - 18 -> {30} [style=dotted]; - 18 -> {19 27} [style=dashed]; - 19 -> {20}; - 20 -> {21}; + 11 -> {12}; + 12 -> {13 36}; + 12 -> {36} [style=dashed]; + 13 -> {14 21}; + 13 -> {21} [style=dashed]; + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18} [style=dotted]; + 18 -> {19} [style=dotted]; + 19 -> {20} [style=dotted]; + 20 -> {52} [style=dotted]; 21 -> {22}; - 22 -> {23} [style=dotted]; - 23 -> {24} [style=dotted]; - 24 -> {25} [style=dotted]; - 25 -> {26} [style=dotted]; - 26 -> {27} [style=dotted]; + 21 -> {32} [color=red]; + 21 -> {35} [style=dotted]; + 21 -> {22 32} [style=dashed]; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; + 25 -> {26}; + 26 -> {27}; 27 -> {28} [style=dotted]; 28 -> {29} [style=dotted]; 29 -> {30} [style=dotted]; - 31 -> {32}; - 32 -> {33}; - 33 -> {34}; - 34 -> {35}; - 35 -> {36}; + 30 -> {31} [style=dotted]; + 31 -> {32} [style=dotted]; + 32 -> {33} [style=dotted]; + 33 -> {34} [style=dotted]; + 34 -> {35} [style=dotted]; 36 -> {37}; 37 -> {38}; - 38 -> {39} [style=dotted]; - 39 -> {40} [style=dotted]; - 40 -> {41} [style=dotted]; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; + 41 -> {42}; 42 -> {43}; - 42 -> {8} [color=green style=dashed]; 43 -> {44}; - 44 -> {45} [color=green]; + 44 -> {45}; 45 -> {46}; - 46 -> {47 52}; - 46 -> {58} [label="onUncaughtException"]; - 47 -> {48}; - 48 -> {49}; - 49 -> {50}; - 50 -> {51}; - 51 -> {52 58}; + 46 -> {47}; + 47 -> {48} [style=dotted]; + 48 -> {49} [style=dotted]; + 49 -> {50} [style=dotted]; + 51 -> {53}; 52 -> {53}; - 52 -> {58} [label="onUncaughtException"]; + 52 -> {9} [color=green style=dashed]; 53 -> {54}; - 54 -> {55}; + 54 -> {55} [color=green]; 55 -> {56}; - 56 -> {57}; + 56 -> {57 62}; + 56 -> {68} [label="onUncaughtException"]; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {62}; + 61 -> {62 68}; 62 -> {63}; + 62 -> {68} [label="onUncaughtException"]; 63 -> {64}; - 64 -> {65} [color=green]; - - subgraph cluster_20 { - color=red - 66 [label="Enter function run" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 67 [label="Enter block"]; - 68 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 69 [label="Exit block"]; - } - 70 [label="Exit function run" style="filled" fillcolor=red]; - } + 64 -> {65}; + 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - - subgraph cluster_22 { - color=red - 71 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 72 [label="Enter block"]; - 73 [label="Const: Int(1)"]; - 74 [label="Jump: ^ Int(1)"]; - 75 [label="Stub" style="filled" fillcolor=gray]; - 76 [label="Exit block" style="filled" fillcolor=gray]; - } - 77 [label="Exit function " style="filled" fillcolor=red]; - } + 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; - 74 -> {77}; - 74 -> {75} [style=dotted]; - 75 -> {76} [style=dotted]; - 76 -> {77} [style=dotted]; + 74 -> {75} [color=green]; - subgraph cluster_24 { + subgraph cluster_25 { color=red - 78 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_25 { + 76 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_26 { color=blue - 79 [label="Enter block"]; - 80 [label="Const: Int(1)"]; - 81 [label="Assignment: F|/x2|"]; - 82 [label="Exit block"]; + 77 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 78 [label="Function call arguments enter"]; + 79 [label="Function call arguments exit"]; + } + 80 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 81 [label="Exit block"]; } - 83 [label="Exit function " style="filled" fillcolor=red]; + 82 [label="Exit function run" style="filled" fillcolor=red]; } + 76 -> {77}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {83}; - subgraph cluster_26 { - color=red - 84 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 85 [label="Enter block"]; - 86 [label="Local class declaration"]; - 87 [label="Exit block"]; - } - 88 [label="Exit function " style="filled" fillcolor=red]; - } subgraph cluster_28 { - color=blue - 89 [label="Enter class GetterLocalClass" style="filled" fillcolor=red]; + color=red + 83 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_29 { color=blue - 90 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_30 { - color=blue - 91 [label="Enter block"]; - 92 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 93 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 94 [label="Stub" style="filled" fillcolor=gray]; - 95 [label="Exit block" style="filled" fillcolor=gray]; - } - 96 [label="Exit init block" style="filled" fillcolor=gray]; + 84 [label="Enter block"]; + 85 [label="Const: Int(1)"]; + 86 [label="Jump: ^ Int(1)"]; + 87 [label="Stub" style="filled" fillcolor=gray]; + 88 [label="Exit block" style="filled" fillcolor=gray]; } - subgraph cluster_31 { - color=blue - 97 [label="Enter function " style="filled" fillcolor=gray]; - 98 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; - 99 [label="Exit function " style="filled" fillcolor=gray]; - } - 100 [label="Exit class GetterLocalClass" style="filled" fillcolor=gray]; + 89 [label="Exit function " style="filled" fillcolor=red]; } + 83 -> {84}; 84 -> {85}; 85 -> {86}; - 86 -> {87 89}; - 86 -> {89} [style=dashed]; - 87 -> {88}; - 89 -> {90}; - 89 -> {97} [color=red]; - 89 -> {100} [style=dotted]; - 89 -> {90 97} [style=dashed]; + 86 -> {89}; + 86 -> {87} [style=dotted]; + 87 -> {88} [style=dotted]; + 88 -> {89} [style=dotted]; + + subgraph cluster_30 { + color=red + 90 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 91 [label="Enter block"]; + 92 [label="Const: Int(1)"]; + 93 [label="Assignment: F|/x2|"]; + 94 [label="Exit block"]; + } + 95 [label="Exit function " style="filled" fillcolor=red]; + } 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {94} [style=dotted]; - 94 -> {95} [style=dotted]; - 95 -> {96} [style=dotted]; - 96 -> {97} [style=dotted]; - 97 -> {98} [style=dotted]; - 98 -> {99} [style=dotted]; - 99 -> {100} [style=dotted]; + 93 -> {94}; + 94 -> {95}; + + subgraph cluster_32 { + color=red + 96 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_33 { + color=blue + 97 [label="Enter block"]; + 98 [label="Local class declaration"]; + 99 [label="Exit block"]; + } + 100 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_34 { + color=blue + 101 [label="Enter class GetterLocalClass" style="filled" fillcolor=red]; + subgraph cluster_35 { + color=blue + 102 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_36 { + color=blue + 103 [label="Enter block"]; + subgraph cluster_37 { + color=blue + 104 [label="Function call arguments enter"]; + 105 [label="Function call arguments exit"]; + } + 106 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 107 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 108 [label="Stub" style="filled" fillcolor=gray]; + 109 [label="Exit block" style="filled" fillcolor=gray]; + } + 110 [label="Exit init block" style="filled" fillcolor=gray]; + } + subgraph cluster_38 { + color=blue + 111 [label="Enter function " style="filled" fillcolor=gray]; + 112 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; + 113 [label="Exit function " style="filled" fillcolor=gray]; + } + 114 [label="Exit class GetterLocalClass" style="filled" fillcolor=gray]; + } + 96 -> {97}; + 97 -> {98}; + 98 -> {99 101}; + 98 -> {101} [style=dashed]; + 99 -> {100}; + 101 -> {102}; + 101 -> {111} [color=red]; + 101 -> {114} [style=dotted]; + 101 -> {102 111} [style=dashed]; + 102 -> {103}; + 103 -> {104}; + 104 -> {105}; + 105 -> {106}; + 106 -> {107}; + 107 -> {108} [style=dotted]; + 108 -> {109} [style=dotted]; + 109 -> {110} [style=dotted]; + 110 -> {111} [style=dotted]; + 111 -> {112} [style=dotted]; + 112 -> {113} [style=dotted]; + 113 -> {114} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot index 22e27e3ffff..69c4e9ef0a7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot @@ -59,164 +59,206 @@ digraph returnValuesFromLambda_kt { subgraph cluster_7 { color=blue 15 [label="Enter block"]; - 16 [label="Postponed enter to lambda"]; subgraph cluster_8 { color=blue - 17 [label="Enter function " style="filled" fillcolor=red]; + 16 [label="Function call arguments enter"]; + 17 [label="Postponed enter to lambda"]; subgraph cluster_9 { color=blue - 18 [label="Enter block"]; + 18 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 19 [label="Enter when"]; + 19 [label="Enter block"]; subgraph cluster_11 { color=blue - 20 [label="Enter when branch condition "]; - 21 [label="Access variable R|/b|"]; - 22 [label="Exit when branch condition"]; + 20 [label="Enter when"]; + subgraph cluster_12 { + color=blue + 21 [label="Enter when branch condition "]; + 22 [label="Access variable R|/b|"]; + 23 [label="Exit when branch condition"]; + } + 24 [label="Synthetic else branch"]; + 25 [label="Enter when branch result"]; + subgraph cluster_13 { + color=blue + 26 [label="Enter block"]; + subgraph cluster_14 { + color=blue + 27 [label="Function call arguments enter"]; + 28 [label="Function call arguments exit"]; + } + 29 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 30 [label="Jump: ^@run R|/B.B|()"]; + 31 [label="Stub" style="filled" fillcolor=gray]; + 32 [label="Exit block" style="filled" fillcolor=gray]; + } + 33 [label="Exit when branch result" style="filled" fillcolor=gray]; + 34 [label="Exit when"]; } - 23 [label="Synthetic else branch"]; - 24 [label="Enter when branch result"]; - subgraph cluster_12 { + subgraph cluster_15 { color=blue - 25 [label="Enter block"]; - 26 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 27 [label="Jump: ^@run R|/B.B|()"]; - 28 [label="Stub" style="filled" fillcolor=gray]; - 29 [label="Exit block" style="filled" fillcolor=gray]; + 35 [label="Function call arguments enter"]; + 36 [label="Function call arguments exit"]; } - 30 [label="Exit when branch result" style="filled" fillcolor=gray]; - 31 [label="Exit when"]; + 37 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; } - 32 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; - 33 [label="Exit block"]; + 39 [label="Exit function " style="filled" fillcolor=red]; } - 34 [label="Exit function " style="filled" fillcolor=red]; + 40 [label="Function call arguments exit"]; } - 35 [label="Postponed exit from lambda"]; - 36 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 37 [label="Variable declaration: lval x: R|A|"]; - 38 [label="Exit block"]; + 41 [label="Postponed exit from lambda"]; + 42 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 43 [label="Variable declaration: lval x: R|A|"]; + 44 [label="Exit block"]; } - 39 [label="Exit function test_1" style="filled" fillcolor=red]; + 45 [label="Exit function test_1" style="filled" fillcolor=red]; } 14 -> {15}; 15 -> {16}; - 16 -> {17 36}; - 16 -> {35} [style=dotted]; - 16 -> {17} [style=dashed]; - 17 -> {18}; + 16 -> {17}; + 17 -> {18 40}; + 17 -> {41} [style=dotted]; + 17 -> {18} [style=dashed]; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {23 24}; - 23 -> {31}; - 24 -> {25}; + 22 -> {23}; + 23 -> {24 25}; + 24 -> {34}; 25 -> {26}; 26 -> {27}; - 27 -> {34}; - 27 -> {28} [style=dotted]; - 28 -> {29} [style=dotted]; - 29 -> {30} [style=dotted]; + 27 -> {28}; + 28 -> {29}; + 29 -> {30}; + 30 -> {39}; 30 -> {31} [style=dotted]; - 31 -> {32}; - 32 -> {33}; - 33 -> {34}; + 31 -> {32} [style=dotted]; + 32 -> {33} [style=dotted]; + 33 -> {34} [style=dotted]; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - - subgraph cluster_13 { - color=red - 40 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 41 [label="Enter block"]; - 42 [label="Postponed enter to lambda"]; - subgraph cluster_15 { - color=blue - 43 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 44 [label="Enter block"]; - 45 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; - 46 [label="Jump: ^@run R|/C.C|()"]; - 47 [label="Stub" style="filled" fillcolor=gray]; - 48 [label="Exit block" style="filled" fillcolor=gray]; - } - 49 [label="Exit function " style="filled" fillcolor=red]; - } - 50 [label="Postponed exit from lambda"]; - 51 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 52 [label="Variable declaration: lval x: R|C|"]; - 53 [label="Exit block"]; - } - 54 [label="Exit function test_2" style="filled" fillcolor=red]; - } - 40 -> {41}; + 39 -> {41}; + 40 -> {42}; 41 -> {42}; - 42 -> {43 51}; - 42 -> {50} [style=dotted]; - 42 -> {43} [style=dashed]; + 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {46}; - 46 -> {49}; - 46 -> {47} [style=dotted]; - 47 -> {48} [style=dotted]; - 48 -> {49} [style=dotted]; - 49 -> {50}; + + subgraph cluster_16 { + color=red + 46 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_17 { + color=blue + 47 [label="Enter block"]; + subgraph cluster_18 { + color=blue + 48 [label="Function call arguments enter"]; + 49 [label="Postponed enter to lambda"]; + subgraph cluster_19 { + color=blue + 50 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 51 [label="Enter block"]; + subgraph cluster_21 { + color=blue + 52 [label="Function call arguments enter"]; + 53 [label="Function call arguments exit"]; + } + 54 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; + 55 [label="Jump: ^@run R|/C.C|()"]; + 56 [label="Stub" style="filled" fillcolor=gray]; + 57 [label="Exit block" style="filled" fillcolor=gray]; + } + 58 [label="Exit function " style="filled" fillcolor=red]; + } + 59 [label="Function call arguments exit"]; + } + 60 [label="Postponed exit from lambda"]; + 61 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 62 [label="Variable declaration: lval x: R|C|"]; + 63 [label="Exit block"]; + } + 64 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 46 -> {47}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50 59}; + 49 -> {60} [style=dotted]; + 49 -> {50} [style=dashed]; 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; + 54 -> {55}; + 55 -> {58}; + 55 -> {56} [style=dotted]; + 56 -> {57} [style=dotted]; + 57 -> {58} [style=dotted]; + 58 -> {60}; + 59 -> {61}; + 60 -> {61}; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; - subgraph cluster_17 { + subgraph cluster_22 { color=red - 55 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_18 { + 65 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_23 { color=blue - 56 [label="Enter block"]; - 57 [label="Postponed enter to lambda"]; - subgraph cluster_19 { + 66 [label="Enter block"]; + subgraph cluster_24 { color=blue - 58 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_20 { + 67 [label="Function call arguments enter"]; + 68 [label="Postponed enter to lambda"]; + subgraph cluster_25 { color=blue - 59 [label="Enter block"]; - 60 [label="Jump: ^test_3 Unit"]; - 61 [label="Stub" style="filled" fillcolor=gray]; - 62 [label="Exit block" style="filled" fillcolor=gray]; + 69 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 70 [label="Enter block"]; + 71 [label="Jump: ^test_3 Unit"]; + 72 [label="Stub" style="filled" fillcolor=gray]; + 73 [label="Exit block" style="filled" fillcolor=gray]; + } + 74 [label="Exit function " style="filled" fillcolor=gray]; } - 63 [label="Exit function " style="filled" fillcolor=gray]; + 75 [label="Function call arguments exit"]; } - 64 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 65 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=gray]; - 66 [label="Stub" style="filled" fillcolor=gray]; - 67 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray]; - 68 [label="Exit block" style="filled" fillcolor=gray]; + 76 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 77 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=gray]; + 78 [label="Stub" style="filled" fillcolor=gray]; + 79 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray]; + 80 [label="Exit block" style="filled" fillcolor=gray]; } - 69 [label="Exit function test_3" style="filled" fillcolor=red]; + 81 [label="Exit function test_3" style="filled" fillcolor=red]; } - 55 -> {56}; - 56 -> {57}; - 57 -> {58}; - 57 -> {64 65} [style=dotted]; - 57 -> {58} [style=dashed]; - 58 -> {59}; - 59 -> {60}; - 60 -> {69}; - 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; - 62 -> {63} [style=dotted]; - 63 -> {64} [style=dotted]; - 64 -> {65} [style=dotted]; - 65 -> {66} [style=dotted]; - 66 -> {67} [style=dotted]; - 67 -> {68} [style=dotted]; - 68 -> {69} [style=dotted]; + 65 -> {66}; + 66 -> {67}; + 67 -> {68}; + 68 -> {69 75}; + 68 -> {76} [style=dotted]; + 68 -> {69} [style=dashed]; + 69 -> {70}; + 70 -> {71}; + 71 -> {81}; + 71 -> {72} [style=dotted]; + 72 -> {73} [style=dotted]; + 73 -> {74} [style=dotted]; + 74 -> {76} [style=dotted]; + 75 -> {77} [style=dotted]; + 76 -> {77} [style=dotted]; + 77 -> {78} [style=dotted]; + 78 -> {79} [style=dotted]; + 79 -> {80} [style=dotted]; + 80 -> {81} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot index 3e837454847..b00df66b3e3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot @@ -46,117 +46,138 @@ digraph safeCalls_kt { 11 [label="Enter block"]; 12 [label="Access variable R|/x|"]; 13 [label="Enter safe call"]; - 14 [label="Function call: $subj$.R|/A.foo|()" style="filled" fillcolor=yellow]; - 15 [label="Enter safe call"]; - 16 [label="Const: String()"]; - 17 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; - 18 [label="Exit safe call"]; - 19 [label="Exit safe call"]; - 20 [label="Exit block"]; + subgraph cluster_7 { + color=blue + 14 [label="Function call arguments enter"]; + 15 [label="Function call arguments exit"]; + } + 16 [label="Function call: $subj$.R|/A.foo|()" style="filled" fillcolor=yellow]; + 17 [label="Enter safe call"]; + subgraph cluster_8 { + color=blue + 18 [label="Function call arguments enter"]; + 19 [label="Const: String()"]; + 20 [label="Function call arguments exit"]; + } + 21 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; + 22 [label="Exit safe call"]; + 23 [label="Exit safe call"]; + 24 [label="Exit block"]; } - 21 [label="Exit function test_1" style="filled" fillcolor=red]; + 25 [label="Exit function test_1" style="filled" fillcolor=red]; } 10 -> {11}; 11 -> {12}; - 12 -> {13 18}; + 12 -> {13 22}; 13 -> {14}; - 14 -> {15 18}; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; - 17 -> {19}; + 16 -> {17 22}; + 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - - subgraph cluster_7 { - color=red - 22 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 23 [label="Enter block"]; - 24 [label="Access variable R|/x|"]; - 25 [label="Enter safe call"]; - 26 [label="Access variable R|/B.foo|"]; - 27 [label="Enter safe call"]; - 28 [label="Access variable R|/B.bar|"]; - 29 [label="Exit safe call"]; - 30 [label="Exit safe call"]; - 31 [label="Exit block"]; - } - 32 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 21 -> {23}; 22 -> {23}; 23 -> {24}; - 24 -> {25 29}; - 25 -> {26}; - 26 -> {27 29}; - 27 -> {28}; - 28 -> {30}; - 29 -> {30}; - 30 -> {31}; - 31 -> {32}; + 24 -> {25}; subgraph cluster_9 { color=red - 33 [label="Enter function test_3" style="filled" fillcolor=red]; + 26 [label="Enter function test_2" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 34 [label="Enter block"]; - subgraph cluster_11 { - color=blue - 35 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 36 [label="Enter when branch condition "]; - 37 [label="Access variable R|/x|"]; - 38 [label="Enter safe call"]; - 39 [label="Access variable R|/y|"]; - 40 [label="Type operator: (R|/y| as R|kotlin/String|)"]; - 41 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; - 42 [label="Exit safe call"]; - 43 [label="Const: Null(null)"]; - 44 [label="Equality operator !="]; - 45 [label="Exit when branch condition"]; - } - 46 [label="Synthetic else branch"]; - 47 [label="Enter when branch result"]; - subgraph cluster_13 { - color=blue - 48 [label="Enter block"]; - 49 [label="Access variable R|/y|"]; - 50 [label="Smart cast: R|/y|"]; - 51 [label="Access variable R|kotlin/String.length|"]; - 52 [label="Exit block"]; - } - 53 [label="Exit when branch result"]; - 54 [label="Exit when"]; - } - 55 [label="Exit block"]; + 27 [label="Enter block"]; + 28 [label="Access variable R|/x|"]; + 29 [label="Enter safe call"]; + 30 [label="Access variable R|/B.foo|"]; + 31 [label="Enter safe call"]; + 32 [label="Access variable R|/B.bar|"]; + 33 [label="Exit safe call"]; + 34 [label="Exit safe call"]; + 35 [label="Exit block"]; } - 56 [label="Exit function test_3" style="filled" fillcolor=red]; + 36 [label="Exit function test_2" style="filled" fillcolor=red]; } + 26 -> {27}; + 27 -> {28}; + 28 -> {29 33}; + 29 -> {30}; + 30 -> {31 33}; + 31 -> {32}; + 32 -> {34}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37}; - 37 -> {38 42}; + + subgraph cluster_11 { + color=red + 37 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 38 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 39 [label="Enter when"]; + subgraph cluster_14 { + color=blue + 40 [label="Enter when branch condition "]; + 41 [label="Access variable R|/x|"]; + 42 [label="Enter safe call"]; + subgraph cluster_15 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Access variable R|/y|"]; + 45 [label="Type operator: (R|/y| as R|kotlin/String|)"]; + 46 [label="Function call arguments exit"]; + } + 47 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; + 48 [label="Exit safe call"]; + 49 [label="Const: Null(null)"]; + 50 [label="Equality operator !="]; + 51 [label="Exit when branch condition"]; + } + 52 [label="Synthetic else branch"]; + 53 [label="Enter when branch result"]; + subgraph cluster_16 { + color=blue + 54 [label="Enter block"]; + 55 [label="Access variable R|/y|"]; + 56 [label="Smart cast: R|/y|"]; + 57 [label="Access variable R|kotlin/String.length|"]; + 58 [label="Exit block"]; + } + 59 [label="Exit when branch result"]; + 60 [label="Exit when"]; + } + 61 [label="Exit block"]; + } + 62 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {42}; + 41 -> {42 48}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {46 47}; - 46 -> {54}; + 45 -> {46}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52}; - 52 -> {53}; + 51 -> {52 53}; + 52 -> {60}; 53 -> {54}; 54 -> {55}; 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; + 59 -> {60}; + 60 -> {61}; + 61 -> {62}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot index a4d74f356b6..c413fa3912f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot @@ -32,14 +32,24 @@ digraph simple_kt { 7 [label="Enter block"]; 8 [label="Const: Int(1)"]; 9 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 10 [label="Access variable R|/x|"]; - 11 [label="Const: Int(1)"]; - 12 [label="Function call: R|/x|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; - 13 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 14 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; - 15 [label="Exit block"]; + subgraph cluster_5 { + color=blue + 10 [label="Function call arguments enter"]; + 11 [label="Access variable R|/x|"]; + 12 [label="Const: Int(1)"]; + 13 [label="Function call arguments exit"]; + } + 14 [label="Function call: R|/x|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; + 15 [label="Variable declaration: lval y: R|kotlin/Int|"]; + subgraph cluster_6 { + color=blue + 16 [label="Function call arguments enter"]; + 17 [label="Function call arguments exit"]; + } + 18 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; + 19 [label="Exit block"]; } - 16 [label="Exit function test" style="filled" fillcolor=red]; + 20 [label="Exit function test" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; @@ -51,5 +61,9 @@ digraph simple_kt { 13 -> {14}; 14 -> {15}; 15 -> {16}; + 16 -> {17}; + 17 -> {18}; + 18 -> {19}; + 19 -> {20}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot index e54d58e83e1..8f0a51b1bbe 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot @@ -205,67 +205,72 @@ digraph tryCatch_kt { subgraph cluster_30 { color=blue 72 [label="Enter when branch condition "]; - 73 [label="Access variable R|/b|"]; - 74 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 75 [label="Exit when branch condition"]; + subgraph cluster_31 { + color=blue + 73 [label="Function call arguments enter"]; + 74 [label="Access variable R|/b|"]; + 75 [label="Function call arguments exit"]; + } + 76 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 77 [label="Exit when branch condition"]; } - 76 [label="Synthetic else branch"]; - 77 [label="Enter when branch result"]; - subgraph cluster_31 { + 78 [label="Synthetic else branch"]; + 79 [label="Enter when branch result"]; + subgraph cluster_32 { color=blue - 78 [label="Enter block"]; - 79 [label="Jump: break@@@[Boolean(true)] "]; - 80 [label="Stub" style="filled" fillcolor=gray]; - 81 [label="Exit block" style="filled" fillcolor=gray]; + 80 [label="Enter block"]; + 81 [label="Jump: break@@@[Boolean(true)] "]; + 82 [label="Stub" style="filled" fillcolor=gray]; + 83 [label="Exit block" style="filled" fillcolor=gray]; } - 82 [label="Exit when branch result" style="filled" fillcolor=gray]; - 83 [label="Exit when"]; + 84 [label="Exit when branch result" style="filled" fillcolor=gray]; + 85 [label="Exit when"]; } - 84 [label="Exit block"]; + 86 [label="Exit block"]; } - 85 [label="Try main block exit"]; + 87 [label="Try main block exit"]; } - subgraph cluster_32 { + subgraph cluster_33 { color=blue - 86 [label="Catch enter"]; - 87 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_33 { + 88 [label="Catch enter"]; + 89 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_34 { color=blue - 88 [label="Enter block"]; - 89 [label="Jump: continue@@@[Boolean(true)] "]; - 90 [label="Stub" style="filled" fillcolor=gray]; - 91 [label="Exit block" style="filled" fillcolor=gray]; + 90 [label="Enter block"]; + 91 [label="Jump: continue@@@[Boolean(true)] "]; + 92 [label="Stub" style="filled" fillcolor=gray]; + 93 [label="Exit block" style="filled" fillcolor=gray]; } - 92 [label="Catch exit" style="filled" fillcolor=gray]; + 94 [label="Catch exit" style="filled" fillcolor=gray]; } - subgraph cluster_34 { + subgraph cluster_35 { color=blue - 93 [label="Catch enter"]; - 94 [label="Variable declaration: e: R|kotlin/RuntimeException|"]; - subgraph cluster_35 { + 95 [label="Catch enter"]; + 96 [label="Variable declaration: e: R|kotlin/RuntimeException|"]; + subgraph cluster_36 { color=blue - 95 [label="Enter block"]; - 96 [label="Jump: break@@@[Boolean(true)] "]; - 97 [label="Stub" style="filled" fillcolor=gray]; - 98 [label="Exit block" style="filled" fillcolor=gray]; + 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]; } - 99 [label="Catch exit" style="filled" fillcolor=gray]; + 101 [label="Catch exit" style="filled" fillcolor=gray]; } - 100 [label="Try expression exit"]; + 102 [label="Try expression exit"]; } - 101 [label="Const: Int(2)"]; - 102 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 103 [label="Exit block"]; + 103 [label="Const: Int(2)"]; + 104 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 105 [label="Exit block"]; } - 104 [label="Exit loop block"]; + 106 [label="Exit loop block"]; } - 105 [label="Exit while loop"]; + 107 [label="Exit while loop"]; } - 106 [label="Const: Int(3)"]; - 107 [label="Variable declaration: lval z: R|kotlin/Int|"]; - 108 [label="Exit block"]; + 108 [label="Const: Int(3)"]; + 109 [label="Variable declaration: lval z: R|kotlin/Int|"]; + 110 [label="Exit block"]; } - 109 [label="Exit function test_3" style="filled" fillcolor=red]; + 111 [label="Exit function test_3" style="filled" fillcolor=red]; } 46 -> {47}; 47 -> {48}; @@ -273,10 +278,10 @@ digraph tryCatch_kt { 49 -> {50}; 50 -> {51}; 51 -> {52}; - 51 -> {105} [style=dotted]; + 51 -> {107} [style=dotted]; 52 -> {53}; 53 -> {54}; - 54 -> {55 86 93}; + 54 -> {55 88 95}; 55 -> {56}; 56 -> {57}; 57 -> {58}; @@ -286,7 +291,7 @@ digraph tryCatch_kt { 61 -> {68}; 62 -> {63}; 63 -> {64}; - 64 -> {109}; + 64 -> {111}; 64 -> {65} [style=dotted]; 65 -> {66} [style=dotted]; 66 -> {67} [style=dotted]; @@ -298,42 +303,44 @@ digraph tryCatch_kt { 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76 77}; - 76 -> {83}; - 77 -> {78}; - 78 -> {79}; - 79 -> {105}; - 79 -> {80} [style=dotted]; - 80 -> {81} [style=dotted]; + 75 -> {76}; + 76 -> {77}; + 77 -> {78 79}; + 78 -> {85}; + 79 -> {80}; + 80 -> {81}; + 81 -> {107}; 81 -> {82} [style=dotted]; 82 -> {83} [style=dotted]; - 83 -> {84}; - 84 -> {85}; - 85 -> {86 93 100}; + 83 -> {84} [style=dotted]; + 84 -> {85} [style=dotted]; + 85 -> {86}; 86 -> {87}; - 87 -> {88}; + 87 -> {88 95 102}; 88 -> {89}; - 89 -> {49} [color=green style=dashed]; - 89 -> {90} [style=dotted]; - 90 -> {91} [style=dotted]; + 89 -> {90}; + 90 -> {91}; + 91 -> {49} [color=green style=dashed]; 91 -> {92} [style=dotted]; - 92 -> {100} [style=dotted]; - 93 -> {94}; - 94 -> {95}; + 92 -> {93} [style=dotted]; + 93 -> {94} [style=dotted]; + 94 -> {102} [style=dotted]; 95 -> {96}; - 96 -> {105}; - 96 -> {97} [style=dotted]; - 97 -> {98} [style=dotted]; + 96 -> {97}; + 97 -> {98}; + 98 -> {107}; 98 -> {99} [style=dotted]; 99 -> {100} [style=dotted]; - 100 -> {101}; - 101 -> {102}; + 100 -> {101} [style=dotted]; + 101 -> {102} [style=dotted]; 102 -> {103}; 103 -> {104}; - 104 -> {49} [color=green style=dashed]; + 104 -> {105}; 105 -> {106}; - 106 -> {107}; + 106 -> {49} [color=green style=dashed]; 107 -> {108}; 108 -> {109}; + 109 -> {110}; + 110 -> {111}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/variableInitializedInTryBlock.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/variableInitializedInTryBlock.dot index 3e2ea4262e6..02544e14da1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/variableInitializedInTryBlock.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/variableInitializedInTryBlock.dot @@ -26,110 +26,131 @@ digraph variableInitializedInTryBlock_kt { subgraph cluster_5 { color=blue 7 [label="Enter block"]; - 8 [label="Function call: R|/getStringOrNull|()" style="filled" fillcolor=yellow]; - 9 [label="Exit lhs of ?:"]; - 10 [label="Enter rhs of ?:"]; - 11 [label="Jump: ^test Unit"]; - 12 [label="Stub" style="filled" fillcolor=gray]; - 13 [label="Lhs of ?: is not null"]; - 14 [label="Exit ?:"]; - 15 [label="Variable declaration: lval s: R|kotlin/String|"]; - 16 [label="Access variable R|/s|"]; - 17 [label="Access variable R|kotlin/String.length|"]; - 18 [label="Const: Int(0)"]; - 19 [label="Equality operator !="]; - 20 [label="Assignment: R|/b|"]; - 21 [label="Exit block"]; + subgraph cluster_6 { + color=blue + 8 [label="Function call arguments enter"]; + 9 [label="Function call arguments exit"]; + } + 10 [label="Function call: R|/getStringOrNull|()" style="filled" fillcolor=yellow]; + 11 [label="Exit lhs of ?:"]; + 12 [label="Enter rhs of ?:"]; + 13 [label="Jump: ^test Unit"]; + 14 [label="Stub" style="filled" fillcolor=gray]; + 15 [label="Lhs of ?: is not null"]; + 16 [label="Exit ?:"]; + 17 [label="Variable declaration: lval s: R|kotlin/String|"]; + 18 [label="Access variable R|/s|"]; + 19 [label="Access variable R|kotlin/String.length|"]; + 20 [label="Const: Int(0)"]; + 21 [label="Equality operator !="]; + 22 [label="Assignment: R|/b|"]; + 23 [label="Exit block"]; } - 22 [label="Try main block exit"]; + 24 [label="Try main block exit"]; } - subgraph cluster_6 { + subgraph cluster_7 { color=blue - 23 [label="Enter finally"]; - subgraph cluster_7 { + 25 [label="Enter finally"]; + subgraph cluster_8 { color=blue - 24 [label="Enter block"]; - 25 [label="Function call: R|/test|()" style="filled" fillcolor=yellow]; - 26 [label="Exit block"]; + 26 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 27 [label="Function call arguments enter"]; + 28 [label="Function call arguments exit"]; + } + 29 [label="Function call: R|/test|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; } - 27 [label="Exit finally"]; + 31 [label="Exit finally"]; } - 28 [label="Try expression exit"]; + 32 [label="Try expression exit"]; } - 29 [label="Access variable R|/b|"]; - 30 [label="Function call: R|/takeBoolean|(...)" style="filled" fillcolor=yellow]; - 31 [label="Exit block"]; + subgraph cluster_10 { + color=blue + 33 [label="Function call arguments enter"]; + 34 [label="Access variable R|/b|"]; + 35 [label="Function call arguments exit"]; + } + 36 [label="Function call: R|/takeBoolean|(...)" style="filled" fillcolor=yellow]; + 37 [label="Exit block"]; } - 32 [label="Exit function test" style="filled" fillcolor=red]; + 38 [label="Exit function test" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - 5 -> {23} [label="onUncaughtException"]; + 5 -> {25} [label="onUncaughtException"]; 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {10 13}; + 9 -> {10}; 10 -> {11}; - 11 -> {23} [label="return@/test"]; - 11 -> {12} [style=dotted]; - 12 -> {14} [style=dotted]; - 13 -> {14}; - 14 -> {15}; + 11 -> {12 15}; + 12 -> {13}; + 13 -> {25} [label="return@/test"]; + 13 -> {14} [style=dotted]; + 14 -> {16} [style=dotted]; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 20 -> {23} [label="onUncaughtException"]; 21 -> {22}; 22 -> {23}; + 22 -> {25} [label="onUncaughtException"]; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 27 -> {32} [label="return@/test"]; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; - - subgraph cluster_8 { - color=red - 33 [label="Enter function takeBoolean" style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 34 [label="Enter block"]; - 35 [label="Exit block"]; - } - 36 [label="Exit function takeBoolean" style="filled" fillcolor=red]; - } + 31 -> {38} [label="return@/test"]; + 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - - subgraph cluster_10 { - color=red - 37 [label="Enter function getStringOrNull" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 38 [label="Enter block"]; - 39 [label="Const: String(hello)"]; - 40 [label="Jump: ^getStringOrNull String(hello)"]; - 41 [label="Stub" style="filled" fillcolor=gray]; - 42 [label="Exit block" style="filled" fillcolor=gray]; - } - 43 [label="Exit function getStringOrNull" style="filled" fillcolor=red]; - } + 36 -> {37}; 37 -> {38}; - 38 -> {39}; + + subgraph cluster_11 { + color=red + 39 [label="Enter function takeBoolean" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 40 [label="Enter block"]; + 41 [label="Exit block"]; + } + 42 [label="Exit function takeBoolean" style="filled" fillcolor=red]; + } 39 -> {40}; - 40 -> {43}; - 40 -> {41} [style=dotted]; - 41 -> {42} [style=dotted]; - 42 -> {43} [style=dotted]; + 40 -> {41}; + 41 -> {42}; + + subgraph cluster_13 { + color=red + 43 [label="Enter function getStringOrNull" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 44 [label="Enter block"]; + 45 [label="Const: String(hello)"]; + 46 [label="Jump: ^getStringOrNull String(hello)"]; + 47 [label="Stub" style="filled" fillcolor=gray]; + 48 [label="Exit block" style="filled" fillcolor=gray]; + } + 49 [label="Exit function getStringOrNull" style="filled" fillcolor=red]; + } + 43 -> {44}; + 44 -> {45}; + 45 -> {46}; + 46 -> {49}; + 46 -> {47} [style=dotted]; + 47 -> {48} [style=dotted]; + 48 -> {49} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot index 876011205db..8f603840b5b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot @@ -30,67 +30,77 @@ digraph when_kt { subgraph cluster_5 { color=blue 10 [label="Enter when branch condition "]; - 11 [label="Access variable R|/x|"]; - 12 [label="Const: Int(2)"]; - 13 [label="Function call: R|/x|.R|kotlin/Int.rem|(...)" style="filled" fillcolor=yellow]; - 14 [label="Const: Int(0)"]; - 15 [label="Equality operator =="]; - 16 [label="Exit when branch condition"]; - } - subgraph cluster_6 { - color=blue - 17 [label="Enter when branch condition "]; - 18 [label="Const: Int(1)"]; - 19 [label="Const: Int(1)"]; - 20 [label="Function call: Int(1).R|kotlin/Int.minus|(...)" style="filled" fillcolor=yellow]; - 21 [label="Const: Int(0)"]; - 22 [label="Equality operator =="]; - 23 [label="Exit when branch condition"]; + subgraph cluster_6 { + color=blue + 11 [label="Function call arguments enter"]; + 12 [label="Access variable R|/x|"]; + 13 [label="Const: Int(2)"]; + 14 [label="Function call arguments exit"]; + } + 15 [label="Function call: R|/x|.R|kotlin/Int.rem|(...)" style="filled" fillcolor=yellow]; + 16 [label="Const: Int(0)"]; + 17 [label="Equality operator =="]; + 18 [label="Exit when branch condition"]; } subgraph cluster_7 { color=blue - 24 [label="Enter when branch condition else"]; - 25 [label="Exit when branch condition"]; + 19 [label="Enter when branch condition "]; + subgraph cluster_8 { + color=blue + 20 [label="Function call arguments enter"]; + 21 [label="Const: Int(1)"]; + 22 [label="Const: Int(1)"]; + 23 [label="Function call arguments exit"]; + } + 24 [label="Function call: Int(1).R|kotlin/Int.minus|(...)" style="filled" fillcolor=yellow]; + 25 [label="Const: Int(0)"]; + 26 [label="Equality operator =="]; + 27 [label="Exit when branch condition"]; } - 26 [label="Enter when branch result"]; - subgraph cluster_8 { - color=blue - 27 [label="Enter block"]; - 28 [label="Const: Int(5)"]; - 29 [label="Exit block"]; - } - 30 [label="Exit when branch result"]; - 31 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 32 [label="Enter block"]; - 33 [label="Jump: ^test_1 Unit"]; - 34 [label="Stub" style="filled" fillcolor=gray]; - 35 [label="Exit block" style="filled" fillcolor=gray]; + 28 [label="Enter when branch condition else"]; + 29 [label="Exit when branch condition"]; } - 36 [label="Exit when branch result" style="filled" fillcolor=gray]; - 37 [label="Enter when branch result"]; + 30 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 38 [label="Enter block"]; - 39 [label="Const: Int(20)"]; - 40 [label="Exit block"]; + 31 [label="Enter block"]; + 32 [label="Const: Int(5)"]; + 33 [label="Exit block"]; } - 41 [label="Exit when branch result"]; - 42 [label="Enter when branch result"]; + 34 [label="Exit when branch result"]; + 35 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 43 [label="Enter block"]; - 44 [label="Const: Int(10)"]; - 45 [label="Exit block"]; + 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]; } - 46 [label="Exit when branch result"]; - 47 [label="Exit when"]; + 40 [label="Exit when branch result" style="filled" fillcolor=gray]; + 41 [label="Enter when branch result"]; + subgraph cluster_12 { + color=blue + 42 [label="Enter block"]; + 43 [label="Const: Int(20)"]; + 44 [label="Exit block"]; + } + 45 [label="Exit when branch result"]; + 46 [label="Enter when branch result"]; + subgraph cluster_13 { + color=blue + 47 [label="Enter block"]; + 48 [label="Const: Int(10)"]; + 49 [label="Exit block"]; + } + 50 [label="Exit when branch result"]; + 51 [label="Exit when"]; } - 48 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 49 [label="Exit block"]; + 52 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 53 [label="Exit block"]; } - 50 [label="Exit function test_1" style="filled" fillcolor=red]; + 54 [label="Exit function test_1" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -99,129 +109,133 @@ digraph when_kt { 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {10 42}; + 9 -> {10 46}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; - 16 -> {17 37}; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; + 18 -> {19 41}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {24 31}; + 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {28}; + 27 -> {28 35}; 28 -> {29}; 29 -> {30}; - 30 -> {47}; + 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {50}; - 33 -> {34} [style=dotted]; - 34 -> {35} [style=dotted]; - 35 -> {36} [style=dotted]; - 36 -> {47} [style=dotted]; - 37 -> {38}; - 38 -> {39}; - 39 -> {40}; - 40 -> {41}; - 41 -> {47}; + 33 -> {34}; + 34 -> {51}; + 35 -> {36}; + 36 -> {37}; + 37 -> {54}; + 37 -> {38} [style=dotted]; + 38 -> {39} [style=dotted]; + 39 -> {40} [style=dotted]; + 40 -> {51} [style=dotted]; + 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {46}; + 45 -> {51}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - - subgraph cluster_12 { - color=red - 51 [label="Enter class A" style="filled" fillcolor=red]; - 52 [label="Exit class A" style="filled" fillcolor=red]; - } - 51 -> {52} [color=green]; - - subgraph cluster_13 { - color=red - 53 [label="Enter class B" style="filled" fillcolor=red]; - 54 [label="Exit class B" style="filled" fillcolor=red]; - } - 53 -> {54} [color=green]; + 50 -> {51}; + 51 -> {52}; + 52 -> {53}; + 53 -> {54}; subgraph cluster_14 { color=red - 55 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_15 { + 55 [label="Enter class A" style="filled" fillcolor=red]; + 56 [label="Exit class A" style="filled" fillcolor=red]; + } + 55 -> {56} [color=green]; + + subgraph cluster_15 { + color=red + 57 [label="Enter class B" style="filled" fillcolor=red]; + 58 [label="Exit class B" style="filled" fillcolor=red]; + } + 57 -> {58} [color=green]; + + subgraph cluster_16 { + color=red + 59 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_17 { color=blue - 56 [label="Enter block"]; - subgraph cluster_16 { + 60 [label="Enter block"]; + subgraph cluster_18 { color=blue - 57 [label="Enter when"]; - subgraph cluster_17 { - color=blue - 58 [label="Enter when branch condition "]; - subgraph cluster_18 { - color=blue - 59 [label="Enter &&"]; - 60 [label="Access variable R|/x|"]; - 61 [label="Type operator: (R|/x| is R|A|)"]; - 62 [label="Exit left part of &&"]; - 63 [label="Enter right part of &&"]; - 64 [label="Access variable R|/x|"]; - 65 [label="Smart cast: R|/x|"]; - 66 [label="Type operator: (R|/x| is R|B|)"]; - 67 [label="Exit &&"]; - } - 68 [label="Exit when branch condition"]; - } - 69 [label="Synthetic else branch"]; - 70 [label="Enter when branch result"]; + 61 [label="Enter when"]; subgraph cluster_19 { color=blue - 71 [label="Enter block"]; - 72 [label="Access variable R|/x|"]; - 73 [label="Smart cast: R|/x|"]; - 74 [label="Type operator: (R|/x| is R|A|)"]; - 75 [label="Exit block"]; + 62 [label="Enter when branch condition "]; + subgraph cluster_20 { + color=blue + 63 [label="Enter &&"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Type operator: (R|/x| is R|A|)"]; + 66 [label="Exit left part of &&"]; + 67 [label="Enter right part of &&"]; + 68 [label="Access variable R|/x|"]; + 69 [label="Smart cast: R|/x|"]; + 70 [label="Type operator: (R|/x| is R|B|)"]; + 71 [label="Exit &&"]; + } + 72 [label="Exit when branch condition"]; } - 76 [label="Exit when branch result"]; - 77 [label="Exit when"]; + 73 [label="Synthetic else branch"]; + 74 [label="Enter when branch result"]; + subgraph cluster_21 { + color=blue + 75 [label="Enter block"]; + 76 [label="Access variable R|/x|"]; + 77 [label="Smart cast: R|/x|"]; + 78 [label="Type operator: (R|/x| is R|A|)"]; + 79 [label="Exit block"]; + } + 80 [label="Exit when branch result"]; + 81 [label="Exit when"]; } - 78 [label="Exit block"]; + 82 [label="Exit block"]; } - 79 [label="Exit function test_2" style="filled" fillcolor=red]; + 83 [label="Exit function test_2" style="filled" fillcolor=red]; } - 55 -> {56}; - 56 -> {57}; - 57 -> {58}; - 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {63 67}; + 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {67}; + 66 -> {67 71}; 67 -> {68}; - 68 -> {69 70}; - 69 -> {77}; + 68 -> {69}; + 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {73}; - 73 -> {74}; + 72 -> {73 74}; + 73 -> {81}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; + 79 -> {80}; + 80 -> {81}; + 81 -> {82}; + 82 -> {83}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot b/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot index 5b0b8bf971d..c8062d53f71 100644 --- a/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot @@ -16,48 +16,55 @@ digraph classCallInLambda_kt { subgraph cluster_2 { color=blue 3 [label="Enter block"]; - 4 [label="Access variable R|/x|"]; - 5 [label="Postponed enter to lambda"]; subgraph cluster_3 { color=blue - 6 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Function call arguments enter"]; + 5 [label="Access variable R|/x|"]; + 6 [label="Postponed enter to lambda"]; subgraph cluster_4 { color=blue - 7 [label="Enter block"]; - 8 [label="Access variable R|/it|"]; - 9 [label="::class call"]; - 10 [label="Exit block"]; + 7 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 8 [label="Enter block"]; + 9 [label="Access variable R|/it|"]; + 10 [label="::class call"]; + 11 [label="Exit block"]; + } + 12 [label="Exit function " style="filled" fillcolor=red]; } - 11 [label="Exit function " style="filled" fillcolor=red]; + 13 [label="Function call arguments exit"]; } - 12 [label="Postponed exit from lambda"]; - 13 [label="Function call: R|/x|.R|kotlin/let||>(...)" style="filled" fillcolor=yellow]; - 14 [label="Jump: ^test R|/x|.R|kotlin/let||>( = let@fun (it: R|kotlin/String|): R|kotlin/reflect/KClass| { + 14 [label="Postponed exit from lambda"]; + 15 [label="Function call: R|/x|.R|kotlin/let||>(...)" style="filled" fillcolor=yellow]; + 16 [label="Jump: ^test R|/x|.R|kotlin/let||>( = let@fun (it: R|kotlin/String|): R|kotlin/reflect/KClass| { ^ (R|/it|) } )"]; - 15 [label="Stub" style="filled" fillcolor=gray]; - 16 [label="Exit block" style="filled" fillcolor=gray]; + 17 [label="Stub" style="filled" fillcolor=gray]; + 18 [label="Exit block" style="filled" fillcolor=gray]; } - 17 [label="Exit function test" style="filled" fillcolor=red]; + 19 [label="Exit function test" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; - 5 -> {6 13}; - 5 -> {12} [style=dotted]; - 5 -> {6} [style=dashed]; - 6 -> {7}; + 5 -> {6}; + 6 -> {7 13}; + 6 -> {14} [style=dotted]; + 6 -> {7} [style=dashed]; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {13}; - 13 -> {14}; - 14 -> {17}; - 14 -> {15} [style=dotted]; - 15 -> {16} [style=dotted]; + 12 -> {14}; + 13 -> {15}; + 14 -> {15}; + 15 -> {16}; + 16 -> {19}; 16 -> {17} [style=dotted]; + 17 -> {18} [style=dotted]; + 18 -> {19} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot index e69d8a2fda0..31683e40182 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot @@ -96,26 +96,41 @@ digraph exhaustiveWhenAndDNNType_kt { subgraph cluster_12 { color=blue 37 [label="Enter block"]; - 38 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 39 [label="Exit block"]; + subgraph cluster_13 { + color=blue + 38 [label="Function call arguments enter"]; + 39 [label="Function call arguments exit"]; + } + 40 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 41 [label="Exit block"]; } - 40 [label="Exit when branch result"]; - 41 [label="Enter when branch result"]; - subgraph cluster_13 { + 42 [label="Exit when branch result"]; + 43 [label="Enter when branch result"]; + subgraph cluster_14 { color=blue - 42 [label="Enter block"]; - 43 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 44 [label="Exit block"]; + 44 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 45 [label="Function call arguments enter"]; + 46 [label="Function call arguments exit"]; + } + 47 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 48 [label="Exit block"]; } - 45 [label="Exit when branch result"]; - 46 [label="Exit when"]; + 49 [label="Exit when branch result"]; + 50 [label="Exit when"]; } - 47 [label="Variable declaration: lval b: R|B|"]; - 48 [label="Access variable R|/b|"]; - 49 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; - 50 [label="Exit block"]; + 51 [label="Variable declaration: lval b: R|B|"]; + subgraph cluster_16 { + color=blue + 52 [label="Function call arguments enter"]; + 53 [label="Access variable R|/b|"]; + 54 [label="Function call arguments exit"]; + } + 55 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; + 56 [label="Exit block"]; } - 51 [label="Exit function test_1" style="filled" fillcolor=red]; + 57 [label="Exit function test_1" style="filled" fillcolor=red]; } 16 -> {17}; 17 -> {18}; @@ -130,7 +145,7 @@ digraph exhaustiveWhenAndDNNType_kt { 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {30 41}; + 29 -> {30 43}; 30 -> {31}; 31 -> {32}; 32 -> {33}; @@ -141,9 +156,9 @@ digraph exhaustiveWhenAndDNNType_kt { 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {46}; + 40 -> {41}; 41 -> {42}; - 42 -> {43}; + 42 -> {50}; 43 -> {44}; 44 -> {45}; 45 -> {46}; @@ -152,70 +167,85 @@ digraph exhaustiveWhenAndDNNType_kt { 48 -> {49}; 49 -> {50}; 50 -> {51}; - - subgraph cluster_14 { - color=red - 52 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 53 [label="Enter block"]; - 54 [label="Access qualifier /SomeEnum"]; - 55 [label="Access variable R|/SomeEnum.A1|"]; - 56 [label="Variable declaration: lval flag: R|SomeEnum|"]; - subgraph cluster_16 { - color=blue - 57 [label="Enter when"]; - 58 [label="Access variable R|/flag|"]; - 59 [label="Check not null: R|/flag|!!" style="filled" fillcolor=yellow]; - subgraph cluster_17 { - color=blue - 60 [label="Enter when branch condition "]; - 61 [label="Exit $subj"]; - 62 [label="Access qualifier /SomeEnum"]; - 63 [label="Access variable R|/SomeEnum.A1|"]; - 64 [label="Equality operator =="]; - 65 [label="Exit when branch condition"]; - } - subgraph cluster_18 { - color=blue - 66 [label="Enter when branch condition "]; - 67 [label="Exit $subj"]; - 68 [label="Access qualifier /SomeEnum"]; - 69 [label="Access variable R|/SomeEnum.A2|"]; - 70 [label="Equality operator =="]; - 71 [label="Exit when branch condition"]; - } - 72 [label="Enter when branch result"]; - subgraph cluster_19 { - color=blue - 73 [label="Enter block"]; - 74 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 75 [label="Exit block"]; - } - 76 [label="Exit when branch result"]; - 77 [label="Enter when branch result"]; - subgraph cluster_20 { - color=blue - 78 [label="Enter block"]; - 79 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 80 [label="Exit block"]; - } - 81 [label="Exit when branch result"]; - 82 [label="Exit when"]; - } - 83 [label="Variable declaration: lval b: R|B|"]; - 84 [label="Access variable R|/b|"]; - 85 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; - 86 [label="Exit block"]; - } - 87 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58}; + + subgraph cluster_17 { + color=red + 58 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 59 [label="Enter block"]; + 60 [label="Access qualifier /SomeEnum"]; + 61 [label="Access variable R|/SomeEnum.A1|"]; + 62 [label="Variable declaration: lval flag: R|SomeEnum|"]; + subgraph cluster_19 { + color=blue + 63 [label="Enter when"]; + 64 [label="Access variable R|/flag|"]; + 65 [label="Check not null: R|/flag|!!" style="filled" fillcolor=yellow]; + subgraph cluster_20 { + color=blue + 66 [label="Enter when branch condition "]; + 67 [label="Exit $subj"]; + 68 [label="Access qualifier /SomeEnum"]; + 69 [label="Access variable R|/SomeEnum.A1|"]; + 70 [label="Equality operator =="]; + 71 [label="Exit when branch condition"]; + } + subgraph cluster_21 { + color=blue + 72 [label="Enter when branch condition "]; + 73 [label="Exit $subj"]; + 74 [label="Access qualifier /SomeEnum"]; + 75 [label="Access variable R|/SomeEnum.A2|"]; + 76 [label="Equality operator =="]; + 77 [label="Exit when branch condition"]; + } + 78 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 79 [label="Enter block"]; + subgraph cluster_23 { + color=blue + 80 [label="Function call arguments enter"]; + 81 [label="Function call arguments exit"]; + } + 82 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 83 [label="Exit block"]; + } + 84 [label="Exit when branch result"]; + 85 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 86 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 87 [label="Function call arguments enter"]; + 88 [label="Function call arguments exit"]; + } + 89 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 90 [label="Exit block"]; + } + 91 [label="Exit when branch result"]; + 92 [label="Exit when"]; + } + 93 [label="Variable declaration: lval b: R|B|"]; + subgraph cluster_26 { + color=blue + 94 [label="Function call arguments enter"]; + 95 [label="Access variable R|/b|"]; + 96 [label="Function call arguments exit"]; + } + 97 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; + 98 [label="Exit block"]; + } + 99 [label="Exit function test_2" style="filled" fillcolor=red]; + } 58 -> {59}; 59 -> {60}; 60 -> {61}; @@ -223,18 +253,18 @@ digraph exhaustiveWhenAndDNNType_kt { 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {66 77}; + 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {72 85}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {82}; + 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; @@ -242,66 +272,10 @@ digraph exhaustiveWhenAndDNNType_kt { 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {85}; + 84 -> {92}; 85 -> {86}; 86 -> {87}; - - subgraph cluster_21 { - color=red - 88 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 89 [label="Enter block"]; - 90 [label="Access qualifier /SomeEnum"]; - 91 [label="Access variable R|/SomeEnum.A1|"]; - 92 [label="Variable declaration: lval flag: R|SomeEnum|"]; - subgraph cluster_23 { - color=blue - 93 [label="Enter when"]; - 94 [label="Access variable R|/flag|"]; - subgraph cluster_24 { - color=blue - 95 [label="Enter when branch condition "]; - 96 [label="Exit $subj"]; - 97 [label="Access qualifier /SomeEnum"]; - 98 [label="Access variable R|/SomeEnum.A1|"]; - 99 [label="Equality operator =="]; - 100 [label="Exit when branch condition"]; - } - subgraph cluster_25 { - color=blue - 101 [label="Enter when branch condition "]; - 102 [label="Exit $subj"]; - 103 [label="Access qualifier /SomeEnum"]; - 104 [label="Access variable R|/SomeEnum.A2|"]; - 105 [label="Equality operator =="]; - 106 [label="Exit when branch condition"]; - } - 107 [label="Enter when branch result"]; - subgraph cluster_26 { - color=blue - 108 [label="Enter block"]; - 109 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 110 [label="Exit block"]; - } - 111 [label="Exit when branch result"]; - 112 [label="Enter when branch result"]; - subgraph cluster_27 { - color=blue - 113 [label="Enter block"]; - 114 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 115 [label="Exit block"]; - } - 116 [label="Exit when branch result"]; - 117 [label="Exit when"]; - } - 118 [label="Variable declaration: lval b: R|B|"]; - 119 [label="Access variable R|/b|"]; - 120 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; - 121 [label="Exit block"]; - } - 122 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; @@ -313,8 +287,79 @@ digraph exhaustiveWhenAndDNNType_kt { 96 -> {97}; 97 -> {98}; 98 -> {99}; - 99 -> {100}; - 100 -> {101 112}; + + subgraph cluster_27 { + color=red + 100 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 101 [label="Enter block"]; + 102 [label="Access qualifier /SomeEnum"]; + 103 [label="Access variable R|/SomeEnum.A1|"]; + 104 [label="Variable declaration: lval flag: R|SomeEnum|"]; + subgraph cluster_29 { + color=blue + 105 [label="Enter when"]; + 106 [label="Access variable R|/flag|"]; + subgraph cluster_30 { + color=blue + 107 [label="Enter when branch condition "]; + 108 [label="Exit $subj"]; + 109 [label="Access qualifier /SomeEnum"]; + 110 [label="Access variable R|/SomeEnum.A1|"]; + 111 [label="Equality operator =="]; + 112 [label="Exit when branch condition"]; + } + subgraph cluster_31 { + color=blue + 113 [label="Enter when branch condition "]; + 114 [label="Exit $subj"]; + 115 [label="Access qualifier /SomeEnum"]; + 116 [label="Access variable R|/SomeEnum.A2|"]; + 117 [label="Equality operator =="]; + 118 [label="Exit when branch condition"]; + } + 119 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 120 [label="Enter block"]; + subgraph cluster_33 { + color=blue + 121 [label="Function call arguments enter"]; + 122 [label="Function call arguments exit"]; + } + 123 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 124 [label="Exit block"]; + } + 125 [label="Exit when branch result"]; + 126 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 127 [label="Enter block"]; + subgraph cluster_35 { + color=blue + 128 [label="Function call arguments enter"]; + 129 [label="Function call arguments exit"]; + } + 130 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 131 [label="Exit block"]; + } + 132 [label="Exit when branch result"]; + 133 [label="Exit when"]; + } + 134 [label="Variable declaration: lval b: R|B|"]; + subgraph cluster_36 { + color=blue + 135 [label="Function call arguments enter"]; + 136 [label="Access variable R|/b|"]; + 137 [label="Function call arguments exit"]; + } + 138 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; + 139 [label="Exit block"]; + } + 140 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 100 -> {101}; 101 -> {102}; 102 -> {103}; 103 -> {104}; @@ -325,8 +370,8 @@ digraph exhaustiveWhenAndDNNType_kt { 108 -> {109}; 109 -> {110}; 110 -> {111}; - 111 -> {117}; - 112 -> {113}; + 111 -> {112}; + 112 -> {113 126}; 113 -> {114}; 114 -> {115}; 115 -> {116}; @@ -336,5 +381,23 @@ digraph exhaustiveWhenAndDNNType_kt { 119 -> {120}; 120 -> {121}; 121 -> {122}; + 122 -> {123}; + 123 -> {124}; + 124 -> {125}; + 125 -> {133}; + 126 -> {127}; + 127 -> {128}; + 128 -> {129}; + 129 -> {130}; + 130 -> {131}; + 131 -> {132}; + 132 -> {133}; + 133 -> {134}; + 134 -> {135}; + 135 -> {136}; + 136 -> {137}; + 137 -> {138}; + 138 -> {139}; + 139 -> {140}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot index 545da88d0d7..af43e607cb3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot @@ -30,15 +30,25 @@ digraph bangbang_kt { subgraph cluster_4 { color=blue 7 [label="Enter block"]; - 8 [label="Access variable R|/a|"]; - 9 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 10 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 11 [label="Access variable R|/a|"]; - 12 [label="Smart cast: R|/a|"]; - 13 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; + subgraph cluster_5 { + color=blue + 8 [label="Function call arguments enter"]; + 9 [label="Access variable R|/a|"]; + 10 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 11 [label="Function call arguments exit"]; + } + 12 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_6 { + color=blue + 13 [label="Function call arguments enter"]; + 14 [label="Access variable R|/a|"]; + 15 [label="Smart cast: R|/a|"]; + 16 [label="Function call arguments exit"]; + } + 17 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 18 [label="Exit block"]; } - 15 [label="Exit function test_0" style="filled" fillcolor=red]; + 19 [label="Exit function test_0" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; @@ -49,111 +59,81 @@ digraph bangbang_kt { 12 -> {13}; 13 -> {14}; 14 -> {15}; - - subgraph cluster_5 { - color=red - 16 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 17 [label="Enter block"]; - subgraph cluster_7 { - color=blue - 18 [label="Enter when"]; - subgraph cluster_8 { - color=blue - 19 [label="Enter when branch condition "]; - 20 [label="Access variable R|/a|"]; - 21 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 22 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 23 [label="Exit when branch condition"]; - } - 24 [label="Synthetic else branch"]; - 25 [label="Enter when branch result"]; - subgraph cluster_9 { - color=blue - 26 [label="Enter block"]; - 27 [label="Access variable R|/a|"]; - 28 [label="Smart cast: R|/a|"]; - 29 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; - } - 31 [label="Exit when branch result"]; - 32 [label="Exit when"]; - } - 33 [label="Access variable R|/a|"]; - 34 [label="Smart cast: R|/a|"]; - 35 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 36 [label="Exit block"]; - } - 37 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20}; + + subgraph cluster_7 { + color=red + 20 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 21 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 22 [label="Enter when"]; + subgraph cluster_10 { + color=blue + 23 [label="Enter when branch condition "]; + subgraph cluster_11 { + color=blue + 24 [label="Function call arguments enter"]; + 25 [label="Access variable R|/a|"]; + 26 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 27 [label="Function call arguments exit"]; + } + 28 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 29 [label="Exit when branch condition"]; + } + 30 [label="Synthetic else branch"]; + 31 [label="Enter when branch result"]; + subgraph cluster_12 { + color=blue + 32 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 33 [label="Function call arguments enter"]; + 34 [label="Access variable R|/a|"]; + 35 [label="Smart cast: R|/a|"]; + 36 [label="Function call arguments exit"]; + } + 37 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; + } + 39 [label="Exit when branch result"]; + 40 [label="Exit when"]; + } + subgraph cluster_14 { + color=blue + 41 [label="Function call arguments enter"]; + 42 [label="Access variable R|/a|"]; + 43 [label="Smart cast: R|/a|"]; + 44 [label="Function call arguments exit"]; + } + 45 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 46 [label="Exit block"]; + } + 47 [label="Exit function test_1" style="filled" fillcolor=red]; + } 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {24 25}; - 24 -> {32}; + 23 -> {24}; + 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {30}; - 30 -> {31}; + 29 -> {30 31}; + 30 -> {40}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - - subgraph cluster_10 { - color=red - 38 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 39 [label="Enter block"]; - subgraph cluster_12 { - color=blue - 40 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 41 [label="Enter when branch condition "]; - subgraph cluster_14 { - color=blue - 42 [label="Enter &&"]; - 43 [label="Access variable R|/a|"]; - 44 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 45 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 46 [label="Exit left part of &&"]; - 47 [label="Enter right part of &&"]; - 48 [label="Access variable R|/b|"]; - 49 [label="Exit &&"]; - } - 50 [label="Exit when branch condition"]; - } - 51 [label="Synthetic else branch"]; - 52 [label="Enter when branch result"]; - subgraph cluster_15 { - color=blue - 53 [label="Enter block"]; - 54 [label="Access variable R|/a|"]; - 55 [label="Smart cast: R|/a|"]; - 56 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 57 [label="Exit block"]; - } - 58 [label="Exit when branch result"]; - 59 [label="Exit when"]; - } - 60 [label="Access variable R|/a|"]; - 61 [label="Smart cast: R|/a|"]; - 62 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 63 [label="Exit block"]; - } - 64 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; @@ -162,154 +142,184 @@ digraph bangbang_kt { 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47 49}; - 47 -> {48}; + 46 -> {47}; + + subgraph cluster_15 { + color=red + 48 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 49 [label="Enter block"]; + subgraph cluster_17 { + color=blue + 50 [label="Enter when"]; + subgraph cluster_18 { + color=blue + 51 [label="Enter when branch condition "]; + subgraph cluster_19 { + color=blue + 52 [label="Enter &&"]; + subgraph cluster_20 { + color=blue + 53 [label="Function call arguments enter"]; + 54 [label="Access variable R|/a|"]; + 55 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 56 [label="Function call arguments exit"]; + } + 57 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 58 [label="Exit left part of &&"]; + 59 [label="Enter right part of &&"]; + 60 [label="Access variable R|/b|"]; + 61 [label="Exit &&"]; + } + 62 [label="Exit when branch condition"]; + } + 63 [label="Synthetic else branch"]; + 64 [label="Enter when branch result"]; + subgraph cluster_21 { + color=blue + 65 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 66 [label="Function call arguments enter"]; + 67 [label="Access variable R|/a|"]; + 68 [label="Smart cast: R|/a|"]; + 69 [label="Function call arguments exit"]; + } + 70 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 71 [label="Exit block"]; + } + 72 [label="Exit when branch result"]; + 73 [label="Exit when"]; + } + subgraph cluster_23 { + color=blue + 74 [label="Function call arguments enter"]; + 75 [label="Access variable R|/a|"]; + 76 [label="Smart cast: R|/a|"]; + 77 [label="Function call arguments exit"]; + } + 78 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 79 [label="Exit block"]; + } + 80 [label="Exit function test_2" style="filled" fillcolor=red]; + } 48 -> {49}; 49 -> {50}; - 50 -> {51 52}; - 51 -> {59}; + 50 -> {51}; + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {59}; + 58 -> {59 61}; 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {63}; - 63 -> {64}; - - subgraph cluster_16 { - color=red - 65 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 66 [label="Enter block"]; - subgraph cluster_18 { - color=blue - 67 [label="Enter when"]; - subgraph cluster_19 { - color=blue - 68 [label="Enter when branch condition "]; - subgraph cluster_20 { - color=blue - 69 [label="Enter &&"]; - 70 [label="Access variable R|/b|"]; - 71 [label="Exit left part of &&"]; - 72 [label="Enter right part of &&"]; - 73 [label="Access variable R|/a|"]; - 74 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 75 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 76 [label="Exit &&"]; - } - 77 [label="Exit when branch condition"]; - } - 78 [label="Synthetic else branch"]; - 79 [label="Enter when branch result"]; - subgraph cluster_21 { - color=blue - 80 [label="Enter block"]; - 81 [label="Access variable R|/a|"]; - 82 [label="Smart cast: R|/a|"]; - 83 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 84 [label="Exit block"]; - } - 85 [label="Exit when branch result"]; - 86 [label="Exit when"]; - } - 87 [label="Access variable R|/a|"]; - 88 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 89 [label="Exit block"]; - } - 90 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 62 -> {63 64}; + 63 -> {73}; + 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72 76}; + 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {78 79}; - 78 -> {86}; + 77 -> {78}; + 78 -> {79}; 79 -> {80}; - 80 -> {81}; + + subgraph cluster_24 { + color=red + 81 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_25 { + color=blue + 82 [label="Enter block"]; + subgraph cluster_26 { + color=blue + 83 [label="Enter when"]; + subgraph cluster_27 { + color=blue + 84 [label="Enter when branch condition "]; + subgraph cluster_28 { + color=blue + 85 [label="Enter &&"]; + 86 [label="Access variable R|/b|"]; + 87 [label="Exit left part of &&"]; + 88 [label="Enter right part of &&"]; + subgraph cluster_29 { + color=blue + 89 [label="Function call arguments enter"]; + 90 [label="Access variable R|/a|"]; + 91 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 92 [label="Function call arguments exit"]; + } + 93 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 94 [label="Exit &&"]; + } + 95 [label="Exit when branch condition"]; + } + 96 [label="Synthetic else branch"]; + 97 [label="Enter when branch result"]; + subgraph cluster_30 { + color=blue + 98 [label="Enter block"]; + subgraph cluster_31 { + color=blue + 99 [label="Function call arguments enter"]; + 100 [label="Access variable R|/a|"]; + 101 [label="Smart cast: R|/a|"]; + 102 [label="Function call arguments exit"]; + } + 103 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 104 [label="Exit block"]; + } + 105 [label="Exit when branch result"]; + 106 [label="Exit when"]; + } + subgraph cluster_32 { + color=blue + 107 [label="Function call arguments enter"]; + 108 [label="Access variable R|/a|"]; + 109 [label="Function call arguments exit"]; + } + 110 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 111 [label="Exit block"]; + } + 112 [label="Exit function test_3" style="filled" fillcolor=red]; + } 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; - 87 -> {88}; + 87 -> {88 94}; 88 -> {89}; 89 -> {90}; - - subgraph cluster_22 { - color=red - 91 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 92 [label="Enter block"]; - subgraph cluster_24 { - color=blue - 93 [label="Enter when"]; - subgraph cluster_25 { - color=blue - 94 [label="Enter when branch condition "]; - subgraph cluster_26 { - color=blue - 95 [label="Enter ||"]; - 96 [label="Access variable R|/a|"]; - 97 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 98 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 99 [label="Exit left part of ||"]; - 100 [label="Enter right part of ||"]; - 101 [label="Access variable R|/b|"]; - 102 [label="Exit ||"]; - } - 103 [label="Exit when branch condition"]; - } - 104 [label="Synthetic else branch"]; - 105 [label="Enter when branch result"]; - subgraph cluster_27 { - color=blue - 106 [label="Enter block"]; - 107 [label="Access variable R|/a|"]; - 108 [label="Smart cast: R|/a|"]; - 109 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 110 [label="Exit block"]; - } - 111 [label="Exit when branch result"]; - 112 [label="Exit when"]; - } - 113 [label="Access variable R|/a|"]; - 114 [label="Smart cast: R|/a|"]; - 115 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 116 [label="Exit block"]; - } - 117 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; - 95 -> {96}; - 96 -> {97}; + 95 -> {96 97}; + 96 -> {106}; 97 -> {98}; 98 -> {99}; - 99 -> {100 102}; + 99 -> {100}; 100 -> {101}; 101 -> {102}; 102 -> {103}; - 103 -> {104 105}; - 104 -> {112}; + 103 -> {104}; + 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; @@ -317,69 +327,86 @@ digraph bangbang_kt { 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; - 113 -> {114}; - 114 -> {115}; - 115 -> {116}; - 116 -> {117}; - subgraph cluster_28 { + subgraph cluster_33 { color=red - 118 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_29 { + 113 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_34 { color=blue - 119 [label="Enter block"]; - subgraph cluster_30 { + 114 [label="Enter block"]; + subgraph cluster_35 { color=blue - 120 [label="Enter when"]; - subgraph cluster_31 { + 115 [label="Enter when"]; + subgraph cluster_36 { color=blue - 121 [label="Enter when branch condition "]; - subgraph cluster_32 { + 116 [label="Enter when branch condition "]; + subgraph cluster_37 { color=blue - 122 [label="Enter ||"]; - 123 [label="Access variable R|/b|"]; - 124 [label="Exit left part of ||"]; - 125 [label="Enter right part of ||"]; - 126 [label="Access variable R|/a|"]; - 127 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 128 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 129 [label="Exit ||"]; + 117 [label="Enter ||"]; + subgraph cluster_38 { + color=blue + 118 [label="Function call arguments enter"]; + 119 [label="Access variable R|/a|"]; + 120 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 121 [label="Function call arguments exit"]; + } + 122 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 123 [label="Exit left part of ||"]; + 124 [label="Enter right part of ||"]; + 125 [label="Access variable R|/b|"]; + 126 [label="Exit ||"]; } - 130 [label="Exit when branch condition"]; + 127 [label="Exit when branch condition"]; } - 131 [label="Synthetic else branch"]; - 132 [label="Enter when branch result"]; - subgraph cluster_33 { + 128 [label="Synthetic else branch"]; + 129 [label="Enter when branch result"]; + subgraph cluster_39 { color=blue - 133 [label="Enter block"]; - 134 [label="Access variable R|/a|"]; - 135 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 130 [label="Enter block"]; + subgraph cluster_40 { + color=blue + 131 [label="Function call arguments enter"]; + 132 [label="Access variable R|/a|"]; + 133 [label="Smart cast: R|/a|"]; + 134 [label="Function call arguments exit"]; + } + 135 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; 136 [label="Exit block"]; } 137 [label="Exit when branch result"]; 138 [label="Exit when"]; } - 139 [label="Access variable R|/a|"]; - 140 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 141 [label="Exit block"]; + subgraph cluster_41 { + color=blue + 139 [label="Function call arguments enter"]; + 140 [label="Access variable R|/a|"]; + 141 [label="Smart cast: R|/a|"]; + 142 [label="Function call arguments exit"]; + } + 143 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 144 [label="Exit block"]; } - 142 [label="Exit function test_5" style="filled" fillcolor=red]; + 145 [label="Exit function test_4" style="filled" fillcolor=red]; } + 113 -> {114}; + 114 -> {115}; + 115 -> {116}; + 116 -> {117}; + 117 -> {118}; 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124}; - 124 -> {125 129}; + 123 -> {124 126}; + 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {128}; - 128 -> {129}; + 127 -> {128 129}; + 128 -> {138}; 129 -> {130}; - 130 -> {131 132}; - 131 -> {138}; + 130 -> {131}; + 131 -> {132}; 132 -> {133}; 133 -> {134}; 134 -> {135}; @@ -390,45 +417,151 @@ digraph bangbang_kt { 139 -> {140}; 140 -> {141}; 141 -> {142}; - - subgraph cluster_34 { - color=red - 143 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_35 { - color=blue - 144 [label="Enter block"]; - 145 [label="Access variable R|/x|"]; - 146 [label="Check not null: R|/x|!!" style="filled" fillcolor=yellow]; - 147 [label="Function call: R|/x|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 148 [label="Exit block"]; - } - 149 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 142 -> {143}; 143 -> {144}; 144 -> {145}; - 145 -> {146}; + + subgraph cluster_42 { + color=red + 146 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_43 { + color=blue + 147 [label="Enter block"]; + subgraph cluster_44 { + color=blue + 148 [label="Enter when"]; + subgraph cluster_45 { + color=blue + 149 [label="Enter when branch condition "]; + subgraph cluster_46 { + color=blue + 150 [label="Enter ||"]; + 151 [label="Access variable R|/b|"]; + 152 [label="Exit left part of ||"]; + 153 [label="Enter right part of ||"]; + subgraph cluster_47 { + color=blue + 154 [label="Function call arguments enter"]; + 155 [label="Access variable R|/a|"]; + 156 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 157 [label="Function call arguments exit"]; + } + 158 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 159 [label="Exit ||"]; + } + 160 [label="Exit when branch condition"]; + } + 161 [label="Synthetic else branch"]; + 162 [label="Enter when branch result"]; + subgraph cluster_48 { + color=blue + 163 [label="Enter block"]; + subgraph cluster_49 { + color=blue + 164 [label="Function call arguments enter"]; + 165 [label="Access variable R|/a|"]; + 166 [label="Function call arguments exit"]; + } + 167 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 168 [label="Exit block"]; + } + 169 [label="Exit when branch result"]; + 170 [label="Exit when"]; + } + subgraph cluster_50 { + color=blue + 171 [label="Function call arguments enter"]; + 172 [label="Access variable R|/a|"]; + 173 [label="Function call arguments exit"]; + } + 174 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 175 [label="Exit block"]; + } + 176 [label="Exit function test_5" style="filled" fillcolor=red]; + } 146 -> {147}; 147 -> {148}; 148 -> {149}; - - subgraph cluster_36 { - color=red - 150 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_37 { - color=blue - 151 [label="Enter block"]; - 152 [label="Access variable R|/x|"]; - 153 [label="Check not null: R|/x|!!" style="filled" fillcolor=yellow]; - 154 [label="Function call: R|/x|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 155 [label="Exit block"]; - } - 156 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 149 -> {150}; 150 -> {151}; 151 -> {152}; - 152 -> {153}; + 152 -> {153 159}; 153 -> {154}; 154 -> {155}; 155 -> {156}; + 156 -> {157}; + 157 -> {158}; + 158 -> {159}; + 159 -> {160}; + 160 -> {161 162}; + 161 -> {170}; + 162 -> {163}; + 163 -> {164}; + 164 -> {165}; + 165 -> {166}; + 166 -> {167}; + 167 -> {168}; + 168 -> {169}; + 169 -> {170}; + 170 -> {171}; + 171 -> {172}; + 172 -> {173}; + 173 -> {174}; + 174 -> {175}; + 175 -> {176}; + + subgraph cluster_51 { + color=red + 177 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_52 { + color=blue + 178 [label="Enter block"]; + subgraph cluster_53 { + color=blue + 179 [label="Function call arguments enter"]; + 180 [label="Access variable R|/x|"]; + 181 [label="Check not null: R|/x|!!" style="filled" fillcolor=yellow]; + 182 [label="Function call arguments exit"]; + } + 183 [label="Function call: R|/x|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 184 [label="Exit block"]; + } + 185 [label="Exit function test_6" style="filled" fillcolor=red]; + } + 177 -> {178}; + 178 -> {179}; + 179 -> {180}; + 180 -> {181}; + 181 -> {182}; + 182 -> {183}; + 183 -> {184}; + 184 -> {185}; + + subgraph cluster_54 { + color=red + 186 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_55 { + color=blue + 187 [label="Enter block"]; + subgraph cluster_56 { + color=blue + 188 [label="Function call arguments enter"]; + 189 [label="Access variable R|/x|"]; + 190 [label="Check not null: R|/x|!!" style="filled" fillcolor=yellow]; + 191 [label="Function call arguments exit"]; + } + 192 [label="Function call: R|/x|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 193 [label="Exit block"]; + } + 194 [label="Exit function test_7" style="filled" fillcolor=red]; + } + 186 -> {187}; + 187 -> {188}; + 188 -> {189}; + 189 -> {190}; + 190 -> {191}; + 191 -> {192}; + 192 -> {193}; + 193 -> {194}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot index 099ff5ef5b0..9bae852e5ec 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot @@ -90,23 +90,38 @@ digraph booleanOperators_kt { subgraph cluster_13 { color=blue 32 [label="Enter block"]; - 33 [label="Access variable R|/x|"]; - 34 [label="Smart cast: R|/x|"]; - 35 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 36 [label="Access variable R|/x|"]; - 37 [label="Smart cast: R|/x|"]; - 38 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 39 [label="Access variable R|/x|"]; - 40 [label="Smart cast: R|/x|"]; - 41 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; - 42 [label="Exit block"]; + subgraph cluster_14 { + color=blue + 33 [label="Function call arguments enter"]; + 34 [label="Access variable R|/x|"]; + 35 [label="Smart cast: R|/x|"]; + 36 [label="Function call arguments exit"]; + } + 37 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_15 { + color=blue + 38 [label="Function call arguments enter"]; + 39 [label="Access variable R|/x|"]; + 40 [label="Smart cast: R|/x|"]; + 41 [label="Function call arguments exit"]; + } + 42 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + subgraph cluster_16 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Access variable R|/x|"]; + 45 [label="Smart cast: R|/x|"]; + 46 [label="Function call arguments exit"]; + } + 47 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; + 48 [label="Exit block"]; } - 43 [label="Exit when branch result"]; - 44 [label="Exit when"]; + 49 [label="Exit when branch result"]; + 50 [label="Exit when"]; } - 45 [label="Exit block"]; + 51 [label="Exit block"]; } - 46 [label="Exit function test_1" style="filled" fillcolor=red]; + 52 [label="Exit function test_1" style="filled" fillcolor=red]; } 16 -> {17}; 17 -> {18}; @@ -122,7 +137,7 @@ digraph booleanOperators_kt { 27 -> {28}; 28 -> {29}; 29 -> {30 31}; - 30 -> {44}; + 30 -> {50}; 31 -> {32}; 32 -> {33}; 33 -> {34}; @@ -138,75 +153,90 @@ digraph booleanOperators_kt { 43 -> {44}; 44 -> {45}; 45 -> {46}; - - subgraph cluster_14 { - color=red - 47 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 48 [label="Enter block"]; - subgraph cluster_16 { - color=blue - 49 [label="Enter when"]; - subgraph cluster_17 { - color=blue - 50 [label="Enter when branch condition "]; - subgraph cluster_18 { - color=blue - 51 [label="Enter ||"]; - 52 [label="Access variable R|/x|"]; - 53 [label="Type operator: (R|/x| is R|B|)"]; - 54 [label="Exit left part of ||"]; - 55 [label="Enter right part of ||"]; - 56 [label="Access variable R|/x|"]; - 57 [label="Type operator: (R|/x| is R|C|)"]; - 58 [label="Exit ||"]; - } - 59 [label="Exit when branch condition"]; - } - 60 [label="Synthetic else branch"]; - 61 [label="Enter when branch result"]; - subgraph cluster_19 { - color=blue - 62 [label="Enter block"]; - 63 [label="Access variable R|/x|"]; - 64 [label="Smart cast: R|/x|"]; - 65 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 66 [label="Access variable R|/x|"]; - 67 [label="Smart cast: R|/x|"]; - 68 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 69 [label="Access variable R|/x|"]; - 70 [label="Smart cast: R|/x|"]; - 71 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 72 [label="Exit block"]; - } - 73 [label="Exit when branch result"]; - 74 [label="Exit when"]; - } - 75 [label="Exit block"]; - } - 76 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {53}; + + subgraph cluster_17 { + color=red + 53 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 54 [label="Enter block"]; + subgraph cluster_19 { + color=blue + 55 [label="Enter when"]; + subgraph cluster_20 { + color=blue + 56 [label="Enter when branch condition "]; + subgraph cluster_21 { + color=blue + 57 [label="Enter ||"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Type operator: (R|/x| is R|B|)"]; + 60 [label="Exit left part of ||"]; + 61 [label="Enter right part of ||"]; + 62 [label="Access variable R|/x|"]; + 63 [label="Type operator: (R|/x| is R|C|)"]; + 64 [label="Exit ||"]; + } + 65 [label="Exit when branch condition"]; + } + 66 [label="Synthetic else branch"]; + 67 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 68 [label="Enter block"]; + subgraph cluster_23 { + color=blue + 69 [label="Function call arguments enter"]; + 70 [label="Access variable R|/x|"]; + 71 [label="Smart cast: R|/x|"]; + 72 [label="Function call arguments exit"]; + } + 73 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_24 { + color=blue + 74 [label="Function call arguments enter"]; + 75 [label="Access variable R|/x|"]; + 76 [label="Smart cast: R|/x|"]; + 77 [label="Function call arguments exit"]; + } + 78 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_25 { + color=blue + 79 [label="Function call arguments enter"]; + 80 [label="Access variable R|/x|"]; + 81 [label="Smart cast: R|/x|"]; + 82 [label="Function call arguments exit"]; + } + 83 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 84 [label="Exit block"]; + } + 85 [label="Exit when branch result"]; + 86 [label="Exit when"]; + } + 87 [label="Exit block"]; + } + 88 [label="Exit function test_2" style="filled" fillcolor=red]; + } 53 -> {54}; - 54 -> {55 58}; + 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; - 59 -> {60 61}; - 60 -> {74}; + 59 -> {60}; + 60 -> {61 64}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {66}; - 66 -> {67}; + 65 -> {66 67}; + 66 -> {86}; 67 -> {68}; 68 -> {69}; 69 -> {70}; @@ -216,41 +246,7 @@ digraph booleanOperators_kt { 73 -> {74}; 74 -> {75}; 75 -> {76}; - - subgraph cluster_20 { - color=red - 77 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 78 [label="Enter block"]; - subgraph cluster_22 { - color=blue - 79 [label="Enter when"]; - subgraph cluster_23 { - color=blue - 80 [label="Enter when branch condition "]; - 81 [label="Access variable R|/x|"]; - 82 [label="Type operator: (R|/x| !is R|A|)"]; - 83 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 84 [label="Exit when branch condition"]; - } - 85 [label="Synthetic else branch"]; - 86 [label="Enter when branch result"]; - subgraph cluster_24 { - color=blue - 87 [label="Enter block"]; - 88 [label="Access variable R|/x|"]; - 89 [label="Smart cast: R|/x|"]; - 90 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 91 [label="Exit block"]; - } - 92 [label="Exit when branch result"]; - 93 [label="Exit when"]; - } - 94 [label="Exit block"]; - } - 95 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; @@ -258,72 +254,70 @@ digraph booleanOperators_kt { 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {85 86}; - 85 -> {93}; + 84 -> {85}; + 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {89}; + + subgraph cluster_26 { + color=red + 89 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_27 { + color=blue + 90 [label="Enter block"]; + subgraph cluster_28 { + color=blue + 91 [label="Enter when"]; + subgraph cluster_29 { + color=blue + 92 [label="Enter when branch condition "]; + subgraph cluster_30 { + color=blue + 93 [label="Function call arguments enter"]; + 94 [label="Access variable R|/x|"]; + 95 [label="Type operator: (R|/x| !is R|A|)"]; + 96 [label="Function call arguments exit"]; + } + 97 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 98 [label="Exit when branch condition"]; + } + 99 [label="Synthetic else branch"]; + 100 [label="Enter when branch result"]; + subgraph cluster_31 { + color=blue + 101 [label="Enter block"]; + subgraph cluster_32 { + color=blue + 102 [label="Function call arguments enter"]; + 103 [label="Access variable R|/x|"]; + 104 [label="Smart cast: R|/x|"]; + 105 [label="Function call arguments exit"]; + } + 106 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 107 [label="Exit block"]; + } + 108 [label="Exit when branch result"]; + 109 [label="Exit when"]; + } + 110 [label="Exit block"]; + } + 111 [label="Exit function test_3" style="filled" fillcolor=red]; + } 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; - - subgraph cluster_25 { - color=red - 96 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_26 { - color=blue - 97 [label="Enter block"]; - subgraph cluster_27 { - color=blue - 98 [label="Enter when"]; - subgraph cluster_28 { - color=blue - 99 [label="Enter when branch condition "]; - subgraph cluster_29 { - color=blue - 100 [label="Enter ||"]; - 101 [label="Access variable R|/x|"]; - 102 [label="Type operator: (R|/x| !is R|kotlin/String|)"]; - 103 [label="Exit left part of ||"]; - 104 [label="Enter right part of ||"]; - 105 [label="Access variable R|/x|"]; - 106 [label="Smart cast: R|/x|"]; - 107 [label="Access variable R|kotlin/String.length|"]; - 108 [label="Const: Int(0)"]; - 109 [label="Equality operator =="]; - 110 [label="Exit ||"]; - } - 111 [label="Exit when branch condition"]; - } - 112 [label="Synthetic else branch"]; - 113 [label="Enter when branch result"]; - subgraph cluster_30 { - color=blue - 114 [label="Enter block"]; - 115 [label="Access variable R|/x|"]; - 116 [label="Access variable #"]; - 117 [label="Exit block"]; - } - 118 [label="Exit when branch result"]; - 119 [label="Exit when"]; - } - 120 [label="Access variable R|/x|"]; - 121 [label="Access variable #"]; - 122 [label="Exit block"]; - } - 123 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {99}; - 99 -> {100}; + 98 -> {99 100}; + 99 -> {109}; 100 -> {101}; 101 -> {102}; 102 -> {103}; - 103 -> {104 110}; + 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; @@ -331,78 +325,134 @@ digraph booleanOperators_kt { 108 -> {109}; 109 -> {110}; 110 -> {111}; - 111 -> {112 113}; - 112 -> {119}; + + subgraph cluster_33 { + color=red + 112 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 113 [label="Enter block"]; + subgraph cluster_35 { + color=blue + 114 [label="Enter when"]; + subgraph cluster_36 { + color=blue + 115 [label="Enter when branch condition "]; + subgraph cluster_37 { + color=blue + 116 [label="Enter ||"]; + 117 [label="Access variable R|/x|"]; + 118 [label="Type operator: (R|/x| !is R|kotlin/String|)"]; + 119 [label="Exit left part of ||"]; + 120 [label="Enter right part of ||"]; + 121 [label="Access variable R|/x|"]; + 122 [label="Smart cast: R|/x|"]; + 123 [label="Access variable R|kotlin/String.length|"]; + 124 [label="Const: Int(0)"]; + 125 [label="Equality operator =="]; + 126 [label="Exit ||"]; + } + 127 [label="Exit when branch condition"]; + } + 128 [label="Synthetic else branch"]; + 129 [label="Enter when branch result"]; + subgraph cluster_38 { + color=blue + 130 [label="Enter block"]; + 131 [label="Access variable R|/x|"]; + 132 [label="Access variable #"]; + 133 [label="Exit block"]; + } + 134 [label="Exit when branch result"]; + 135 [label="Exit when"]; + } + 136 [label="Access variable R|/x|"]; + 137 [label="Access variable #"]; + 138 [label="Exit block"]; + } + 139 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; 118 -> {119}; - 119 -> {120}; + 119 -> {120 126}; 120 -> {121}; 121 -> {122}; 122 -> {123}; - - subgraph cluster_31 { - color=red - 124 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 125 [label="Enter block"]; - subgraph cluster_33 { - color=blue - 126 [label="Enter when"]; - subgraph cluster_34 { - color=blue - 127 [label="Enter when branch condition "]; - subgraph cluster_35 { - color=blue - 128 [label="Enter &&"]; - 129 [label="Access variable R|/x|"]; - 130 [label="Type operator: (R|/x| is R|A|)"]; - 131 [label="Exit left part of &&"]; - 132 [label="Enter right part of &&"]; - 133 [label="Access variable R|/x|"]; - 134 [label="Smart cast: R|/x|"]; - 135 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; - 136 [label="Exit &&"]; - } - 137 [label="Exit when branch condition"]; - } - 138 [label="Synthetic else branch"]; - 139 [label="Enter when branch result"]; - subgraph cluster_36 { - color=blue - 140 [label="Enter block"]; - 141 [label="Access variable R|/x|"]; - 142 [label="Smart cast: R|/x|"]; - 143 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 144 [label="Exit block"]; - } - 145 [label="Exit when branch result"]; - 146 [label="Exit when"]; - } - 147 [label="Exit block"]; - } - 148 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {128}; - 128 -> {129}; + 127 -> {128 129}; + 128 -> {135}; 129 -> {130}; 130 -> {131}; - 131 -> {132 136}; + 131 -> {132}; 132 -> {133}; 133 -> {134}; 134 -> {135}; 135 -> {136}; 136 -> {137}; - 137 -> {138 139}; - 138 -> {146}; - 139 -> {140}; + 137 -> {138}; + 138 -> {139}; + + subgraph cluster_39 { + color=red + 140 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_40 { + color=blue + 141 [label="Enter block"]; + subgraph cluster_41 { + color=blue + 142 [label="Enter when"]; + subgraph cluster_42 { + color=blue + 143 [label="Enter when branch condition "]; + subgraph cluster_43 { + color=blue + 144 [label="Enter &&"]; + 145 [label="Access variable R|/x|"]; + 146 [label="Type operator: (R|/x| is R|A|)"]; + 147 [label="Exit left part of &&"]; + 148 [label="Enter right part of &&"]; + subgraph cluster_44 { + color=blue + 149 [label="Function call arguments enter"]; + 150 [label="Access variable R|/x|"]; + 151 [label="Smart cast: R|/x|"]; + 152 [label="Function call arguments exit"]; + } + 153 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; + 154 [label="Exit &&"]; + } + 155 [label="Exit when branch condition"]; + } + 156 [label="Synthetic else branch"]; + 157 [label="Enter when branch result"]; + subgraph cluster_45 { + color=blue + 158 [label="Enter block"]; + subgraph cluster_46 { + color=blue + 159 [label="Function call arguments enter"]; + 160 [label="Access variable R|/x|"]; + 161 [label="Smart cast: R|/x|"]; + 162 [label="Function call arguments exit"]; + } + 163 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 164 [label="Exit block"]; + } + 165 [label="Exit when branch result"]; + 166 [label="Exit when"]; + } + 167 [label="Exit block"]; + } + 168 [label="Exit function test_5" style="filled" fillcolor=red]; + } 140 -> {141}; 141 -> {142}; 142 -> {143}; @@ -410,51 +460,17 @@ digraph booleanOperators_kt { 144 -> {145}; 145 -> {146}; 146 -> {147}; - 147 -> {148}; - - subgraph cluster_37 { - color=red - 149 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 150 [label="Enter block"]; - subgraph cluster_39 { - color=blue - 151 [label="Enter when"]; - subgraph cluster_40 { - color=blue - 152 [label="Enter when branch condition "]; - 153 [label="Access variable R|/x|"]; - 154 [label="Type operator: (R|/x| !is R|A|)"]; - 155 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 156 [label="Exit when branch condition"]; - } - 157 [label="Synthetic else branch"]; - 158 [label="Enter when branch result"]; - subgraph cluster_41 { - color=blue - 159 [label="Enter block"]; - 160 [label="Access variable R|/x|"]; - 161 [label="Smart cast: R|/x|"]; - 162 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 163 [label="Exit block"]; - } - 164 [label="Exit when branch result"]; - 165 [label="Exit when"]; - } - 166 [label="Exit block"]; - } - 167 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 147 -> {148 154}; + 148 -> {149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; 152 -> {153}; 153 -> {154}; 154 -> {155}; - 155 -> {156}; - 156 -> {157 158}; - 157 -> {165}; + 155 -> {156 157}; + 156 -> {166}; + 157 -> {158}; 158 -> {159}; 159 -> {160}; 160 -> {161}; @@ -464,60 +480,64 @@ digraph booleanOperators_kt { 164 -> {165}; 165 -> {166}; 166 -> {167}; + 167 -> {168}; - subgraph cluster_42 { + subgraph cluster_47 { color=red - 168 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_43 { + 169 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_48 { color=blue - 169 [label="Enter block"]; - subgraph cluster_44 { + 170 [label="Enter block"]; + subgraph cluster_49 { color=blue - 170 [label="Enter when"]; - subgraph cluster_45 { + 171 [label="Enter when"]; + subgraph cluster_50 { color=blue - 171 [label="Enter when branch condition "]; - subgraph cluster_46 { + 172 [label="Enter when branch condition "]; + subgraph cluster_51 { color=blue - 172 [label="Enter ||"]; - 173 [label="Access variable R|/x|"]; - 174 [label="Type operator: (R|/x| is R|A|)"]; - 175 [label="Exit left part of ||"]; - 176 [label="Enter right part of ||"]; - 177 [label="Const: Boolean(false)"]; - 178 [label="Exit ||"]; + 173 [label="Function call arguments enter"]; + 174 [label="Access variable R|/x|"]; + 175 [label="Type operator: (R|/x| !is R|A|)"]; + 176 [label="Function call arguments exit"]; } - 179 [label="Exit when branch condition"]; + 177 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 178 [label="Exit when branch condition"]; } - 180 [label="Synthetic else branch"]; - 181 [label="Enter when branch result"]; - subgraph cluster_47 { + 179 [label="Synthetic else branch"]; + 180 [label="Enter when branch result"]; + subgraph cluster_52 { color=blue - 182 [label="Enter block"]; - 183 [label="Access variable R|/x|"]; - 184 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 185 [label="Exit block"]; + 181 [label="Enter block"]; + subgraph cluster_53 { + color=blue + 182 [label="Function call arguments enter"]; + 183 [label="Access variable R|/x|"]; + 184 [label="Smart cast: R|/x|"]; + 185 [label="Function call arguments exit"]; + } + 186 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 187 [label="Exit block"]; } - 186 [label="Exit when branch result"]; - 187 [label="Exit when"]; + 188 [label="Exit when branch result"]; + 189 [label="Exit when"]; } - 188 [label="Exit block"]; + 190 [label="Exit block"]; } - 189 [label="Exit function test_7" style="filled" fillcolor=red]; + 191 [label="Exit function test_6" style="filled" fillcolor=red]; } - 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {176 178}; + 175 -> {176}; 176 -> {177}; 177 -> {178}; - 178 -> {179}; - 179 -> {180 181}; - 180 -> {187}; + 178 -> {179 180}; + 179 -> {189}; + 180 -> {181}; 181 -> {182}; 182 -> {183}; 183 -> {184}; @@ -526,299 +546,277 @@ digraph booleanOperators_kt { 186 -> {187}; 187 -> {188}; 188 -> {189}; - - subgraph cluster_48 { - color=red - 190 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_49 { - color=blue - 191 [label="Enter block"]; - subgraph cluster_50 { - color=blue - 192 [label="Enter when"]; - subgraph cluster_51 { - color=blue - 193 [label="Enter when branch condition "]; - subgraph cluster_52 { - color=blue - 194 [label="Enter ||"]; - 195 [label="Const: Boolean(false)"]; - 196 [label="Exit left part of ||"]; - 197 [label="Enter right part of ||"]; - 198 [label="Access variable R|/x|"]; - 199 [label="Type operator: (R|/x| is R|A|)"]; - 200 [label="Exit ||"]; - } - 201 [label="Exit when branch condition"]; - } - 202 [label="Synthetic else branch"]; - 203 [label="Enter when branch result"]; - subgraph cluster_53 { - color=blue - 204 [label="Enter block"]; - 205 [label="Access variable R|/x|"]; - 206 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 207 [label="Exit block"]; - } - 208 [label="Exit when branch result"]; - 209 [label="Exit when"]; - } - 210 [label="Exit block"]; - } - 211 [label="Exit function test_8" style="filled" fillcolor=red]; - } + 189 -> {190}; 190 -> {191}; - 191 -> {192}; + + subgraph cluster_54 { + color=red + 192 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_55 { + color=blue + 193 [label="Enter block"]; + subgraph cluster_56 { + color=blue + 194 [label="Enter when"]; + subgraph cluster_57 { + color=blue + 195 [label="Enter when branch condition "]; + subgraph cluster_58 { + color=blue + 196 [label="Enter ||"]; + 197 [label="Access variable R|/x|"]; + 198 [label="Type operator: (R|/x| is R|A|)"]; + 199 [label="Exit left part of ||"]; + 200 [label="Enter right part of ||"]; + 201 [label="Const: Boolean(false)"]; + 202 [label="Exit ||"]; + } + 203 [label="Exit when branch condition"]; + } + 204 [label="Synthetic else branch"]; + 205 [label="Enter when branch result"]; + subgraph cluster_59 { + color=blue + 206 [label="Enter block"]; + subgraph cluster_60 { + color=blue + 207 [label="Function call arguments enter"]; + 208 [label="Access variable R|/x|"]; + 209 [label="Function call arguments exit"]; + } + 210 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 211 [label="Exit block"]; + } + 212 [label="Exit when branch result"]; + 213 [label="Exit when"]; + } + 214 [label="Exit block"]; + } + 215 [label="Exit function test_7" style="filled" fillcolor=red]; + } 192 -> {193}; 193 -> {194}; 194 -> {195}; 195 -> {196}; 196 -> {197}; - 196 -> {200} [style=dotted]; 197 -> {198}; 198 -> {199}; - 199 -> {200}; + 199 -> {200 202}; 200 -> {201}; - 201 -> {202 203}; - 202 -> {209}; - 203 -> {204}; - 204 -> {205}; + 201 -> {202}; + 202 -> {203}; + 203 -> {204 205}; + 204 -> {213}; 205 -> {206}; 206 -> {207}; 207 -> {208}; 208 -> {209}; 209 -> {210}; 210 -> {211}; - - subgraph cluster_54 { - color=red - 212 [label="Enter function test_9" style="filled" fillcolor=red]; - subgraph cluster_55 { - color=blue - 213 [label="Enter block"]; - subgraph cluster_56 { - color=blue - 214 [label="Enter when"]; - subgraph cluster_57 { - color=blue - 215 [label="Enter when branch condition "]; - subgraph cluster_58 { - color=blue - 216 [label="Enter ||"]; - 217 [label="Access variable R|/x|"]; - 218 [label="Type operator: (R|/x| is R|A|)"]; - 219 [label="Exit left part of ||"]; - 220 [label="Enter right part of ||"]; - 221 [label="Const: Boolean(true)"]; - 222 [label="Exit ||"]; - } - 223 [label="Exit when branch condition"]; - } - 224 [label="Synthetic else branch"]; - 225 [label="Enter when branch result"]; - subgraph cluster_59 { - color=blue - 226 [label="Enter block"]; - 227 [label="Access variable R|/x|"]; - 228 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 229 [label="Exit block"]; - } - 230 [label="Exit when branch result"]; - 231 [label="Exit when"]; - } - 232 [label="Exit block"]; - } - 233 [label="Exit function test_9" style="filled" fillcolor=red]; - } + 211 -> {212}; 212 -> {213}; 213 -> {214}; 214 -> {215}; - 215 -> {216}; + + subgraph cluster_61 { + color=red + 216 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_62 { + color=blue + 217 [label="Enter block"]; + subgraph cluster_63 { + color=blue + 218 [label="Enter when"]; + subgraph cluster_64 { + color=blue + 219 [label="Enter when branch condition "]; + subgraph cluster_65 { + color=blue + 220 [label="Enter ||"]; + 221 [label="Const: Boolean(false)"]; + 222 [label="Exit left part of ||"]; + 223 [label="Enter right part of ||"]; + 224 [label="Access variable R|/x|"]; + 225 [label="Type operator: (R|/x| is R|A|)"]; + 226 [label="Exit ||"]; + } + 227 [label="Exit when branch condition"]; + } + 228 [label="Synthetic else branch"]; + 229 [label="Enter when branch result"]; + subgraph cluster_66 { + color=blue + 230 [label="Enter block"]; + subgraph cluster_67 { + color=blue + 231 [label="Function call arguments enter"]; + 232 [label="Access variable R|/x|"]; + 233 [label="Function call arguments exit"]; + } + 234 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 235 [label="Exit block"]; + } + 236 [label="Exit when branch result"]; + 237 [label="Exit when"]; + } + 238 [label="Exit block"]; + } + 239 [label="Exit function test_8" style="filled" fillcolor=red]; + } 216 -> {217}; 217 -> {218}; 218 -> {219}; - 219 -> {220 222}; + 219 -> {220}; 220 -> {221}; 221 -> {222}; 222 -> {223}; - 223 -> {224 225}; - 224 -> {231}; + 222 -> {226} [style=dotted]; + 223 -> {224}; + 224 -> {225}; 225 -> {226}; 226 -> {227}; - 227 -> {228}; - 228 -> {229}; + 227 -> {228 229}; + 228 -> {237}; 229 -> {230}; 230 -> {231}; 231 -> {232}; 232 -> {233}; - - subgraph cluster_60 { - color=red - 234 [label="Enter function test_10" style="filled" fillcolor=red]; - subgraph cluster_61 { - color=blue - 235 [label="Enter block"]; - subgraph cluster_62 { - color=blue - 236 [label="Enter when"]; - subgraph cluster_63 { - color=blue - 237 [label="Enter when branch condition "]; - subgraph cluster_64 { - color=blue - 238 [label="Enter ||"]; - 239 [label="Const: Boolean(true)"]; - 240 [label="Exit left part of ||"]; - 241 [label="Enter right part of ||" style="filled" fillcolor=gray]; - 242 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 243 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; - 244 [label="Exit ||"]; - } - 245 [label="Exit when branch condition"]; - } - 246 [label="Synthetic else branch"]; - 247 [label="Enter when branch result"]; - subgraph cluster_65 { - color=blue - 248 [label="Enter block"]; - 249 [label="Access variable R|/x|"]; - 250 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 251 [label="Exit block"]; - } - 252 [label="Exit when branch result"]; - 253 [label="Exit when"]; - } - 254 [label="Exit block"]; - } - 255 [label="Exit function test_10" style="filled" fillcolor=red]; - } + 233 -> {234}; 234 -> {235}; 235 -> {236}; 236 -> {237}; 237 -> {238}; 238 -> {239}; - 239 -> {240}; - 240 -> {244}; - 240 -> {241} [style=dotted]; - 241 -> {242} [style=dotted]; - 242 -> {243} [style=dotted]; - 243 -> {244} [style=dotted]; + + subgraph cluster_68 { + color=red + 240 [label="Enter function test_9" style="filled" fillcolor=red]; + subgraph cluster_69 { + color=blue + 241 [label="Enter block"]; + subgraph cluster_70 { + color=blue + 242 [label="Enter when"]; + subgraph cluster_71 { + color=blue + 243 [label="Enter when branch condition "]; + subgraph cluster_72 { + color=blue + 244 [label="Enter ||"]; + 245 [label="Access variable R|/x|"]; + 246 [label="Type operator: (R|/x| is R|A|)"]; + 247 [label="Exit left part of ||"]; + 248 [label="Enter right part of ||"]; + 249 [label="Const: Boolean(true)"]; + 250 [label="Exit ||"]; + } + 251 [label="Exit when branch condition"]; + } + 252 [label="Synthetic else branch"]; + 253 [label="Enter when branch result"]; + subgraph cluster_73 { + color=blue + 254 [label="Enter block"]; + subgraph cluster_74 { + color=blue + 255 [label="Function call arguments enter"]; + 256 [label="Access variable R|/x|"]; + 257 [label="Function call arguments exit"]; + } + 258 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 259 [label="Exit block"]; + } + 260 [label="Exit when branch result"]; + 261 [label="Exit when"]; + } + 262 [label="Exit block"]; + } + 263 [label="Exit function test_9" style="filled" fillcolor=red]; + } + 240 -> {241}; + 241 -> {242}; + 242 -> {243}; + 243 -> {244}; 244 -> {245}; - 245 -> {246 247}; - 246 -> {253}; - 247 -> {248}; + 245 -> {246}; + 246 -> {247}; + 247 -> {248 250}; 248 -> {249}; 249 -> {250}; 250 -> {251}; - 251 -> {252}; - 252 -> {253}; + 251 -> {252 253}; + 252 -> {261}; 253 -> {254}; 254 -> {255}; - - subgraph cluster_66 { - color=red - 256 [label="Enter function test_11" style="filled" fillcolor=red]; - subgraph cluster_67 { - color=blue - 257 [label="Enter block"]; - subgraph cluster_68 { - color=blue - 258 [label="Enter when"]; - subgraph cluster_69 { - color=blue - 259 [label="Enter when branch condition "]; - subgraph cluster_70 { - color=blue - 260 [label="Enter &&"]; - 261 [label="Const: Boolean(false)"]; - 262 [label="Exit left part of &&"]; - 263 [label="Enter right part of &&" style="filled" fillcolor=gray]; - 264 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 265 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; - 266 [label="Exit &&"]; - } - 267 [label="Exit when branch condition"]; - } - 268 [label="Synthetic else branch"]; - 269 [label="Enter when branch result"]; - subgraph cluster_71 { - color=blue - 270 [label="Enter block"]; - 271 [label="Access variable R|/x|"]; - 272 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 273 [label="Exit block"]; - } - 274 [label="Exit when branch result"]; - 275 [label="Exit when"]; - } - 276 [label="Exit block"]; - } - 277 [label="Exit function test_11" style="filled" fillcolor=red]; - } + 255 -> {256}; 256 -> {257}; 257 -> {258}; 258 -> {259}; 259 -> {260}; 260 -> {261}; 261 -> {262}; - 262 -> {266}; - 262 -> {263} [style=dotted]; - 263 -> {264} [style=dotted]; - 264 -> {265} [style=dotted]; - 265 -> {266} [style=dotted]; - 266 -> {267}; - 267 -> {268 269}; - 268 -> {275}; - 269 -> {270}; - 270 -> {271}; - 271 -> {272}; - 272 -> {273}; - 273 -> {274}; - 274 -> {275}; - 275 -> {276}; - 276 -> {277}; + 262 -> {263}; - subgraph cluster_72 { + subgraph cluster_75 { color=red - 278 [label="Enter function test_12" style="filled" fillcolor=red]; - subgraph cluster_73 { + 264 [label="Enter function test_10" style="filled" fillcolor=red]; + subgraph cluster_76 { color=blue - 279 [label="Enter block"]; - subgraph cluster_74 { + 265 [label="Enter block"]; + subgraph cluster_77 { color=blue - 280 [label="Enter when"]; - subgraph cluster_75 { + 266 [label="Enter when"]; + subgraph cluster_78 { color=blue - 281 [label="Enter when branch condition "]; - subgraph cluster_76 { + 267 [label="Enter when branch condition "]; + subgraph cluster_79 { color=blue - 282 [label="Enter &&"]; - 283 [label="Access variable R|/x|"]; - 284 [label="Type operator: (R|/x| is R|A|)"]; - 285 [label="Exit left part of &&"]; - 286 [label="Enter right part of &&"]; - 287 [label="Const: Boolean(false)"]; - 288 [label="Exit &&"]; + 268 [label="Enter ||"]; + 269 [label="Const: Boolean(true)"]; + 270 [label="Exit left part of ||"]; + 271 [label="Enter right part of ||" style="filled" fillcolor=gray]; + 272 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 273 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; + 274 [label="Exit ||"]; } - 289 [label="Exit when branch condition"]; + 275 [label="Exit when branch condition"]; } - 290 [label="Synthetic else branch"]; - 291 [label="Enter when branch result"]; - subgraph cluster_77 { + 276 [label="Synthetic else branch"]; + 277 [label="Enter when branch result"]; + subgraph cluster_80 { color=blue - 292 [label="Enter block"]; - 293 [label="Access variable R|/x|"]; - 294 [label="Smart cast: R|/x|"]; - 295 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 296 [label="Exit block"]; + 278 [label="Enter block"]; + subgraph cluster_81 { + color=blue + 279 [label="Function call arguments enter"]; + 280 [label="Access variable R|/x|"]; + 281 [label="Function call arguments exit"]; + } + 282 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 283 [label="Exit block"]; } - 297 [label="Exit when branch result"]; - 298 [label="Exit when"]; + 284 [label="Exit when branch result"]; + 285 [label="Exit when"]; } - 299 [label="Exit block"]; + 286 [label="Exit block"]; } - 300 [label="Exit function test_12" style="filled" fillcolor=red]; + 287 [label="Exit function test_10" style="filled" fillcolor=red]; } + 264 -> {265}; + 265 -> {266}; + 266 -> {267}; + 267 -> {268}; + 268 -> {269}; + 269 -> {270}; + 270 -> {274}; + 270 -> {271} [style=dotted]; + 271 -> {272} [style=dotted]; + 272 -> {273} [style=dotted]; + 273 -> {274} [style=dotted]; + 274 -> {275}; + 275 -> {276 277}; + 276 -> {285}; + 277 -> {278}; 278 -> {279}; 279 -> {280}; 280 -> {281}; @@ -826,63 +824,68 @@ digraph booleanOperators_kt { 282 -> {283}; 283 -> {284}; 284 -> {285}; - 285 -> {286 288}; + 285 -> {286}; 286 -> {287}; - 287 -> {288}; + + subgraph cluster_82 { + color=red + 288 [label="Enter function test_11" style="filled" fillcolor=red]; + subgraph cluster_83 { + color=blue + 289 [label="Enter block"]; + subgraph cluster_84 { + color=blue + 290 [label="Enter when"]; + subgraph cluster_85 { + color=blue + 291 [label="Enter when branch condition "]; + subgraph cluster_86 { + color=blue + 292 [label="Enter &&"]; + 293 [label="Const: Boolean(false)"]; + 294 [label="Exit left part of &&"]; + 295 [label="Enter right part of &&" style="filled" fillcolor=gray]; + 296 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 297 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; + 298 [label="Exit &&"]; + } + 299 [label="Exit when branch condition"]; + } + 300 [label="Synthetic else branch"]; + 301 [label="Enter when branch result"]; + subgraph cluster_87 { + color=blue + 302 [label="Enter block"]; + subgraph cluster_88 { + color=blue + 303 [label="Function call arguments enter"]; + 304 [label="Access variable R|/x|"]; + 305 [label="Function call arguments exit"]; + } + 306 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 307 [label="Exit block"]; + } + 308 [label="Exit when branch result"]; + 309 [label="Exit when"]; + } + 310 [label="Exit block"]; + } + 311 [label="Exit function test_11" style="filled" fillcolor=red]; + } 288 -> {289}; - 289 -> {290 291}; - 290 -> {298}; + 289 -> {290}; + 290 -> {291}; 291 -> {292}; 292 -> {293}; 293 -> {294}; - 294 -> {295}; - 295 -> {296}; - 296 -> {297}; - 297 -> {298}; + 294 -> {298}; + 294 -> {295} [style=dotted]; + 295 -> {296} [style=dotted]; + 296 -> {297} [style=dotted]; + 297 -> {298} [style=dotted]; 298 -> {299}; - 299 -> {300}; - - subgraph cluster_78 { - color=red - 301 [label="Enter function test_13" style="filled" fillcolor=red]; - subgraph cluster_79 { - color=blue - 302 [label="Enter block"]; - subgraph cluster_80 { - color=blue - 303 [label="Enter when"]; - subgraph cluster_81 { - color=blue - 304 [label="Enter when branch condition "]; - subgraph cluster_82 { - color=blue - 305 [label="Enter &&"]; - 306 [label="Const: Boolean(true)"]; - 307 [label="Exit left part of &&"]; - 308 [label="Enter right part of &&"]; - 309 [label="Access variable R|/x|"]; - 310 [label="Type operator: (R|/x| is R|A|)"]; - 311 [label="Exit &&"]; - } - 312 [label="Exit when branch condition"]; - } - 313 [label="Synthetic else branch"]; - 314 [label="Enter when branch result"]; - subgraph cluster_83 { - color=blue - 315 [label="Enter block"]; - 316 [label="Access variable R|/x|"]; - 317 [label="Smart cast: R|/x|"]; - 318 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 319 [label="Exit block"]; - } - 320 [label="Exit when branch result"]; - 321 [label="Exit when"]; - } - 322 [label="Exit block"]; - } - 323 [label="Exit function test_13" style="filled" fillcolor=red]; - } + 299 -> {300 301}; + 300 -> {309}; 301 -> {302}; 302 -> {303}; 303 -> {304}; @@ -890,77 +893,127 @@ digraph booleanOperators_kt { 305 -> {306}; 306 -> {307}; 307 -> {308}; - 307 -> {311} [style=dotted]; 308 -> {309}; 309 -> {310}; 310 -> {311}; - 311 -> {312}; - 312 -> {313 314}; - 313 -> {321}; + + subgraph cluster_89 { + color=red + 312 [label="Enter function test_12" style="filled" fillcolor=red]; + subgraph cluster_90 { + color=blue + 313 [label="Enter block"]; + subgraph cluster_91 { + color=blue + 314 [label="Enter when"]; + subgraph cluster_92 { + color=blue + 315 [label="Enter when branch condition "]; + subgraph cluster_93 { + color=blue + 316 [label="Enter &&"]; + 317 [label="Access variable R|/x|"]; + 318 [label="Type operator: (R|/x| is R|A|)"]; + 319 [label="Exit left part of &&"]; + 320 [label="Enter right part of &&"]; + 321 [label="Const: Boolean(false)"]; + 322 [label="Exit &&"]; + } + 323 [label="Exit when branch condition"]; + } + 324 [label="Synthetic else branch"]; + 325 [label="Enter when branch result"]; + subgraph cluster_94 { + color=blue + 326 [label="Enter block"]; + subgraph cluster_95 { + color=blue + 327 [label="Function call arguments enter"]; + 328 [label="Access variable R|/x|"]; + 329 [label="Smart cast: R|/x|"]; + 330 [label="Function call arguments exit"]; + } + 331 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 332 [label="Exit block"]; + } + 333 [label="Exit when branch result"]; + 334 [label="Exit when"]; + } + 335 [label="Exit block"]; + } + 336 [label="Exit function test_12" style="filled" fillcolor=red]; + } + 312 -> {313}; + 313 -> {314}; 314 -> {315}; 315 -> {316}; 316 -> {317}; 317 -> {318}; 318 -> {319}; - 319 -> {320}; + 319 -> {320 322}; 320 -> {321}; 321 -> {322}; 322 -> {323}; - - subgraph cluster_84 { - color=red - 324 [label="Enter function test_14" style="filled" fillcolor=red]; - subgraph cluster_85 { - color=blue - 325 [label="Enter block"]; - subgraph cluster_86 { - color=blue - 326 [label="Enter when"]; - subgraph cluster_87 { - color=blue - 327 [label="Enter when branch condition "]; - subgraph cluster_88 { - color=blue - 328 [label="Enter &&"]; - 329 [label="Access variable R|/x|"]; - 330 [label="Type operator: (R|/x| is R|A|)"]; - 331 [label="Exit left part of &&"]; - 332 [label="Enter right part of &&"]; - 333 [label="Const: Boolean(false)"]; - 334 [label="Exit &&"]; - } - 335 [label="Exit when branch condition"]; - } - 336 [label="Synthetic else branch"]; - 337 [label="Enter when branch result"]; - subgraph cluster_89 { - color=blue - 338 [label="Enter block"]; - 339 [label="Access variable R|/x|"]; - 340 [label="Smart cast: R|/x|"]; - 341 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 342 [label="Exit block"]; - } - 343 [label="Exit when branch result"]; - 344 [label="Exit when"]; - } - 345 [label="Exit block"]; - } - 346 [label="Exit function test_14" style="filled" fillcolor=red]; - } - 324 -> {325}; + 323 -> {324 325}; + 324 -> {334}; 325 -> {326}; 326 -> {327}; 327 -> {328}; 328 -> {329}; 329 -> {330}; 330 -> {331}; - 331 -> {332 334}; + 331 -> {332}; 332 -> {333}; 333 -> {334}; 334 -> {335}; - 335 -> {336 337}; - 336 -> {344}; + 335 -> {336}; + + subgraph cluster_96 { + color=red + 337 [label="Enter function test_13" style="filled" fillcolor=red]; + subgraph cluster_97 { + color=blue + 338 [label="Enter block"]; + subgraph cluster_98 { + color=blue + 339 [label="Enter when"]; + subgraph cluster_99 { + color=blue + 340 [label="Enter when branch condition "]; + subgraph cluster_100 { + color=blue + 341 [label="Enter &&"]; + 342 [label="Const: Boolean(true)"]; + 343 [label="Exit left part of &&"]; + 344 [label="Enter right part of &&"]; + 345 [label="Access variable R|/x|"]; + 346 [label="Type operator: (R|/x| is R|A|)"]; + 347 [label="Exit &&"]; + } + 348 [label="Exit when branch condition"]; + } + 349 [label="Synthetic else branch"]; + 350 [label="Enter when branch result"]; + subgraph cluster_101 { + color=blue + 351 [label="Enter block"]; + subgraph cluster_102 { + color=blue + 352 [label="Function call arguments enter"]; + 353 [label="Access variable R|/x|"]; + 354 [label="Smart cast: R|/x|"]; + 355 [label="Function call arguments exit"]; + } + 356 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 357 [label="Exit block"]; + } + 358 [label="Exit when branch result"]; + 359 [label="Exit when"]; + } + 360 [label="Exit block"]; + } + 361 [label="Exit function test_13" style="filled" fillcolor=red]; + } 337 -> {338}; 338 -> {339}; 339 -> {340}; @@ -968,7 +1021,94 @@ digraph booleanOperators_kt { 341 -> {342}; 342 -> {343}; 343 -> {344}; + 343 -> {347} [style=dotted]; 344 -> {345}; 345 -> {346}; + 346 -> {347}; + 347 -> {348}; + 348 -> {349 350}; + 349 -> {359}; + 350 -> {351}; + 351 -> {352}; + 352 -> {353}; + 353 -> {354}; + 354 -> {355}; + 355 -> {356}; + 356 -> {357}; + 357 -> {358}; + 358 -> {359}; + 359 -> {360}; + 360 -> {361}; + + subgraph cluster_103 { + color=red + 362 [label="Enter function test_14" style="filled" fillcolor=red]; + subgraph cluster_104 { + color=blue + 363 [label="Enter block"]; + subgraph cluster_105 { + color=blue + 364 [label="Enter when"]; + subgraph cluster_106 { + color=blue + 365 [label="Enter when branch condition "]; + subgraph cluster_107 { + color=blue + 366 [label="Enter &&"]; + 367 [label="Access variable R|/x|"]; + 368 [label="Type operator: (R|/x| is R|A|)"]; + 369 [label="Exit left part of &&"]; + 370 [label="Enter right part of &&"]; + 371 [label="Const: Boolean(false)"]; + 372 [label="Exit &&"]; + } + 373 [label="Exit when branch condition"]; + } + 374 [label="Synthetic else branch"]; + 375 [label="Enter when branch result"]; + subgraph cluster_108 { + color=blue + 376 [label="Enter block"]; + subgraph cluster_109 { + color=blue + 377 [label="Function call arguments enter"]; + 378 [label="Access variable R|/x|"]; + 379 [label="Smart cast: R|/x|"]; + 380 [label="Function call arguments exit"]; + } + 381 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 382 [label="Exit block"]; + } + 383 [label="Exit when branch result"]; + 384 [label="Exit when"]; + } + 385 [label="Exit block"]; + } + 386 [label="Exit function test_14" style="filled" fillcolor=red]; + } + 362 -> {363}; + 363 -> {364}; + 364 -> {365}; + 365 -> {366}; + 366 -> {367}; + 367 -> {368}; + 368 -> {369}; + 369 -> {370 372}; + 370 -> {371}; + 371 -> {372}; + 372 -> {373}; + 373 -> {374 375}; + 374 -> {384}; + 375 -> {376}; + 376 -> {377}; + 377 -> {378}; + 378 -> {379}; + 379 -> {380}; + 380 -> {381}; + 381 -> {382}; + 382 -> {383}; + 383 -> {384}; + 384 -> {385}; + 385 -> {386}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot index 01d660cbd3a..8429d2d797a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot @@ -52,26 +52,36 @@ digraph equalsToBoolean_kt { subgraph cluster_8 { color=blue 19 [label="Enter block"]; - 20 [label="Access variable R|/b|"]; - 21 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 22 [label="Exit block"]; + subgraph cluster_9 { + color=blue + 20 [label="Function call arguments enter"]; + 21 [label="Access variable R|/b|"]; + 22 [label="Function call arguments exit"]; + } + 23 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 24 [label="Exit block"]; } - 23 [label="Exit when branch result"]; - 24 [label="Enter when branch result"]; - subgraph cluster_9 { + 25 [label="Exit when branch result"]; + 26 [label="Enter when branch result"]; + subgraph cluster_10 { color=blue - 25 [label="Enter block"]; - 26 [label="Access variable R|/b|"]; - 27 [label="Smart cast: R|/b|"]; - 28 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 29 [label="Exit block"]; + 27 [label="Enter block"]; + subgraph cluster_11 { + color=blue + 28 [label="Function call arguments enter"]; + 29 [label="Access variable R|/b|"]; + 30 [label="Smart cast: R|/b|"]; + 31 [label="Function call arguments exit"]; + } + 32 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 33 [label="Exit block"]; } - 30 [label="Exit when branch result"]; - 31 [label="Exit when"]; + 34 [label="Exit when branch result"]; + 35 [label="Exit when"]; } - 32 [label="Exit block"]; + 36 [label="Exit block"]; } - 33 [label="Exit function test_1" style="filled" fillcolor=red]; + 37 [label="Exit function test_1" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; @@ -82,7 +92,7 @@ digraph equalsToBoolean_kt { 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16 24}; + 15 -> {16 26}; 16 -> {17}; 17 -> {18}; 18 -> {19}; @@ -90,9 +100,9 @@ digraph equalsToBoolean_kt { 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {31}; + 23 -> {24}; 24 -> {25}; - 25 -> {26}; + 25 -> {35}; 26 -> {27}; 27 -> {28}; 28 -> {29}; @@ -100,133 +110,94 @@ digraph equalsToBoolean_kt { 30 -> {31}; 31 -> {32}; 32 -> {33}; - - subgraph cluster_10 { - color=red - 34 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 35 [label="Enter block"]; - subgraph cluster_12 { - color=blue - 36 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 37 [label="Enter when branch condition "]; - 38 [label="Access variable R|/b|"]; - 39 [label="Const: Boolean(true)"]; - 40 [label="Equality operator =="]; - 41 [label="Const: Boolean(true)"]; - 42 [label="Equality operator !="]; - 43 [label="Exit when branch condition"]; - } - subgraph cluster_14 { - color=blue - 44 [label="Enter when branch condition else"]; - 45 [label="Exit when branch condition"]; - } - 46 [label="Enter when branch result"]; - subgraph cluster_15 { - color=blue - 47 [label="Enter block"]; - 48 [label="Access variable R|/b|"]; - 49 [label="Smart cast: R|/b|"]; - 50 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 51 [label="Exit block"]; - } - 52 [label="Exit when branch result"]; - 53 [label="Enter when branch result"]; - subgraph cluster_16 { - color=blue - 54 [label="Enter block"]; - 55 [label="Access variable R|/b|"]; - 56 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 57 [label="Exit block"]; - } - 58 [label="Exit when branch result"]; - 59 [label="Exit when"]; - } - 60 [label="Exit block"]; - } - 61 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38}; + + subgraph cluster_12 { + color=red + 38 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 39 [label="Enter block"]; + subgraph cluster_14 { + color=blue + 40 [label="Enter when"]; + subgraph cluster_15 { + color=blue + 41 [label="Enter when branch condition "]; + 42 [label="Access variable R|/b|"]; + 43 [label="Const: Boolean(true)"]; + 44 [label="Equality operator =="]; + 45 [label="Const: Boolean(true)"]; + 46 [label="Equality operator !="]; + 47 [label="Exit when branch condition"]; + } + subgraph cluster_16 { + color=blue + 48 [label="Enter when branch condition else"]; + 49 [label="Exit when branch condition"]; + } + 50 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 51 [label="Enter block"]; + subgraph cluster_18 { + color=blue + 52 [label="Function call arguments enter"]; + 53 [label="Access variable R|/b|"]; + 54 [label="Smart cast: R|/b|"]; + 55 [label="Function call arguments exit"]; + } + 56 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 57 [label="Exit block"]; + } + 58 [label="Exit when branch result"]; + 59 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 60 [label="Enter block"]; + subgraph cluster_20 { + color=blue + 61 [label="Function call arguments enter"]; + 62 [label="Access variable R|/b|"]; + 63 [label="Function call arguments exit"]; + } + 64 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 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]; + } 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {44 53}; + 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; + 47 -> {48 59}; 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {59}; + 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {59}; + 58 -> {67}; 59 -> {60}; 60 -> {61}; - - subgraph cluster_17 { - color=red - 62 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 63 [label="Enter block"]; - subgraph cluster_19 { - color=blue - 64 [label="Enter when"]; - subgraph cluster_20 { - color=blue - 65 [label="Enter when branch condition "]; - 66 [label="Access variable R|/b|"]; - 67 [label="Const: Boolean(true)"]; - 68 [label="Equality operator =="]; - 69 [label="Const: Boolean(false)"]; - 70 [label="Equality operator =="]; - 71 [label="Exit when branch condition"]; - } - subgraph cluster_21 { - color=blue - 72 [label="Enter when branch condition else"]; - 73 [label="Exit when branch condition"]; - } - 74 [label="Enter when branch result"]; - subgraph cluster_22 { - color=blue - 75 [label="Enter block"]; - 76 [label="Access variable R|/b|"]; - 77 [label="Smart cast: R|/b|"]; - 78 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 79 [label="Exit block"]; - } - 80 [label="Exit when branch result"]; - 81 [label="Enter when branch result"]; - subgraph cluster_23 { - color=blue - 82 [label="Enter block"]; - 83 [label="Access variable R|/b|"]; - 84 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 85 [label="Exit block"]; - } - 86 [label="Exit when branch result"]; - 87 [label="Exit when"]; - } - 88 [label="Exit block"]; - } - 89 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; @@ -234,9 +205,68 @@ digraph equalsToBoolean_kt { 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {70}; + + subgraph cluster_21 { + color=red + 70 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 71 [label="Enter block"]; + subgraph cluster_23 { + color=blue + 72 [label="Enter when"]; + subgraph cluster_24 { + color=blue + 73 [label="Enter when branch condition "]; + 74 [label="Access variable R|/b|"]; + 75 [label="Const: Boolean(true)"]; + 76 [label="Equality operator =="]; + 77 [label="Const: Boolean(false)"]; + 78 [label="Equality operator =="]; + 79 [label="Exit when branch condition"]; + } + subgraph cluster_25 { + color=blue + 80 [label="Enter when branch condition else"]; + 81 [label="Exit when branch condition"]; + } + 82 [label="Enter when branch result"]; + subgraph cluster_26 { + color=blue + 83 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 84 [label="Function call arguments enter"]; + 85 [label="Access variable R|/b|"]; + 86 [label="Smart cast: R|/b|"]; + 87 [label="Function call arguments exit"]; + } + 88 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 89 [label="Exit block"]; + } + 90 [label="Exit when branch result"]; + 91 [label="Enter when branch result"]; + subgraph cluster_28 { + color=blue + 92 [label="Enter block"]; + subgraph cluster_29 { + color=blue + 93 [label="Function call arguments enter"]; + 94 [label="Access variable R|/b|"]; + 95 [label="Function call arguments exit"]; + } + 96 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 97 [label="Exit block"]; + } + 98 [label="Exit when branch result"]; + 99 [label="Exit when"]; + } + 100 [label="Exit block"]; + } + 101 [label="Exit function test_3" style="filled" fillcolor=red]; + } 70 -> {71}; - 71 -> {72 81}; + 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; @@ -244,8 +274,8 @@ digraph equalsToBoolean_kt { 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {80}; - 80 -> {87}; + 79 -> {80 91}; + 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; @@ -254,57 +284,8 @@ digraph equalsToBoolean_kt { 86 -> {87}; 87 -> {88}; 88 -> {89}; - - subgraph cluster_24 { - color=red - 90 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 91 [label="Enter block"]; - subgraph cluster_26 { - color=blue - 92 [label="Enter when"]; - subgraph cluster_27 { - color=blue - 93 [label="Enter when branch condition "]; - 94 [label="Access variable R|/b|"]; - 95 [label="Const: Boolean(true)"]; - 96 [label="Equality operator =="]; - 97 [label="Const: Boolean(false)"]; - 98 [label="Equality operator !="]; - 99 [label="Exit when branch condition"]; - } - subgraph cluster_28 { - color=blue - 100 [label="Enter when branch condition else"]; - 101 [label="Exit when branch condition"]; - } - 102 [label="Enter when branch result"]; - subgraph cluster_29 { - color=blue - 103 [label="Enter block"]; - 104 [label="Access variable R|/b|"]; - 105 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 106 [label="Exit block"]; - } - 107 [label="Exit when branch result"]; - 108 [label="Enter when branch result"]; - subgraph cluster_30 { - color=blue - 109 [label="Enter block"]; - 110 [label="Access variable R|/b|"]; - 111 [label="Smart cast: R|/b|"]; - 112 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 113 [label="Exit block"]; - } - 114 [label="Exit when branch result"]; - 115 [label="Exit when"]; - } - 116 [label="Exit block"]; - } - 117 [label="Exit function test_4" style="filled" fillcolor=red]; - } - 90 -> {91}; + 89 -> {90}; + 90 -> {99}; 91 -> {92}; 92 -> {93}; 93 -> {94}; @@ -313,151 +294,171 @@ digraph equalsToBoolean_kt { 96 -> {97}; 97 -> {98}; 98 -> {99}; - 99 -> {100 108}; + 99 -> {100}; 100 -> {101}; - 101 -> {102}; + + subgraph cluster_30 { + color=red + 102 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 103 [label="Enter block"]; + subgraph cluster_32 { + color=blue + 104 [label="Enter when"]; + subgraph cluster_33 { + color=blue + 105 [label="Enter when branch condition "]; + 106 [label="Access variable R|/b|"]; + 107 [label="Const: Boolean(true)"]; + 108 [label="Equality operator =="]; + 109 [label="Const: Boolean(false)"]; + 110 [label="Equality operator !="]; + 111 [label="Exit when branch condition"]; + } + subgraph cluster_34 { + color=blue + 112 [label="Enter when branch condition else"]; + 113 [label="Exit when branch condition"]; + } + 114 [label="Enter when branch result"]; + subgraph cluster_35 { + color=blue + 115 [label="Enter block"]; + subgraph cluster_36 { + color=blue + 116 [label="Function call arguments enter"]; + 117 [label="Access variable R|/b|"]; + 118 [label="Function call arguments exit"]; + } + 119 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 120 [label="Exit block"]; + } + 121 [label="Exit when branch result"]; + 122 [label="Enter when branch result"]; + subgraph cluster_37 { + color=blue + 123 [label="Enter block"]; + subgraph cluster_38 { + color=blue + 124 [label="Function call arguments enter"]; + 125 [label="Access variable R|/b|"]; + 126 [label="Smart cast: R|/b|"]; + 127 [label="Function call arguments exit"]; + } + 128 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 129 [label="Exit block"]; + } + 130 [label="Exit when branch result"]; + 131 [label="Exit when"]; + } + 132 [label="Exit block"]; + } + 133 [label="Exit function test_4" style="filled" fillcolor=red]; + } 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {115}; + 107 -> {108}; 108 -> {109}; 109 -> {110}; 110 -> {111}; - 111 -> {112}; + 111 -> {112 122}; 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; - - subgraph cluster_31 { - color=red - 118 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 119 [label="Enter block"]; - subgraph cluster_33 { - color=blue - 120 [label="Enter when"]; - subgraph cluster_34 { - color=blue - 121 [label="Enter when branch condition "]; - 122 [label="Access variable R|/b|"]; - 123 [label="Const: Boolean(true)"]; - 124 [label="Equality operator !="]; - 125 [label="Const: Boolean(true)"]; - 126 [label="Equality operator =="]; - 127 [label="Exit when branch condition"]; - } - subgraph cluster_35 { - color=blue - 128 [label="Enter when branch condition else"]; - 129 [label="Exit when branch condition"]; - } - 130 [label="Enter when branch result"]; - subgraph cluster_36 { - color=blue - 131 [label="Enter block"]; - 132 [label="Access variable R|/b|"]; - 133 [label="Smart cast: R|/b|"]; - 134 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 135 [label="Exit block"]; - } - 136 [label="Exit when branch result"]; - 137 [label="Enter when branch result"]; - subgraph cluster_37 { - color=blue - 138 [label="Enter block"]; - 139 [label="Access variable R|/b|"]; - 140 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 141 [label="Exit block"]; - } - 142 [label="Exit when branch result"]; - 143 [label="Exit when"]; - } - 144 [label="Exit block"]; - } - 145 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 117 -> {118}; 118 -> {119}; 119 -> {120}; 120 -> {121}; - 121 -> {122}; + 121 -> {131}; 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {128 137}; + 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {134}; + + subgraph cluster_39 { + color=red + 134 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_40 { + color=blue + 135 [label="Enter block"]; + subgraph cluster_41 { + color=blue + 136 [label="Enter when"]; + subgraph cluster_42 { + color=blue + 137 [label="Enter when branch condition "]; + 138 [label="Access variable R|/b|"]; + 139 [label="Const: Boolean(true)"]; + 140 [label="Equality operator !="]; + 141 [label="Const: Boolean(true)"]; + 142 [label="Equality operator =="]; + 143 [label="Exit when branch condition"]; + } + subgraph cluster_43 { + color=blue + 144 [label="Enter when branch condition else"]; + 145 [label="Exit when branch condition"]; + } + 146 [label="Enter when branch result"]; + subgraph cluster_44 { + color=blue + 147 [label="Enter block"]; + subgraph cluster_45 { + color=blue + 148 [label="Function call arguments enter"]; + 149 [label="Access variable R|/b|"]; + 150 [label="Smart cast: R|/b|"]; + 151 [label="Function call arguments exit"]; + } + 152 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 153 [label="Exit block"]; + } + 154 [label="Exit when branch result"]; + 155 [label="Enter when branch result"]; + subgraph cluster_46 { + color=blue + 156 [label="Enter block"]; + subgraph cluster_47 { + color=blue + 157 [label="Function call arguments enter"]; + 158 [label="Access variable R|/b|"]; + 159 [label="Function call arguments exit"]; + } + 160 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 161 [label="Exit block"]; + } + 162 [label="Exit when branch result"]; + 163 [label="Exit when"]; + } + 164 [label="Exit block"]; + } + 165 [label="Exit function test_5" style="filled" fillcolor=red]; + } 134 -> {135}; 135 -> {136}; - 136 -> {143}; + 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; 140 -> {141}; 141 -> {142}; 142 -> {143}; - 143 -> {144}; + 143 -> {144 155}; 144 -> {145}; - - subgraph cluster_38 { - color=red - 146 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_39 { - color=blue - 147 [label="Enter block"]; - subgraph cluster_40 { - color=blue - 148 [label="Enter when"]; - subgraph cluster_41 { - color=blue - 149 [label="Enter when branch condition "]; - 150 [label="Access variable R|/b|"]; - 151 [label="Const: Boolean(true)"]; - 152 [label="Equality operator !="]; - 153 [label="Const: Boolean(true)"]; - 154 [label="Equality operator !="]; - 155 [label="Exit when branch condition"]; - } - subgraph cluster_42 { - color=blue - 156 [label="Enter when branch condition else"]; - 157 [label="Exit when branch condition"]; - } - 158 [label="Enter when branch result"]; - subgraph cluster_43 { - color=blue - 159 [label="Enter block"]; - 160 [label="Access variable R|/b|"]; - 161 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 162 [label="Exit block"]; - } - 163 [label="Exit when branch result"]; - 164 [label="Enter when branch result"]; - subgraph cluster_44 { - color=blue - 165 [label="Enter block"]; - 166 [label="Access variable R|/b|"]; - 167 [label="Smart cast: R|/b|"]; - 168 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 169 [label="Exit block"]; - } - 170 [label="Exit when branch result"]; - 171 [label="Exit when"]; - } - 172 [label="Exit block"]; - } - 173 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 145 -> {146}; 146 -> {147}; 147 -> {148}; 148 -> {149}; @@ -466,8 +467,8 @@ digraph equalsToBoolean_kt { 151 -> {152}; 152 -> {153}; 153 -> {154}; - 154 -> {155}; - 155 -> {156 164}; + 154 -> {163}; + 155 -> {156}; 156 -> {157}; 157 -> {158}; 158 -> {159}; @@ -475,9 +476,68 @@ digraph equalsToBoolean_kt { 160 -> {161}; 161 -> {162}; 162 -> {163}; - 163 -> {171}; + 163 -> {164}; 164 -> {165}; - 165 -> {166}; + + subgraph cluster_48 { + color=red + 166 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 167 [label="Enter block"]; + subgraph cluster_50 { + color=blue + 168 [label="Enter when"]; + subgraph cluster_51 { + color=blue + 169 [label="Enter when branch condition "]; + 170 [label="Access variable R|/b|"]; + 171 [label="Const: Boolean(true)"]; + 172 [label="Equality operator !="]; + 173 [label="Const: Boolean(true)"]; + 174 [label="Equality operator !="]; + 175 [label="Exit when branch condition"]; + } + subgraph cluster_52 { + color=blue + 176 [label="Enter when branch condition else"]; + 177 [label="Exit when branch condition"]; + } + 178 [label="Enter when branch result"]; + subgraph cluster_53 { + color=blue + 179 [label="Enter block"]; + subgraph cluster_54 { + color=blue + 180 [label="Function call arguments enter"]; + 181 [label="Access variable R|/b|"]; + 182 [label="Function call arguments exit"]; + } + 183 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 184 [label="Exit block"]; + } + 185 [label="Exit when branch result"]; + 186 [label="Enter when branch result"]; + subgraph cluster_55 { + color=blue + 187 [label="Enter block"]; + subgraph cluster_56 { + color=blue + 188 [label="Function call arguments enter"]; + 189 [label="Access variable R|/b|"]; + 190 [label="Smart cast: R|/b|"]; + 191 [label="Function call arguments exit"]; + } + 192 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 193 [label="Exit block"]; + } + 194 [label="Exit when branch result"]; + 195 [label="Exit when"]; + } + 196 [label="Exit block"]; + } + 197 [label="Exit function test_6" style="filled" fillcolor=red]; + } 166 -> {167}; 167 -> {168}; 168 -> {169}; @@ -485,58 +545,9 @@ digraph equalsToBoolean_kt { 170 -> {171}; 171 -> {172}; 172 -> {173}; - - subgraph cluster_45 { - color=red - 174 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_46 { - color=blue - 175 [label="Enter block"]; - subgraph cluster_47 { - color=blue - 176 [label="Enter when"]; - subgraph cluster_48 { - color=blue - 177 [label="Enter when branch condition "]; - 178 [label="Access variable R|/b|"]; - 179 [label="Const: Boolean(true)"]; - 180 [label="Equality operator !="]; - 181 [label="Const: Boolean(false)"]; - 182 [label="Equality operator =="]; - 183 [label="Exit when branch condition"]; - } - subgraph cluster_49 { - color=blue - 184 [label="Enter when branch condition else"]; - 185 [label="Exit when branch condition"]; - } - 186 [label="Enter when branch result"]; - subgraph cluster_50 { - color=blue - 187 [label="Enter block"]; - 188 [label="Access variable R|/b|"]; - 189 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 190 [label="Exit block"]; - } - 191 [label="Exit when branch result"]; - 192 [label="Enter when branch result"]; - subgraph cluster_51 { - color=blue - 193 [label="Enter block"]; - 194 [label="Access variable R|/b|"]; - 195 [label="Smart cast: R|/b|"]; - 196 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 197 [label="Exit block"]; - } - 198 [label="Exit when branch result"]; - 199 [label="Exit when"]; - } - 200 [label="Exit block"]; - } - 201 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 173 -> {174}; 174 -> {175}; - 175 -> {176}; + 175 -> {176 186}; 176 -> {177}; 177 -> {178}; 178 -> {179}; @@ -544,65 +555,71 @@ digraph equalsToBoolean_kt { 180 -> {181}; 181 -> {182}; 182 -> {183}; - 183 -> {184 192}; + 183 -> {184}; 184 -> {185}; - 185 -> {186}; + 185 -> {195}; 186 -> {187}; 187 -> {188}; 188 -> {189}; 189 -> {190}; 190 -> {191}; - 191 -> {199}; + 191 -> {192}; 192 -> {193}; 193 -> {194}; 194 -> {195}; 195 -> {196}; 196 -> {197}; - 197 -> {198}; - 198 -> {199}; - 199 -> {200}; - 200 -> {201}; - subgraph cluster_52 { + subgraph cluster_57 { color=red - 202 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_53 { + 198 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_58 { color=blue - 203 [label="Enter block"]; - subgraph cluster_54 { + 199 [label="Enter block"]; + subgraph cluster_59 { color=blue - 204 [label="Enter when"]; - subgraph cluster_55 { + 200 [label="Enter when"]; + subgraph cluster_60 { color=blue - 205 [label="Enter when branch condition "]; - 206 [label="Access variable R|/b|"]; - 207 [label="Const: Boolean(true)"]; - 208 [label="Equality operator !="]; - 209 [label="Const: Boolean(false)"]; - 210 [label="Equality operator !="]; - 211 [label="Exit when branch condition"]; + 201 [label="Enter when branch condition "]; + 202 [label="Access variable R|/b|"]; + 203 [label="Const: Boolean(true)"]; + 204 [label="Equality operator !="]; + 205 [label="Const: Boolean(false)"]; + 206 [label="Equality operator =="]; + 207 [label="Exit when branch condition"]; } - subgraph cluster_56 { + subgraph cluster_61 { color=blue - 212 [label="Enter when branch condition else"]; - 213 [label="Exit when branch condition"]; + 208 [label="Enter when branch condition else"]; + 209 [label="Exit when branch condition"]; } - 214 [label="Enter when branch result"]; - subgraph cluster_57 { + 210 [label="Enter when branch result"]; + subgraph cluster_62 { color=blue - 215 [label="Enter block"]; - 216 [label="Access variable R|/b|"]; - 217 [label="Smart cast: R|/b|"]; - 218 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 219 [label="Exit block"]; + 211 [label="Enter block"]; + subgraph cluster_63 { + color=blue + 212 [label="Function call arguments enter"]; + 213 [label="Access variable R|/b|"]; + 214 [label="Function call arguments exit"]; + } + 215 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 216 [label="Exit block"]; } - 220 [label="Exit when branch result"]; - 221 [label="Enter when branch result"]; - subgraph cluster_58 { + 217 [label="Exit when branch result"]; + 218 [label="Enter when branch result"]; + subgraph cluster_64 { color=blue - 222 [label="Enter block"]; - 223 [label="Access variable R|/b|"]; - 224 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 219 [label="Enter block"]; + subgraph cluster_65 { + color=blue + 220 [label="Function call arguments enter"]; + 221 [label="Access variable R|/b|"]; + 222 [label="Smart cast: R|/b|"]; + 223 [label="Function call arguments exit"]; + } + 224 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; 225 [label="Exit block"]; } 226 [label="Exit when branch result"]; @@ -610,27 +627,31 @@ digraph equalsToBoolean_kt { } 228 [label="Exit block"]; } - 229 [label="Exit function test_8" style="filled" fillcolor=red]; + 229 [label="Exit function test_7" style="filled" fillcolor=red]; } + 198 -> {199}; + 199 -> {200}; + 200 -> {201}; + 201 -> {202}; 202 -> {203}; 203 -> {204}; 204 -> {205}; 205 -> {206}; 206 -> {207}; - 207 -> {208}; + 207 -> {208 218}; 208 -> {209}; 209 -> {210}; 210 -> {211}; - 211 -> {212 221}; + 211 -> {212}; 212 -> {213}; 213 -> {214}; 214 -> {215}; 215 -> {216}; 216 -> {217}; - 217 -> {218}; + 217 -> {227}; 218 -> {219}; 219 -> {220}; - 220 -> {227}; + 220 -> {221}; 221 -> {222}; 222 -> {223}; 223 -> {224}; @@ -640,4 +661,95 @@ digraph equalsToBoolean_kt { 227 -> {228}; 228 -> {229}; + subgraph cluster_66 { + color=red + 230 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_67 { + color=blue + 231 [label="Enter block"]; + subgraph cluster_68 { + color=blue + 232 [label="Enter when"]; + subgraph cluster_69 { + color=blue + 233 [label="Enter when branch condition "]; + 234 [label="Access variable R|/b|"]; + 235 [label="Const: Boolean(true)"]; + 236 [label="Equality operator !="]; + 237 [label="Const: Boolean(false)"]; + 238 [label="Equality operator !="]; + 239 [label="Exit when branch condition"]; + } + subgraph cluster_70 { + color=blue + 240 [label="Enter when branch condition else"]; + 241 [label="Exit when branch condition"]; + } + 242 [label="Enter when branch result"]; + subgraph cluster_71 { + color=blue + 243 [label="Enter block"]; + subgraph cluster_72 { + color=blue + 244 [label="Function call arguments enter"]; + 245 [label="Access variable R|/b|"]; + 246 [label="Smart cast: R|/b|"]; + 247 [label="Function call arguments exit"]; + } + 248 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 249 [label="Exit block"]; + } + 250 [label="Exit when branch result"]; + 251 [label="Enter when branch result"]; + subgraph cluster_73 { + color=blue + 252 [label="Enter block"]; + subgraph cluster_74 { + color=blue + 253 [label="Function call arguments enter"]; + 254 [label="Access variable R|/b|"]; + 255 [label="Function call arguments exit"]; + } + 256 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 257 [label="Exit block"]; + } + 258 [label="Exit when branch result"]; + 259 [label="Exit when"]; + } + 260 [label="Exit block"]; + } + 261 [label="Exit function test_8" style="filled" fillcolor=red]; + } + 230 -> {231}; + 231 -> {232}; + 232 -> {233}; + 233 -> {234}; + 234 -> {235}; + 235 -> {236}; + 236 -> {237}; + 237 -> {238}; + 238 -> {239}; + 239 -> {240 251}; + 240 -> {241}; + 241 -> {242}; + 242 -> {243}; + 243 -> {244}; + 244 -> {245}; + 245 -> {246}; + 246 -> {247}; + 247 -> {248}; + 248 -> {249}; + 249 -> {250}; + 250 -> {259}; + 251 -> {252}; + 252 -> {253}; + 253 -> {254}; + 254 -> {255}; + 255 -> {256}; + 256 -> {257}; + 257 -> {258}; + 258 -> {259}; + 259 -> {260}; + 260 -> {261}; + } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot index e7bd33e98f2..a7a1d55ed0e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot @@ -38,17 +38,27 @@ digraph jumpFromRhsOfOperator_kt { 11 [label="Equality operator !="]; 12 [label="Exit left part of ||"]; 13 [label="Enter right part of ||"]; - 14 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 15 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 16 [label="Stub" style="filled" fillcolor=gray]; - 17 [label="Exit ||"]; + subgraph cluster_6 { + color=blue + 14 [label="Function call arguments enter"]; + 15 [label="Function call arguments exit"]; + } + 16 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 17 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 18 [label="Stub" style="filled" fillcolor=gray]; + 19 [label="Exit ||"]; } - 18 [label="Access variable R|/a|"]; - 19 [label="Smart cast: R|/a|"]; - 20 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 21 [label="Exit block"]; + subgraph cluster_7 { + color=blue + 20 [label="Function call arguments enter"]; + 21 [label="Access variable R|/a|"]; + 22 [label="Smart cast: R|/a|"]; + 23 [label="Function call arguments exit"]; + } + 24 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 25 [label="Exit block"]; } - 22 [label="Exit function test_1" style="filled" fillcolor=red]; + 26 [label="Exit function test_1" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; @@ -56,107 +66,70 @@ digraph jumpFromRhsOfOperator_kt { 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {13 17}; + 12 -> {13 19}; 13 -> {14}; 14 -> {15}; - 15 -> {16} [style=dotted]; - 16 -> {17} [style=dotted]; - 17 -> {18}; - 18 -> {19}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18} [style=dotted]; + 18 -> {19} [style=dotted]; 19 -> {20}; 20 -> {21}; 21 -> {22}; - - subgraph cluster_6 { - color=red - 23 [label="Enter function teat_2" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 24 [label="Enter block"]; - subgraph cluster_8 { - color=blue - 25 [label="Enter &&"]; - 26 [label="Access variable R|/a|"]; - 27 [label="Const: Null(null)"]; - 28 [label="Equality operator =="]; - 29 [label="Exit left part of &&"]; - 30 [label="Enter right part of &&"]; - 31 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 32 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 33 [label="Stub" style="filled" fillcolor=gray]; - 34 [label="Exit &&"]; - } - 35 [label="Access variable R|/a|"]; - 36 [label="Smart cast: R|/a|"]; - 37 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; - } - 39 [label="Exit function teat_2" style="filled" fillcolor=red]; - } + 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {27}; + + subgraph cluster_8 { + color=red + 27 [label="Enter function teat_2" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 28 [label="Enter block"]; + subgraph cluster_10 { + color=blue + 29 [label="Enter &&"]; + 30 [label="Access variable R|/a|"]; + 31 [label="Const: Null(null)"]; + 32 [label="Equality operator =="]; + 33 [label="Exit left part of &&"]; + 34 [label="Enter right part of &&"]; + subgraph cluster_11 { + color=blue + 35 [label="Function call arguments enter"]; + 36 [label="Function call arguments exit"]; + } + 37 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 38 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 39 [label="Stub" style="filled" fillcolor=gray]; + 40 [label="Exit &&"]; + } + subgraph cluster_12 { + color=blue + 41 [label="Function call arguments enter"]; + 42 [label="Access variable R|/a|"]; + 43 [label="Smart cast: R|/a|"]; + 44 [label="Function call arguments exit"]; + } + 45 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 46 [label="Exit block"]; + } + 47 [label="Exit function teat_2" style="filled" fillcolor=red]; + } 27 -> {28}; 28 -> {29}; - 29 -> {30 34}; + 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {33} [style=dotted]; - 33 -> {34} [style=dotted]; + 32 -> {33}; + 33 -> {34 40}; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {39}; - - subgraph cluster_9 { - color=red - 40 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 41 [label="Enter block"]; - subgraph cluster_11 { - color=blue - 42 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 43 [label="Enter when branch condition "]; - subgraph cluster_13 { - color=blue - 44 [label="Enter ||"]; - 45 [label="Access variable R|/a|"]; - 46 [label="Const: Null(null)"]; - 47 [label="Equality operator !="]; - 48 [label="Exit left part of ||"]; - 49 [label="Enter right part of ||"]; - 50 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 51 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 52 [label="Stub" style="filled" fillcolor=gray]; - 53 [label="Exit ||"]; - } - 54 [label="Exit when branch condition"]; - } - 55 [label="Synthetic else branch"]; - 56 [label="Enter when branch result"]; - subgraph cluster_14 { - color=blue - 57 [label="Enter block"]; - 58 [label="Access variable R|/a|"]; - 59 [label="Smart cast: R|/a|"]; - 60 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 61 [label="Exit block"]; - } - 62 [label="Exit when branch result"]; - 63 [label="Exit when"]; - } - 64 [label="Access variable R|/a|"]; - 65 [label="Smart cast: R|/a|"]; - 66 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 67 [label="Exit block"]; - } - 68 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 38 -> {39} [style=dotted]; + 39 -> {40} [style=dotted]; 40 -> {41}; 41 -> {42}; 42 -> {43}; @@ -164,75 +137,90 @@ digraph jumpFromRhsOfOperator_kt { 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; - 48 -> {49 53}; + + subgraph cluster_13 { + color=red + 48 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 49 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 50 [label="Enter when"]; + subgraph cluster_16 { + color=blue + 51 [label="Enter when branch condition "]; + subgraph cluster_17 { + color=blue + 52 [label="Enter ||"]; + 53 [label="Access variable R|/a|"]; + 54 [label="Const: Null(null)"]; + 55 [label="Equality operator !="]; + 56 [label="Exit left part of ||"]; + 57 [label="Enter right part of ||"]; + subgraph cluster_18 { + color=blue + 58 [label="Function call arguments enter"]; + 59 [label="Function call arguments exit"]; + } + 60 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 61 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 62 [label="Stub" style="filled" fillcolor=gray]; + 63 [label="Exit ||"]; + } + 64 [label="Exit when branch condition"]; + } + 65 [label="Synthetic else branch"]; + 66 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 67 [label="Enter block"]; + subgraph cluster_20 { + color=blue + 68 [label="Function call arguments enter"]; + 69 [label="Access variable R|/a|"]; + 70 [label="Smart cast: R|/a|"]; + 71 [label="Function call arguments exit"]; + } + 72 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 73 [label="Exit block"]; + } + 74 [label="Exit when branch result"]; + 75 [label="Exit when"]; + } + subgraph cluster_21 { + color=blue + 76 [label="Function call arguments enter"]; + 77 [label="Access variable R|/a|"]; + 78 [label="Smart cast: R|/a|"]; + 79 [label="Function call arguments exit"]; + } + 80 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 81 [label="Exit block"]; + } + 82 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52} [style=dotted]; - 52 -> {53} [style=dotted]; + 51 -> {52}; + 52 -> {53}; 53 -> {54}; - 54 -> {55 56}; - 55 -> {63}; - 56 -> {57}; + 54 -> {55}; + 55 -> {56}; + 56 -> {57 63}; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {62}; - 62 -> {63}; + 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; 63 -> {64}; - 64 -> {65}; - 65 -> {66}; + 64 -> {65 66}; + 65 -> {75}; 66 -> {67}; 67 -> {68}; - - subgraph cluster_15 { - color=red - 69 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 70 [label="Enter block"]; - subgraph cluster_17 { - color=blue - 71 [label="Enter when"]; - subgraph cluster_18 { - color=blue - 72 [label="Enter when branch condition "]; - subgraph cluster_19 { - color=blue - 73 [label="Enter &&"]; - 74 [label="Access variable R|/a|"]; - 75 [label="Const: Null(null)"]; - 76 [label="Equality operator =="]; - 77 [label="Exit left part of &&"]; - 78 [label="Enter right part of &&"]; - 79 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 80 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 81 [label="Stub" style="filled" fillcolor=gray]; - 82 [label="Exit &&"]; - } - 83 [label="Exit when branch condition"]; - } - 84 [label="Synthetic else branch"]; - 85 [label="Enter when branch result"]; - subgraph cluster_20 { - color=blue - 86 [label="Enter block"]; - 87 [label="Access variable R|/a|"]; - 88 [label="Smart cast: R|/a|"]; - 89 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 90 [label="Exit block"]; - } - 91 [label="Exit when branch result"]; - 92 [label="Exit when"]; - } - 93 [label="Access variable R|/a|"]; - 94 [label="Smart cast: R|/a|"]; - 95 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 96 [label="Exit block"]; - } - 97 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; @@ -241,180 +229,215 @@ digraph jumpFromRhsOfOperator_kt { 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {78 82}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {81} [style=dotted]; - 81 -> {82} [style=dotted]; - 82 -> {83}; - 83 -> {84 85}; - 84 -> {92}; + 80 -> {81}; + 81 -> {82}; + + subgraph cluster_22 { + color=red + 83 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_23 { + color=blue + 84 [label="Enter block"]; + subgraph cluster_24 { + color=blue + 85 [label="Enter when"]; + subgraph cluster_25 { + color=blue + 86 [label="Enter when branch condition "]; + subgraph cluster_26 { + color=blue + 87 [label="Enter &&"]; + 88 [label="Access variable R|/a|"]; + 89 [label="Const: Null(null)"]; + 90 [label="Equality operator =="]; + 91 [label="Exit left part of &&"]; + 92 [label="Enter right part of &&"]; + subgraph cluster_27 { + color=blue + 93 [label="Function call arguments enter"]; + 94 [label="Function call arguments exit"]; + } + 95 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 96 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 97 [label="Stub" style="filled" fillcolor=gray]; + 98 [label="Exit &&"]; + } + 99 [label="Exit when branch condition"]; + } + 100 [label="Synthetic else branch"]; + 101 [label="Enter when branch result"]; + subgraph cluster_28 { + color=blue + 102 [label="Enter block"]; + subgraph cluster_29 { + color=blue + 103 [label="Function call arguments enter"]; + 104 [label="Access variable R|/a|"]; + 105 [label="Smart cast: R|/a|"]; + 106 [label="Function call arguments exit"]; + } + 107 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 108 [label="Exit block"]; + } + 109 [label="Exit when branch result"]; + 110 [label="Exit when"]; + } + subgraph cluster_30 { + color=blue + 111 [label="Function call arguments enter"]; + 112 [label="Access variable R|/a|"]; + 113 [label="Smart cast: R|/a|"]; + 114 [label="Function call arguments exit"]; + } + 115 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 116 [label="Exit block"]; + } + 117 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 83 -> {84}; + 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; - 91 -> {92}; + 91 -> {92 98}; 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {97}; - - subgraph cluster_21 { - color=red - 98 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 99 [label="Enter block"]; - subgraph cluster_23 { - color=blue - 100 [label="Enter ||"]; - 101 [label="Access variable R|/a|"]; - 102 [label="Const: Null(null)"]; - 103 [label="Equality operator =="]; - 104 [label="Exit left part of ||"]; - 105 [label="Enter right part of ||"]; - 106 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 107 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 108 [label="Stub" style="filled" fillcolor=gray]; - 109 [label="Exit ||"]; - } - 110 [label="Access variable R|/a|"]; - 111 [label="Smart cast: R|/a|"]; - 112 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 113 [label="Exit block"]; - } - 114 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 96 -> {97} [style=dotted]; + 97 -> {98} [style=dotted]; 98 -> {99}; - 99 -> {100}; - 100 -> {101}; + 99 -> {100 101}; + 100 -> {110}; 101 -> {102}; 102 -> {103}; 103 -> {104}; - 104 -> {105 109}; + 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {108} [style=dotted]; - 108 -> {109} [style=dotted]; + 107 -> {108}; + 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; - - subgraph cluster_24 { - color=red - 115 [label="Enter function teat_6" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 116 [label="Enter block"]; - subgraph cluster_26 { - color=blue - 117 [label="Enter &&"]; - 118 [label="Access variable R|/a|"]; - 119 [label="Const: Null(null)"]; - 120 [label="Equality operator !="]; - 121 [label="Exit left part of &&"]; - 122 [label="Enter right part of &&"]; - 123 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 124 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 125 [label="Stub" style="filled" fillcolor=gray]; - 126 [label="Exit &&"]; - } - 127 [label="Access variable R|/a|"]; - 128 [label="Smart cast: R|/a|"]; - 129 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 130 [label="Exit block"]; - } - 131 [label="Exit function teat_6" style="filled" fillcolor=red]; - } + 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {118}; + + subgraph cluster_31 { + color=red + 118 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 119 [label="Enter block"]; + subgraph cluster_33 { + color=blue + 120 [label="Enter ||"]; + 121 [label="Access variable R|/a|"]; + 122 [label="Const: Null(null)"]; + 123 [label="Equality operator =="]; + 124 [label="Exit left part of ||"]; + 125 [label="Enter right part of ||"]; + subgraph cluster_34 { + color=blue + 126 [label="Function call arguments enter"]; + 127 [label="Function call arguments exit"]; + } + 128 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 129 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 130 [label="Stub" style="filled" fillcolor=gray]; + 131 [label="Exit ||"]; + } + subgraph cluster_35 { + color=blue + 132 [label="Function call arguments enter"]; + 133 [label="Access variable R|/a|"]; + 134 [label="Smart cast: R|/a|"]; + 135 [label="Function call arguments exit"]; + } + 136 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 137 [label="Exit block"]; + } + 138 [label="Exit function test_5" style="filled" fillcolor=red]; + } 118 -> {119}; 119 -> {120}; 120 -> {121}; - 121 -> {122 126}; + 121 -> {122}; 122 -> {123}; 123 -> {124}; - 124 -> {125} [style=dotted]; - 125 -> {126} [style=dotted]; + 124 -> {125 131}; + 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; - 129 -> {130}; - 130 -> {131}; - - subgraph cluster_27 { - color=red - 132 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 133 [label="Enter block"]; - subgraph cluster_29 { - color=blue - 134 [label="Enter when"]; - subgraph cluster_30 { - color=blue - 135 [label="Enter when branch condition "]; - subgraph cluster_31 { - color=blue - 136 [label="Enter ||"]; - 137 [label="Access variable R|/a|"]; - 138 [label="Const: Null(null)"]; - 139 [label="Equality operator =="]; - 140 [label="Exit left part of ||"]; - 141 [label="Enter right part of ||"]; - 142 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 143 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 144 [label="Stub" style="filled" fillcolor=gray]; - 145 [label="Exit ||"]; - } - 146 [label="Exit when branch condition"]; - } - 147 [label="Synthetic else branch"]; - 148 [label="Enter when branch result"]; - subgraph cluster_32 { - color=blue - 149 [label="Enter block"]; - 150 [label="Access variable R|/a|"]; - 151 [label="Smart cast: R|/a|"]; - 152 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 153 [label="Exit block"]; - } - 154 [label="Exit when branch result"]; - 155 [label="Exit when"]; - } - 156 [label="Access variable R|/a|"]; - 157 [label="Smart cast: R|/a|"]; - 158 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 159 [label="Exit block"]; - } - 160 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 129 -> {130} [style=dotted]; + 130 -> {131} [style=dotted]; + 131 -> {132}; 132 -> {133}; 133 -> {134}; 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; - 138 -> {139}; + + subgraph cluster_36 { + color=red + 139 [label="Enter function teat_6" style="filled" fillcolor=red]; + subgraph cluster_37 { + color=blue + 140 [label="Enter block"]; + subgraph cluster_38 { + color=blue + 141 [label="Enter &&"]; + 142 [label="Access variable R|/a|"]; + 143 [label="Const: Null(null)"]; + 144 [label="Equality operator !="]; + 145 [label="Exit left part of &&"]; + 146 [label="Enter right part of &&"]; + subgraph cluster_39 { + color=blue + 147 [label="Function call arguments enter"]; + 148 [label="Function call arguments exit"]; + } + 149 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 150 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 151 [label="Stub" style="filled" fillcolor=gray]; + 152 [label="Exit &&"]; + } + subgraph cluster_40 { + color=blue + 153 [label="Function call arguments enter"]; + 154 [label="Access variable R|/a|"]; + 155 [label="Smart cast: R|/a|"]; + 156 [label="Function call arguments exit"]; + } + 157 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 158 [label="Exit block"]; + } + 159 [label="Exit function teat_6" style="filled" fillcolor=red]; + } 139 -> {140}; - 140 -> {141 145}; + 140 -> {141}; 141 -> {142}; 142 -> {143}; - 143 -> {144} [style=dotted]; - 144 -> {145} [style=dotted]; - 145 -> {146}; - 146 -> {147 148}; - 147 -> {155}; + 143 -> {144}; + 144 -> {145}; + 145 -> {146 152}; + 146 -> {147}; + 147 -> {148}; 148 -> {149}; 149 -> {150}; - 150 -> {151}; - 151 -> {152}; + 150 -> {151} [style=dotted]; + 151 -> {152} [style=dotted]; 152 -> {153}; 153 -> {154}; 154 -> {155}; @@ -422,55 +445,70 @@ digraph jumpFromRhsOfOperator_kt { 156 -> {157}; 157 -> {158}; 158 -> {159}; - 159 -> {160}; - subgraph cluster_33 { + subgraph cluster_41 { color=red - 161 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_34 { + 160 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_42 { color=blue - 162 [label="Enter block"]; - subgraph cluster_35 { + 161 [label="Enter block"]; + subgraph cluster_43 { color=blue - 163 [label="Enter when"]; - subgraph cluster_36 { + 162 [label="Enter when"]; + subgraph cluster_44 { color=blue - 164 [label="Enter when branch condition "]; - subgraph cluster_37 { + 163 [label="Enter when branch condition "]; + subgraph cluster_45 { color=blue - 165 [label="Enter &&"]; - 166 [label="Access variable R|/a|"]; - 167 [label="Const: Null(null)"]; - 168 [label="Equality operator !="]; - 169 [label="Exit left part of &&"]; - 170 [label="Enter right part of &&"]; - 171 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 172 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 173 [label="Stub" style="filled" fillcolor=gray]; - 174 [label="Exit &&"]; + 164 [label="Enter ||"]; + 165 [label="Access variable R|/a|"]; + 166 [label="Const: Null(null)"]; + 167 [label="Equality operator =="]; + 168 [label="Exit left part of ||"]; + 169 [label="Enter right part of ||"]; + subgraph cluster_46 { + color=blue + 170 [label="Function call arguments enter"]; + 171 [label="Function call arguments exit"]; + } + 172 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 173 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 174 [label="Stub" style="filled" fillcolor=gray]; + 175 [label="Exit ||"]; } - 175 [label="Exit when branch condition"]; + 176 [label="Exit when branch condition"]; } - 176 [label="Synthetic else branch"]; - 177 [label="Enter when branch result"]; - subgraph cluster_38 { + 177 [label="Synthetic else branch"]; + 178 [label="Enter when branch result"]; + subgraph cluster_47 { color=blue - 178 [label="Enter block"]; - 179 [label="Access variable R|/a|"]; - 180 [label="Smart cast: R|/a|"]; - 181 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 182 [label="Exit block"]; + 179 [label="Enter block"]; + subgraph cluster_48 { + color=blue + 180 [label="Function call arguments enter"]; + 181 [label="Access variable R|/a|"]; + 182 [label="Smart cast: R|/a|"]; + 183 [label="Function call arguments exit"]; + } + 184 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 185 [label="Exit block"]; } - 183 [label="Exit when branch result"]; - 184 [label="Exit when"]; + 186 [label="Exit when branch result"]; + 187 [label="Exit when"]; } - 185 [label="Access variable R|/a|"]; - 186 [label="Smart cast: R|/a|"]; - 187 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 188 [label="Exit block"]; + subgraph cluster_49 { + color=blue + 188 [label="Function call arguments enter"]; + 189 [label="Access variable R|/a|"]; + 190 [label="Smart cast: R|/a|"]; + 191 [label="Function call arguments exit"]; + } + 192 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 193 [label="Exit block"]; } - 189 [label="Exit function test_8" style="filled" fillcolor=red]; + 194 [label="Exit function test_7" style="filled" fillcolor=red]; } + 160 -> {161}; 161 -> {162}; 162 -> {163}; 163 -> {164}; @@ -478,16 +516,16 @@ digraph jumpFromRhsOfOperator_kt { 165 -> {166}; 166 -> {167}; 167 -> {168}; - 168 -> {169}; - 169 -> {170 174}; + 168 -> {169 175}; + 169 -> {170}; 170 -> {171}; 171 -> {172}; - 172 -> {173} [style=dotted]; + 172 -> {173}; 173 -> {174} [style=dotted]; - 174 -> {175}; - 175 -> {176 177}; - 176 -> {184}; - 177 -> {178}; + 174 -> {175} [style=dotted]; + 175 -> {176}; + 176 -> {177 178}; + 177 -> {187}; 178 -> {179}; 179 -> {180}; 180 -> {181}; @@ -499,5 +537,107 @@ digraph jumpFromRhsOfOperator_kt { 186 -> {187}; 187 -> {188}; 188 -> {189}; + 189 -> {190}; + 190 -> {191}; + 191 -> {192}; + 192 -> {193}; + 193 -> {194}; + + subgraph cluster_50 { + color=red + 195 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_51 { + color=blue + 196 [label="Enter block"]; + subgraph cluster_52 { + color=blue + 197 [label="Enter when"]; + subgraph cluster_53 { + color=blue + 198 [label="Enter when branch condition "]; + subgraph cluster_54 { + color=blue + 199 [label="Enter &&"]; + 200 [label="Access variable R|/a|"]; + 201 [label="Const: Null(null)"]; + 202 [label="Equality operator !="]; + 203 [label="Exit left part of &&"]; + 204 [label="Enter right part of &&"]; + subgraph cluster_55 { + color=blue + 205 [label="Function call arguments enter"]; + 206 [label="Function call arguments exit"]; + } + 207 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 208 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 209 [label="Stub" style="filled" fillcolor=gray]; + 210 [label="Exit &&"]; + } + 211 [label="Exit when branch condition"]; + } + 212 [label="Synthetic else branch"]; + 213 [label="Enter when branch result"]; + subgraph cluster_56 { + color=blue + 214 [label="Enter block"]; + subgraph cluster_57 { + color=blue + 215 [label="Function call arguments enter"]; + 216 [label="Access variable R|/a|"]; + 217 [label="Smart cast: R|/a|"]; + 218 [label="Function call arguments exit"]; + } + 219 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 220 [label="Exit block"]; + } + 221 [label="Exit when branch result"]; + 222 [label="Exit when"]; + } + subgraph cluster_58 { + color=blue + 223 [label="Function call arguments enter"]; + 224 [label="Access variable R|/a|"]; + 225 [label="Smart cast: R|/a|"]; + 226 [label="Function call arguments exit"]; + } + 227 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 228 [label="Exit block"]; + } + 229 [label="Exit function test_8" style="filled" fillcolor=red]; + } + 195 -> {196}; + 196 -> {197}; + 197 -> {198}; + 198 -> {199}; + 199 -> {200}; + 200 -> {201}; + 201 -> {202}; + 202 -> {203}; + 203 -> {204 210}; + 204 -> {205}; + 205 -> {206}; + 206 -> {207}; + 207 -> {208}; + 208 -> {209} [style=dotted]; + 209 -> {210} [style=dotted]; + 210 -> {211}; + 211 -> {212 213}; + 212 -> {222}; + 213 -> {214}; + 214 -> {215}; + 215 -> {216}; + 216 -> {217}; + 217 -> {218}; + 218 -> {219}; + 219 -> {220}; + 220 -> {221}; + 221 -> {222}; + 222 -> {223}; + 223 -> {224}; + 224 -> {225}; + 225 -> {226}; + 226 -> {227}; + 227 -> {228}; + 228 -> {229}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot index 9029e96f683..0a24f9c9681 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot @@ -61,20 +61,30 @@ digraph boundSmartcasts_kt { subgraph cluster_9 { color=blue 21 [label="Enter block"]; - 22 [label="Access variable R|/x|"]; - 23 [label="Smart cast: R|/x|"]; - 24 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 25 [label="Access variable R|/y|"]; - 26 [label="Smart cast: R|/y|"]; - 27 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; + subgraph cluster_10 { + color=blue + 22 [label="Function call arguments enter"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Smart cast: R|/x|"]; + 25 [label="Function call arguments exit"]; + } + 26 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_11 { + color=blue + 27 [label="Function call arguments enter"]; + 28 [label="Access variable R|/y|"]; + 29 [label="Smart cast: R|/y|"]; + 30 [label="Function call arguments exit"]; + } + 31 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 29 [label="Exit when branch result"]; - 30 [label="Exit when"]; + 33 [label="Exit when branch result"]; + 34 [label="Exit when"]; } - 31 [label="Exit block"]; + 35 [label="Exit block"]; } - 32 [label="Exit function test_1" style="filled" fillcolor=red]; + 36 [label="Exit function test_1" style="filled" fillcolor=red]; } 10 -> {11}; 11 -> {12}; @@ -85,7 +95,7 @@ digraph boundSmartcasts_kt { 16 -> {17}; 17 -> {18}; 18 -> {19 20}; - 19 -> {30}; + 19 -> {34}; 20 -> {21}; 21 -> {22}; 22 -> {23}; @@ -98,59 +108,69 @@ digraph boundSmartcasts_kt { 29 -> {30}; 30 -> {31}; 31 -> {32}; - - subgraph cluster_10 { - color=red - 33 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 34 [label="Enter block"]; - 35 [label="Access variable R|/x|"]; - 36 [label="Variable declaration: lval y: R|kotlin/Any|"]; - subgraph cluster_12 { - color=blue - 37 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 38 [label="Enter when branch condition "]; - 39 [label="Access variable R|/y|"]; - 40 [label="Type operator: (R|/y| is R|A|)"]; - 41 [label="Exit when branch condition"]; - } - 42 [label="Synthetic else branch"]; - 43 [label="Enter when branch result"]; - subgraph cluster_14 { - color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/x|"]; - 46 [label="Smart cast: R|/x|"]; - 47 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 48 [label="Access variable R|/y|"]; - 49 [label="Smart cast: R|/y|"]; - 50 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 51 [label="Exit block"]; - } - 52 [label="Exit when branch result"]; - 53 [label="Exit when"]; - } - 54 [label="Exit block"]; - } - 55 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37}; + + subgraph cluster_12 { + color=red + 37 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 38 [label="Enter block"]; + 39 [label="Access variable R|/x|"]; + 40 [label="Variable declaration: lval y: R|kotlin/Any|"]; + subgraph cluster_14 { + color=blue + 41 [label="Enter when"]; + subgraph cluster_15 { + color=blue + 42 [label="Enter when branch condition "]; + 43 [label="Access variable R|/y|"]; + 44 [label="Type operator: (R|/y| is R|A|)"]; + 45 [label="Exit when branch condition"]; + } + 46 [label="Synthetic else branch"]; + 47 [label="Enter when branch result"]; + subgraph cluster_16 { + color=blue + 48 [label="Enter block"]; + subgraph cluster_17 { + color=blue + 49 [label="Function call arguments enter"]; + 50 [label="Access variable R|/x|"]; + 51 [label="Smart cast: R|/x|"]; + 52 [label="Function call arguments exit"]; + } + 53 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_18 { + color=blue + 54 [label="Function call arguments enter"]; + 55 [label="Access variable R|/y|"]; + 56 [label="Smart cast: R|/y|"]; + 57 [label="Function call arguments exit"]; + } + 58 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 59 [label="Exit block"]; + } + 60 [label="Exit when branch result"]; + 61 [label="Exit when"]; + } + 62 [label="Exit block"]; + } + 63 [label="Exit function test_2" style="filled" fillcolor=red]; + } 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {42 43}; - 42 -> {53}; + 41 -> {42}; + 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {46}; - 46 -> {47}; + 45 -> {46 47}; + 46 -> {61}; 47 -> {48}; 48 -> {49}; 49 -> {50}; @@ -159,70 +179,7 @@ digraph boundSmartcasts_kt { 52 -> {53}; 53 -> {54}; 54 -> {55}; - - subgraph cluster_15 { - color=red - 56 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 57 [label="Enter block"]; - 58 [label="Access variable R|/x|"]; - 59 [label="Variable declaration: lvar z: R|kotlin/Any|"]; - subgraph cluster_17 { - color=blue - 60 [label="Enter when"]; - subgraph cluster_18 { - color=blue - 61 [label="Enter when branch condition "]; - 62 [label="Access variable R|/x|"]; - 63 [label="Type operator: (R|/x| is R|A|)"]; - 64 [label="Exit when branch condition"]; - } - 65 [label="Synthetic else branch"]; - 66 [label="Enter when branch result"]; - subgraph cluster_19 { - color=blue - 67 [label="Enter block"]; - 68 [label="Access variable R|/z|"]; - 69 [label="Smart cast: R|/z|"]; - 70 [label="Function call: R|/z|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 71 [label="Exit block"]; - } - 72 [label="Exit when branch result"]; - 73 [label="Exit when"]; - } - 74 [label="Access variable R|/y|"]; - 75 [label="Assignment: R|/z|"]; - subgraph cluster_20 { - color=blue - 76 [label="Enter when"]; - subgraph cluster_21 { - color=blue - 77 [label="Enter when branch condition "]; - 78 [label="Access variable R|/y|"]; - 79 [label="Type operator: (R|/y| is R|B|)"]; - 80 [label="Exit when branch condition"]; - } - 81 [label="Synthetic else branch"]; - 82 [label="Enter when branch result"]; - subgraph cluster_22 { - color=blue - 83 [label="Enter block"]; - 84 [label="Access variable R|/z|"]; - 85 [label="Smart cast: R|/z|"]; - 86 [label="Function call: R|/z|.#()" style="filled" fillcolor=yellow]; - 87 [label="Access variable R|/z|"]; - 88 [label="Smart cast: R|/z|"]; - 89 [label="Function call: R|/z|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 90 [label="Exit block"]; - } - 91 [label="Exit when branch result"]; - 92 [label="Exit when"]; - } - 93 [label="Exit block"]; - } - 94 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; @@ -230,25 +187,103 @@ digraph boundSmartcasts_kt { 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {64}; - 64 -> {65 66}; - 65 -> {73}; + + subgraph cluster_19 { + color=red + 64 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 65 [label="Enter block"]; + 66 [label="Access variable R|/x|"]; + 67 [label="Variable declaration: lvar z: R|kotlin/Any|"]; + subgraph cluster_21 { + color=blue + 68 [label="Enter when"]; + subgraph cluster_22 { + color=blue + 69 [label="Enter when branch condition "]; + 70 [label="Access variable R|/x|"]; + 71 [label="Type operator: (R|/x| is R|A|)"]; + 72 [label="Exit when branch condition"]; + } + 73 [label="Synthetic else branch"]; + 74 [label="Enter when branch result"]; + subgraph cluster_23 { + color=blue + 75 [label="Enter block"]; + subgraph cluster_24 { + color=blue + 76 [label="Function call arguments enter"]; + 77 [label="Access variable R|/z|"]; + 78 [label="Smart cast: R|/z|"]; + 79 [label="Function call arguments exit"]; + } + 80 [label="Function call: R|/z|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 81 [label="Exit block"]; + } + 82 [label="Exit when branch result"]; + 83 [label="Exit when"]; + } + 84 [label="Access variable R|/y|"]; + 85 [label="Assignment: R|/z|"]; + subgraph cluster_25 { + color=blue + 86 [label="Enter when"]; + subgraph cluster_26 { + color=blue + 87 [label="Enter when branch condition "]; + 88 [label="Access variable R|/y|"]; + 89 [label="Type operator: (R|/y| is R|B|)"]; + 90 [label="Exit when branch condition"]; + } + 91 [label="Synthetic else branch"]; + 92 [label="Enter when branch result"]; + subgraph cluster_27 { + color=blue + 93 [label="Enter block"]; + subgraph cluster_28 { + color=blue + 94 [label="Function call arguments enter"]; + 95 [label="Access variable R|/z|"]; + 96 [label="Smart cast: R|/z|"]; + 97 [label="Function call arguments exit"]; + } + 98 [label="Function call: R|/z|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_29 { + color=blue + 99 [label="Function call arguments enter"]; + 100 [label="Access variable R|/z|"]; + 101 [label="Smart cast: R|/z|"]; + 102 [label="Function call arguments exit"]; + } + 103 [label="Function call: R|/z|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 104 [label="Exit block"]; + } + 105 [label="Exit when branch result"]; + 106 [label="Exit when"]; + } + 107 [label="Exit block"]; + } + 108 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 64 -> {65}; + 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {73}; - 73 -> {74}; + 72 -> {73 74}; + 73 -> {83}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {81 82}; - 81 -> {92}; + 80 -> {81}; + 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; @@ -257,58 +292,11 @@ digraph boundSmartcasts_kt { 87 -> {88}; 88 -> {89}; 89 -> {90}; - 90 -> {91}; - 91 -> {92}; + 90 -> {91 92}; + 91 -> {106}; 92 -> {93}; 93 -> {94}; - - subgraph cluster_23 { - color=red - 95 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 96 [label="Enter block"]; - 97 [label="Const: Int(1)"]; - 98 [label="Variable declaration: lvar x: R|kotlin/Any|"]; - 99 [label="Access variable R|/x|"]; - 100 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 101 [label="Access variable R|/x|"]; - 102 [label="Smart cast: R|/x|"]; - 103 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 104 [label="Access variable R|/y|"]; - 105 [label="Assignment: R|/x|"]; - 106 [label="Access variable R|/x|"]; - 107 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - subgraph cluster_25 { - color=blue - 108 [label="Enter when"]; - subgraph cluster_26 { - color=blue - 109 [label="Enter when branch condition "]; - 110 [label="Access variable R|/y|"]; - 111 [label="Type operator: (R|/y| is R|A|)"]; - 112 [label="Exit when branch condition"]; - } - 113 [label="Synthetic else branch"]; - 114 [label="Enter when branch result"]; - subgraph cluster_27 { - color=blue - 115 [label="Enter block"]; - 116 [label="Access variable R|/x|"]; - 117 [label="Smart cast: R|/x|"]; - 118 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 119 [label="Access variable R|/y|"]; - 120 [label="Smart cast: R|/y|"]; - 121 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 122 [label="Exit block"]; - } - 123 [label="Exit when branch result"]; - 124 [label="Exit when"]; - } - 125 [label="Exit block"]; - } - 126 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; @@ -322,12 +310,79 @@ digraph boundSmartcasts_kt { 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {109}; + + subgraph cluster_30 { + color=red + 109 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 110 [label="Enter block"]; + 111 [label="Const: Int(1)"]; + 112 [label="Variable declaration: lvar x: R|kotlin/Any|"]; + 113 [label="Access variable R|/x|"]; + 114 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + subgraph cluster_32 { + color=blue + 115 [label="Function call arguments enter"]; + 116 [label="Access variable R|/x|"]; + 117 [label="Smart cast: R|/x|"]; + 118 [label="Function call arguments exit"]; + } + 119 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 120 [label="Access variable R|/y|"]; + 121 [label="Assignment: R|/x|"]; + subgraph cluster_33 { + color=blue + 122 [label="Function call arguments enter"]; + 123 [label="Access variable R|/x|"]; + 124 [label="Function call arguments exit"]; + } + 125 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_34 { + color=blue + 126 [label="Enter when"]; + subgraph cluster_35 { + color=blue + 127 [label="Enter when branch condition "]; + 128 [label="Access variable R|/y|"]; + 129 [label="Type operator: (R|/y| is R|A|)"]; + 130 [label="Exit when branch condition"]; + } + 131 [label="Synthetic else branch"]; + 132 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 133 [label="Enter block"]; + subgraph cluster_37 { + color=blue + 134 [label="Function call arguments enter"]; + 135 [label="Access variable R|/x|"]; + 136 [label="Smart cast: R|/x|"]; + 137 [label="Function call arguments exit"]; + } + 138 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_38 { + color=blue + 139 [label="Function call arguments enter"]; + 140 [label="Access variable R|/y|"]; + 141 [label="Smart cast: R|/y|"]; + 142 [label="Function call arguments exit"]; + } + 143 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 144 [label="Exit block"]; + } + 145 [label="Exit when branch result"]; + 146 [label="Exit when"]; + } + 147 [label="Exit block"]; + } + 148 [label="Exit function test_4" style="filled" fillcolor=red]; + } 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113 114}; - 113 -> {124}; + 112 -> {113}; + 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; @@ -340,135 +395,124 @@ digraph boundSmartcasts_kt { 123 -> {124}; 124 -> {125}; 125 -> {126}; - - subgraph cluster_28 { - color=red - 127 [label="Enter class D" style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 128 [label="Enter property" style="filled" fillcolor=red]; - 129 [label="Access variable R|/any|"]; - 130 [label="Exit property" style="filled" fillcolor=red]; - } - subgraph cluster_30 { - color=blue - 131 [label="Enter function " style="filled" fillcolor=red]; - 132 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 133 [label="Exit function " style="filled" fillcolor=red]; - } - 134 [label="Exit class D" style="filled" fillcolor=red]; - } - 127 -> {128} [color=green]; - 127 -> {134} [style=dotted]; - 127 -> {128 131} [style=dashed]; + 126 -> {127}; + 127 -> {128}; 128 -> {129}; 129 -> {130}; - 130 -> {131} [color=green]; - 131 -> {132}; + 130 -> {131 132}; + 131 -> {146}; 132 -> {133}; - 133 -> {134} [color=green]; - - subgraph cluster_31 { - color=red - 135 [label="Enter function baz" style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 136 [label="Enter block"]; - 137 [label="Exit block"]; - } - 138 [label="Exit function baz" style="filled" fillcolor=red]; - } + 133 -> {134}; + 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; - - subgraph cluster_33 { - color=red - 139 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_34 { - color=blue - 140 [label="Enter block"]; - 141 [label="Access variable R|/d|"]; - 142 [label="Access variable R|/D.any|"]; - 143 [label="Exit lhs of ?:"]; - 144 [label="Enter rhs of ?:"]; - 145 [label="Jump: ^test_5 Unit"]; - 146 [label="Stub" style="filled" fillcolor=gray]; - 147 [label="Lhs of ?: is not null"]; - 148 [label="Exit ?:"]; - 149 [label="Variable declaration: lval a: R|kotlin/Any|"]; - 150 [label="Access variable R|/a|"]; - 151 [label="Function call: R|/a|.R|/baz|()" style="filled" fillcolor=yellow]; - 152 [label="Access variable R|/d|"]; - 153 [label="Access variable R|/D.any|"]; - 154 [label="Smart cast: R|/d|.R|/D.any|"]; - 155 [label="Function call: R|/d|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow]; - 156 [label="Access variable R|/a|"]; - 157 [label="Type operator: (R|/a| as R|A|)"]; - 158 [label="Access variable R|/a|"]; - 159 [label="Smart cast: R|/a|"]; - 160 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 161 [label="Exit block"]; - } - 162 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 138 -> {139}; 139 -> {140}; 140 -> {141}; 141 -> {142}; 142 -> {143}; - 143 -> {144 147}; + 143 -> {144}; 144 -> {145}; - 145 -> {162}; - 145 -> {146} [style=dotted]; - 146 -> {148} [style=dotted]; + 145 -> {146}; + 146 -> {147}; 147 -> {148}; - 148 -> {149}; - 149 -> {150}; + + subgraph cluster_39 { + color=red + 149 [label="Enter class D" style="filled" fillcolor=red]; + subgraph cluster_40 { + color=blue + 150 [label="Enter property" style="filled" fillcolor=red]; + 151 [label="Access variable R|/any|"]; + 152 [label="Exit property" style="filled" fillcolor=red]; + } + subgraph cluster_41 { + color=blue + 153 [label="Enter function " style="filled" fillcolor=red]; + 154 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 155 [label="Exit function " style="filled" fillcolor=red]; + } + 156 [label="Exit class D" style="filled" fillcolor=red]; + } + 149 -> {150} [color=green]; + 149 -> {156} [style=dotted]; + 149 -> {150 153} [style=dashed]; 150 -> {151}; 151 -> {152}; - 152 -> {153}; + 152 -> {153} [color=green]; 153 -> {154}; 154 -> {155}; - 155 -> {156}; - 156 -> {157}; + 155 -> {156} [color=green]; + + subgraph cluster_42 { + color=red + 157 [label="Enter function baz" style="filled" fillcolor=red]; + subgraph cluster_43 { + color=blue + 158 [label="Enter block"]; + 159 [label="Exit block"]; + } + 160 [label="Exit function baz" style="filled" fillcolor=red]; + } 157 -> {158}; 158 -> {159}; 159 -> {160}; - 160 -> {161}; - 161 -> {162}; - subgraph cluster_35 { + subgraph cluster_44 { color=red - 163 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_36 { + 161 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_45 { color=blue - 164 [label="Enter block"]; - 165 [label="Access variable R|/d1|"]; - 166 [label="Access variable R|/D.any|"]; - 167 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 168 [label="Access variable R|/a|"]; - 169 [label="Type operator: (R|/a| as R|A|)"]; - 170 [label="Access variable R|/a|"]; - 171 [label="Smart cast: R|/a|"]; - 172 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 173 [label="Access variable R|/d1|"]; - 174 [label="Access variable R|/D.any|"]; - 175 [label="Smart cast: R|/d1|.R|/D.any|"]; - 176 [label="Function call: R|/d1|.R|/D.any|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 177 [label="Access variable R|/d1|"]; - 178 [label="Access variable R|/D.any|"]; - 179 [label="Smart cast: R|/d1|.R|/D.any|"]; - 180 [label="Function call: R|/d1|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow]; - 181 [label="Exit block"]; + 162 [label="Enter block"]; + 163 [label="Access variable R|/d|"]; + 164 [label="Access variable R|/D.any|"]; + 165 [label="Exit lhs of ?:"]; + 166 [label="Enter rhs of ?:"]; + 167 [label="Jump: ^test_5 Unit"]; + 168 [label="Stub" style="filled" fillcolor=gray]; + 169 [label="Lhs of ?: is not null"]; + 170 [label="Exit ?:"]; + 171 [label="Variable declaration: lval a: R|kotlin/Any|"]; + subgraph cluster_46 { + color=blue + 172 [label="Function call arguments enter"]; + 173 [label="Access variable R|/a|"]; + 174 [label="Function call arguments exit"]; + } + 175 [label="Function call: R|/a|.R|/baz|()" style="filled" fillcolor=yellow]; + subgraph cluster_47 { + color=blue + 176 [label="Function call arguments enter"]; + 177 [label="Access variable R|/d|"]; + 178 [label="Access variable R|/D.any|"]; + 179 [label="Smart cast: R|/d|.R|/D.any|"]; + 180 [label="Function call arguments exit"]; + } + 181 [label="Function call: R|/d|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow]; + 182 [label="Access variable R|/a|"]; + 183 [label="Type operator: (R|/a| as R|A|)"]; + subgraph cluster_48 { + color=blue + 184 [label="Function call arguments enter"]; + 185 [label="Access variable R|/a|"]; + 186 [label="Smart cast: R|/a|"]; + 187 [label="Function call arguments exit"]; + } + 188 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 189 [label="Exit block"]; } - 182 [label="Exit function test_6" style="filled" fillcolor=red]; + 190 [label="Exit function test_5" style="filled" fillcolor=red]; } + 161 -> {162}; + 162 -> {163}; 163 -> {164}; 164 -> {165}; - 165 -> {166}; + 165 -> {166 169}; 166 -> {167}; - 167 -> {168}; - 168 -> {169}; + 167 -> {190}; + 167 -> {168} [style=dotted]; + 168 -> {170} [style=dotted]; 169 -> {170}; 170 -> {171}; 171 -> {172}; @@ -482,45 +526,56 @@ digraph boundSmartcasts_kt { 179 -> {180}; 180 -> {181}; 181 -> {182}; - - subgraph cluster_37 { - color=red - 183 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 184 [label="Enter block"]; - 185 [label="Access variable R|/d1|"]; - 186 [label="Enter safe call"]; - 187 [label="Access variable R|/D.any|"]; - 188 [label="Exit safe call"]; - 189 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 190 [label="Access variable R|/d2|"]; - 191 [label="Enter safe call"]; - 192 [label="Access variable R|/D.any|"]; - 193 [label="Exit safe call"]; - 194 [label="Variable declaration: lval b: R|kotlin/Any?|"]; - 195 [label="Access variable R|/a|"]; - 196 [label="Type operator: (R|/a| as R|A|)"]; - 197 [label="Access variable R|/a|"]; - 198 [label="Smart cast: R|/a|"]; - 199 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 200 [label="Access variable R|/b|"]; - 201 [label="Type operator: (R|/b| as R|B|)"]; - 202 [label="Access variable R|/b|"]; - 203 [label="Smart cast: R|/b|"]; - 204 [label="Function call: R|/b|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 205 [label="Exit block"]; - } - 206 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 182 -> {183}; 183 -> {184}; 184 -> {185}; - 185 -> {186 188}; + 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; 189 -> {190}; - 190 -> {191 193}; + + subgraph cluster_49 { + color=red + 191 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_50 { + color=blue + 192 [label="Enter block"]; + 193 [label="Access variable R|/d1|"]; + 194 [label="Access variable R|/D.any|"]; + 195 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + 196 [label="Access variable R|/a|"]; + 197 [label="Type operator: (R|/a| as R|A|)"]; + subgraph cluster_51 { + color=blue + 198 [label="Function call arguments enter"]; + 199 [label="Access variable R|/a|"]; + 200 [label="Smart cast: R|/a|"]; + 201 [label="Function call arguments exit"]; + } + 202 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_52 { + color=blue + 203 [label="Function call arguments enter"]; + 204 [label="Access variable R|/d1|"]; + 205 [label="Access variable R|/D.any|"]; + 206 [label="Smart cast: R|/d1|.R|/D.any|"]; + 207 [label="Function call arguments exit"]; + } + 208 [label="Function call: R|/d1|.R|/D.any|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_53 { + color=blue + 209 [label="Function call arguments enter"]; + 210 [label="Access variable R|/d1|"]; + 211 [label="Access variable R|/D.any|"]; + 212 [label="Smart cast: R|/d1|.R|/D.any|"]; + 213 [label="Function call arguments exit"]; + } + 214 [label="Function call: R|/d1|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow]; + 215 [label="Exit block"]; + } + 216 [label="Exit function test_6" style="filled" fillcolor=red]; + } 191 -> {192}; 192 -> {193}; 193 -> {194}; @@ -536,5 +591,83 @@ digraph boundSmartcasts_kt { 203 -> {204}; 204 -> {205}; 205 -> {206}; + 206 -> {207}; + 207 -> {208}; + 208 -> {209}; + 209 -> {210}; + 210 -> {211}; + 211 -> {212}; + 212 -> {213}; + 213 -> {214}; + 214 -> {215}; + 215 -> {216}; + + subgraph cluster_54 { + color=red + 217 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_55 { + color=blue + 218 [label="Enter block"]; + 219 [label="Access variable R|/d1|"]; + 220 [label="Enter safe call"]; + 221 [label="Access variable R|/D.any|"]; + 222 [label="Exit safe call"]; + 223 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + 224 [label="Access variable R|/d2|"]; + 225 [label="Enter safe call"]; + 226 [label="Access variable R|/D.any|"]; + 227 [label="Exit safe call"]; + 228 [label="Variable declaration: lval b: R|kotlin/Any?|"]; + 229 [label="Access variable R|/a|"]; + 230 [label="Type operator: (R|/a| as R|A|)"]; + subgraph cluster_56 { + color=blue + 231 [label="Function call arguments enter"]; + 232 [label="Access variable R|/a|"]; + 233 [label="Smart cast: R|/a|"]; + 234 [label="Function call arguments exit"]; + } + 235 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 236 [label="Access variable R|/b|"]; + 237 [label="Type operator: (R|/b| as R|B|)"]; + subgraph cluster_57 { + color=blue + 238 [label="Function call arguments enter"]; + 239 [label="Access variable R|/b|"]; + 240 [label="Smart cast: R|/b|"]; + 241 [label="Function call arguments exit"]; + } + 242 [label="Function call: R|/b|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 243 [label="Exit block"]; + } + 244 [label="Exit function test_7" style="filled" fillcolor=red]; + } + 217 -> {218}; + 218 -> {219}; + 219 -> {220 222}; + 220 -> {221}; + 221 -> {222}; + 222 -> {223}; + 223 -> {224}; + 224 -> {225 227}; + 225 -> {226}; + 226 -> {227}; + 227 -> {228}; + 228 -> {229}; + 229 -> {230}; + 230 -> {231}; + 231 -> {232}; + 232 -> {233}; + 233 -> {234}; + 234 -> {235}; + 235 -> {236}; + 236 -> {237}; + 237 -> {238}; + 238 -> {239}; + 239 -> {240}; + 240 -> {241}; + 241 -> {242}; + 242 -> {243}; + 243 -> {244}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot index ce1f4541ac6..de1a441a08d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot @@ -48,72 +48,87 @@ digraph boundSmartcastsInBranches_kt { subgraph cluster_6 { color=blue 14 [label="Enter block"]; - 15 [label="Access variable R|/list|"]; - 16 [label="Function call: R|/list|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; - 17 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; subgraph cluster_7 { color=blue - 18 [label="Enter while loop"]; - subgraph cluster_8 { - color=blue - 19 [label="Enter loop condition"]; - 20 [label="Access variable R|/|"]; - 21 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 22 [label="Exit loop condition"]; - } + 15 [label="Function call arguments enter"]; + 16 [label="Access variable R|/list|"]; + 17 [label="Function call arguments exit"]; + } + 18 [label="Function call: R|/list|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; + 19 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; + subgraph cluster_8 { + color=blue + 20 [label="Enter while loop"]; subgraph cluster_9 { color=blue - 23 [label="Enter loop block"]; + 21 [label="Enter loop condition"]; subgraph cluster_10 { color=blue - 24 [label="Enter block"]; - 25 [label="Access variable R|/|"]; - 26 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 27 [label="Variable declaration: lval a: R|A|"]; - subgraph cluster_11 { - color=blue - 28 [label="Enter block"]; - subgraph cluster_12 { - color=blue - 29 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 30 [label="Enter when branch condition "]; - 31 [label="Access variable R|/goodA|"]; - 32 [label="Const: Null(null)"]; - 33 [label="Equality operator =="]; - 34 [label="Exit when branch condition"]; - } - 35 [label="Synthetic else branch"]; - 36 [label="Enter when branch result"]; - subgraph cluster_14 { - color=blue - 37 [label="Enter block"]; - 38 [label="Access variable R|/a|"]; - 39 [label="Assignment: R|/goodA|"]; - 40 [label="Jump: continue@@@[R|/|.R|SubstitutionOverride|()] "]; - 41 [label="Stub" style="filled" fillcolor=gray]; - 42 [label="Exit block" style="filled" fillcolor=gray]; - } - 43 [label="Exit when branch result" style="filled" fillcolor=gray]; - 44 [label="Exit when"]; - } - 45 [label="Access variable R|/goodA|"]; - 46 [label="Smart cast: R|/goodA|"]; - 47 [label="Access variable R|/A.s|"]; - 48 [label="Exit block"]; - } - 49 [label="Exit block"]; + 22 [label="Function call arguments enter"]; + 23 [label="Access variable R|/|"]; + 24 [label="Function call arguments exit"]; } - 50 [label="Exit loop block"]; + 25 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 26 [label="Exit loop condition"]; } - 51 [label="Exit while loop"]; + subgraph cluster_11 { + color=blue + 27 [label="Enter loop block"]; + subgraph cluster_12 { + color=blue + 28 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 29 [label="Function call arguments enter"]; + 30 [label="Access variable R|/|"]; + 31 [label="Function call arguments exit"]; + } + 32 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 33 [label="Variable declaration: lval a: R|A|"]; + subgraph cluster_14 { + color=blue + 34 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 35 [label="Enter when"]; + subgraph cluster_16 { + color=blue + 36 [label="Enter when branch condition "]; + 37 [label="Access variable R|/goodA|"]; + 38 [label="Const: Null(null)"]; + 39 [label="Equality operator =="]; + 40 [label="Exit when branch condition"]; + } + 41 [label="Synthetic else branch"]; + 42 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 43 [label="Enter block"]; + 44 [label="Access variable R|/a|"]; + 45 [label="Assignment: R|/goodA|"]; + 46 [label="Jump: continue@@@[R|/|.R|SubstitutionOverride|()] "]; + 47 [label="Stub" style="filled" fillcolor=gray]; + 48 [label="Exit block" style="filled" fillcolor=gray]; + } + 49 [label="Exit when branch result" style="filled" fillcolor=gray]; + 50 [label="Exit when"]; + } + 51 [label="Access variable R|/goodA|"]; + 52 [label="Smart cast: R|/goodA|"]; + 53 [label="Access variable R|/A.s|"]; + 54 [label="Exit block"]; + } + 55 [label="Exit block"]; + } + 56 [label="Exit loop block"]; + } + 57 [label="Exit while loop"]; } - 52 [label="Exit block"]; + 58 [label="Exit block"]; } - 53 [label="Exit block"]; + 59 [label="Exit block"]; } - 54 [label="Exit function test_0" style="filled" fillcolor=red]; + 60 [label="Exit function test_0" style="filled" fillcolor=red]; } 10 -> {11}; 11 -> {12}; @@ -127,11 +142,11 @@ digraph boundSmartcastsInBranches_kt { 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {23 51}; + 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {27}; + 26 -> {27 57}; 27 -> {28}; 28 -> {29}; 29 -> {30}; @@ -139,170 +154,180 @@ digraph boundSmartcastsInBranches_kt { 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {35 36}; - 35 -> {44}; + 34 -> {35}; + 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {19} [color=green style=dashed]; - 40 -> {41} [style=dotted]; - 41 -> {42} [style=dotted]; - 42 -> {43} [style=dotted]; - 43 -> {44} [style=dotted]; + 40 -> {41 42}; + 41 -> {50}; + 42 -> {43}; + 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47}; - 47 -> {48}; - 48 -> {49}; - 49 -> {50}; - 50 -> {19} [color=green style=dashed]; + 46 -> {21} [color=green style=dashed]; + 46 -> {47} [style=dotted]; + 47 -> {48} [style=dotted]; + 48 -> {49} [style=dotted]; + 49 -> {50} [style=dotted]; + 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; + 54 -> {55}; + 55 -> {56}; + 56 -> {21} [color=green style=dashed]; + 57 -> {58}; + 58 -> {59}; + 59 -> {60}; - subgraph cluster_15 { + subgraph cluster_18 { color=red - 55 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_16 { + 61 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_19 { color=blue - 56 [label="Enter block"]; - 57 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_17 { + 62 [label="Enter block"]; + 63 [label="Variable declaration: lval x: R|kotlin/Any|"]; + subgraph cluster_20 { color=blue - 58 [label="Enter when"]; - subgraph cluster_18 { - color=blue - 59 [label="Enter when branch condition "]; - 60 [label="Access variable R|/b|"]; - 61 [label="Exit when branch condition"]; - } - subgraph cluster_19 { - color=blue - 62 [label="Enter when branch condition else"]; - 63 [label="Exit when branch condition"]; - } - 64 [label="Enter when branch result"]; - subgraph cluster_20 { - color=blue - 65 [label="Enter block"]; - 66 [label="Access variable R|/a|"]; - 67 [label="Assignment: R|/x|"]; - 68 [label="Exit block"]; - } - 69 [label="Exit when branch result"]; - 70 [label="Enter when branch result"]; + 64 [label="Enter when"]; subgraph cluster_21 { + color=blue + 65 [label="Enter when branch condition "]; + 66 [label="Access variable R|/b|"]; + 67 [label="Exit when branch condition"]; + } + subgraph cluster_22 { + color=blue + 68 [label="Enter when branch condition else"]; + 69 [label="Exit when branch condition"]; + } + 70 [label="Enter when branch result"]; + subgraph cluster_23 { color=blue 71 [label="Enter block"]; - 72 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; + 72 [label="Access variable R|/a|"]; 73 [label="Assignment: R|/x|"]; 74 [label="Exit block"]; } 75 [label="Exit when branch result"]; - 76 [label="Exit when"]; + 76 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 77 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 78 [label="Function call arguments enter"]; + 79 [label="Function call arguments exit"]; + } + 80 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; + 81 [label="Assignment: R|/x|"]; + 82 [label="Exit block"]; + } + 83 [label="Exit when branch result"]; + 84 [label="Exit when"]; } - 77 [label="Access variable R|/x|"]; - 78 [label="Smart cast: R|/x|"]; - 79 [label="Access variable R|/A.s|"]; - 80 [label="Exit block"]; + 85 [label="Access variable R|/x|"]; + 86 [label="Smart cast: R|/x|"]; + 87 [label="Access variable R|/A.s|"]; + 88 [label="Exit block"]; } - 81 [label="Exit function test_1" style="filled" fillcolor=red]; + 89 [label="Exit function test_1" style="filled" fillcolor=red]; } - 55 -> {56}; - 56 -> {57}; - 57 -> {58}; - 58 -> {59}; - 59 -> {60}; - 60 -> {61}; - 61 -> {62 70}; + 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {68}; + 67 -> {68 76}; 68 -> {69}; - 69 -> {76}; + 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76}; + 75 -> {84}; 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; - - subgraph cluster_22 { - color=red - 82 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 83 [label="Enter block"]; - 84 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_24 { - color=blue - 85 [label="Enter when"]; - subgraph cluster_25 { - color=blue - 86 [label="Enter when branch condition "]; - 87 [label="Access variable R|/b|"]; - 88 [label="Exit when branch condition"]; - } - subgraph cluster_26 { - color=blue - 89 [label="Enter when branch condition else"]; - 90 [label="Exit when branch condition"]; - } - 91 [label="Enter when branch result"]; - subgraph cluster_27 { - color=blue - 92 [label="Enter block"]; - 93 [label="Access variable R|/a|"]; - 94 [label="Assignment: R|/x|"]; - 95 [label="Access variable R|/a|"]; - 96 [label="Type operator: (R|/a| as R|A|)"]; - 97 [label="Exit block"]; - } - 98 [label="Exit when branch result"]; - 99 [label="Enter when branch result"]; - subgraph cluster_28 { - color=blue - 100 [label="Enter block"]; - 101 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; - 102 [label="Assignment: R|/x|"]; - 103 [label="Exit block"]; - } - 104 [label="Exit when branch result"]; - 105 [label="Exit when"]; - } - 106 [label="Access variable R|/x|"]; - 107 [label="Smart cast: R|/x|"]; - 108 [label="Access variable R|/A.s|"]; - 109 [label="Exit block"]; - } - 110 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {89 99}; - 89 -> {90}; + 88 -> {89}; + + subgraph cluster_26 { + color=red + 90 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_27 { + color=blue + 91 [label="Enter block"]; + 92 [label="Variable declaration: lval x: R|kotlin/Any|"]; + subgraph cluster_28 { + color=blue + 93 [label="Enter when"]; + subgraph cluster_29 { + color=blue + 94 [label="Enter when branch condition "]; + 95 [label="Access variable R|/b|"]; + 96 [label="Exit when branch condition"]; + } + subgraph cluster_30 { + color=blue + 97 [label="Enter when branch condition else"]; + 98 [label="Exit when branch condition"]; + } + 99 [label="Enter when branch result"]; + subgraph cluster_31 { + color=blue + 100 [label="Enter block"]; + 101 [label="Access variable R|/a|"]; + 102 [label="Assignment: R|/x|"]; + 103 [label="Access variable R|/a|"]; + 104 [label="Type operator: (R|/a| as R|A|)"]; + 105 [label="Exit block"]; + } + 106 [label="Exit when branch result"]; + 107 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 108 [label="Enter block"]; + subgraph cluster_33 { + color=blue + 109 [label="Function call arguments enter"]; + 110 [label="Function call arguments exit"]; + } + 111 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; + 112 [label="Assignment: R|/x|"]; + 113 [label="Exit block"]; + } + 114 [label="Exit when branch result"]; + 115 [label="Exit when"]; + } + 116 [label="Access variable R|/x|"]; + 117 [label="Smart cast: R|/x|"]; + 118 [label="Access variable R|/A.s|"]; + 119 [label="Exit block"]; + } + 120 [label="Exit function test_2" style="filled" fillcolor=red]; + } 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {97}; + 96 -> {97 107}; 97 -> {98}; - 98 -> {105}; + 98 -> {99}; 99 -> {100}; 100 -> {101}; 101 -> {102}; @@ -310,80 +335,85 @@ digraph boundSmartcastsInBranches_kt { 103 -> {104}; 104 -> {105}; 105 -> {106}; - 106 -> {107}; + 106 -> {115}; 107 -> {108}; 108 -> {109}; 109 -> {110}; - - subgraph cluster_29 { - color=red - 111 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_30 { - color=blue - 112 [label="Enter block"]; - 113 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_31 { - color=blue - 114 [label="Enter when"]; - subgraph cluster_32 { - color=blue - 115 [label="Enter when branch condition "]; - 116 [label="Access variable R|/b|"]; - 117 [label="Exit when branch condition"]; - } - subgraph cluster_33 { - color=blue - 118 [label="Enter when branch condition else"]; - 119 [label="Exit when branch condition"]; - } - 120 [label="Enter when branch result"]; - subgraph cluster_34 { - color=blue - 121 [label="Enter block"]; - 122 [label="Access variable R|/a|"]; - 123 [label="Type operator: (R|/a| as R|A|)"]; - 124 [label="Access variable R|/a|"]; - 125 [label="Smart cast: R|/a|"]; - 126 [label="Assignment: R|/x|"]; - 127 [label="Exit block"]; - } - 128 [label="Exit when branch result"]; - 129 [label="Enter when branch result"]; - subgraph cluster_35 { - color=blue - 130 [label="Enter block"]; - 131 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; - 132 [label="Assignment: R|/x|"]; - 133 [label="Exit block"]; - } - 134 [label="Exit when branch result"]; - 135 [label="Exit when"]; - } - 136 [label="Access variable R|/x|"]; - 137 [label="Smart cast: R|/x|"]; - 138 [label="Access variable R|/A.s|"]; - 139 [label="Exit block"]; - } - 140 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {118 129}; + 117 -> {118}; 118 -> {119}; 119 -> {120}; - 120 -> {121}; + + subgraph cluster_34 { + color=red + 121 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_35 { + color=blue + 122 [label="Enter block"]; + 123 [label="Variable declaration: lval x: R|kotlin/Any|"]; + subgraph cluster_36 { + color=blue + 124 [label="Enter when"]; + subgraph cluster_37 { + color=blue + 125 [label="Enter when branch condition "]; + 126 [label="Access variable R|/b|"]; + 127 [label="Exit when branch condition"]; + } + subgraph cluster_38 { + color=blue + 128 [label="Enter when branch condition else"]; + 129 [label="Exit when branch condition"]; + } + 130 [label="Enter when branch result"]; + subgraph cluster_39 { + color=blue + 131 [label="Enter block"]; + 132 [label="Access variable R|/a|"]; + 133 [label="Type operator: (R|/a| as R|A|)"]; + 134 [label="Access variable R|/a|"]; + 135 [label="Smart cast: R|/a|"]; + 136 [label="Assignment: R|/x|"]; + 137 [label="Exit block"]; + } + 138 [label="Exit when branch result"]; + 139 [label="Enter when branch result"]; + subgraph cluster_40 { + color=blue + 140 [label="Enter block"]; + subgraph cluster_41 { + color=blue + 141 [label="Function call arguments enter"]; + 142 [label="Function call arguments exit"]; + } + 143 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; + 144 [label="Assignment: R|/x|"]; + 145 [label="Exit block"]; + } + 146 [label="Exit when branch result"]; + 147 [label="Exit when"]; + } + 148 [label="Access variable R|/x|"]; + 149 [label="Smart cast: R|/x|"]; + 150 [label="Access variable R|/A.s|"]; + 151 [label="Exit block"]; + } + 152 [label="Exit function test_3" style="filled" fillcolor=red]; + } 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {128}; - 128 -> {135}; + 127 -> {128 139}; + 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; @@ -393,81 +423,81 @@ digraph boundSmartcastsInBranches_kt { 135 -> {136}; 136 -> {137}; 137 -> {138}; - 138 -> {139}; + 138 -> {147}; 139 -> {140}; - - subgraph cluster_36 { - color=red - 141 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_37 { - color=blue - 142 [label="Enter block"]; - 143 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_38 { - color=blue - 144 [label="Enter when"]; - subgraph cluster_39 { - color=blue - 145 [label="Enter when branch condition "]; - 146 [label="Access variable R|/b|"]; - 147 [label="Exit when branch condition"]; - } - subgraph cluster_40 { - color=blue - 148 [label="Enter when branch condition else"]; - 149 [label="Exit when branch condition"]; - } - 150 [label="Enter when branch result"]; - subgraph cluster_41 { - color=blue - 151 [label="Enter block"]; - 152 [label="Access variable R|/a|"]; - 153 [label="Assignment: R|/x|"]; - 154 [label="Exit block"]; - } - 155 [label="Exit when branch result"]; - 156 [label="Enter when branch result"]; - subgraph cluster_42 { - color=blue - 157 [label="Enter block"]; - 158 [label="Access variable R|/a|"]; - 159 [label="Assignment: R|/x|"]; - 160 [label="Exit block"]; - } - 161 [label="Exit when branch result"]; - 162 [label="Exit when"]; - } - 163 [label="Access variable R|/x|"]; - 164 [label="Type operator: (R|/x| as R|A|)"]; - 165 [label="Access variable R|/x|"]; - 166 [label="Smart cast: R|/x|"]; - 167 [label="Access variable R|/A.s|"]; - 168 [label="Access variable R|/a|"]; - 169 [label="Smart cast: R|/a|"]; - 170 [label="Access variable R|/A.s|"]; - 171 [label="Exit block"]; - } - 172 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; - 147 -> {148 156}; + 147 -> {148}; 148 -> {149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; - 152 -> {153}; + + subgraph cluster_42 { + color=red + 153 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_43 { + color=blue + 154 [label="Enter block"]; + 155 [label="Variable declaration: lval x: R|kotlin/Any|"]; + subgraph cluster_44 { + color=blue + 156 [label="Enter when"]; + subgraph cluster_45 { + color=blue + 157 [label="Enter when branch condition "]; + 158 [label="Access variable R|/b|"]; + 159 [label="Exit when branch condition"]; + } + subgraph cluster_46 { + color=blue + 160 [label="Enter when branch condition else"]; + 161 [label="Exit when branch condition"]; + } + 162 [label="Enter when branch result"]; + subgraph cluster_47 { + color=blue + 163 [label="Enter block"]; + 164 [label="Access variable R|/a|"]; + 165 [label="Assignment: R|/x|"]; + 166 [label="Exit block"]; + } + 167 [label="Exit when branch result"]; + 168 [label="Enter when branch result"]; + subgraph cluster_48 { + color=blue + 169 [label="Enter block"]; + 170 [label="Access variable R|/a|"]; + 171 [label="Assignment: R|/x|"]; + 172 [label="Exit block"]; + } + 173 [label="Exit when branch result"]; + 174 [label="Exit when"]; + } + 175 [label="Access variable R|/x|"]; + 176 [label="Type operator: (R|/x| as R|A|)"]; + 177 [label="Access variable R|/x|"]; + 178 [label="Smart cast: R|/x|"]; + 179 [label="Access variable R|/A.s|"]; + 180 [label="Access variable R|/a|"]; + 181 [label="Smart cast: R|/a|"]; + 182 [label="Access variable R|/A.s|"]; + 183 [label="Exit block"]; + } + 184 [label="Exit function test_4" style="filled" fillcolor=red]; + } 153 -> {154}; 154 -> {155}; - 155 -> {162}; + 155 -> {156}; 156 -> {157}; 157 -> {158}; 158 -> {159}; - 159 -> {160}; + 159 -> {160 168}; 160 -> {161}; 161 -> {162}; 162 -> {163}; @@ -475,84 +505,84 @@ digraph boundSmartcastsInBranches_kt { 164 -> {165}; 165 -> {166}; 166 -> {167}; - 167 -> {168}; + 167 -> {174}; 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; - - subgraph cluster_43 { - color=red - 173 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_44 { - color=blue - 174 [label="Enter block"]; - 175 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_45 { - color=blue - 176 [label="Enter when"]; - subgraph cluster_46 { - color=blue - 177 [label="Enter when branch condition "]; - 178 [label="Access variable R|/b|"]; - 179 [label="Exit when branch condition"]; - } - subgraph cluster_47 { - color=blue - 180 [label="Enter when branch condition else"]; - 181 [label="Exit when branch condition"]; - } - 182 [label="Enter when branch result"]; - subgraph cluster_48 { - color=blue - 183 [label="Enter block"]; - 184 [label="Access variable R|/a|"]; - 185 [label="Assignment: R|/x|"]; - 186 [label="Exit block"]; - } - 187 [label="Exit when branch result"]; - 188 [label="Enter when branch result"]; - subgraph cluster_49 { - color=blue - 189 [label="Enter block"]; - 190 [label="Access variable R|/a|"]; - 191 [label="Assignment: R|/x|"]; - 192 [label="Exit block"]; - } - 193 [label="Exit when branch result"]; - 194 [label="Exit when"]; - } - 195 [label="Access variable R|/a|"]; - 196 [label="Type operator: (R|/a| as R|A|)"]; - 197 [label="Access variable R|/x|"]; - 198 [label="Smart cast: R|/x|"]; - 199 [label="Access variable R|/A.s|"]; - 200 [label="Access variable R|/a|"]; - 201 [label="Smart cast: R|/a|"]; - 202 [label="Access variable R|/A.s|"]; - 203 [label="Exit block"]; - } - 204 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 172 -> {173}; 173 -> {174}; 174 -> {175}; 175 -> {176}; 176 -> {177}; 177 -> {178}; 178 -> {179}; - 179 -> {180 188}; + 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; 183 -> {184}; - 184 -> {185}; + + subgraph cluster_49 { + color=red + 185 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_50 { + color=blue + 186 [label="Enter block"]; + 187 [label="Variable declaration: lval x: R|kotlin/Any|"]; + subgraph cluster_51 { + color=blue + 188 [label="Enter when"]; + subgraph cluster_52 { + color=blue + 189 [label="Enter when branch condition "]; + 190 [label="Access variable R|/b|"]; + 191 [label="Exit when branch condition"]; + } + subgraph cluster_53 { + color=blue + 192 [label="Enter when branch condition else"]; + 193 [label="Exit when branch condition"]; + } + 194 [label="Enter when branch result"]; + subgraph cluster_54 { + color=blue + 195 [label="Enter block"]; + 196 [label="Access variable R|/a|"]; + 197 [label="Assignment: R|/x|"]; + 198 [label="Exit block"]; + } + 199 [label="Exit when branch result"]; + 200 [label="Enter when branch result"]; + subgraph cluster_55 { + color=blue + 201 [label="Enter block"]; + 202 [label="Access variable R|/a|"]; + 203 [label="Assignment: R|/x|"]; + 204 [label="Exit block"]; + } + 205 [label="Exit when branch result"]; + 206 [label="Exit when"]; + } + 207 [label="Access variable R|/a|"]; + 208 [label="Type operator: (R|/a| as R|A|)"]; + 209 [label="Access variable R|/x|"]; + 210 [label="Smart cast: R|/x|"]; + 211 [label="Access variable R|/A.s|"]; + 212 [label="Access variable R|/a|"]; + 213 [label="Smart cast: R|/a|"]; + 214 [label="Access variable R|/A.s|"]; + 215 [label="Exit block"]; + } + 216 [label="Exit function test_5" style="filled" fillcolor=red]; + } 185 -> {186}; 186 -> {187}; - 187 -> {194}; + 187 -> {188}; 188 -> {189}; 189 -> {190}; 190 -> {191}; - 191 -> {192}; + 191 -> {192 200}; 192 -> {193}; 193 -> {194}; 194 -> {195}; @@ -560,28 +590,12 @@ digraph boundSmartcastsInBranches_kt { 196 -> {197}; 197 -> {198}; 198 -> {199}; - 199 -> {200}; + 199 -> {206}; 200 -> {201}; 201 -> {202}; 202 -> {203}; 203 -> {204}; - - subgraph cluster_50 { - color=red - 205 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_51 { - color=blue - 206 [label="Enter block"]; - 207 [label="Variable declaration: lval x: R|kotlin/Any|"]; - 208 [label="Access variable R|/a|"]; - 209 [label="Assignment: R|/x|"]; - 210 [label="Access variable R|/x|"]; - 211 [label="Smart cast: R|/x|"]; - 212 [label="Access variable R|/A.s|"]; - 213 [label="Exit block"]; - } - 214 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 204 -> {205}; 205 -> {206}; 206 -> {207}; 207 -> {208}; @@ -591,198 +605,25 @@ digraph boundSmartcastsInBranches_kt { 211 -> {212}; 212 -> {213}; 213 -> {214}; - - subgraph cluster_52 { - color=red - 215 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_53 { - color=blue - 216 [label="Enter block"]; - 217 [label="Const: Null(null)"]; - 218 [label="Variable declaration: lval z: R|kotlin/String?|"]; - 219 [label="Access variable R|/z|"]; - 220 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 221 [label="Access variable R|/y|"]; - 222 [label="Variable declaration: lval x: R|kotlin/String?|"]; - subgraph cluster_54 { - color=blue - 223 [label="Enter when"]; - subgraph cluster_55 { - color=blue - 224 [label="Enter when branch condition "]; - 225 [label="Access variable R|/x|"]; - 226 [label="Const: Null(null)"]; - 227 [label="Equality operator !="]; - 228 [label="Exit when branch condition"]; - } - 229 [label="Synthetic else branch"]; - 230 [label="Enter when branch result"]; - subgraph cluster_56 { - color=blue - 231 [label="Enter block"]; - 232 [label="Access variable R|/x|"]; - 233 [label="Smart cast: R|/x|"]; - 234 [label="Access variable R|kotlin/String.length|"]; - 235 [label="Access variable R|/y|"]; - 236 [label="Access variable R|kotlin/String.length#|"]; - 237 [label="Access variable R|/z|"]; - 238 [label="Access variable R|kotlin/String.length#|"]; - 239 [label="Exit block"]; - } - 240 [label="Exit when branch result"]; - 241 [label="Exit when"]; - } - subgraph cluster_57 { - color=blue - 242 [label="Enter when"]; - subgraph cluster_58 { - color=blue - 243 [label="Enter when branch condition "]; - 244 [label="Access variable R|/y|"]; - 245 [label="Const: Null(null)"]; - 246 [label="Equality operator !="]; - 247 [label="Exit when branch condition"]; - } - 248 [label="Synthetic else branch"]; - 249 [label="Enter when branch result"]; - subgraph cluster_59 { - color=blue - 250 [label="Enter block"]; - 251 [label="Access variable R|/x|"]; - 252 [label="Access variable R|kotlin/String.length#|"]; - 253 [label="Access variable R|/y|"]; - 254 [label="Smart cast: R|/y|"]; - 255 [label="Access variable R|kotlin/String.length|"]; - 256 [label="Access variable R|/z|"]; - 257 [label="Access variable R|kotlin/String.length#|"]; - 258 [label="Exit block"]; - } - 259 [label="Exit when branch result"]; - 260 [label="Exit when"]; - } - subgraph cluster_60 { - color=blue - 261 [label="Enter when"]; - subgraph cluster_61 { - color=blue - 262 [label="Enter when branch condition "]; - 263 [label="Access variable R|/z|"]; - 264 [label="Const: Null(null)"]; - 265 [label="Equality operator !="]; - 266 [label="Exit when branch condition"]; - } - 267 [label="Synthetic else branch"]; - 268 [label="Enter when branch result"]; - subgraph cluster_62 { - color=blue - 269 [label="Enter block"]; - 270 [label="Access variable R|/x|"]; - 271 [label="Access variable R|kotlin/String.length#|"]; - 272 [label="Access variable R|/y|"]; - 273 [label="Access variable R|kotlin/String.length#|"]; - 274 [label="Access variable R|/z|"]; - 275 [label="Smart cast: R|/z|"]; - 276 [label="Access variable R|kotlin/String.length|"]; - 277 [label="Exit block"]; - } - 278 [label="Exit when branch result"]; - 279 [label="Exit when"]; - } - 280 [label="Const: Null(null)"]; - 281 [label="Assignment: R|/y|"]; - subgraph cluster_63 { - color=blue - 282 [label="Enter when"]; - subgraph cluster_64 { - color=blue - 283 [label="Enter when branch condition "]; - 284 [label="Access variable R|/x|"]; - 285 [label="Const: Null(null)"]; - 286 [label="Equality operator !="]; - 287 [label="Exit when branch condition"]; - } - 288 [label="Synthetic else branch"]; - 289 [label="Enter when branch result"]; - subgraph cluster_65 { - color=blue - 290 [label="Enter block"]; - 291 [label="Access variable R|/x|"]; - 292 [label="Smart cast: R|/x|"]; - 293 [label="Access variable R|kotlin/String.length|"]; - 294 [label="Access variable R|/y|"]; - 295 [label="Smart cast: R|/y|"]; - 296 [label="Access variable R|kotlin/String.length#|"]; - 297 [label="Access variable R|/z|"]; - 298 [label="Access variable R|kotlin/String.length#|"]; - 299 [label="Exit block"]; - } - 300 [label="Exit when branch result"]; - 301 [label="Exit when"]; - } - subgraph cluster_66 { - color=blue - 302 [label="Enter when"]; - subgraph cluster_67 { - color=blue - 303 [label="Enter when branch condition "]; - 304 [label="Access variable R|/y|"]; - 305 [label="Smart cast: R|/y|"]; - 306 [label="Const: Null(null)"]; - 307 [label="Equality operator !="]; - 308 [label="Exit when branch condition"]; - } - 309 [label="Synthetic else branch"]; - 310 [label="Enter when branch result"]; - subgraph cluster_68 { - color=blue - 311 [label="Enter block"]; - 312 [label="Access variable R|/x|"]; - 313 [label="Access variable R|kotlin/String.length#|"]; - 314 [label="Access variable R|/y|"]; - 315 [label="Smart cast: R|/y|"]; - 316 [label="Access variable R|kotlin/String.length|"]; - 317 [label="Access variable R|/z|"]; - 318 [label="Access variable R|kotlin/String.length#|"]; - 319 [label="Exit block"]; - } - 320 [label="Exit when branch result"]; - 321 [label="Exit when"]; - } - subgraph cluster_69 { - color=blue - 322 [label="Enter when"]; - subgraph cluster_70 { - color=blue - 323 [label="Enter when branch condition "]; - 324 [label="Access variable R|/z|"]; - 325 [label="Const: Null(null)"]; - 326 [label="Equality operator !="]; - 327 [label="Exit when branch condition"]; - } - 328 [label="Synthetic else branch"]; - 329 [label="Enter when branch result"]; - subgraph cluster_71 { - color=blue - 330 [label="Enter block"]; - 331 [label="Access variable R|/x|"]; - 332 [label="Access variable R|kotlin/String.length#|"]; - 333 [label="Access variable R|/y|"]; - 334 [label="Smart cast: R|/y|"]; - 335 [label="Access variable R|kotlin/String.length#|"]; - 336 [label="Access variable R|/z|"]; - 337 [label="Smart cast: R|/z|"]; - 338 [label="Access variable R|kotlin/String.length|"]; - 339 [label="Exit block"]; - } - 340 [label="Exit when branch result"]; - 341 [label="Exit when"]; - } - 342 [label="Exit block"]; - } - 343 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 214 -> {215}; 215 -> {216}; - 216 -> {217}; + + subgraph cluster_56 { + color=red + 217 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_57 { + color=blue + 218 [label="Enter block"]; + 219 [label="Variable declaration: lval x: R|kotlin/Any|"]; + 220 [label="Access variable R|/a|"]; + 221 [label="Assignment: R|/x|"]; + 222 [label="Access variable R|/x|"]; + 223 [label="Smart cast: R|/x|"]; + 224 [label="Access variable R|/A.s|"]; + 225 [label="Exit block"]; + } + 226 [label="Exit function test_6" style="filled" fillcolor=red]; + } 217 -> {218}; 218 -> {219}; 219 -> {220}; @@ -792,10 +633,199 @@ digraph boundSmartcastsInBranches_kt { 223 -> {224}; 224 -> {225}; 225 -> {226}; - 226 -> {227}; + + subgraph cluster_58 { + color=red + 227 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_59 { + color=blue + 228 [label="Enter block"]; + 229 [label="Const: Null(null)"]; + 230 [label="Variable declaration: lval z: R|kotlin/String?|"]; + 231 [label="Access variable R|/z|"]; + 232 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + 233 [label="Access variable R|/y|"]; + 234 [label="Variable declaration: lval x: R|kotlin/String?|"]; + subgraph cluster_60 { + color=blue + 235 [label="Enter when"]; + subgraph cluster_61 { + color=blue + 236 [label="Enter when branch condition "]; + 237 [label="Access variable R|/x|"]; + 238 [label="Const: Null(null)"]; + 239 [label="Equality operator !="]; + 240 [label="Exit when branch condition"]; + } + 241 [label="Synthetic else branch"]; + 242 [label="Enter when branch result"]; + subgraph cluster_62 { + color=blue + 243 [label="Enter block"]; + 244 [label="Access variable R|/x|"]; + 245 [label="Smart cast: R|/x|"]; + 246 [label="Access variable R|kotlin/String.length|"]; + 247 [label="Access variable R|/y|"]; + 248 [label="Access variable R|kotlin/String.length#|"]; + 249 [label="Access variable R|/z|"]; + 250 [label="Access variable R|kotlin/String.length#|"]; + 251 [label="Exit block"]; + } + 252 [label="Exit when branch result"]; + 253 [label="Exit when"]; + } + subgraph cluster_63 { + color=blue + 254 [label="Enter when"]; + subgraph cluster_64 { + color=blue + 255 [label="Enter when branch condition "]; + 256 [label="Access variable R|/y|"]; + 257 [label="Const: Null(null)"]; + 258 [label="Equality operator !="]; + 259 [label="Exit when branch condition"]; + } + 260 [label="Synthetic else branch"]; + 261 [label="Enter when branch result"]; + subgraph cluster_65 { + color=blue + 262 [label="Enter block"]; + 263 [label="Access variable R|/x|"]; + 264 [label="Access variable R|kotlin/String.length#|"]; + 265 [label="Access variable R|/y|"]; + 266 [label="Smart cast: R|/y|"]; + 267 [label="Access variable R|kotlin/String.length|"]; + 268 [label="Access variable R|/z|"]; + 269 [label="Access variable R|kotlin/String.length#|"]; + 270 [label="Exit block"]; + } + 271 [label="Exit when branch result"]; + 272 [label="Exit when"]; + } + subgraph cluster_66 { + color=blue + 273 [label="Enter when"]; + subgraph cluster_67 { + color=blue + 274 [label="Enter when branch condition "]; + 275 [label="Access variable R|/z|"]; + 276 [label="Const: Null(null)"]; + 277 [label="Equality operator !="]; + 278 [label="Exit when branch condition"]; + } + 279 [label="Synthetic else branch"]; + 280 [label="Enter when branch result"]; + subgraph cluster_68 { + color=blue + 281 [label="Enter block"]; + 282 [label="Access variable R|/x|"]; + 283 [label="Access variable R|kotlin/String.length#|"]; + 284 [label="Access variable R|/y|"]; + 285 [label="Access variable R|kotlin/String.length#|"]; + 286 [label="Access variable R|/z|"]; + 287 [label="Smart cast: R|/z|"]; + 288 [label="Access variable R|kotlin/String.length|"]; + 289 [label="Exit block"]; + } + 290 [label="Exit when branch result"]; + 291 [label="Exit when"]; + } + 292 [label="Const: Null(null)"]; + 293 [label="Assignment: R|/y|"]; + subgraph cluster_69 { + color=blue + 294 [label="Enter when"]; + subgraph cluster_70 { + color=blue + 295 [label="Enter when branch condition "]; + 296 [label="Access variable R|/x|"]; + 297 [label="Const: Null(null)"]; + 298 [label="Equality operator !="]; + 299 [label="Exit when branch condition"]; + } + 300 [label="Synthetic else branch"]; + 301 [label="Enter when branch result"]; + subgraph cluster_71 { + color=blue + 302 [label="Enter block"]; + 303 [label="Access variable R|/x|"]; + 304 [label="Smart cast: R|/x|"]; + 305 [label="Access variable R|kotlin/String.length|"]; + 306 [label="Access variable R|/y|"]; + 307 [label="Smart cast: R|/y|"]; + 308 [label="Access variable R|kotlin/String.length#|"]; + 309 [label="Access variable R|/z|"]; + 310 [label="Access variable R|kotlin/String.length#|"]; + 311 [label="Exit block"]; + } + 312 [label="Exit when branch result"]; + 313 [label="Exit when"]; + } + subgraph cluster_72 { + color=blue + 314 [label="Enter when"]; + subgraph cluster_73 { + color=blue + 315 [label="Enter when branch condition "]; + 316 [label="Access variable R|/y|"]; + 317 [label="Smart cast: R|/y|"]; + 318 [label="Const: Null(null)"]; + 319 [label="Equality operator !="]; + 320 [label="Exit when branch condition"]; + } + 321 [label="Synthetic else branch"]; + 322 [label="Enter when branch result"]; + subgraph cluster_74 { + color=blue + 323 [label="Enter block"]; + 324 [label="Access variable R|/x|"]; + 325 [label="Access variable R|kotlin/String.length#|"]; + 326 [label="Access variable R|/y|"]; + 327 [label="Smart cast: R|/y|"]; + 328 [label="Access variable R|kotlin/String.length|"]; + 329 [label="Access variable R|/z|"]; + 330 [label="Access variable R|kotlin/String.length#|"]; + 331 [label="Exit block"]; + } + 332 [label="Exit when branch result"]; + 333 [label="Exit when"]; + } + subgraph cluster_75 { + color=blue + 334 [label="Enter when"]; + subgraph cluster_76 { + color=blue + 335 [label="Enter when branch condition "]; + 336 [label="Access variable R|/z|"]; + 337 [label="Const: Null(null)"]; + 338 [label="Equality operator !="]; + 339 [label="Exit when branch condition"]; + } + 340 [label="Synthetic else branch"]; + 341 [label="Enter when branch result"]; + subgraph cluster_77 { + color=blue + 342 [label="Enter block"]; + 343 [label="Access variable R|/x|"]; + 344 [label="Access variable R|kotlin/String.length#|"]; + 345 [label="Access variable R|/y|"]; + 346 [label="Smart cast: R|/y|"]; + 347 [label="Access variable R|kotlin/String.length#|"]; + 348 [label="Access variable R|/z|"]; + 349 [label="Smart cast: R|/z|"]; + 350 [label="Access variable R|kotlin/String.length|"]; + 351 [label="Exit block"]; + } + 352 [label="Exit when branch result"]; + 353 [label="Exit when"]; + } + 354 [label="Exit block"]; + } + 355 [label="Exit function test_7" style="filled" fillcolor=red]; + } 227 -> {228}; - 228 -> {229 230}; - 229 -> {241}; + 228 -> {229}; + 229 -> {230}; 230 -> {231}; 231 -> {232}; 232 -> {233}; @@ -806,15 +836,15 @@ digraph boundSmartcastsInBranches_kt { 237 -> {238}; 238 -> {239}; 239 -> {240}; - 240 -> {241}; - 241 -> {242}; + 240 -> {241 242}; + 241 -> {253}; 242 -> {243}; 243 -> {244}; 244 -> {245}; 245 -> {246}; 246 -> {247}; - 247 -> {248 249}; - 248 -> {260}; + 247 -> {248}; + 248 -> {249}; 249 -> {250}; 250 -> {251}; 251 -> {252}; @@ -825,15 +855,15 @@ digraph boundSmartcastsInBranches_kt { 256 -> {257}; 257 -> {258}; 258 -> {259}; - 259 -> {260}; - 260 -> {261}; + 259 -> {260 261}; + 260 -> {272}; 261 -> {262}; 262 -> {263}; 263 -> {264}; 264 -> {265}; 265 -> {266}; - 266 -> {267 268}; - 267 -> {279}; + 266 -> {267}; + 267 -> {268}; 268 -> {269}; 269 -> {270}; 270 -> {271}; @@ -844,8 +874,8 @@ digraph boundSmartcastsInBranches_kt { 275 -> {276}; 276 -> {277}; 277 -> {278}; - 278 -> {279}; - 279 -> {280}; + 278 -> {279 280}; + 279 -> {291}; 280 -> {281}; 281 -> {282}; 282 -> {283}; @@ -853,8 +883,8 @@ digraph boundSmartcastsInBranches_kt { 284 -> {285}; 285 -> {286}; 286 -> {287}; - 287 -> {288 289}; - 288 -> {301}; + 287 -> {288}; + 288 -> {289}; 289 -> {290}; 290 -> {291}; 291 -> {292}; @@ -865,8 +895,8 @@ digraph boundSmartcastsInBranches_kt { 296 -> {297}; 297 -> {298}; 298 -> {299}; - 299 -> {300}; - 300 -> {301}; + 299 -> {300 301}; + 300 -> {313}; 301 -> {302}; 302 -> {303}; 303 -> {304}; @@ -874,8 +904,8 @@ digraph boundSmartcastsInBranches_kt { 305 -> {306}; 306 -> {307}; 307 -> {308}; - 308 -> {309 310}; - 309 -> {321}; + 308 -> {309}; + 309 -> {310}; 310 -> {311}; 311 -> {312}; 312 -> {313}; @@ -886,15 +916,15 @@ digraph boundSmartcastsInBranches_kt { 317 -> {318}; 318 -> {319}; 319 -> {320}; - 320 -> {321}; - 321 -> {322}; + 320 -> {321 322}; + 321 -> {333}; 322 -> {323}; 323 -> {324}; 324 -> {325}; 325 -> {326}; 326 -> {327}; - 327 -> {328 329}; - 328 -> {341}; + 327 -> {328}; + 328 -> {329}; 329 -> {330}; 330 -> {331}; 331 -> {332}; @@ -905,208 +935,11 @@ digraph boundSmartcastsInBranches_kt { 336 -> {337}; 337 -> {338}; 338 -> {339}; - 339 -> {340}; - 340 -> {341}; + 339 -> {340 341}; + 340 -> {353}; 341 -> {342}; 342 -> {343}; - - subgraph cluster_72 { - color=red - 344 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_73 { - color=blue - 345 [label="Enter block"]; - 346 [label="Const: Null(null)"]; - 347 [label="Variable declaration: lval z: R|kotlin/String?|"]; - 348 [label="Access variable R|/z|"]; - 349 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 350 [label="Access variable R|/y|"]; - 351 [label="Variable declaration: lval x: R|kotlin/String?|"]; - subgraph cluster_74 { - color=blue - 352 [label="Enter when"]; - subgraph cluster_75 { - color=blue - 353 [label="Enter when branch condition "]; - 354 [label="Access variable R|/x|"]; - 355 [label="Const: Null(null)"]; - 356 [label="Equality operator !="]; - 357 [label="Exit when branch condition"]; - } - 358 [label="Synthetic else branch"]; - 359 [label="Enter when branch result"]; - subgraph cluster_76 { - color=blue - 360 [label="Enter block"]; - 361 [label="Access variable R|/x|"]; - 362 [label="Smart cast: R|/x|"]; - 363 [label="Access variable R|kotlin/String.length|"]; - 364 [label="Access variable R|/y|"]; - 365 [label="Smart cast: R|/y|"]; - 366 [label="Access variable R|kotlin/String.length|"]; - 367 [label="Access variable R|/z|"]; - 368 [label="Smart cast: R|/z|"]; - 369 [label="Access variable R|kotlin/String.length|"]; - 370 [label="Exit block"]; - } - 371 [label="Exit when branch result"]; - 372 [label="Exit when"]; - } - subgraph cluster_77 { - color=blue - 373 [label="Enter when"]; - subgraph cluster_78 { - color=blue - 374 [label="Enter when branch condition "]; - 375 [label="Access variable R|/y|"]; - 376 [label="Const: Null(null)"]; - 377 [label="Equality operator !="]; - 378 [label="Exit when branch condition"]; - } - 379 [label="Synthetic else branch"]; - 380 [label="Enter when branch result"]; - subgraph cluster_79 { - color=blue - 381 [label="Enter block"]; - 382 [label="Access variable R|/x|"]; - 383 [label="Smart cast: R|/x|"]; - 384 [label="Access variable R|kotlin/String.length|"]; - 385 [label="Access variable R|/y|"]; - 386 [label="Smart cast: R|/y|"]; - 387 [label="Access variable R|kotlin/String.length|"]; - 388 [label="Access variable R|/z|"]; - 389 [label="Smart cast: R|/z|"]; - 390 [label="Access variable R|kotlin/String.length|"]; - 391 [label="Exit block"]; - } - 392 [label="Exit when branch result"]; - 393 [label="Exit when"]; - } - subgraph cluster_80 { - color=blue - 394 [label="Enter when"]; - subgraph cluster_81 { - color=blue - 395 [label="Enter when branch condition "]; - 396 [label="Access variable R|/z|"]; - 397 [label="Const: Null(null)"]; - 398 [label="Equality operator !="]; - 399 [label="Exit when branch condition"]; - } - 400 [label="Synthetic else branch"]; - 401 [label="Enter when branch result"]; - subgraph cluster_82 { - color=blue - 402 [label="Enter block"]; - 403 [label="Access variable R|/x|"]; - 404 [label="Smart cast: R|/x|"]; - 405 [label="Access variable R|kotlin/String.length|"]; - 406 [label="Access variable R|/y|"]; - 407 [label="Smart cast: R|/y|"]; - 408 [label="Access variable R|kotlin/String.length|"]; - 409 [label="Access variable R|/z|"]; - 410 [label="Smart cast: R|/z|"]; - 411 [label="Access variable R|kotlin/String.length|"]; - 412 [label="Exit block"]; - } - 413 [label="Exit when branch result"]; - 414 [label="Exit when"]; - } - 415 [label="Const: Null(null)"]; - 416 [label="Assignment: R|/y|"]; - subgraph cluster_83 { - color=blue - 417 [label="Enter when"]; - subgraph cluster_84 { - color=blue - 418 [label="Enter when branch condition "]; - 419 [label="Access variable R|/x|"]; - 420 [label="Const: Null(null)"]; - 421 [label="Equality operator !="]; - 422 [label="Exit when branch condition"]; - } - 423 [label="Synthetic else branch"]; - 424 [label="Enter when branch result"]; - subgraph cluster_85 { - color=blue - 425 [label="Enter block"]; - 426 [label="Access variable R|/x|"]; - 427 [label="Smart cast: R|/x|"]; - 428 [label="Access variable R|kotlin/String.length|"]; - 429 [label="Access variable R|/y|"]; - 430 [label="Smart cast: R|/y|"]; - 431 [label="Access variable R|kotlin/String.length#|"]; - 432 [label="Access variable R|/z|"]; - 433 [label="Smart cast: R|/z|"]; - 434 [label="Access variable R|kotlin/String.length|"]; - 435 [label="Exit block"]; - } - 436 [label="Exit when branch result"]; - 437 [label="Exit when"]; - } - subgraph cluster_86 { - color=blue - 438 [label="Enter when"]; - subgraph cluster_87 { - color=blue - 439 [label="Enter when branch condition "]; - 440 [label="Access variable R|/y|"]; - 441 [label="Smart cast: R|/y|"]; - 442 [label="Const: Null(null)"]; - 443 [label="Equality operator !="]; - 444 [label="Exit when branch condition"]; - } - 445 [label="Synthetic else branch"]; - 446 [label="Enter when branch result"]; - subgraph cluster_88 { - color=blue - 447 [label="Enter block"]; - 448 [label="Access variable R|/x|"]; - 449 [label="Access variable R|kotlin/String.length#|"]; - 450 [label="Access variable R|/y|"]; - 451 [label="Smart cast: R|/y|"]; - 452 [label="Access variable R|kotlin/String.length|"]; - 453 [label="Access variable R|/z|"]; - 454 [label="Access variable R|kotlin/String.length#|"]; - 455 [label="Exit block"]; - } - 456 [label="Exit when branch result"]; - 457 [label="Exit when"]; - } - subgraph cluster_89 { - color=blue - 458 [label="Enter when"]; - subgraph cluster_90 { - color=blue - 459 [label="Enter when branch condition "]; - 460 [label="Access variable R|/z|"]; - 461 [label="Const: Null(null)"]; - 462 [label="Equality operator !="]; - 463 [label="Exit when branch condition"]; - } - 464 [label="Synthetic else branch"]; - 465 [label="Enter when branch result"]; - subgraph cluster_91 { - color=blue - 466 [label="Enter block"]; - 467 [label="Access variable R|/x|"]; - 468 [label="Smart cast: R|/x|"]; - 469 [label="Access variable R|kotlin/String.length|"]; - 470 [label="Access variable R|/y|"]; - 471 [label="Smart cast: R|/y|"]; - 472 [label="Access variable R|kotlin/String.length#|"]; - 473 [label="Access variable R|/z|"]; - 474 [label="Smart cast: R|/z|"]; - 475 [label="Access variable R|kotlin/String.length|"]; - 476 [label="Exit block"]; - } - 477 [label="Exit when branch result"]; - 478 [label="Exit when"]; - } - 479 [label="Exit block"]; - } - 480 [label="Exit function test_8" style="filled" fillcolor=red]; - } + 343 -> {344}; 344 -> {345}; 345 -> {346}; 346 -> {347}; @@ -1118,10 +951,207 @@ digraph boundSmartcastsInBranches_kt { 352 -> {353}; 353 -> {354}; 354 -> {355}; - 355 -> {356}; + + subgraph cluster_78 { + color=red + 356 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_79 { + color=blue + 357 [label="Enter block"]; + 358 [label="Const: Null(null)"]; + 359 [label="Variable declaration: lval z: R|kotlin/String?|"]; + 360 [label="Access variable R|/z|"]; + 361 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + 362 [label="Access variable R|/y|"]; + 363 [label="Variable declaration: lval x: R|kotlin/String?|"]; + subgraph cluster_80 { + color=blue + 364 [label="Enter when"]; + subgraph cluster_81 { + color=blue + 365 [label="Enter when branch condition "]; + 366 [label="Access variable R|/x|"]; + 367 [label="Const: Null(null)"]; + 368 [label="Equality operator !="]; + 369 [label="Exit when branch condition"]; + } + 370 [label="Synthetic else branch"]; + 371 [label="Enter when branch result"]; + subgraph cluster_82 { + color=blue + 372 [label="Enter block"]; + 373 [label="Access variable R|/x|"]; + 374 [label="Smart cast: R|/x|"]; + 375 [label="Access variable R|kotlin/String.length|"]; + 376 [label="Access variable R|/y|"]; + 377 [label="Smart cast: R|/y|"]; + 378 [label="Access variable R|kotlin/String.length|"]; + 379 [label="Access variable R|/z|"]; + 380 [label="Smart cast: R|/z|"]; + 381 [label="Access variable R|kotlin/String.length|"]; + 382 [label="Exit block"]; + } + 383 [label="Exit when branch result"]; + 384 [label="Exit when"]; + } + subgraph cluster_83 { + color=blue + 385 [label="Enter when"]; + subgraph cluster_84 { + color=blue + 386 [label="Enter when branch condition "]; + 387 [label="Access variable R|/y|"]; + 388 [label="Const: Null(null)"]; + 389 [label="Equality operator !="]; + 390 [label="Exit when branch condition"]; + } + 391 [label="Synthetic else branch"]; + 392 [label="Enter when branch result"]; + subgraph cluster_85 { + color=blue + 393 [label="Enter block"]; + 394 [label="Access variable R|/x|"]; + 395 [label="Smart cast: R|/x|"]; + 396 [label="Access variable R|kotlin/String.length|"]; + 397 [label="Access variable R|/y|"]; + 398 [label="Smart cast: R|/y|"]; + 399 [label="Access variable R|kotlin/String.length|"]; + 400 [label="Access variable R|/z|"]; + 401 [label="Smart cast: R|/z|"]; + 402 [label="Access variable R|kotlin/String.length|"]; + 403 [label="Exit block"]; + } + 404 [label="Exit when branch result"]; + 405 [label="Exit when"]; + } + subgraph cluster_86 { + color=blue + 406 [label="Enter when"]; + subgraph cluster_87 { + color=blue + 407 [label="Enter when branch condition "]; + 408 [label="Access variable R|/z|"]; + 409 [label="Const: Null(null)"]; + 410 [label="Equality operator !="]; + 411 [label="Exit when branch condition"]; + } + 412 [label="Synthetic else branch"]; + 413 [label="Enter when branch result"]; + subgraph cluster_88 { + color=blue + 414 [label="Enter block"]; + 415 [label="Access variable R|/x|"]; + 416 [label="Smart cast: R|/x|"]; + 417 [label="Access variable R|kotlin/String.length|"]; + 418 [label="Access variable R|/y|"]; + 419 [label="Smart cast: R|/y|"]; + 420 [label="Access variable R|kotlin/String.length|"]; + 421 [label="Access variable R|/z|"]; + 422 [label="Smart cast: R|/z|"]; + 423 [label="Access variable R|kotlin/String.length|"]; + 424 [label="Exit block"]; + } + 425 [label="Exit when branch result"]; + 426 [label="Exit when"]; + } + 427 [label="Const: Null(null)"]; + 428 [label="Assignment: R|/y|"]; + subgraph cluster_89 { + color=blue + 429 [label="Enter when"]; + subgraph cluster_90 { + color=blue + 430 [label="Enter when branch condition "]; + 431 [label="Access variable R|/x|"]; + 432 [label="Const: Null(null)"]; + 433 [label="Equality operator !="]; + 434 [label="Exit when branch condition"]; + } + 435 [label="Synthetic else branch"]; + 436 [label="Enter when branch result"]; + subgraph cluster_91 { + color=blue + 437 [label="Enter block"]; + 438 [label="Access variable R|/x|"]; + 439 [label="Smart cast: R|/x|"]; + 440 [label="Access variable R|kotlin/String.length|"]; + 441 [label="Access variable R|/y|"]; + 442 [label="Smart cast: R|/y|"]; + 443 [label="Access variable R|kotlin/String.length#|"]; + 444 [label="Access variable R|/z|"]; + 445 [label="Smart cast: R|/z|"]; + 446 [label="Access variable R|kotlin/String.length|"]; + 447 [label="Exit block"]; + } + 448 [label="Exit when branch result"]; + 449 [label="Exit when"]; + } + subgraph cluster_92 { + color=blue + 450 [label="Enter when"]; + subgraph cluster_93 { + color=blue + 451 [label="Enter when branch condition "]; + 452 [label="Access variable R|/y|"]; + 453 [label="Smart cast: R|/y|"]; + 454 [label="Const: Null(null)"]; + 455 [label="Equality operator !="]; + 456 [label="Exit when branch condition"]; + } + 457 [label="Synthetic else branch"]; + 458 [label="Enter when branch result"]; + subgraph cluster_94 { + color=blue + 459 [label="Enter block"]; + 460 [label="Access variable R|/x|"]; + 461 [label="Access variable R|kotlin/String.length#|"]; + 462 [label="Access variable R|/y|"]; + 463 [label="Smart cast: R|/y|"]; + 464 [label="Access variable R|kotlin/String.length|"]; + 465 [label="Access variable R|/z|"]; + 466 [label="Access variable R|kotlin/String.length#|"]; + 467 [label="Exit block"]; + } + 468 [label="Exit when branch result"]; + 469 [label="Exit when"]; + } + subgraph cluster_95 { + color=blue + 470 [label="Enter when"]; + subgraph cluster_96 { + color=blue + 471 [label="Enter when branch condition "]; + 472 [label="Access variable R|/z|"]; + 473 [label="Const: Null(null)"]; + 474 [label="Equality operator !="]; + 475 [label="Exit when branch condition"]; + } + 476 [label="Synthetic else branch"]; + 477 [label="Enter when branch result"]; + subgraph cluster_97 { + color=blue + 478 [label="Enter block"]; + 479 [label="Access variable R|/x|"]; + 480 [label="Smart cast: R|/x|"]; + 481 [label="Access variable R|kotlin/String.length|"]; + 482 [label="Access variable R|/y|"]; + 483 [label="Smart cast: R|/y|"]; + 484 [label="Access variable R|kotlin/String.length#|"]; + 485 [label="Access variable R|/z|"]; + 486 [label="Smart cast: R|/z|"]; + 487 [label="Access variable R|kotlin/String.length|"]; + 488 [label="Exit block"]; + } + 489 [label="Exit when branch result"]; + 490 [label="Exit when"]; + } + 491 [label="Exit block"]; + } + 492 [label="Exit function test_8" style="filled" fillcolor=red]; + } 356 -> {357}; - 357 -> {358 359}; - 358 -> {372}; + 357 -> {358}; + 358 -> {359}; 359 -> {360}; 360 -> {361}; 361 -> {362}; @@ -1132,8 +1162,8 @@ digraph boundSmartcastsInBranches_kt { 366 -> {367}; 367 -> {368}; 368 -> {369}; - 369 -> {370}; - 370 -> {371}; + 369 -> {370 371}; + 370 -> {384}; 371 -> {372}; 372 -> {373}; 373 -> {374}; @@ -1141,8 +1171,8 @@ digraph boundSmartcastsInBranches_kt { 375 -> {376}; 376 -> {377}; 377 -> {378}; - 378 -> {379 380}; - 379 -> {393}; + 378 -> {379}; + 379 -> {380}; 380 -> {381}; 381 -> {382}; 382 -> {383}; @@ -1153,8 +1183,8 @@ digraph boundSmartcastsInBranches_kt { 387 -> {388}; 388 -> {389}; 389 -> {390}; - 390 -> {391}; - 391 -> {392}; + 390 -> {391 392}; + 391 -> {405}; 392 -> {393}; 393 -> {394}; 394 -> {395}; @@ -1162,8 +1192,8 @@ digraph boundSmartcastsInBranches_kt { 396 -> {397}; 397 -> {398}; 398 -> {399}; - 399 -> {400 401}; - 400 -> {414}; + 399 -> {400}; + 400 -> {401}; 401 -> {402}; 402 -> {403}; 403 -> {404}; @@ -1174,8 +1204,8 @@ digraph boundSmartcastsInBranches_kt { 408 -> {409}; 409 -> {410}; 410 -> {411}; - 411 -> {412}; - 412 -> {413}; + 411 -> {412 413}; + 412 -> {426}; 413 -> {414}; 414 -> {415}; 415 -> {416}; @@ -1185,8 +1215,8 @@ digraph boundSmartcastsInBranches_kt { 419 -> {420}; 420 -> {421}; 421 -> {422}; - 422 -> {423 424}; - 423 -> {437}; + 422 -> {423}; + 423 -> {424}; 424 -> {425}; 425 -> {426}; 426 -> {427}; @@ -1197,8 +1227,8 @@ digraph boundSmartcastsInBranches_kt { 431 -> {432}; 432 -> {433}; 433 -> {434}; - 434 -> {435}; - 435 -> {436}; + 434 -> {435 436}; + 435 -> {449}; 436 -> {437}; 437 -> {438}; 438 -> {439}; @@ -1207,8 +1237,8 @@ digraph boundSmartcastsInBranches_kt { 441 -> {442}; 442 -> {443}; 443 -> {444}; - 444 -> {445 446}; - 445 -> {457}; + 444 -> {445}; + 445 -> {446}; 446 -> {447}; 447 -> {448}; 448 -> {449}; @@ -1219,15 +1249,15 @@ digraph boundSmartcastsInBranches_kt { 453 -> {454}; 454 -> {455}; 455 -> {456}; - 456 -> {457}; - 457 -> {458}; + 456 -> {457 458}; + 457 -> {469}; 458 -> {459}; 459 -> {460}; 460 -> {461}; 461 -> {462}; 462 -> {463}; - 463 -> {464 465}; - 464 -> {478}; + 463 -> {464}; + 464 -> {465}; 465 -> {466}; 466 -> {467}; 467 -> {468}; @@ -1238,89 +1268,12 @@ digraph boundSmartcastsInBranches_kt { 472 -> {473}; 473 -> {474}; 474 -> {475}; - 475 -> {476}; - 476 -> {477}; + 475 -> {476 477}; + 476 -> {490}; 477 -> {478}; 478 -> {479}; 479 -> {480}; - - subgraph cluster_92 { - color=red - 481 [label="Enter function test_9" style="filled" fillcolor=red]; - subgraph cluster_93 { - color=blue - 482 [label="Enter block"]; - 483 [label="Const: Null(null)"]; - 484 [label="Variable declaration: lvar a: R|kotlin/String?|"]; - 485 [label="Variable declaration: lval b: R|kotlin/String?|"]; - subgraph cluster_94 { - color=blue - 486 [label="Enter when"]; - subgraph cluster_95 { - color=blue - 487 [label="Enter when branch condition "]; - 488 [label="Access variable R|/a|"]; - 489 [label="Const: Null(null)"]; - 490 [label="Equality operator !="]; - 491 [label="Exit when branch condition"]; - } - subgraph cluster_96 { - color=blue - 492 [label="Enter when branch condition else"]; - 493 [label="Exit when branch condition"]; - } - 494 [label="Enter when branch result"]; - subgraph cluster_97 { - color=blue - 495 [label="Enter block"]; - 496 [label="Access variable R|/a|"]; - 497 [label="Smart cast: R|/a|"]; - 498 [label="Assignment: R|/b|"]; - 499 [label="Exit block"]; - } - 500 [label="Exit when branch result"]; - 501 [label="Enter when branch result"]; - subgraph cluster_98 { - color=blue - 502 [label="Enter block"]; - 503 [label="Access variable R|/a|"]; - 504 [label="Smart cast: R|/a|"]; - 505 [label="Assignment: R|/b|"]; - 506 [label="Exit block"]; - } - 507 [label="Exit when branch result"]; - 508 [label="Exit when"]; - } - 509 [label="Access variable R|/b|"]; - 510 [label="Access variable R|kotlin/String.length#|"]; - subgraph cluster_99 { - color=blue - 511 [label="Enter when"]; - subgraph cluster_100 { - color=blue - 512 [label="Enter when branch condition "]; - 513 [label="Access variable R|/a|"]; - 514 [label="Const: Null(null)"]; - 515 [label="Equality operator !="]; - 516 [label="Exit when branch condition"]; - } - 517 [label="Synthetic else branch"]; - 518 [label="Enter when branch result"]; - subgraph cluster_101 { - color=blue - 519 [label="Enter block"]; - 520 [label="Access variable R|/b|"]; - 521 [label="Smart cast: R|/b|"]; - 522 [label="Access variable R|kotlin/String.length|"]; - 523 [label="Exit block"]; - } - 524 [label="Exit when branch result"]; - 525 [label="Exit when"]; - } - 526 [label="Exit block"]; - } - 527 [label="Exit function test_9" style="filled" fillcolor=red]; - } + 480 -> {481}; 481 -> {482}; 482 -> {483}; 483 -> {484}; @@ -1331,8 +1284,85 @@ digraph boundSmartcastsInBranches_kt { 488 -> {489}; 489 -> {490}; 490 -> {491}; - 491 -> {492 501}; - 492 -> {493}; + 491 -> {492}; + + subgraph cluster_98 { + color=red + 493 [label="Enter function test_9" style="filled" fillcolor=red]; + subgraph cluster_99 { + color=blue + 494 [label="Enter block"]; + 495 [label="Const: Null(null)"]; + 496 [label="Variable declaration: lvar a: R|kotlin/String?|"]; + 497 [label="Variable declaration: lval b: R|kotlin/String?|"]; + subgraph cluster_100 { + color=blue + 498 [label="Enter when"]; + subgraph cluster_101 { + color=blue + 499 [label="Enter when branch condition "]; + 500 [label="Access variable R|/a|"]; + 501 [label="Const: Null(null)"]; + 502 [label="Equality operator !="]; + 503 [label="Exit when branch condition"]; + } + subgraph cluster_102 { + color=blue + 504 [label="Enter when branch condition else"]; + 505 [label="Exit when branch condition"]; + } + 506 [label="Enter when branch result"]; + subgraph cluster_103 { + color=blue + 507 [label="Enter block"]; + 508 [label="Access variable R|/a|"]; + 509 [label="Smart cast: R|/a|"]; + 510 [label="Assignment: R|/b|"]; + 511 [label="Exit block"]; + } + 512 [label="Exit when branch result"]; + 513 [label="Enter when branch result"]; + subgraph cluster_104 { + color=blue + 514 [label="Enter block"]; + 515 [label="Access variable R|/a|"]; + 516 [label="Smart cast: R|/a|"]; + 517 [label="Assignment: R|/b|"]; + 518 [label="Exit block"]; + } + 519 [label="Exit when branch result"]; + 520 [label="Exit when"]; + } + 521 [label="Access variable R|/b|"]; + 522 [label="Access variable R|kotlin/String.length#|"]; + subgraph cluster_105 { + color=blue + 523 [label="Enter when"]; + subgraph cluster_106 { + color=blue + 524 [label="Enter when branch condition "]; + 525 [label="Access variable R|/a|"]; + 526 [label="Const: Null(null)"]; + 527 [label="Equality operator !="]; + 528 [label="Exit when branch condition"]; + } + 529 [label="Synthetic else branch"]; + 530 [label="Enter when branch result"]; + subgraph cluster_107 { + color=blue + 531 [label="Enter block"]; + 532 [label="Access variable R|/b|"]; + 533 [label="Smart cast: R|/b|"]; + 534 [label="Access variable R|kotlin/String.length|"]; + 535 [label="Exit block"]; + } + 536 [label="Exit when branch result"]; + 537 [label="Exit when"]; + } + 538 [label="Exit block"]; + } + 539 [label="Exit function test_9" style="filled" fillcolor=red]; + } 493 -> {494}; 494 -> {495}; 495 -> {496}; @@ -1340,10 +1370,10 @@ digraph boundSmartcastsInBranches_kt { 497 -> {498}; 498 -> {499}; 499 -> {500}; - 500 -> {508}; + 500 -> {501}; 501 -> {502}; 502 -> {503}; - 503 -> {504}; + 503 -> {504 513}; 504 -> {505}; 505 -> {506}; 506 -> {507}; @@ -1352,12 +1382,12 @@ digraph boundSmartcastsInBranches_kt { 509 -> {510}; 510 -> {511}; 511 -> {512}; - 512 -> {513}; + 512 -> {520}; 513 -> {514}; 514 -> {515}; 515 -> {516}; - 516 -> {517 518}; - 517 -> {525}; + 516 -> {517}; + 517 -> {518}; 518 -> {519}; 519 -> {520}; 520 -> {521}; @@ -1367,5 +1397,17 @@ digraph boundSmartcastsInBranches_kt { 524 -> {525}; 525 -> {526}; 526 -> {527}; + 527 -> {528}; + 528 -> {529 530}; + 529 -> {537}; + 530 -> {531}; + 531 -> {532}; + 532 -> {533}; + 533 -> {534}; + 534 -> {535}; + 535 -> {536}; + 536 -> {537}; + 537 -> {538}; + 538 -> {539}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot index d5c8ccce7a4..2286a6e3a4e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot @@ -91,38 +91,43 @@ digraph functionCallBound_kt { 26 [label="Access variable R|/base|"]; 27 [label="Type operator: (R|/base| as? R|Sub|)"]; 28 [label="Enter safe call"]; - 29 [label="Function call: $subj$.R|/isOk|()" style="filled" fillcolor=yellow]; - 30 [label="Exit safe call"]; - 31 [label="Const: Boolean(true)"]; - 32 [label="Equality operator =="]; - 33 [label="Exit when branch condition"]; - } - subgraph cluster_12 { - color=blue - 34 [label="Enter when branch condition else"]; + subgraph cluster_12 { + color=blue + 29 [label="Function call arguments enter"]; + 30 [label="Function call arguments exit"]; + } + 31 [label="Function call: $subj$.R|/isOk|()" style="filled" fillcolor=yellow]; + 32 [label="Exit safe call"]; + 33 [label="Const: Boolean(true)"]; + 34 [label="Equality operator =="]; 35 [label="Exit when branch condition"]; } - 36 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 37 [label="Enter block"]; - 38 [label="Access variable R|/base|"]; - 39 [label="Exit block"]; + 36 [label="Enter when branch condition else"]; + 37 [label="Exit when branch condition"]; } - 40 [label="Exit when branch result"]; - 41 [label="Enter when branch result"]; + 38 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 42 [label="Enter block"]; - 43 [label="Access variable R|/base|"]; - 44 [label="Smart cast: R|/base|"]; - 45 [label="Access variable R|/Sub.data|"]; - 46 [label="Exit block"]; + 39 [label="Enter block"]; + 40 [label="Access variable R|/base|"]; + 41 [label="Exit block"]; } - 47 [label="Exit when branch result"]; - 48 [label="Exit when"]; + 42 [label="Exit when branch result"]; + 43 [label="Enter when branch result"]; + subgraph cluster_15 { + color=blue + 44 [label="Enter block"]; + 45 [label="Access variable R|/base|"]; + 46 [label="Smart cast: R|/base|"]; + 47 [label="Access variable R|/Sub.data|"]; + 48 [label="Exit block"]; + } + 49 [label="Exit when branch result"]; + 50 [label="Exit when"]; } - 49 [label="Jump: ^check when () { + 51 [label="Jump: ^check when () { ==((R|/base| as? R|Sub|)?.{ $subj$.R|/isOk|() }, Boolean(true)) -> { R|/base|.R|/Sub.data| } @@ -131,41 +136,43 @@ digraph functionCallBound_kt { } } "]; - 50 [label="Stub" style="filled" fillcolor=gray]; - 51 [label="Exit block" style="filled" fillcolor=gray]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; } - 52 [label="Exit function check" style="filled" fillcolor=red]; + 54 [label="Exit function check" style="filled" fillcolor=red]; } 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {28 30}; + 27 -> {28 32}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {34 41}; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {36 43}; 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {48}; + 40 -> {41}; 41 -> {42}; - 42 -> {43}; + 42 -> {50}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {52}; - 49 -> {50} [style=dotted]; - 50 -> {51} [style=dotted]; + 49 -> {50}; + 50 -> {51}; + 51 -> {54}; 51 -> {52} [style=dotted]; + 52 -> {53} [style=dotted]; + 53 -> {54} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot index 5c8c78a7f59..f7398343991 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot @@ -55,20 +55,30 @@ digraph casts_kt { subgraph cluster_7 { color=blue 20 [label="Enter block"]; - 21 [label="Access variable R|/x|"]; - 22 [label="Smart cast: R|/x|"]; - 23 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 24 [label="Exit block"]; + subgraph cluster_8 { + color=blue + 21 [label="Function call arguments enter"]; + 22 [label="Access variable R|/x|"]; + 23 [label="Smart cast: R|/x|"]; + 24 [label="Function call arguments exit"]; + } + 25 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 26 [label="Exit block"]; } - 25 [label="Exit when branch result"]; - 26 [label="Exit when"]; + 27 [label="Exit when branch result"]; + 28 [label="Exit when"]; } - 27 [label="Access variable R|/x|"]; - 28 [label="Smart cast: R|/x|"]; - 29 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; + subgraph cluster_9 { + color=blue + 29 [label="Function call arguments enter"]; + 30 [label="Access variable R|/x|"]; + 31 [label="Smart cast: R|/x|"]; + 32 [label="Function call arguments exit"]; + } + 33 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 34 [label="Exit block"]; } - 31 [label="Exit function test_2" style="filled" fillcolor=red]; + 35 [label="Exit function test_2" style="filled" fillcolor=red]; } 11 -> {12}; 12 -> {13}; @@ -77,7 +87,7 @@ digraph casts_kt { 15 -> {16}; 16 -> {17}; 17 -> {18 19}; - 18 -> {26}; + 18 -> {28}; 19 -> {20}; 20 -> {21}; 21 -> {22}; @@ -90,134 +100,164 @@ digraph casts_kt { 28 -> {29}; 29 -> {30}; 30 -> {31}; - - subgraph cluster_8 { - color=red - 32 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 33 [label="Enter block"]; - subgraph cluster_10 { - color=blue - 34 [label="Enter when"]; - subgraph cluster_11 { - color=blue - 35 [label="Enter when branch condition "]; - subgraph cluster_12 { - color=blue - 36 [label="Enter &&"]; - 37 [label="Access variable R|/b|"]; - 38 [label="Exit left part of &&"]; - 39 [label="Enter right part of &&"]; - 40 [label="Access variable R|/x|"]; - 41 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; - 42 [label="Exit &&"]; - } - 43 [label="Exit when branch condition"]; - } - 44 [label="Synthetic else branch"]; - 45 [label="Enter when branch result"]; - subgraph cluster_13 { - color=blue - 46 [label="Enter block"]; - 47 [label="Access variable R|/x|"]; - 48 [label="Smart cast: R|/x|"]; - 49 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 50 [label="Exit block"]; - } - 51 [label="Exit when branch result"]; - 52 [label="Exit when"]; - } - 53 [label="Access variable R|/x|"]; - 54 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - subgraph cluster_14 { - color=blue - 55 [label="Enter when"]; - subgraph cluster_15 { - color=blue - 56 [label="Enter when branch condition "]; - subgraph cluster_16 { - color=blue - 57 [label="Enter &&"]; - 58 [label="Access variable R|/b|"]; - 59 [label="Exit left part of &&"]; - 60 [label="Enter right part of &&"]; - 61 [label="Access variable R|/x|"]; - 62 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; - 63 [label="Const: Boolean(true)"]; - 64 [label="Equality operator =="]; - 65 [label="Exit &&"]; - } - 66 [label="Exit when branch condition"]; - } - 67 [label="Synthetic else branch"]; - 68 [label="Enter when branch result"]; - subgraph cluster_17 { - color=blue - 69 [label="Enter block"]; - 70 [label="Access variable R|/x|"]; - 71 [label="Smart cast: R|/x|"]; - 72 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 73 [label="Exit block"]; - } - 74 [label="Exit when branch result"]; - 75 [label="Exit when"]; - } - 76 [label="Access variable R|/x|"]; - 77 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - subgraph cluster_18 { - color=blue - 78 [label="Enter when"]; - subgraph cluster_19 { - color=blue - 79 [label="Enter when branch condition "]; - subgraph cluster_20 { - color=blue - 80 [label="Enter ||"]; - 81 [label="Access variable R|/b|"]; - 82 [label="Exit left part of ||"]; - 83 [label="Enter right part of ||"]; - 84 [label="Access variable R|/x|"]; - 85 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; - 86 [label="Exit ||"]; - } - 87 [label="Exit when branch condition"]; - } - 88 [label="Synthetic else branch"]; - 89 [label="Enter when branch result"]; - subgraph cluster_21 { - color=blue - 90 [label="Enter block"]; - 91 [label="Access variable R|/x|"]; - 92 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 93 [label="Exit block"]; - } - 94 [label="Exit when branch result"]; - 95 [label="Exit when"]; - } - 96 [label="Access variable R|/x|"]; - 97 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 98 [label="Exit block"]; - } - 99 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36}; + + subgraph cluster_10 { + color=red + 36 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 37 [label="Enter block"]; + subgraph cluster_12 { + color=blue + 38 [label="Enter when"]; + subgraph cluster_13 { + color=blue + 39 [label="Enter when branch condition "]; + subgraph cluster_14 { + color=blue + 40 [label="Enter &&"]; + 41 [label="Access variable R|/b|"]; + 42 [label="Exit left part of &&"]; + 43 [label="Enter right part of &&"]; + 44 [label="Access variable R|/x|"]; + 45 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 46 [label="Exit &&"]; + } + 47 [label="Exit when branch condition"]; + } + 48 [label="Synthetic else branch"]; + 49 [label="Enter when branch result"]; + subgraph cluster_15 { + color=blue + 50 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 51 [label="Function call arguments enter"]; + 52 [label="Access variable R|/x|"]; + 53 [label="Smart cast: R|/x|"]; + 54 [label="Function call arguments exit"]; + } + 55 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 56 [label="Exit block"]; + } + 57 [label="Exit when branch result"]; + 58 [label="Exit when"]; + } + subgraph cluster_17 { + color=blue + 59 [label="Function call arguments enter"]; + 60 [label="Access variable R|/x|"]; + 61 [label="Function call arguments exit"]; + } + 62 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_18 { + color=blue + 63 [label="Enter when"]; + subgraph cluster_19 { + color=blue + 64 [label="Enter when branch condition "]; + subgraph cluster_20 { + color=blue + 65 [label="Enter &&"]; + 66 [label="Access variable R|/b|"]; + 67 [label="Exit left part of &&"]; + 68 [label="Enter right part of &&"]; + 69 [label="Access variable R|/x|"]; + 70 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 71 [label="Const: Boolean(true)"]; + 72 [label="Equality operator =="]; + 73 [label="Exit &&"]; + } + 74 [label="Exit when branch condition"]; + } + 75 [label="Synthetic else branch"]; + 76 [label="Enter when branch result"]; + subgraph cluster_21 { + color=blue + 77 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 78 [label="Function call arguments enter"]; + 79 [label="Access variable R|/x|"]; + 80 [label="Smart cast: R|/x|"]; + 81 [label="Function call arguments exit"]; + } + 82 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 83 [label="Exit block"]; + } + 84 [label="Exit when branch result"]; + 85 [label="Exit when"]; + } + subgraph cluster_23 { + color=blue + 86 [label="Function call arguments enter"]; + 87 [label="Access variable R|/x|"]; + 88 [label="Function call arguments exit"]; + } + 89 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_24 { + color=blue + 90 [label="Enter when"]; + subgraph cluster_25 { + color=blue + 91 [label="Enter when branch condition "]; + subgraph cluster_26 { + color=blue + 92 [label="Enter ||"]; + 93 [label="Access variable R|/b|"]; + 94 [label="Exit left part of ||"]; + 95 [label="Enter right part of ||"]; + 96 [label="Access variable R|/x|"]; + 97 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 98 [label="Exit ||"]; + } + 99 [label="Exit when branch condition"]; + } + 100 [label="Synthetic else branch"]; + 101 [label="Enter when branch result"]; + subgraph cluster_27 { + color=blue + 102 [label="Enter block"]; + subgraph cluster_28 { + color=blue + 103 [label="Function call arguments enter"]; + 104 [label="Access variable R|/x|"]; + 105 [label="Function call arguments exit"]; + } + 106 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 107 [label="Exit block"]; + } + 108 [label="Exit when branch result"]; + 109 [label="Exit when"]; + } + subgraph cluster_29 { + color=blue + 110 [label="Function call arguments enter"]; + 111 [label="Access variable R|/x|"]; + 112 [label="Function call arguments exit"]; + } + 113 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 114 [label="Exit block"]; + } + 115 [label="Exit function test_3" style="filled" fillcolor=red]; + } 36 -> {37}; 37 -> {38}; - 38 -> {39 42}; + 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43}; - 43 -> {44 45}; - 44 -> {52}; + 42 -> {43 46}; + 43 -> {44}; + 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; - 48 -> {49}; + 47 -> {48 49}; + 48 -> {58}; 49 -> {50}; 50 -> {51}; 51 -> {52}; @@ -228,138 +268,48 @@ digraph casts_kt { 56 -> {57}; 57 -> {58}; 58 -> {59}; - 59 -> {60 65}; + 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {67 68}; - 67 -> {75}; + 66 -> {67}; + 67 -> {68 73}; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; - 74 -> {75}; - 75 -> {76}; + 74 -> {75 76}; + 75 -> {85}; 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {83 86}; + 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; - 87 -> {88 89}; - 88 -> {95}; + 87 -> {88}; + 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; - 94 -> {95}; + 94 -> {95 98}; 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; - - subgraph cluster_22 { - color=red - 100 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 101 [label="Enter block"]; - subgraph cluster_24 { - color=blue - 102 [label="Enter when"]; - subgraph cluster_25 { - color=blue - 103 [label="Enter when branch condition "]; - 104 [label="Access variable R|/b|"]; - 105 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; - 106 [label="Const: Null(null)"]; - 107 [label="Equality operator !="]; - 108 [label="Exit when branch condition"]; - } - subgraph cluster_26 { - color=blue - 109 [label="Enter when branch condition else"]; - 110 [label="Exit when branch condition"]; - } - 111 [label="Enter when branch result"]; - subgraph cluster_27 { - color=blue - 112 [label="Enter block"]; - 113 [label="Access variable R|/b|"]; - 114 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; - 115 [label="Exit block"]; - } - 116 [label="Exit when branch result"]; - 117 [label="Enter when branch result"]; - subgraph cluster_28 { - color=blue - 118 [label="Enter block"]; - 119 [label="Access variable R|/b|"]; - 120 [label="Smart cast: R|/b|"]; - 121 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 122 [label="Exit block"]; - } - 123 [label="Exit when branch result"]; - 124 [label="Exit when"]; - } - 125 [label="Access variable R|/b|"]; - 126 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; - subgraph cluster_29 { - color=blue - 127 [label="Enter when"]; - subgraph cluster_30 { - color=blue - 128 [label="Enter when branch condition "]; - 129 [label="Access variable R|/b|"]; - 130 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; - 131 [label="Const: Null(null)"]; - 132 [label="Equality operator =="]; - 133 [label="Exit when branch condition"]; - } - subgraph cluster_31 { - color=blue - 134 [label="Enter when branch condition else"]; - 135 [label="Exit when branch condition"]; - } - 136 [label="Enter when branch result"]; - subgraph cluster_32 { - color=blue - 137 [label="Enter block"]; - 138 [label="Access variable R|/b|"]; - 139 [label="Smart cast: R|/b|"]; - 140 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 141 [label="Exit block"]; - } - 142 [label="Exit when branch result"]; - 143 [label="Enter when branch result"]; - subgraph cluster_33 { - color=blue - 144 [label="Enter block"]; - 145 [label="Access variable R|/b|"]; - 146 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; - 147 [label="Exit block"]; - } - 148 [label="Exit when branch result"]; - 149 [label="Exit when"]; - } - 150 [label="Access variable R|/b|"]; - 151 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; - 152 [label="Exit block"]; - } - 153 [label="Exit function test_4" style="filled" fillcolor=red]; - } - 100 -> {101}; + 99 -> {100 101}; + 100 -> {109}; 101 -> {102}; 102 -> {103}; 103 -> {104}; @@ -367,15 +317,135 @@ digraph casts_kt { 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {109 117}; + 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; - 115 -> {116}; - 116 -> {124}; + + subgraph cluster_30 { + color=red + 116 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 117 [label="Enter block"]; + subgraph cluster_32 { + color=blue + 118 [label="Enter when"]; + subgraph cluster_33 { + color=blue + 119 [label="Enter when branch condition "]; + 120 [label="Access variable R|/b|"]; + 121 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; + 122 [label="Const: Null(null)"]; + 123 [label="Equality operator !="]; + 124 [label="Exit when branch condition"]; + } + subgraph cluster_34 { + color=blue + 125 [label="Enter when branch condition else"]; + 126 [label="Exit when branch condition"]; + } + 127 [label="Enter when branch result"]; + subgraph cluster_35 { + color=blue + 128 [label="Enter block"]; + subgraph cluster_36 { + color=blue + 129 [label="Function call arguments enter"]; + 130 [label="Access variable R|/b|"]; + 131 [label="Function call arguments exit"]; + } + 132 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; + 133 [label="Exit block"]; + } + 134 [label="Exit when branch result"]; + 135 [label="Enter when branch result"]; + subgraph cluster_37 { + color=blue + 136 [label="Enter block"]; + subgraph cluster_38 { + color=blue + 137 [label="Function call arguments enter"]; + 138 [label="Access variable R|/b|"]; + 139 [label="Smart cast: R|/b|"]; + 140 [label="Function call arguments exit"]; + } + 141 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 142 [label="Exit block"]; + } + 143 [label="Exit when branch result"]; + 144 [label="Exit when"]; + } + subgraph cluster_39 { + color=blue + 145 [label="Function call arguments enter"]; + 146 [label="Access variable R|/b|"]; + 147 [label="Function call arguments exit"]; + } + 148 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_40 { + color=blue + 149 [label="Enter when"]; + subgraph cluster_41 { + color=blue + 150 [label="Enter when branch condition "]; + 151 [label="Access variable R|/b|"]; + 152 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; + 153 [label="Const: Null(null)"]; + 154 [label="Equality operator =="]; + 155 [label="Exit when branch condition"]; + } + subgraph cluster_42 { + color=blue + 156 [label="Enter when branch condition else"]; + 157 [label="Exit when branch condition"]; + } + 158 [label="Enter when branch result"]; + subgraph cluster_43 { + color=blue + 159 [label="Enter block"]; + subgraph cluster_44 { + color=blue + 160 [label="Function call arguments enter"]; + 161 [label="Access variable R|/b|"]; + 162 [label="Smart cast: R|/b|"]; + 163 [label="Function call arguments exit"]; + } + 164 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 165 [label="Exit block"]; + } + 166 [label="Exit when branch result"]; + 167 [label="Enter when branch result"]; + subgraph cluster_45 { + color=blue + 168 [label="Enter block"]; + subgraph cluster_46 { + color=blue + 169 [label="Function call arguments enter"]; + 170 [label="Access variable R|/b|"]; + 171 [label="Function call arguments exit"]; + } + 172 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; + 173 [label="Exit block"]; + } + 174 [label="Exit when branch result"]; + 175 [label="Exit when"]; + } + subgraph cluster_47 { + color=blue + 176 [label="Function call arguments enter"]; + 177 [label="Access variable R|/b|"]; + 178 [label="Function call arguments exit"]; + } + 179 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; + 180 [label="Exit block"]; + } + 181 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 116 -> {117}; 117 -> {118}; 118 -> {119}; 119 -> {120}; @@ -383,7 +453,7 @@ digraph casts_kt { 121 -> {122}; 122 -> {123}; 123 -> {124}; - 124 -> {125}; + 124 -> {125 135}; 125 -> {126}; 126 -> {127}; 127 -> {128}; @@ -392,8 +462,8 @@ digraph casts_kt { 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {134 143}; - 134 -> {135}; + 133 -> {134}; + 134 -> {144}; 135 -> {136}; 136 -> {137}; 137 -> {138}; @@ -401,7 +471,7 @@ digraph casts_kt { 139 -> {140}; 140 -> {141}; 141 -> {142}; - 142 -> {149}; + 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; @@ -412,5 +482,33 @@ digraph casts_kt { 150 -> {151}; 151 -> {152}; 152 -> {153}; + 153 -> {154}; + 154 -> {155}; + 155 -> {156 167}; + 156 -> {157}; + 157 -> {158}; + 158 -> {159}; + 159 -> {160}; + 160 -> {161}; + 161 -> {162}; + 162 -> {163}; + 163 -> {164}; + 164 -> {165}; + 165 -> {166}; + 166 -> {175}; + 167 -> {168}; + 168 -> {169}; + 169 -> {170}; + 170 -> {171}; + 171 -> {172}; + 172 -> {173}; + 173 -> {174}; + 174 -> {175}; + 175 -> {176}; + 176 -> {177}; + 177 -> {178}; + 178 -> {179}; + 179 -> {180}; + 180 -> {181}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot index 65bf08474fe..b8c858558bd 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot @@ -53,17 +53,22 @@ digraph elvis_kt { subgraph cluster_7 { color=blue 23 [label="Enter block"]; - 24 [label="Access variable R|/x|"]; - 25 [label="Smart cast: R|/x|"]; - 26 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; + subgraph cluster_8 { + color=blue + 24 [label="Function call arguments enter"]; + 25 [label="Access variable R|/x|"]; + 26 [label="Smart cast: R|/x|"]; + 27 [label="Function call arguments exit"]; + } + 28 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 29 [label="Exit block"]; } - 28 [label="Exit when branch result"]; - 29 [label="Exit when"]; + 30 [label="Exit when branch result"]; + 31 [label="Exit when"]; } - 30 [label="Exit block"]; + 32 [label="Exit block"]; } - 31 [label="Exit function test_1" style="filled" fillcolor=red]; + 33 [label="Exit function test_1" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; @@ -75,13 +80,13 @@ digraph elvis_kt { 13 -> {14}; 14 -> {15 18}; 15 -> {16}; - 16 -> {31}; + 16 -> {33}; 16 -> {17} [style=dotted]; 17 -> {19} [style=dotted]; 18 -> {19}; 19 -> {20}; 20 -> {21 22}; - 21 -> {29}; + 21 -> {31}; 22 -> {23}; 23 -> {24}; 24 -> {25}; @@ -91,116 +96,118 @@ digraph elvis_kt { 28 -> {29}; 29 -> {30}; 30 -> {31}; + 31 -> {32}; + 32 -> {33}; - subgraph cluster_8 { + subgraph cluster_9 { color=red - 32 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_9 { + 34 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 33 [label="Enter block"]; - subgraph cluster_10 { + 35 [label="Enter block"]; + subgraph cluster_11 { color=blue - 34 [label="Enter when"]; - subgraph cluster_11 { - color=blue - 35 [label="Enter when branch condition "]; - 36 [label="Access variable R|/b|"]; - 37 [label="Type operator: (R|/b| !is R|kotlin/String|)"]; - 38 [label="Exit when branch condition"]; - } - 39 [label="Synthetic else branch"]; - 40 [label="Enter when branch result"]; + 36 [label="Enter when"]; subgraph cluster_12 { color=blue - 41 [label="Enter block"]; - 42 [label="Const: String()"]; - 43 [label="Jump: ^test2 String()"]; - 44 [label="Stub" style="filled" fillcolor=gray]; - 45 [label="Exit block" style="filled" fillcolor=gray]; + 37 [label="Enter when branch condition "]; + 38 [label="Access variable R|/b|"]; + 39 [label="Type operator: (R|/b| !is R|kotlin/String|)"]; + 40 [label="Exit when branch condition"]; } - 46 [label="Exit when branch result" style="filled" fillcolor=gray]; - 47 [label="Exit when"]; - } - subgraph cluster_13 { - color=blue - 48 [label="Enter when"]; - subgraph cluster_14 { + 41 [label="Synthetic else branch"]; + 42 [label="Enter when branch result"]; + subgraph cluster_13 { color=blue - 49 [label="Enter when branch condition "]; - 50 [label="Access variable R|/a|"]; - 51 [label="Type operator: (R|/a| !is R|kotlin/String?|)"]; - 52 [label="Exit when branch condition"]; + 43 [label="Enter block"]; + 44 [label="Const: String()"]; + 45 [label="Jump: ^test2 String()"]; + 46 [label="Stub" style="filled" fillcolor=gray]; + 47 [label="Exit block" style="filled" fillcolor=gray]; } - 53 [label="Synthetic else branch"]; - 54 [label="Enter when branch result"]; + 48 [label="Exit when branch result" style="filled" fillcolor=gray]; + 49 [label="Exit when"]; + } + subgraph cluster_14 { + color=blue + 50 [label="Enter when"]; subgraph cluster_15 { color=blue - 55 [label="Enter block"]; - 56 [label="Const: String()"]; - 57 [label="Jump: ^test2 String()"]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; + 51 [label="Enter when branch condition "]; + 52 [label="Access variable R|/a|"]; + 53 [label="Type operator: (R|/a| !is R|kotlin/String?|)"]; + 54 [label="Exit when branch condition"]; } - 60 [label="Exit when branch result" style="filled" fillcolor=gray]; - 61 [label="Exit when"]; + 55 [label="Synthetic else branch"]; + 56 [label="Enter when branch result"]; + subgraph cluster_16 { + color=blue + 57 [label="Enter block"]; + 58 [label="Const: String()"]; + 59 [label="Jump: ^test2 String()"]; + 60 [label="Stub" style="filled" fillcolor=gray]; + 61 [label="Exit block" style="filled" fillcolor=gray]; + } + 62 [label="Exit when branch result" style="filled" fillcolor=gray]; + 63 [label="Exit when"]; } - 62 [label="Access variable R|/a|"]; - 63 [label="Smart cast: R|/a|"]; - 64 [label="Exit lhs of ?:"]; - 65 [label="Enter rhs of ?:"]; - 66 [label="Access variable R|/b|"]; - 67 [label="Smart cast: R|/b|"]; - 68 [label="Lhs of ?: is not null"]; - 69 [label="Exit ?:"]; - 70 [label="Jump: ^test2 R|/a| ?: R|/b|"]; - 71 [label="Stub" style="filled" fillcolor=gray]; - 72 [label="Exit block" style="filled" fillcolor=gray]; + 64 [label="Access variable R|/a|"]; + 65 [label="Smart cast: R|/a|"]; + 66 [label="Exit lhs of ?:"]; + 67 [label="Enter rhs of ?:"]; + 68 [label="Access variable R|/b|"]; + 69 [label="Smart cast: R|/b|"]; + 70 [label="Lhs of ?: is not null"]; + 71 [label="Exit ?:"]; + 72 [label="Jump: ^test2 R|/a| ?: R|/b|"]; + 73 [label="Stub" style="filled" fillcolor=gray]; + 74 [label="Exit block" style="filled" fillcolor=gray]; } - 73 [label="Exit function test2" style="filled" fillcolor=red]; + 75 [label="Exit function test2" style="filled" fillcolor=red]; } - 32 -> {33}; - 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {39 40}; - 39 -> {47}; - 40 -> {41}; - 41 -> {42}; + 38 -> {39}; + 39 -> {40}; + 40 -> {41 42}; + 41 -> {49}; 42 -> {43}; - 43 -> {73}; - 43 -> {44} [style=dotted]; - 44 -> {45} [style=dotted]; + 43 -> {44}; + 44 -> {45}; + 45 -> {75}; 45 -> {46} [style=dotted]; 46 -> {47} [style=dotted]; - 47 -> {48}; - 48 -> {49}; + 47 -> {48} [style=dotted]; + 48 -> {49} [style=dotted]; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {53 54}; - 53 -> {61}; - 54 -> {55}; - 55 -> {56}; + 52 -> {53}; + 53 -> {54}; + 54 -> {55 56}; + 55 -> {63}; 56 -> {57}; - 57 -> {73}; - 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; + 57 -> {58}; + 58 -> {59}; + 59 -> {75}; 59 -> {60} [style=dotted]; 60 -> {61} [style=dotted]; - 61 -> {62}; - 62 -> {63}; + 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; 63 -> {64}; - 64 -> {65 68}; + 64 -> {65}; 65 -> {66}; - 66 -> {67}; - 67 -> {69}; + 66 -> {67 70}; + 67 -> {68}; 68 -> {69}; - 69 -> {70}; - 70 -> {73}; - 70 -> {71} [style=dotted]; - 71 -> {72} [style=dotted]; + 69 -> {71}; + 70 -> {71}; + 71 -> {72}; + 72 -> {75}; 72 -> {73} [style=dotted]; + 73 -> {74} [style=dotted]; + 74 -> {75} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot index 735372d2589..323b9032295 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot @@ -242,36 +242,61 @@ digraph returns_kt { subgraph cluster_28 { color=blue 87 [label="Enter block"]; - 88 [label="Access variable R|/x|"]; - 89 [label="Smart cast: R|/x|"]; - 90 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; - 91 [label="Exit block"]; + subgraph cluster_29 { + color=blue + 88 [label="Function call arguments enter"]; + 89 [label="Access variable R|/x|"]; + 90 [label="Smart cast: R|/x|"]; + 91 [label="Function call arguments exit"]; + } + 92 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; + 93 [label="Exit block"]; } - 92 [label="Exit when branch result"]; - 93 [label="Enter when branch result"]; - subgraph cluster_29 { + 94 [label="Exit when branch result"]; + 95 [label="Enter when branch result"]; + subgraph cluster_30 { color=blue - 94 [label="Enter block"]; - 95 [label="Access variable R|/x|"]; - 96 [label="Smart cast: R|/x|"]; - 97 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 98 [label="Exit block"]; + 96 [label="Enter block"]; + subgraph cluster_31 { + color=blue + 97 [label="Function call arguments enter"]; + 98 [label="Access variable R|/x|"]; + 99 [label="Smart cast: R|/x|"]; + 100 [label="Function call arguments exit"]; + } + 101 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 102 [label="Exit block"]; } - 99 [label="Exit when branch result"]; - 100 [label="Exit when"]; + 103 [label="Exit when branch result"]; + 104 [label="Exit when"]; } - 101 [label="Access variable R|/x|"]; - 102 [label="Smart cast: R|/x|"]; - 103 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 104 [label="Access variable R|/x|"]; - 105 [label="Smart cast: R|/x|"]; - 106 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 107 [label="Access variable R|/x|"]; - 108 [label="Smart cast: R|/x|"]; - 109 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 110 [label="Exit block"]; + subgraph cluster_32 { + color=blue + 105 [label="Function call arguments enter"]; + 106 [label="Access variable R|/x|"]; + 107 [label="Smart cast: R|/x|"]; + 108 [label="Function call arguments exit"]; + } + 109 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_33 { + color=blue + 110 [label="Function call arguments enter"]; + 111 [label="Access variable R|/x|"]; + 112 [label="Smart cast: R|/x|"]; + 113 [label="Function call arguments exit"]; + } + 114 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_34 { + color=blue + 115 [label="Function call arguments enter"]; + 116 [label="Access variable R|/x|"]; + 117 [label="Smart cast: R|/x|"]; + 118 [label="Function call arguments exit"]; + } + 119 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 120 [label="Exit block"]; } - 111 [label="Exit function test_2" style="filled" fillcolor=red]; + 121 [label="Exit function test_2" style="filled" fillcolor=red]; } 67 -> {68}; 68 -> {69}; @@ -279,7 +304,7 @@ digraph returns_kt { 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {74 93}; + 73 -> {74 95}; 74 -> {75}; 75 -> {76}; 76 -> {77}; @@ -288,20 +313,20 @@ digraph returns_kt { 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {111}; + 82 -> {121}; 82 -> {83} [style=dotted]; 83 -> {84} [style=dotted]; 84 -> {85} [style=dotted]; - 85 -> {100} [style=dotted]; + 85 -> {104} [style=dotted]; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; - 92 -> {100}; + 92 -> {93}; 93 -> {94}; - 94 -> {95}; + 94 -> {104}; 95 -> {96}; 96 -> {97}; 97 -> {98}; @@ -318,85 +343,110 @@ digraph returns_kt { 108 -> {109}; 109 -> {110}; 110 -> {111}; - - subgraph cluster_30 { - color=red - 112 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 113 [label="Enter block"]; - subgraph cluster_32 { - color=blue - 114 [label="Enter when"]; - subgraph cluster_33 { - color=blue - 115 [label="Enter when branch condition "]; - 116 [label="Access variable R|/x|"]; - 117 [label="Type operator: (R|/x| is R|B|)"]; - 118 [label="Exit when branch condition"]; - } - subgraph cluster_34 { - color=blue - 119 [label="Enter when branch condition "]; - 120 [label="Access variable R|/x|"]; - 121 [label="Type operator: (R|/x| is R|C|)"]; - 122 [label="Exit when branch condition"]; - } - 123 [label="Synthetic else branch"]; - 124 [label="Enter when branch result"]; - subgraph cluster_35 { - color=blue - 125 [label="Enter block"]; - 126 [label="Access variable R|/x|"]; - 127 [label="Smart cast: R|/x|"]; - 128 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; - 129 [label="Exit block"]; - } - 130 [label="Exit when branch result"]; - 131 [label="Enter when branch result"]; - subgraph cluster_36 { - color=blue - 132 [label="Enter block"]; - 133 [label="Access variable R|/x|"]; - 134 [label="Smart cast: R|/x|"]; - 135 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 136 [label="Exit block"]; - } - 137 [label="Exit when branch result"]; - 138 [label="Exit when"]; - } - 139 [label="Access variable R|/x|"]; - 140 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 141 [label="Access variable R|/x|"]; - 142 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 143 [label="Access variable R|/x|"]; - 144 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 145 [label="Exit block"]; - } - 146 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {119 131}; + 118 -> {119}; 119 -> {120}; 120 -> {121}; - 121 -> {122}; - 122 -> {123 124}; - 123 -> {138}; + + subgraph cluster_35 { + color=red + 122 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_36 { + color=blue + 123 [label="Enter block"]; + 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|/x|"]; + 127 [label="Type operator: (R|/x| is R|B|)"]; + 128 [label="Exit when branch condition"]; + } + subgraph cluster_39 { + color=blue + 129 [label="Enter when branch condition "]; + 130 [label="Access variable R|/x|"]; + 131 [label="Type operator: (R|/x| is R|C|)"]; + 132 [label="Exit when branch condition"]; + } + 133 [label="Synthetic else branch"]; + 134 [label="Enter when branch result"]; + subgraph cluster_40 { + color=blue + 135 [label="Enter block"]; + subgraph cluster_41 { + color=blue + 136 [label="Function call arguments enter"]; + 137 [label="Access variable R|/x|"]; + 138 [label="Smart cast: R|/x|"]; + 139 [label="Function call arguments exit"]; + } + 140 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; + 141 [label="Exit block"]; + } + 142 [label="Exit when branch result"]; + 143 [label="Enter when branch result"]; + subgraph cluster_42 { + color=blue + 144 [label="Enter block"]; + subgraph cluster_43 { + color=blue + 145 [label="Function call arguments enter"]; + 146 [label="Access variable R|/x|"]; + 147 [label="Smart cast: R|/x|"]; + 148 [label="Function call arguments exit"]; + } + 149 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 150 [label="Exit block"]; + } + 151 [label="Exit when branch result"]; + 152 [label="Exit when"]; + } + subgraph cluster_44 { + color=blue + 153 [label="Function call arguments enter"]; + 154 [label="Access variable R|/x|"]; + 155 [label="Function call arguments exit"]; + } + 156 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_45 { + color=blue + 157 [label="Function call arguments enter"]; + 158 [label="Access variable R|/x|"]; + 159 [label="Function call arguments exit"]; + } + 160 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_46 { + color=blue + 161 [label="Function call arguments enter"]; + 162 [label="Access variable R|/x|"]; + 163 [label="Function call arguments exit"]; + } + 164 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 165 [label="Exit block"]; + } + 166 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 122 -> {123}; + 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; - 128 -> {129}; + 128 -> {129 143}; 129 -> {130}; - 130 -> {138}; + 130 -> {131}; 131 -> {132}; - 132 -> {133}; - 133 -> {134}; + 132 -> {133 134}; + 133 -> {152}; 134 -> {135}; 135 -> {136}; 136 -> {137}; @@ -405,120 +455,154 @@ digraph returns_kt { 139 -> {140}; 140 -> {141}; 141 -> {142}; - 142 -> {143}; + 142 -> {152}; 143 -> {144}; 144 -> {145}; 145 -> {146}; - - subgraph cluster_37 { - color=red - 147 [label="Enter function runHigherOrder" style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 148 [label="Enter block"]; - 149 [label="Function call: R|/f|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 150 [label="Jump: ^runHigherOrder R|/f|.R|SubstitutionOverride|()"]; - 151 [label="Stub" style="filled" fillcolor=gray]; - 152 [label="Exit block" style="filled" fillcolor=gray]; - } - 153 [label="Exit function runHigherOrder" style="filled" fillcolor=red]; - } + 146 -> {147}; 147 -> {148}; 148 -> {149}; 149 -> {150}; - 150 -> {153}; - 150 -> {151} [style=dotted]; - 151 -> {152} [style=dotted]; - 152 -> {153} [style=dotted]; - - subgraph cluster_39 { - color=red - 154 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_40 { - color=blue - 155 [label="Enter block"]; - 156 [label="Access variable R|kotlin/String.length|"]; - 157 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"]; - 158 [label="Stub" style="filled" fillcolor=gray]; - 159 [label="Exit block" style="filled" fillcolor=gray]; - } - 160 [label="Exit function " style="filled" fillcolor=red]; - } + 150 -> {151}; + 151 -> {152}; + 152 -> {153}; + 153 -> {154}; 154 -> {155}; 155 -> {156}; 156 -> {157}; - 157 -> {160}; - 157 -> {158} [style=dotted]; - 158 -> {159} [style=dotted]; - 159 -> {160} [style=dotted]; - - subgraph cluster_41 { - color=red - 161 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_42 { - color=blue - 162 [label="Enter block"]; - 163 [label="Access variable R|/a|"]; - 164 [label="Type operator: (R|/a| as? R|kotlin/String|)"]; - 165 [label="Variable declaration: lval s: R|kotlin/String?|"]; - 166 [label="Access variable R|/s|"]; - 167 [label="Enter safe call"]; - 168 [label="Access variable R|/ext|"]; - 169 [label="Exit safe call"]; - 170 [label="Exit lhs of ?:"]; - 171 [label="Enter rhs of ?:"]; - 172 [label="Jump: ^test_4 Unit"]; - 173 [label="Stub" style="filled" fillcolor=gray]; - 174 [label="Lhs of ?: is not null"]; - 175 [label="Exit ?:"]; - 176 [label="Variable declaration: lval length: R|kotlin/Int|"]; - 177 [label="Postponed enter to lambda"]; - subgraph cluster_43 { - color=blue - 178 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_44 { - color=blue - 179 [label="Enter block"]; - 180 [label="Access variable R|/s|"]; - 181 [label="Smart cast: R|/s|"]; - 182 [label="Access variable R|kotlin/String.length|"]; - 183 [label="Exit block"]; - } - 184 [label="Exit function " style="filled" fillcolor=red]; - } - 185 [label="Postponed exit from lambda"]; - 186 [label="Function call: R|/runHigherOrder|(...)" style="filled" fillcolor=yellow]; - 187 [label="Exit block"]; - } - 188 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 157 -> {158}; + 158 -> {159}; + 159 -> {160}; + 160 -> {161}; 161 -> {162}; 162 -> {163}; 163 -> {164}; 164 -> {165}; 165 -> {166}; - 166 -> {167 171}; + + subgraph cluster_47 { + color=red + 167 [label="Enter function runHigherOrder" style="filled" fillcolor=red]; + subgraph cluster_48 { + color=blue + 168 [label="Enter block"]; + subgraph cluster_49 { + color=blue + 169 [label="Function call arguments enter"]; + 170 [label="Function call arguments exit"]; + } + 171 [label="Function call: R|/f|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 172 [label="Jump: ^runHigherOrder R|/f|.R|SubstitutionOverride|()"]; + 173 [label="Stub" style="filled" fillcolor=gray]; + 174 [label="Exit block" style="filled" fillcolor=gray]; + } + 175 [label="Exit function runHigherOrder" style="filled" fillcolor=red]; + } 167 -> {168}; 168 -> {169}; 169 -> {170}; - 170 -> {171 174}; + 170 -> {171}; 171 -> {172}; - 172 -> {188}; + 172 -> {175}; 172 -> {173} [style=dotted]; - 173 -> {175} [style=dotted]; - 174 -> {175}; - 175 -> {176}; + 173 -> {174} [style=dotted]; + 174 -> {175} [style=dotted]; + + subgraph cluster_50 { + color=red + 176 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_51 { + color=blue + 177 [label="Enter block"]; + 178 [label="Access variable R|kotlin/String.length|"]; + 179 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"]; + 180 [label="Stub" style="filled" fillcolor=gray]; + 181 [label="Exit block" style="filled" fillcolor=gray]; + } + 182 [label="Exit function " style="filled" fillcolor=red]; + } 176 -> {177}; - 177 -> {178 185 186}; - 177 -> {178} [style=dashed]; + 177 -> {178}; 178 -> {179}; - 179 -> {180}; - 180 -> {181}; - 181 -> {182}; - 182 -> {183}; + 179 -> {182}; + 179 -> {180} [style=dotted]; + 180 -> {181} [style=dotted]; + 181 -> {182} [style=dotted]; + + subgraph cluster_52 { + color=red + 183 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_53 { + color=blue + 184 [label="Enter block"]; + 185 [label="Access variable R|/a|"]; + 186 [label="Type operator: (R|/a| as? R|kotlin/String|)"]; + 187 [label="Variable declaration: lval s: R|kotlin/String?|"]; + 188 [label="Access variable R|/s|"]; + 189 [label="Enter safe call"]; + 190 [label="Access variable R|/ext|"]; + 191 [label="Exit safe call"]; + 192 [label="Exit lhs of ?:"]; + 193 [label="Enter rhs of ?:"]; + 194 [label="Jump: ^test_4 Unit"]; + 195 [label="Stub" style="filled" fillcolor=gray]; + 196 [label="Lhs of ?: is not null"]; + 197 [label="Exit ?:"]; + 198 [label="Variable declaration: lval length: R|kotlin/Int|"]; + subgraph cluster_54 { + color=blue + 199 [label="Function call arguments enter"]; + 200 [label="Postponed enter to lambda"]; + subgraph cluster_55 { + color=blue + 201 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_56 { + color=blue + 202 [label="Enter block"]; + 203 [label="Access variable R|/s|"]; + 204 [label="Smart cast: R|/s|"]; + 205 [label="Access variable R|kotlin/String.length|"]; + 206 [label="Exit block"]; + } + 207 [label="Exit function " style="filled" fillcolor=red]; + } + 208 [label="Function call arguments exit"]; + } + 209 [label="Postponed exit from lambda"]; + 210 [label="Function call: R|/runHigherOrder|(...)" style="filled" fillcolor=yellow]; + 211 [label="Exit block"]; + } + 212 [label="Exit function test_4" style="filled" fillcolor=red]; + } 183 -> {184}; + 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; + 188 -> {189 193}; + 189 -> {190}; + 190 -> {191}; + 191 -> {192}; + 192 -> {193 196}; + 193 -> {194}; + 194 -> {212}; + 194 -> {195} [style=dotted]; + 195 -> {197} [style=dotted]; + 196 -> {197}; + 197 -> {198}; + 198 -> {199}; + 199 -> {200}; + 200 -> {201 208 209}; + 200 -> {201} [style=dashed]; + 201 -> {202}; + 202 -> {203}; + 203 -> {204}; + 204 -> {205}; + 205 -> {206}; + 206 -> {207}; + 208 -> {210}; + 209 -> {210}; + 210 -> {211}; + 211 -> {212}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot index ef4622a9ef0..ba51da1c013 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot @@ -160,31 +160,36 @@ digraph simpleIf_kt { 60 [label="Access variable R|/x|"]; 61 [label="Smart cast: R|/x|"]; 62 [label="Access variable R|kotlin/String.length|"]; - 63 [label="Access variable R|/x|"]; - 64 [label="Smart cast: R|/x|"]; - 65 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 66 [label="Exit block"]; + subgraph cluster_18 { + color=blue + 63 [label="Function call arguments enter"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Smart cast: R|/x|"]; + 66 [label="Function call arguments exit"]; + } + 67 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 68 [label="Exit block"]; } - 67 [label="Exit when branch result"]; - 68 [label="Enter when branch result"]; - subgraph cluster_18 { - color=blue - 69 [label="Enter block"]; - 70 [label="Exit block"]; - } - 71 [label="Exit when branch result"]; - 72 [label="Enter when branch result"]; + 69 [label="Exit when branch result"]; + 70 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 73 [label="Enter block"]; - 74 [label="Exit block"]; + 71 [label="Enter block"]; + 72 [label="Exit block"]; } - 75 [label="Exit when branch result"]; - 76 [label="Exit when"]; + 73 [label="Exit when branch result"]; + 74 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 75 [label="Enter block"]; + 76 [label="Exit block"]; + } + 77 [label="Exit when branch result"]; + 78 [label="Exit when"]; } - 77 [label="Exit block"]; + 79 [label="Exit block"]; } - 78 [label="Exit function test_3" style="filled" fillcolor=red]; + 80 [label="Exit function test_3" style="filled" fillcolor=red]; } 44 -> {45}; 45 -> {46}; @@ -192,12 +197,12 @@ digraph simpleIf_kt { 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {51 72}; + 50 -> {51 74}; 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {56 68}; + 55 -> {56 70}; 56 -> {57}; 57 -> {58}; 58 -> {59}; @@ -209,16 +214,18 @@ digraph simpleIf_kt { 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {76}; + 67 -> {68}; 68 -> {69}; - 69 -> {70}; + 69 -> {78}; 70 -> {71}; - 71 -> {76}; + 71 -> {72}; 72 -> {73}; - 73 -> {74}; + 73 -> {78}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; + 78 -> {79}; + 79 -> {80}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot index 8ea4767f566..748e8caf2b3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot @@ -57,33 +57,43 @@ digraph smartcastFromArgument_kt { subgraph cluster_8 { color=blue 16 [label="Enter when branch condition "]; - 17 [label="Access variable R|/a|"]; - 18 [label="Type operator: (R|/a| as? R|A|)"]; - 19 [label="Exit lhs of ?:"]; - 20 [label="Enter rhs of ?:"]; - 21 [label="Jump: ^test Unit"]; - 22 [label="Stub" style="filled" fillcolor=gray]; - 23 [label="Lhs of ?: is not null"]; - 24 [label="Exit ?:"]; - 25 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow]; - 26 [label="Exit when branch condition"]; + subgraph cluster_9 { + color=blue + 17 [label="Function call arguments enter"]; + 18 [label="Access variable R|/a|"]; + 19 [label="Type operator: (R|/a| as? R|A|)"]; + 20 [label="Exit lhs of ?:"]; + 21 [label="Enter rhs of ?:"]; + 22 [label="Jump: ^test Unit"]; + 23 [label="Stub" style="filled" fillcolor=gray]; + 24 [label="Lhs of ?: is not null"]; + 25 [label="Exit ?:"]; + 26 [label="Function call arguments exit"]; + } + 27 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow]; + 28 [label="Exit when branch condition"]; } - 27 [label="Synthetic else branch"]; - 28 [label="Enter when branch result"]; - subgraph cluster_9 { + 29 [label="Synthetic else branch"]; + 30 [label="Enter when branch result"]; + subgraph cluster_10 { color=blue - 29 [label="Enter block"]; - 30 [label="Access variable R|/a|"]; - 31 [label="Smart cast: R|/a|"]; - 32 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 33 [label="Exit block"]; + 31 [label="Enter block"]; + subgraph cluster_11 { + color=blue + 32 [label="Function call arguments enter"]; + 33 [label="Access variable R|/a|"]; + 34 [label="Smart cast: R|/a|"]; + 35 [label="Function call arguments exit"]; + } + 36 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 37 [label="Exit block"]; } - 34 [label="Exit when branch result"]; - 35 [label="Exit when"]; + 38 [label="Exit when branch result"]; + 39 [label="Exit when"]; } - 36 [label="Exit block"]; + 40 [label="Exit block"]; } - 37 [label="Exit function test" style="filled" fillcolor=red]; + 41 [label="Exit function test" style="filled" fillcolor=red]; } 13 -> {14}; 14 -> {15}; @@ -91,18 +101,18 @@ digraph smartcastFromArgument_kt { 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 23}; - 20 -> {21}; - 21 -> {37}; - 21 -> {22} [style=dotted]; - 22 -> {24} [style=dotted]; - 23 -> {24}; + 19 -> {20}; + 20 -> {21 24}; + 21 -> {22}; + 22 -> {41}; + 22 -> {23} [style=dotted]; + 23 -> {25} [style=dotted]; 24 -> {25}; 25 -> {26}; - 26 -> {27 28}; - 27 -> {35}; - 28 -> {29}; - 29 -> {30}; + 26 -> {27}; + 27 -> {28}; + 28 -> {29 30}; + 29 -> {39}; 30 -> {31}; 31 -> {32}; 32 -> {33}; @@ -110,5 +120,9 @@ digraph smartcastFromArgument_kt { 34 -> {35}; 35 -> {36}; 36 -> {37}; + 37 -> {38}; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot index b35f8b87188..040473fe115 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot @@ -66,106 +66,146 @@ digraph when_kt { subgraph cluster_10 { color=blue 23 [label="Enter block"]; - 24 [label="Access variable R|/x|"]; - 25 [label="Smart cast: R|/x|"]; - 26 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; + subgraph cluster_11 { + color=blue + 24 [label="Function call arguments enter"]; + 25 [label="Access variable R|/x|"]; + 26 [label="Smart cast: R|/x|"]; + 27 [label="Function call arguments exit"]; + } + 28 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 29 [label="Exit block"]; } - 28 [label="Exit when branch result"]; - 29 [label="Enter when branch result"]; - subgraph cluster_11 { + 30 [label="Exit when branch result"]; + 31 [label="Enter when branch result"]; + subgraph cluster_12 { color=blue - 30 [label="Enter block"]; - 31 [label="Access variable R|/x|"]; - 32 [label="Smart cast: R|/x|"]; - 33 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 34 [label="Exit block"]; + 32 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 33 [label="Function call arguments enter"]; + 34 [label="Access variable R|/x|"]; + 35 [label="Smart cast: R|/x|"]; + 36 [label="Function call arguments exit"]; + } + 37 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; } - 35 [label="Exit when branch result"]; - 36 [label="Exit when"]; + 39 [label="Exit when branch result"]; + 40 [label="Exit when"]; } - subgraph cluster_12 { + subgraph cluster_14 { color=blue - 37 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 38 [label="Enter when branch condition "]; - 39 [label="Access variable R|/x|"]; - 40 [label="Type operator: (R|/x| !is R|A|)"]; - 41 [label="Exit when branch condition"]; - } - subgraph cluster_14 { + 41 [label="Enter when"]; + subgraph cluster_15 { color=blue 42 [label="Enter when branch condition "]; 43 [label="Access variable R|/x|"]; - 44 [label="Smart cast: R|/x|"]; - 45 [label="Type operator: (R|/x| !is R|B|)"]; - 46 [label="Exit when branch condition"]; - } - subgraph cluster_15 { - color=blue - 47 [label="Enter when branch condition "]; - 48 [label="Access variable R|/x|"]; - 49 [label="Smart cast: R|/x|"]; - 50 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 51 [label="Exit when branch condition"]; + 44 [label="Type operator: (R|/x| !is R|A|)"]; + 45 [label="Exit when branch condition"]; } subgraph cluster_16 { color=blue - 52 [label="Enter when branch condition else"]; - 53 [label="Exit when branch condition"]; + 46 [label="Enter when branch condition "]; + 47 [label="Access variable R|/x|"]; + 48 [label="Smart cast: R|/x|"]; + 49 [label="Type operator: (R|/x| !is R|B|)"]; + 50 [label="Exit when branch condition"]; } - 54 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 55 [label="Enter block"]; - 56 [label="Access variable R|/x|"]; - 57 [label="Smart cast: R|/x|"]; - 58 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 59 [label="Access variable R|/x|"]; - 60 [label="Smart cast: R|/x|"]; - 61 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 62 [label="Exit block"]; + 51 [label="Enter when branch condition "]; + 52 [label="Access variable R|/x|"]; + 53 [label="Smart cast: R|/x|"]; + 54 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 55 [label="Exit when branch condition"]; } - 63 [label="Exit when branch result"]; - 64 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 65 [label="Enter block"]; - 66 [label="Access variable R|/x|"]; - 67 [label="Smart cast: R|/x|"]; - 68 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 69 [label="Access variable R|/x|"]; - 70 [label="Smart cast: R|/x|"]; - 71 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 72 [label="Access variable R|/x|"]; - 73 [label="Smart cast: R|/x|"]; - 74 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 75 [label="Exit block"]; + 56 [label="Enter when branch condition else"]; + 57 [label="Exit when branch condition"]; } - 76 [label="Exit when branch result"]; - 77 [label="Enter when branch result"]; + 58 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 78 [label="Enter block"]; - 79 [label="Access variable R|/x|"]; - 80 [label="Smart cast: R|/x|"]; - 81 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 82 [label="Exit block"]; + 59 [label="Enter block"]; + subgraph cluster_20 { + color=blue + 60 [label="Function call arguments enter"]; + 61 [label="Access variable R|/x|"]; + 62 [label="Smart cast: R|/x|"]; + 63 [label="Function call arguments exit"]; + } + 64 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_21 { + color=blue + 65 [label="Function call arguments enter"]; + 66 [label="Access variable R|/x|"]; + 67 [label="Smart cast: R|/x|"]; + 68 [label="Function call arguments exit"]; + } + 69 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 70 [label="Exit block"]; } - 83 [label="Exit when branch result"]; - 84 [label="Enter when branch result"]; - subgraph cluster_20 { + 71 [label="Exit when branch result"]; + 72 [label="Enter when branch result"]; + subgraph cluster_22 { color=blue - 85 [label="Enter block"]; - 86 [label="Exit block"]; + 73 [label="Enter block"]; + subgraph cluster_23 { + color=blue + 74 [label="Function call arguments enter"]; + 75 [label="Access variable R|/x|"]; + 76 [label="Smart cast: R|/x|"]; + 77 [label="Function call arguments exit"]; + } + 78 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_24 { + color=blue + 79 [label="Function call arguments enter"]; + 80 [label="Access variable R|/x|"]; + 81 [label="Smart cast: R|/x|"]; + 82 [label="Function call arguments exit"]; + } + 83 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + subgraph cluster_25 { + color=blue + 84 [label="Function call arguments enter"]; + 85 [label="Access variable R|/x|"]; + 86 [label="Smart cast: R|/x|"]; + 87 [label="Function call arguments exit"]; + } + 88 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 89 [label="Exit block"]; } - 87 [label="Exit when branch result"]; - 88 [label="Exit when"]; + 90 [label="Exit when branch result"]; + 91 [label="Enter when branch result"]; + subgraph cluster_26 { + color=blue + 92 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 93 [label="Function call arguments enter"]; + 94 [label="Access variable R|/x|"]; + 95 [label="Smart cast: R|/x|"]; + 96 [label="Function call arguments exit"]; + } + 97 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 98 [label="Exit block"]; + } + 99 [label="Exit when branch result"]; + 100 [label="Enter when branch result"]; + subgraph cluster_28 { + color=blue + 101 [label="Enter block"]; + 102 [label="Exit block"]; + } + 103 [label="Exit when branch result"]; + 104 [label="Exit when"]; } - 89 [label="Exit block"]; + 105 [label="Exit block"]; } - 90 [label="Exit function test_1" style="filled" fillcolor=red]; + 106 [label="Exit function test_1" style="filled" fillcolor=red]; } 10 -> {11}; 11 -> {12}; @@ -173,21 +213,21 @@ digraph when_kt { 13 -> {14}; 14 -> {15}; 15 -> {16}; - 16 -> {17 29}; + 16 -> {17 31}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21 22}; - 21 -> {36}; + 21 -> {40}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {36}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {40}; 31 -> {32}; 32 -> {33}; 33 -> {34}; @@ -198,21 +238,21 @@ digraph when_kt { 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {42 84}; + 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {46}; - 46 -> {47 77}; + 45 -> {46 100}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {51}; - 51 -> {52 64}; + 50 -> {51 91}; + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {56}; + 55 -> {56 72}; 56 -> {57}; 57 -> {58}; 58 -> {59}; @@ -220,7 +260,7 @@ digraph when_kt { 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {88}; + 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; @@ -228,155 +268,26 @@ digraph when_kt { 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {104}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {88}; + 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {88}; + 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; - - subgraph cluster_21 { - color=red - 91 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 92 [label="Enter block"]; - subgraph cluster_23 { - color=blue - 93 [label="Enter when"]; - 94 [label="Access variable R|/x|"]; - subgraph cluster_24 { - color=blue - 95 [label="Enter when branch condition "]; - 96 [label="Exit $subj"]; - 97 [label="Type operator: ($subj$ is R|A|)"]; - 98 [label="Exit when branch condition"]; - } - subgraph cluster_25 { - color=blue - 99 [label="Enter when branch condition "]; - 100 [label="Exit $subj"]; - 101 [label="Type operator: ($subj$ is R|B|)"]; - 102 [label="Exit when branch condition"]; - } - 103 [label="Synthetic else branch"]; - 104 [label="Enter when branch result"]; - subgraph cluster_26 { - color=blue - 105 [label="Enter block"]; - 106 [label="Access variable R|/x|"]; - 107 [label="Smart cast: R|/x|"]; - 108 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 109 [label="Exit block"]; - } - 110 [label="Exit when branch result"]; - 111 [label="Enter when branch result"]; - subgraph cluster_27 { - color=blue - 112 [label="Enter block"]; - 113 [label="Access variable R|/x|"]; - 114 [label="Smart cast: R|/x|"]; - 115 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 116 [label="Exit block"]; - } - 117 [label="Exit when branch result"]; - 118 [label="Exit when"]; - } - subgraph cluster_28 { - color=blue - 119 [label="Enter when"]; - 120 [label="Access variable R|/x|"]; - subgraph cluster_29 { - color=blue - 121 [label="Enter when branch condition "]; - 122 [label="Exit $subj"]; - 123 [label="Type operator: ($subj$ !is R|A|)"]; - 124 [label="Exit when branch condition"]; - } - subgraph cluster_30 { - color=blue - 125 [label="Enter when branch condition "]; - 126 [label="Exit $subj"]; - 127 [label="Type operator: ($subj$ !is R|B|)"]; - 128 [label="Exit when branch condition"]; - } - subgraph cluster_31 { - color=blue - 129 [label="Enter when branch condition "]; - 130 [label="Exit $subj"]; - 131 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; - 132 [label="Exit when branch condition"]; - } - subgraph cluster_32 { - color=blue - 133 [label="Enter when branch condition else"]; - 134 [label="Exit when branch condition"]; - } - 135 [label="Enter when branch result"]; - subgraph cluster_33 { - color=blue - 136 [label="Enter block"]; - 137 [label="Access variable R|/x|"]; - 138 [label="Smart cast: R|/x|"]; - 139 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 140 [label="Access variable R|/x|"]; - 141 [label="Smart cast: R|/x|"]; - 142 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 143 [label="Exit block"]; - } - 144 [label="Exit when branch result"]; - 145 [label="Enter when branch result"]; - subgraph cluster_34 { - color=blue - 146 [label="Enter block"]; - 147 [label="Access variable R|/x|"]; - 148 [label="Smart cast: R|/x|"]; - 149 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 150 [label="Access variable R|/x|"]; - 151 [label="Smart cast: R|/x|"]; - 152 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 153 [label="Access variable R|/x|"]; - 154 [label="Smart cast: R|/x|"]; - 155 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 156 [label="Exit block"]; - } - 157 [label="Exit when branch result"]; - 158 [label="Enter when branch result"]; - subgraph cluster_35 { - color=blue - 159 [label="Enter block"]; - 160 [label="Access variable R|/x|"]; - 161 [label="Smart cast: R|/x|"]; - 162 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 163 [label="Exit block"]; - } - 164 [label="Exit when branch result"]; - 165 [label="Enter when branch result"]; - subgraph cluster_36 { - color=blue - 166 [label="Enter block"]; - 167 [label="Exit block"]; - } - 168 [label="Exit when branch result"]; - 169 [label="Exit when"]; - } - 170 [label="Exit block"]; - } - 171 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 90 -> {104}; 91 -> {92}; 92 -> {93}; 93 -> {94}; @@ -384,41 +295,210 @@ digraph when_kt { 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {99 111}; - 99 -> {100}; + 98 -> {99}; + 99 -> {104}; 100 -> {101}; 101 -> {102}; - 102 -> {103 104}; - 103 -> {118}; + 102 -> {103}; + 103 -> {104}; 104 -> {105}; 105 -> {106}; - 106 -> {107}; + + subgraph cluster_29 { + color=red + 107 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 108 [label="Enter block"]; + subgraph cluster_31 { + color=blue + 109 [label="Enter when"]; + 110 [label="Access variable R|/x|"]; + subgraph cluster_32 { + color=blue + 111 [label="Enter when branch condition "]; + 112 [label="Exit $subj"]; + 113 [label="Type operator: ($subj$ is R|A|)"]; + 114 [label="Exit when branch condition"]; + } + subgraph cluster_33 { + color=blue + 115 [label="Enter when branch condition "]; + 116 [label="Exit $subj"]; + 117 [label="Type operator: ($subj$ is R|B|)"]; + 118 [label="Exit when branch condition"]; + } + 119 [label="Synthetic else branch"]; + 120 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 121 [label="Enter block"]; + subgraph cluster_35 { + color=blue + 122 [label="Function call arguments enter"]; + 123 [label="Access variable R|/x|"]; + 124 [label="Smart cast: R|/x|"]; + 125 [label="Function call arguments exit"]; + } + 126 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 127 [label="Exit block"]; + } + 128 [label="Exit when branch result"]; + 129 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 130 [label="Enter block"]; + subgraph cluster_37 { + color=blue + 131 [label="Function call arguments enter"]; + 132 [label="Access variable R|/x|"]; + 133 [label="Smart cast: R|/x|"]; + 134 [label="Function call arguments exit"]; + } + 135 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 136 [label="Exit block"]; + } + 137 [label="Exit when branch result"]; + 138 [label="Exit when"]; + } + subgraph cluster_38 { + color=blue + 139 [label="Enter when"]; + 140 [label="Access variable R|/x|"]; + subgraph cluster_39 { + color=blue + 141 [label="Enter when branch condition "]; + 142 [label="Exit $subj"]; + 143 [label="Type operator: ($subj$ !is R|A|)"]; + 144 [label="Exit when branch condition"]; + } + subgraph cluster_40 { + color=blue + 145 [label="Enter when branch condition "]; + 146 [label="Exit $subj"]; + 147 [label="Type operator: ($subj$ !is R|B|)"]; + 148 [label="Exit when branch condition"]; + } + subgraph cluster_41 { + color=blue + 149 [label="Enter when branch condition "]; + 150 [label="Exit $subj"]; + 151 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; + 152 [label="Exit when branch condition"]; + } + subgraph cluster_42 { + color=blue + 153 [label="Enter when branch condition else"]; + 154 [label="Exit when branch condition"]; + } + 155 [label="Enter when branch result"]; + subgraph cluster_43 { + color=blue + 156 [label="Enter block"]; + subgraph cluster_44 { + color=blue + 157 [label="Function call arguments enter"]; + 158 [label="Access variable R|/x|"]; + 159 [label="Smart cast: R|/x|"]; + 160 [label="Function call arguments exit"]; + } + 161 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_45 { + color=blue + 162 [label="Function call arguments enter"]; + 163 [label="Access variable R|/x|"]; + 164 [label="Smart cast: R|/x|"]; + 165 [label="Function call arguments exit"]; + } + 166 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 167 [label="Exit block"]; + } + 168 [label="Exit when branch result"]; + 169 [label="Enter when branch result"]; + subgraph cluster_46 { + color=blue + 170 [label="Enter block"]; + subgraph cluster_47 { + color=blue + 171 [label="Function call arguments enter"]; + 172 [label="Access variable R|/x|"]; + 173 [label="Smart cast: R|/x|"]; + 174 [label="Function call arguments exit"]; + } + 175 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_48 { + color=blue + 176 [label="Function call arguments enter"]; + 177 [label="Access variable R|/x|"]; + 178 [label="Smart cast: R|/x|"]; + 179 [label="Function call arguments exit"]; + } + 180 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + subgraph cluster_49 { + color=blue + 181 [label="Function call arguments enter"]; + 182 [label="Access variable R|/x|"]; + 183 [label="Smart cast: R|/x|"]; + 184 [label="Function call arguments exit"]; + } + 185 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 186 [label="Exit block"]; + } + 187 [label="Exit when branch result"]; + 188 [label="Enter when branch result"]; + subgraph cluster_50 { + color=blue + 189 [label="Enter block"]; + subgraph cluster_51 { + color=blue + 190 [label="Function call arguments enter"]; + 191 [label="Access variable R|/x|"]; + 192 [label="Smart cast: R|/x|"]; + 193 [label="Function call arguments exit"]; + } + 194 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 195 [label="Exit block"]; + } + 196 [label="Exit when branch result"]; + 197 [label="Enter when branch result"]; + subgraph cluster_52 { + color=blue + 198 [label="Enter block"]; + 199 [label="Exit block"]; + } + 200 [label="Exit when branch result"]; + 201 [label="Exit when"]; + } + 202 [label="Exit block"]; + } + 203 [label="Exit function test_2" style="filled" fillcolor=red]; + } 107 -> {108}; 108 -> {109}; 109 -> {110}; - 110 -> {118}; + 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; - 114 -> {115}; + 114 -> {115 129}; 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {119}; - 119 -> {120}; + 118 -> {119 120}; + 119 -> {138}; 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; - 124 -> {125 165}; + 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; - 128 -> {129 158}; + 128 -> {138}; 129 -> {130}; 130 -> {131}; 131 -> {132}; - 132 -> {133 145}; + 132 -> {133}; 133 -> {134}; 134 -> {135}; 135 -> {136}; @@ -430,189 +510,34 @@ digraph when_kt { 141 -> {142}; 142 -> {143}; 143 -> {144}; - 144 -> {169}; + 144 -> {145 197}; 145 -> {146}; 146 -> {147}; 147 -> {148}; - 148 -> {149}; + 148 -> {149 188}; 149 -> {150}; 150 -> {151}; 151 -> {152}; - 152 -> {153}; + 152 -> {153 169}; 153 -> {154}; 154 -> {155}; 155 -> {156}; 156 -> {157}; - 157 -> {169}; + 157 -> {158}; 158 -> {159}; 159 -> {160}; 160 -> {161}; 161 -> {162}; 162 -> {163}; 163 -> {164}; - 164 -> {169}; + 164 -> {165}; 165 -> {166}; 166 -> {167}; 167 -> {168}; - 168 -> {169}; + 168 -> {201}; 169 -> {170}; 170 -> {171}; - - subgraph cluster_37 { - color=red - 172 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 173 [label="Enter block"]; - subgraph cluster_39 { - color=blue - 174 [label="Enter when"]; - 175 [label="Access variable R|/x|"]; - 176 [label="Variable declaration: lval y: R|kotlin/Any?|"]; - subgraph cluster_40 { - color=blue - 177 [label="Enter when branch condition "]; - 178 [label="Exit $subj"]; - 179 [label="Type operator: ($subj$ is R|A|)"]; - 180 [label="Exit when branch condition"]; - } - subgraph cluster_41 { - color=blue - 181 [label="Enter when branch condition "]; - 182 [label="Exit $subj"]; - 183 [label="Type operator: ($subj$ is R|B|)"]; - 184 [label="Exit when branch condition"]; - } - 185 [label="Synthetic else branch"]; - 186 [label="Enter when branch result"]; - subgraph cluster_42 { - color=blue - 187 [label="Enter block"]; - 188 [label="Access variable R|/x|"]; - 189 [label="Smart cast: R|/x|"]; - 190 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 191 [label="Access variable R|/y|"]; - 192 [label="Smart cast: R|/y|"]; - 193 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 194 [label="Exit block"]; - } - 195 [label="Exit when branch result"]; - 196 [label="Enter when branch result"]; - subgraph cluster_43 { - color=blue - 197 [label="Enter block"]; - 198 [label="Access variable R|/x|"]; - 199 [label="Smart cast: R|/x|"]; - 200 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 201 [label="Access variable R|/y|"]; - 202 [label="Smart cast: R|/y|"]; - 203 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 204 [label="Exit block"]; - } - 205 [label="Exit when branch result"]; - 206 [label="Exit when"]; - } - subgraph cluster_44 { - color=blue - 207 [label="Enter when"]; - 208 [label="Access variable R|/x|"]; - 209 [label="Variable declaration: lval y: R|kotlin/Any?|"]; - subgraph cluster_45 { - color=blue - 210 [label="Enter when branch condition "]; - 211 [label="Exit $subj"]; - 212 [label="Type operator: ($subj$ !is R|A|)"]; - 213 [label="Exit when branch condition"]; - } - subgraph cluster_46 { - color=blue - 214 [label="Enter when branch condition "]; - 215 [label="Exit $subj"]; - 216 [label="Type operator: ($subj$ !is R|B|)"]; - 217 [label="Exit when branch condition"]; - } - subgraph cluster_47 { - color=blue - 218 [label="Enter when branch condition "]; - 219 [label="Exit $subj"]; - 220 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; - 221 [label="Exit when branch condition"]; - } - subgraph cluster_48 { - color=blue - 222 [label="Enter when branch condition else"]; - 223 [label="Exit when branch condition"]; - } - 224 [label="Enter when branch result"]; - subgraph cluster_49 { - color=blue - 225 [label="Enter block"]; - 226 [label="Access variable R|/x|"]; - 227 [label="Smart cast: R|/x|"]; - 228 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 229 [label="Access variable R|/x|"]; - 230 [label="Smart cast: R|/x|"]; - 231 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 232 [label="Access variable R|/y|"]; - 233 [label="Smart cast: R|/y|"]; - 234 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 235 [label="Access variable R|/y|"]; - 236 [label="Smart cast: R|/y|"]; - 237 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 238 [label="Exit block"]; - } - 239 [label="Exit when branch result"]; - 240 [label="Enter when branch result"]; - subgraph cluster_50 { - color=blue - 241 [label="Enter block"]; - 242 [label="Access variable R|/x|"]; - 243 [label="Smart cast: R|/x|"]; - 244 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 245 [label="Access variable R|/x|"]; - 246 [label="Smart cast: R|/x|"]; - 247 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 248 [label="Access variable R|/x|"]; - 249 [label="Smart cast: R|/x|"]; - 250 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 251 [label="Access variable R|/y|"]; - 252 [label="Smart cast: R|/y|"]; - 253 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 254 [label="Access variable R|/y|"]; - 255 [label="Smart cast: R|/y|"]; - 256 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 257 [label="Access variable R|/y|"]; - 258 [label="Smart cast: R|/y|"]; - 259 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 260 [label="Exit block"]; - } - 261 [label="Exit when branch result"]; - 262 [label="Enter when branch result"]; - subgraph cluster_51 { - color=blue - 263 [label="Enter block"]; - 264 [label="Access variable R|/x|"]; - 265 [label="Smart cast: R|/x|"]; - 266 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 267 [label="Access variable R|/y|"]; - 268 [label="Smart cast: R|/y|"]; - 269 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 270 [label="Exit block"]; - } - 271 [label="Exit when branch result"]; - 272 [label="Enter when branch result"]; - subgraph cluster_52 { - color=blue - 273 [label="Enter block"]; - 274 [label="Exit block"]; - } - 275 [label="Exit when branch result"]; - 276 [label="Exit when"]; - } - 277 [label="Exit block"]; - } - 278 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 171 -> {172}; 172 -> {173}; 173 -> {174}; 174 -> {175}; @@ -621,14 +546,14 @@ digraph when_kt { 177 -> {178}; 178 -> {179}; 179 -> {180}; - 180 -> {181 196}; + 180 -> {181}; 181 -> {182}; 182 -> {183}; 183 -> {184}; - 184 -> {185 186}; - 185 -> {206}; + 184 -> {185}; + 185 -> {186}; 186 -> {187}; - 187 -> {188}; + 187 -> {201}; 188 -> {189}; 189 -> {190}; 190 -> {191}; @@ -636,15 +561,250 @@ digraph when_kt { 192 -> {193}; 193 -> {194}; 194 -> {195}; - 195 -> {206}; - 196 -> {197}; + 195 -> {196}; + 196 -> {201}; 197 -> {198}; 198 -> {199}; 199 -> {200}; 200 -> {201}; 201 -> {202}; 202 -> {203}; - 203 -> {204}; + + subgraph cluster_53 { + color=red + 204 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_54 { + color=blue + 205 [label="Enter block"]; + subgraph cluster_55 { + color=blue + 206 [label="Enter when"]; + 207 [label="Access variable R|/x|"]; + 208 [label="Variable declaration: lval y: R|kotlin/Any?|"]; + subgraph cluster_56 { + color=blue + 209 [label="Enter when branch condition "]; + 210 [label="Exit $subj"]; + 211 [label="Type operator: ($subj$ is R|A|)"]; + 212 [label="Exit when branch condition"]; + } + subgraph cluster_57 { + color=blue + 213 [label="Enter when branch condition "]; + 214 [label="Exit $subj"]; + 215 [label="Type operator: ($subj$ is R|B|)"]; + 216 [label="Exit when branch condition"]; + } + 217 [label="Synthetic else branch"]; + 218 [label="Enter when branch result"]; + subgraph cluster_58 { + color=blue + 219 [label="Enter block"]; + subgraph cluster_59 { + color=blue + 220 [label="Function call arguments enter"]; + 221 [label="Access variable R|/x|"]; + 222 [label="Smart cast: R|/x|"]; + 223 [label="Function call arguments exit"]; + } + 224 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + subgraph cluster_60 { + color=blue + 225 [label="Function call arguments enter"]; + 226 [label="Access variable R|/y|"]; + 227 [label="Smart cast: R|/y|"]; + 228 [label="Function call arguments exit"]; + } + 229 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 230 [label="Exit block"]; + } + 231 [label="Exit when branch result"]; + 232 [label="Enter when branch result"]; + subgraph cluster_61 { + color=blue + 233 [label="Enter block"]; + subgraph cluster_62 { + color=blue + 234 [label="Function call arguments enter"]; + 235 [label="Access variable R|/x|"]; + 236 [label="Smart cast: R|/x|"]; + 237 [label="Function call arguments exit"]; + } + 238 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_63 { + color=blue + 239 [label="Function call arguments enter"]; + 240 [label="Access variable R|/y|"]; + 241 [label="Smart cast: R|/y|"]; + 242 [label="Function call arguments exit"]; + } + 243 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 244 [label="Exit block"]; + } + 245 [label="Exit when branch result"]; + 246 [label="Exit when"]; + } + subgraph cluster_64 { + color=blue + 247 [label="Enter when"]; + 248 [label="Access variable R|/x|"]; + 249 [label="Variable declaration: lval y: R|kotlin/Any?|"]; + subgraph cluster_65 { + color=blue + 250 [label="Enter when branch condition "]; + 251 [label="Exit $subj"]; + 252 [label="Type operator: ($subj$ !is R|A|)"]; + 253 [label="Exit when branch condition"]; + } + subgraph cluster_66 { + color=blue + 254 [label="Enter when branch condition "]; + 255 [label="Exit $subj"]; + 256 [label="Type operator: ($subj$ !is R|B|)"]; + 257 [label="Exit when branch condition"]; + } + subgraph cluster_67 { + color=blue + 258 [label="Enter when branch condition "]; + 259 [label="Exit $subj"]; + 260 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; + 261 [label="Exit when branch condition"]; + } + subgraph cluster_68 { + color=blue + 262 [label="Enter when branch condition else"]; + 263 [label="Exit when branch condition"]; + } + 264 [label="Enter when branch result"]; + subgraph cluster_69 { + color=blue + 265 [label="Enter block"]; + subgraph cluster_70 { + color=blue + 266 [label="Function call arguments enter"]; + 267 [label="Access variable R|/x|"]; + 268 [label="Smart cast: R|/x|"]; + 269 [label="Function call arguments exit"]; + } + 270 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_71 { + color=blue + 271 [label="Function call arguments enter"]; + 272 [label="Access variable R|/x|"]; + 273 [label="Smart cast: R|/x|"]; + 274 [label="Function call arguments exit"]; + } + 275 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + subgraph cluster_72 { + color=blue + 276 [label="Function call arguments enter"]; + 277 [label="Access variable R|/y|"]; + 278 [label="Smart cast: R|/y|"]; + 279 [label="Function call arguments exit"]; + } + 280 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_73 { + color=blue + 281 [label="Function call arguments enter"]; + 282 [label="Access variable R|/y|"]; + 283 [label="Smart cast: R|/y|"]; + 284 [label="Function call arguments exit"]; + } + 285 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 286 [label="Exit block"]; + } + 287 [label="Exit when branch result"]; + 288 [label="Enter when branch result"]; + subgraph cluster_74 { + color=blue + 289 [label="Enter block"]; + subgraph cluster_75 { + color=blue + 290 [label="Function call arguments enter"]; + 291 [label="Access variable R|/x|"]; + 292 [label="Smart cast: R|/x|"]; + 293 [label="Function call arguments exit"]; + } + 294 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_76 { + color=blue + 295 [label="Function call arguments enter"]; + 296 [label="Access variable R|/x|"]; + 297 [label="Smart cast: R|/x|"]; + 298 [label="Function call arguments exit"]; + } + 299 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + subgraph cluster_77 { + color=blue + 300 [label="Function call arguments enter"]; + 301 [label="Access variable R|/x|"]; + 302 [label="Smart cast: R|/x|"]; + 303 [label="Function call arguments exit"]; + } + 304 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_78 { + color=blue + 305 [label="Function call arguments enter"]; + 306 [label="Access variable R|/y|"]; + 307 [label="Smart cast: R|/y|"]; + 308 [label="Function call arguments exit"]; + } + 309 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_79 { + color=blue + 310 [label="Function call arguments enter"]; + 311 [label="Access variable R|/y|"]; + 312 [label="Smart cast: R|/y|"]; + 313 [label="Function call arguments exit"]; + } + 314 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; + subgraph cluster_80 { + color=blue + 315 [label="Function call arguments enter"]; + 316 [label="Access variable R|/y|"]; + 317 [label="Smart cast: R|/y|"]; + 318 [label="Function call arguments exit"]; + } + 319 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 320 [label="Exit block"]; + } + 321 [label="Exit when branch result"]; + 322 [label="Enter when branch result"]; + subgraph cluster_81 { + color=blue + 323 [label="Enter block"]; + subgraph cluster_82 { + color=blue + 324 [label="Function call arguments enter"]; + 325 [label="Access variable R|/x|"]; + 326 [label="Smart cast: R|/x|"]; + 327 [label="Function call arguments exit"]; + } + 328 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_83 { + color=blue + 329 [label="Function call arguments enter"]; + 330 [label="Access variable R|/y|"]; + 331 [label="Smart cast: R|/y|"]; + 332 [label="Function call arguments exit"]; + } + 333 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 334 [label="Exit block"]; + } + 335 [label="Exit when branch result"]; + 336 [label="Enter when branch result"]; + subgraph cluster_84 { + color=blue + 337 [label="Enter block"]; + 338 [label="Exit block"]; + } + 339 [label="Exit when branch result"]; + 340 [label="Exit when"]; + } + 341 [label="Exit block"]; + } + 342 [label="Exit function test_3" style="filled" fillcolor=red]; + } 204 -> {205}; 205 -> {206}; 206 -> {207}; @@ -653,16 +813,16 @@ digraph when_kt { 209 -> {210}; 210 -> {211}; 211 -> {212}; - 212 -> {213}; - 213 -> {214 272}; + 212 -> {213 232}; + 213 -> {214}; 214 -> {215}; 215 -> {216}; - 216 -> {217}; - 217 -> {218 262}; + 216 -> {217 218}; + 217 -> {246}; 218 -> {219}; 219 -> {220}; 220 -> {221}; - 221 -> {222 240}; + 221 -> {222}; 222 -> {223}; 223 -> {224}; 224 -> {225}; @@ -672,7 +832,7 @@ digraph when_kt { 228 -> {229}; 229 -> {230}; 230 -> {231}; - 231 -> {232}; + 231 -> {246}; 232 -> {233}; 233 -> {234}; 234 -> {235}; @@ -680,7 +840,7 @@ digraph when_kt { 236 -> {237}; 237 -> {238}; 238 -> {239}; - 239 -> {276}; + 239 -> {240}; 240 -> {241}; 241 -> {242}; 242 -> {243}; @@ -694,15 +854,15 @@ digraph when_kt { 250 -> {251}; 251 -> {252}; 252 -> {253}; - 253 -> {254}; + 253 -> {254 336}; 254 -> {255}; 255 -> {256}; 256 -> {257}; - 257 -> {258}; + 257 -> {258 322}; 258 -> {259}; 259 -> {260}; 260 -> {261}; - 261 -> {276}; + 261 -> {262 288}; 262 -> {263}; 263 -> {264}; 264 -> {265}; @@ -712,53 +872,14 @@ digraph when_kt { 268 -> {269}; 269 -> {270}; 270 -> {271}; - 271 -> {276}; + 271 -> {272}; 272 -> {273}; 273 -> {274}; 274 -> {275}; 275 -> {276}; 276 -> {277}; 277 -> {278}; - - subgraph cluster_53 { - color=red - 279 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_54 { - color=blue - 280 [label="Enter block"]; - subgraph cluster_55 { - color=blue - 281 [label="Enter when"]; - 282 [label="Access variable R|/x|"]; - 283 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - subgraph cluster_56 { - color=blue - 284 [label="Enter when branch condition "]; - 285 [label="Exit $subj"]; - 286 [label="Const: Int(1)"]; - 287 [label="Equality operator =="]; - 288 [label="Exit when branch condition"]; - } - 289 [label="Synthetic else branch"]; - 290 [label="Enter when branch result"]; - subgraph cluster_57 { - color=blue - 291 [label="Enter block"]; - 292 [label="Access variable R|/x|"]; - 293 [label="Smart cast: R|/x|"]; - 294 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 295 [label="Exit block"]; - } - 296 [label="Exit when branch result"]; - 297 [label="Exit when"]; - } - 298 [label="Access variable R|/x|"]; - 299 [label="Smart cast: R|/x|"]; - 300 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 301 [label="Exit block"]; - } - 302 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 278 -> {279}; 279 -> {280}; 280 -> {281}; 281 -> {282}; @@ -767,9 +888,9 @@ digraph when_kt { 284 -> {285}; 285 -> {286}; 286 -> {287}; - 287 -> {288}; - 288 -> {289 290}; - 289 -> {297}; + 287 -> {340}; + 288 -> {289}; + 289 -> {290}; 290 -> {291}; 291 -> {292}; 292 -> {293}; @@ -782,5 +903,122 @@ digraph when_kt { 299 -> {300}; 300 -> {301}; 301 -> {302}; + 302 -> {303}; + 303 -> {304}; + 304 -> {305}; + 305 -> {306}; + 306 -> {307}; + 307 -> {308}; + 308 -> {309}; + 309 -> {310}; + 310 -> {311}; + 311 -> {312}; + 312 -> {313}; + 313 -> {314}; + 314 -> {315}; + 315 -> {316}; + 316 -> {317}; + 317 -> {318}; + 318 -> {319}; + 319 -> {320}; + 320 -> {321}; + 321 -> {340}; + 322 -> {323}; + 323 -> {324}; + 324 -> {325}; + 325 -> {326}; + 326 -> {327}; + 327 -> {328}; + 328 -> {329}; + 329 -> {330}; + 330 -> {331}; + 331 -> {332}; + 332 -> {333}; + 333 -> {334}; + 334 -> {335}; + 335 -> {340}; + 336 -> {337}; + 337 -> {338}; + 338 -> {339}; + 339 -> {340}; + 340 -> {341}; + 341 -> {342}; + + subgraph cluster_85 { + color=red + 343 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_86 { + color=blue + 344 [label="Enter block"]; + subgraph cluster_87 { + color=blue + 345 [label="Enter when"]; + 346 [label="Access variable R|/x|"]; + 347 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + subgraph cluster_88 { + color=blue + 348 [label="Enter when branch condition "]; + 349 [label="Exit $subj"]; + 350 [label="Const: Int(1)"]; + 351 [label="Equality operator =="]; + 352 [label="Exit when branch condition"]; + } + 353 [label="Synthetic else branch"]; + 354 [label="Enter when branch result"]; + subgraph cluster_89 { + color=blue + 355 [label="Enter block"]; + subgraph cluster_90 { + color=blue + 356 [label="Function call arguments enter"]; + 357 [label="Access variable R|/x|"]; + 358 [label="Smart cast: R|/x|"]; + 359 [label="Function call arguments exit"]; + } + 360 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 361 [label="Exit block"]; + } + 362 [label="Exit when branch result"]; + 363 [label="Exit when"]; + } + subgraph cluster_91 { + color=blue + 364 [label="Function call arguments enter"]; + 365 [label="Access variable R|/x|"]; + 366 [label="Smart cast: R|/x|"]; + 367 [label="Function call arguments exit"]; + } + 368 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 369 [label="Exit block"]; + } + 370 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 343 -> {344}; + 344 -> {345}; + 345 -> {346}; + 346 -> {347}; + 347 -> {348}; + 348 -> {349}; + 349 -> {350}; + 350 -> {351}; + 351 -> {352}; + 352 -> {353 354}; + 353 -> {363}; + 354 -> {355}; + 355 -> {356}; + 356 -> {357}; + 357 -> {358}; + 358 -> {359}; + 359 -> {360}; + 360 -> {361}; + 361 -> {362}; + 362 -> {363}; + 363 -> {364}; + 364 -> {365}; + 365 -> {366}; + 366 -> {367}; + 367 -> {368}; + 368 -> {369}; + 369 -> {370}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/whenSubjectExpression.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/whenSubjectExpression.dot index fbbdb7cd184..8ce0ba8ce29 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/whenSubjectExpression.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/whenSubjectExpression.dot @@ -44,33 +44,38 @@ digraph whenSubjectExpression_kt { subgraph cluster_7 { color=blue 18 [label="Enter block"]; - 19 [label="Access variable R|/x|"]; - 20 [label="Smart cast: R|/x|"]; - 21 [label="Function call: R|/x|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow]; - 22 [label="Exit block"]; + subgraph cluster_8 { + color=blue + 19 [label="Function call arguments enter"]; + 20 [label="Access variable R|/x|"]; + 21 [label="Smart cast: R|/x|"]; + 22 [label="Function call arguments exit"]; + } + 23 [label="Function call: R|/x|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow]; + 24 [label="Exit block"]; } - 23 [label="Exit when branch result"]; - 24 [label="Enter when branch result"]; - subgraph cluster_8 { - color=blue - 25 [label="Enter block"]; - 26 [label="Const: Int(0)"]; - 27 [label="Exit block"]; - } - 28 [label="Exit when branch result"]; - 29 [label="Enter when branch result"]; + 25 [label="Exit when branch result"]; + 26 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 30 [label="Enter block"]; - 31 [label="Const: Int(-1)"]; - 32 [label="Exit block"]; + 27 [label="Enter block"]; + 28 [label="Const: Int(0)"]; + 29 [label="Exit block"]; } - 33 [label="Exit when branch result"]; - 34 [label="Exit when"]; + 30 [label="Exit when branch result"]; + 31 [label="Enter when branch result"]; + subgraph cluster_10 { + color=blue + 32 [label="Enter block"]; + 33 [label="Const: Int(-1)"]; + 34 [label="Exit block"]; + } + 35 [label="Exit when branch result"]; + 36 [label="Exit when"]; } - 35 [label="Exit block"]; + 37 [label="Exit block"]; } - 36 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red]; + 38 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -79,12 +84,12 @@ digraph whenSubjectExpression_kt { 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {10 29}; + 9 -> {10 31}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15 24}; + 14 -> {15 26}; 15 -> {16}; 16 -> {17}; 17 -> {18}; @@ -93,117 +98,126 @@ digraph whenSubjectExpression_kt { 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {34}; + 23 -> {24}; 24 -> {25}; - 25 -> {26}; + 25 -> {36}; 26 -> {27}; 27 -> {28}; - 28 -> {34}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {36}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; + 36 -> {37}; + 37 -> {38}; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 37 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red]; - subgraph cluster_11 { + 39 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 38 [label="Enter block"]; - subgraph cluster_12 { + 40 [label="Enter block"]; + subgraph cluster_13 { color=blue - 39 [label="Enter when"]; - 40 [label="Access variable R|/x|"]; - 41 [label="Variable declaration: lval y: R|kotlin/Any|"]; - subgraph cluster_13 { - color=blue - 42 [label="Enter when branch condition "]; - 43 [label="Exit $subj"]; - 44 [label="Type operator: ($subj$ !is R|kotlin/Double|)"]; - 45 [label="Exit when branch condition"]; - } + 41 [label="Enter when"]; + 42 [label="Access variable R|/x|"]; + 43 [label="Variable declaration: lval y: R|kotlin/Any|"]; subgraph cluster_14 { color=blue - 46 [label="Enter when branch condition "]; - 47 [label="Exit $subj"]; - 48 [label="Const: Double(0.0)"]; - 49 [label="Equality operator =="]; - 50 [label="Exit when branch condition"]; + 44 [label="Enter when branch condition "]; + 45 [label="Exit $subj"]; + 46 [label="Type operator: ($subj$ !is R|kotlin/Double|)"]; + 47 [label="Exit when branch condition"]; } subgraph cluster_15 { color=blue - 51 [label="Enter when branch condition else"]; + 48 [label="Enter when branch condition "]; + 49 [label="Exit $subj"]; + 50 [label="Const: Double(0.0)"]; + 51 [label="Equality operator =="]; 52 [label="Exit when branch condition"]; } - 53 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 54 [label="Enter block"]; - 55 [label="Access variable R|/y|"]; - 56 [label="Smart cast: R|/y|"]; - 57 [label="Function call: R|/y|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow]; - 58 [label="Exit block"]; + 53 [label="Enter when branch condition else"]; + 54 [label="Exit when branch condition"]; } - 59 [label="Exit when branch result"]; - 60 [label="Enter when branch result"]; + 55 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 61 [label="Enter block"]; - 62 [label="Const: Int(0)"]; - 63 [label="Exit block"]; + 56 [label="Enter block"]; + subgraph cluster_18 { + color=blue + 57 [label="Function call arguments enter"]; + 58 [label="Access variable R|/y|"]; + 59 [label="Smart cast: R|/y|"]; + 60 [label="Function call arguments exit"]; + } + 61 [label="Function call: R|/y|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow]; + 62 [label="Exit block"]; } - 64 [label="Exit when branch result"]; - 65 [label="Enter when branch result"]; - subgraph cluster_18 { + 63 [label="Exit when branch result"]; + 64 [label="Enter when branch result"]; + subgraph cluster_19 { color=blue - 66 [label="Enter block"]; - 67 [label="Const: Int(-1)"]; - 68 [label="Exit block"]; + 65 [label="Enter block"]; + 66 [label="Const: Int(0)"]; + 67 [label="Exit block"]; } - 69 [label="Exit when branch result"]; - 70 [label="Exit when"]; + 68 [label="Exit when branch result"]; + 69 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 70 [label="Enter block"]; + 71 [label="Const: Int(-1)"]; + 72 [label="Exit block"]; + } + 73 [label="Exit when branch result"]; + 74 [label="Exit when"]; } - 71 [label="Exit block"]; + 75 [label="Exit block"]; } - 72 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red]; + 76 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red]; } - 37 -> {38}; - 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {46 65}; + 45 -> {46}; 46 -> {47}; - 47 -> {48}; + 47 -> {48 69}; 48 -> {49}; 49 -> {50}; - 50 -> {51 60}; + 50 -> {51}; 51 -> {52}; - 52 -> {53}; + 52 -> {53 64}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; - 59 -> {70}; + 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {64}; - 64 -> {70}; + 63 -> {74}; + 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - 68 -> {69}; + 68 -> {74}; 69 -> {70}; 70 -> {71}; 71 -> {72}; + 72 -> {73}; + 73 -> {74}; + 74 -> {75}; + 75 -> {76}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot index 75934a7e7d4..6fd872a90aa 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot @@ -46,45 +46,65 @@ digraph equalsAndIdentity_kt { subgraph cluster_7 { color=blue 16 [label="Enter block"]; - 17 [label="Access variable R|/x|"]; - 18 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 19 [label="Access variable R|/y|"]; - 20 [label="Smart cast: R|/y|"]; - 21 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 22 [label="Exit block"]; + subgraph cluster_8 { + color=blue + 17 [label="Function call arguments enter"]; + 18 [label="Access variable R|/x|"]; + 19 [label="Function call arguments exit"]; + } + 20 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_9 { + color=blue + 21 [label="Function call arguments enter"]; + 22 [label="Access variable R|/y|"]; + 23 [label="Smart cast: R|/y|"]; + 24 [label="Function call arguments exit"]; + } + 25 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 26 [label="Exit block"]; } - 23 [label="Exit when branch result"]; - 24 [label="Exit when"]; + 27 [label="Exit when branch result"]; + 28 [label="Exit when"]; } - subgraph cluster_8 { + subgraph cluster_10 { color=blue - 25 [label="Enter when"]; - subgraph cluster_9 { + 29 [label="Enter when"]; + subgraph cluster_11 { color=blue - 26 [label="Enter when branch condition "]; - 27 [label="Access variable R|/x|"]; - 28 [label="Access variable R|/y|"]; - 29 [label="Equality operator ==="]; - 30 [label="Exit when branch condition"]; + 30 [label="Enter when branch condition "]; + 31 [label="Access variable R|/x|"]; + 32 [label="Access variable R|/y|"]; + 33 [label="Equality operator ==="]; + 34 [label="Exit when branch condition"]; } - 31 [label="Synthetic else branch"]; - 32 [label="Enter when branch result"]; - subgraph cluster_10 { + 35 [label="Synthetic else branch"]; + 36 [label="Enter when branch result"]; + subgraph cluster_12 { color=blue - 33 [label="Enter block"]; - 34 [label="Access variable R|/x|"]; - 35 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 36 [label="Access variable R|/y|"]; - 37 [label="Smart cast: R|/y|"]; - 38 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 39 [label="Exit block"]; + 37 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 38 [label="Function call arguments enter"]; + 39 [label="Access variable R|/x|"]; + 40 [label="Function call arguments exit"]; + } + 41 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_14 { + color=blue + 42 [label="Function call arguments enter"]; + 43 [label="Access variable R|/y|"]; + 44 [label="Smart cast: R|/y|"]; + 45 [label="Function call arguments exit"]; + } + 46 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 47 [label="Exit block"]; } - 40 [label="Exit when branch result"]; - 41 [label="Exit when"]; + 48 [label="Exit when branch result"]; + 49 [label="Exit when"]; } - 42 [label="Exit block"]; + 50 [label="Exit block"]; } - 43 [label="Exit function test_1" style="filled" fillcolor=red]; + 51 [label="Exit function test_1" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; @@ -94,7 +114,7 @@ digraph equalsAndIdentity_kt { 11 -> {12}; 12 -> {13}; 13 -> {14 15}; - 14 -> {24}; + 14 -> {28}; 15 -> {16}; 16 -> {17}; 17 -> {18}; @@ -110,12 +130,12 @@ digraph equalsAndIdentity_kt { 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31 32}; - 31 -> {41}; + 30 -> {31}; + 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {35}; - 35 -> {36}; + 34 -> {35 36}; + 35 -> {49}; 36 -> {37}; 37 -> {38}; 38 -> {39}; @@ -123,67 +143,7 @@ digraph equalsAndIdentity_kt { 40 -> {41}; 41 -> {42}; 42 -> {43}; - - subgraph cluster_11 { - color=red - 44 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 45 [label="Enter block"]; - subgraph cluster_13 { - color=blue - 46 [label="Enter when"]; - subgraph cluster_14 { - color=blue - 47 [label="Enter when branch condition "]; - 48 [label="Access variable R|/x|"]; - 49 [label="Access variable R|/y|"]; - 50 [label="Equality operator =="]; - 51 [label="Exit when branch condition"]; - } - 52 [label="Synthetic else branch"]; - 53 [label="Enter when branch result"]; - subgraph cluster_15 { - color=blue - 54 [label="Enter block"]; - 55 [label="Access variable R|/x|"]; - 56 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 57 [label="Access variable R|/y|"]; - 58 [label="Function call: R|/y|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 59 [label="Exit block"]; - } - 60 [label="Exit when branch result"]; - 61 [label="Exit when"]; - } - subgraph cluster_16 { - color=blue - 62 [label="Enter when"]; - subgraph cluster_17 { - color=blue - 63 [label="Enter when branch condition "]; - 64 [label="Access variable R|/x|"]; - 65 [label="Access variable R|/y|"]; - 66 [label="Equality operator ==="]; - 67 [label="Exit when branch condition"]; - } - 68 [label="Synthetic else branch"]; - 69 [label="Enter when branch result"]; - subgraph cluster_18 { - color=blue - 70 [label="Enter block"]; - 71 [label="Access variable R|/x|"]; - 72 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 73 [label="Access variable R|/y|"]; - 74 [label="Function call: R|/y|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 75 [label="Exit block"]; - } - 76 [label="Exit when branch result"]; - 77 [label="Exit when"]; - } - 78 [label="Exit block"]; - } - 79 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; @@ -191,24 +151,104 @@ digraph equalsAndIdentity_kt { 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52 53}; - 52 -> {61}; + + subgraph cluster_15 { + color=red + 52 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 53 [label="Enter block"]; + subgraph cluster_17 { + color=blue + 54 [label="Enter when"]; + subgraph cluster_18 { + color=blue + 55 [label="Enter when branch condition "]; + 56 [label="Access variable R|/x|"]; + 57 [label="Access variable R|/y|"]; + 58 [label="Equality operator =="]; + 59 [label="Exit when branch condition"]; + } + 60 [label="Synthetic else branch"]; + 61 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 62 [label="Enter block"]; + subgraph cluster_20 { + color=blue + 63 [label="Function call arguments enter"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Function call arguments exit"]; + } + 66 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + subgraph cluster_21 { + color=blue + 67 [label="Function call arguments enter"]; + 68 [label="Access variable R|/y|"]; + 69 [label="Function call arguments exit"]; + } + 70 [label="Function call: R|/y|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 71 [label="Exit block"]; + } + 72 [label="Exit when branch result"]; + 73 [label="Exit when"]; + } + subgraph cluster_22 { + color=blue + 74 [label="Enter when"]; + subgraph cluster_23 { + color=blue + 75 [label="Enter when branch condition "]; + 76 [label="Access variable R|/x|"]; + 77 [label="Access variable R|/y|"]; + 78 [label="Equality operator ==="]; + 79 [label="Exit when branch condition"]; + } + 80 [label="Synthetic else branch"]; + 81 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 82 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 83 [label="Function call arguments enter"]; + 84 [label="Access variable R|/x|"]; + 85 [label="Function call arguments exit"]; + } + 86 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + subgraph cluster_26 { + color=blue + 87 [label="Function call arguments enter"]; + 88 [label="Access variable R|/y|"]; + 89 [label="Function call arguments exit"]; + } + 90 [label="Function call: R|/y|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 91 [label="Exit block"]; + } + 92 [label="Exit when branch result"]; + 93 [label="Exit when"]; + } + 94 [label="Exit block"]; + } + 95 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; - 59 -> {60}; - 60 -> {61}; + 59 -> {60 61}; + 60 -> {73}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {68 69}; - 68 -> {77}; + 67 -> {68}; + 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; @@ -219,128 +259,148 @@ digraph equalsAndIdentity_kt { 76 -> {77}; 77 -> {78}; 78 -> {79}; - - subgraph cluster_19 { - color=red - 80 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_20 { - color=blue - 81 [label="Enter block"]; - subgraph cluster_21 { - color=blue - 82 [label="Enter when"]; - subgraph cluster_22 { - color=blue - 83 [label="Enter when branch condition "]; - 84 [label="Access variable R|/y|"]; - 85 [label="Const: Null(null)"]; - 86 [label="Equality operator =="]; - 87 [label="Exit when branch condition"]; - } - 88 [label="Synthetic else branch"]; - 89 [label="Enter when branch result"]; - subgraph cluster_23 { - color=blue - 90 [label="Enter block"]; - 91 [label="Jump: ^test_3 Unit"]; - 92 [label="Stub" style="filled" fillcolor=gray]; - 93 [label="Exit block" style="filled" fillcolor=gray]; - } - 94 [label="Exit when branch result" style="filled" fillcolor=gray]; - 95 [label="Exit when"]; - } - subgraph cluster_24 { - color=blue - 96 [label="Enter when"]; - subgraph cluster_25 { - color=blue - 97 [label="Enter when branch condition "]; - 98 [label="Access variable R|/x|"]; - 99 [label="Access variable R|/y|"]; - 100 [label="Smart cast: R|/y|"]; - 101 [label="Equality operator =="]; - 102 [label="Exit when branch condition"]; - } - 103 [label="Synthetic else branch"]; - 104 [label="Enter when branch result"]; - subgraph cluster_26 { - color=blue - 105 [label="Enter block"]; - 106 [label="Access variable R|/x|"]; - 107 [label="Smart cast: R|/x|"]; - 108 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 109 [label="Access variable R|/y|"]; - 110 [label="Smart cast: R|/y|"]; - 111 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 112 [label="Exit block"]; - } - 113 [label="Exit when branch result"]; - 114 [label="Exit when"]; - } - subgraph cluster_27 { - color=blue - 115 [label="Enter when"]; - subgraph cluster_28 { - color=blue - 116 [label="Enter when branch condition "]; - 117 [label="Access variable R|/x|"]; - 118 [label="Access variable R|/y|"]; - 119 [label="Smart cast: R|/y|"]; - 120 [label="Equality operator ==="]; - 121 [label="Exit when branch condition"]; - } - 122 [label="Synthetic else branch"]; - 123 [label="Enter when branch result"]; - subgraph cluster_29 { - color=blue - 124 [label="Enter block"]; - 125 [label="Access variable R|/x|"]; - 126 [label="Smart cast: R|/x|"]; - 127 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 128 [label="Access variable R|/y|"]; - 129 [label="Smart cast: R|/y|"]; - 130 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 131 [label="Exit block"]; - } - 132 [label="Exit when branch result"]; - 133 [label="Exit when"]; - } - 134 [label="Exit block"]; - } - 135 [label="Exit function test_3" style="filled" fillcolor=red]; - } - 80 -> {81}; + 79 -> {80 81}; + 80 -> {93}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; - 87 -> {88 89}; - 88 -> {95}; + 87 -> {88}; + 88 -> {89}; 89 -> {90}; 90 -> {91}; - 91 -> {135}; - 91 -> {92} [style=dotted]; - 92 -> {93} [style=dotted]; - 93 -> {94} [style=dotted]; - 94 -> {95} [style=dotted]; - 95 -> {96}; + 91 -> {92}; + 92 -> {93}; + 93 -> {94}; + 94 -> {95}; + + subgraph cluster_27 { + color=red + 96 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 97 [label="Enter block"]; + subgraph cluster_29 { + color=blue + 98 [label="Enter when"]; + subgraph cluster_30 { + color=blue + 99 [label="Enter when branch condition "]; + 100 [label="Access variable R|/y|"]; + 101 [label="Const: Null(null)"]; + 102 [label="Equality operator =="]; + 103 [label="Exit when branch condition"]; + } + 104 [label="Synthetic else branch"]; + 105 [label="Enter when branch result"]; + subgraph cluster_31 { + color=blue + 106 [label="Enter block"]; + 107 [label="Jump: ^test_3 Unit"]; + 108 [label="Stub" style="filled" fillcolor=gray]; + 109 [label="Exit block" style="filled" fillcolor=gray]; + } + 110 [label="Exit when branch result" style="filled" fillcolor=gray]; + 111 [label="Exit when"]; + } + subgraph cluster_32 { + color=blue + 112 [label="Enter when"]; + subgraph cluster_33 { + color=blue + 113 [label="Enter when branch condition "]; + 114 [label="Access variable R|/x|"]; + 115 [label="Access variable R|/y|"]; + 116 [label="Smart cast: R|/y|"]; + 117 [label="Equality operator =="]; + 118 [label="Exit when branch condition"]; + } + 119 [label="Synthetic else branch"]; + 120 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 121 [label="Enter block"]; + subgraph cluster_35 { + color=blue + 122 [label="Function call arguments enter"]; + 123 [label="Access variable R|/x|"]; + 124 [label="Smart cast: R|/x|"]; + 125 [label="Function call arguments exit"]; + } + 126 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_36 { + color=blue + 127 [label="Function call arguments enter"]; + 128 [label="Access variable R|/y|"]; + 129 [label="Smart cast: R|/y|"]; + 130 [label="Function call arguments exit"]; + } + 131 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 132 [label="Exit block"]; + } + 133 [label="Exit when branch result"]; + 134 [label="Exit when"]; + } + subgraph cluster_37 { + color=blue + 135 [label="Enter when"]; + subgraph cluster_38 { + color=blue + 136 [label="Enter when branch condition "]; + 137 [label="Access variable R|/x|"]; + 138 [label="Access variable R|/y|"]; + 139 [label="Smart cast: R|/y|"]; + 140 [label="Equality operator ==="]; + 141 [label="Exit when branch condition"]; + } + 142 [label="Synthetic else branch"]; + 143 [label="Enter when branch result"]; + subgraph cluster_39 { + color=blue + 144 [label="Enter block"]; + subgraph cluster_40 { + color=blue + 145 [label="Function call arguments enter"]; + 146 [label="Access variable R|/x|"]; + 147 [label="Smart cast: R|/x|"]; + 148 [label="Function call arguments exit"]; + } + 149 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_41 { + color=blue + 150 [label="Function call arguments enter"]; + 151 [label="Access variable R|/y|"]; + 152 [label="Smart cast: R|/y|"]; + 153 [label="Function call arguments exit"]; + } + 154 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 155 [label="Exit block"]; + } + 156 [label="Exit when branch result"]; + 157 [label="Exit when"]; + } + 158 [label="Exit block"]; + } + 159 [label="Exit function test_3" style="filled" fillcolor=red]; + } 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; 101 -> {102}; - 102 -> {103 104}; - 103 -> {114}; - 104 -> {105}; + 102 -> {103}; + 103 -> {104 105}; + 104 -> {111}; 105 -> {106}; 106 -> {107}; - 107 -> {108}; - 108 -> {109}; - 109 -> {110}; - 110 -> {111}; + 107 -> {159}; + 107 -> {108} [style=dotted]; + 108 -> {109} [style=dotted]; + 109 -> {110} [style=dotted]; + 110 -> {111} [style=dotted]; 111 -> {112}; 112 -> {113}; 113 -> {114}; @@ -348,11 +408,11 @@ digraph equalsAndIdentity_kt { 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {119}; - 119 -> {120}; + 118 -> {119 120}; + 119 -> {134}; 120 -> {121}; - 121 -> {122 123}; - 122 -> {133}; + 121 -> {122}; + 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; @@ -365,5 +425,29 @@ digraph equalsAndIdentity_kt { 132 -> {133}; 133 -> {134}; 134 -> {135}; + 135 -> {136}; + 136 -> {137}; + 137 -> {138}; + 138 -> {139}; + 139 -> {140}; + 140 -> {141}; + 141 -> {142 143}; + 142 -> {157}; + 143 -> {144}; + 144 -> {145}; + 145 -> {146}; + 146 -> {147}; + 147 -> {148}; + 148 -> {149}; + 149 -> {150}; + 150 -> {151}; + 151 -> {152}; + 152 -> {153}; + 153 -> {154}; + 154 -> {155}; + 155 -> {156}; + 156 -> {157}; + 157 -> {158}; + 158 -> {159}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot index 31412cf3f3b..365e4ac3207 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot @@ -9,152 +9,187 @@ digraph incorrectSmartcastToNothing_kt { subgraph cluster_1 { color=blue 1 [label="Enter property" style="filled" fillcolor=red]; - 2 [label="Const: String(foo)"]; - 3 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; - 4 [label="Exit property" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 2 [label="Function call arguments enter"]; + 3 [label="Const: String(foo)"]; + 4 [label="Function call arguments exit"]; + } + 5 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; + 6 [label="Exit property" style="filled" fillcolor=red]; } - 5 [label="Exit file incorrectSmartcastToNothing.kt" style="filled" fillcolor=red]; + 7 [label="Exit file incorrectSmartcastToNothing.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {5} [style=dotted]; + 0 -> {7} [style=dotted]; 0 -> {1} [style=dashed]; 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {5} [color=green]; + 4 -> {5}; + 5 -> {6}; + 6 -> {7} [color=green]; - subgraph cluster_2 { + subgraph cluster_3 { color=red - 6 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_3 { + 8 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 7 [label="Enter block"]; - subgraph cluster_4 { + 9 [label="Enter block"]; + subgraph cluster_5 { color=blue - 8 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 9 [label="Enter when branch condition "]; - 10 [label="Access variable R|/cacheExtSetting|"]; - 11 [label="Const: Null(null)"]; - 12 [label="Equality operator =="]; - 13 [label="Exit when branch condition"]; - } + 10 [label="Enter when"]; subgraph cluster_6 { color=blue - 14 [label="Enter when branch condition "]; - 15 [label="Access variable R|/cacheExtSetting|"]; - 16 [label="Smart cast: R|/cacheExtSetting|"]; - 17 [label="Function call: R|/cacheExtSetting|.R|kotlin/text/isBlank|()" style="filled" fillcolor=yellow]; - 18 [label="Exit when branch condition"]; + 11 [label="Enter when branch condition "]; + 12 [label="Access variable R|/cacheExtSetting|"]; + 13 [label="Const: Null(null)"]; + 14 [label="Equality operator =="]; + 15 [label="Exit when branch condition"]; } subgraph cluster_7 { color=blue - 19 [label="Enter when branch condition else"]; - 20 [label="Exit when branch condition"]; + 16 [label="Enter when branch condition "]; + subgraph cluster_8 { + color=blue + 17 [label="Function call arguments enter"]; + 18 [label="Access variable R|/cacheExtSetting|"]; + 19 [label="Smart cast: R|/cacheExtSetting|"]; + 20 [label="Function call arguments exit"]; + } + 21 [label="Function call: R|/cacheExtSetting|.R|kotlin/text/isBlank|()" style="filled" fillcolor=yellow]; + 22 [label="Exit when branch condition"]; } - 21 [label="Enter when branch result"]; - subgraph cluster_8 { - color=blue - 22 [label="Enter block"]; - 23 [label="Access variable R|/cacheExtSetting|"]; - 24 [label="Smart cast: R|/cacheExtSetting|"]; - 25 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; - 26 [label="Exit block"]; - } - 27 [label="Exit when branch result"]; - 28 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 29 [label="Enter block"]; - 30 [label="Const: Null(null)"]; - 31 [label="Exit block"]; + 23 [label="Enter when branch condition else"]; + 24 [label="Exit when branch condition"]; } - 32 [label="Exit when branch result"]; - 33 [label="Enter when branch result"]; + 25 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 34 [label="Enter block"]; - 35 [label="Access variable R|/cache|"]; - 36 [label="Enter safe call"]; - 37 [label="Postponed enter to lambda"]; + 26 [label="Enter block"]; subgraph cluster_11 { color=blue - 38 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 39 [label="Enter block"]; - 40 [label="Access variable R|/it|"]; - 41 [label="Const: String(main.kts.compiled.cache)"]; - 42 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; - 43 [label="Exit block"]; - } - 44 [label="Exit function " style="filled" fillcolor=red]; + 27 [label="Function call arguments enter"]; + 28 [label="Access variable R|/cacheExtSetting|"]; + 29 [label="Smart cast: R|/cacheExtSetting|"]; + 30 [label="Function call arguments exit"]; } - 45 [label="Postponed exit from lambda"]; - 46 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 47 [label="Exit safe call"]; - 48 [label="Exit block"]; + 31 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 49 [label="Exit when branch result"]; - 50 [label="Merge postponed lambda exits"]; - 51 [label="Exit when"]; + 33 [label="Exit when branch result"]; + 34 [label="Enter when branch result"]; + subgraph cluster_12 { + color=blue + 35 [label="Enter block"]; + 36 [label="Const: Null(null)"]; + 37 [label="Exit block"]; + } + 38 [label="Exit when branch result"]; + 39 [label="Enter when branch result"]; + subgraph cluster_13 { + color=blue + 40 [label="Enter block"]; + 41 [label="Access variable R|/cache|"]; + 42 [label="Enter safe call"]; + subgraph cluster_14 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Postponed enter to lambda"]; + subgraph cluster_15 { + color=blue + 45 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 46 [label="Enter block"]; + subgraph cluster_17 { + color=blue + 47 [label="Function call arguments enter"]; + 48 [label="Access variable R|/it|"]; + 49 [label="Const: String(main.kts.compiled.cache)"]; + 50 [label="Function call arguments exit"]; + } + 51 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; + 52 [label="Exit block"]; + } + 53 [label="Exit function " style="filled" fillcolor=red]; + } + 54 [label="Function call arguments exit"]; + } + 55 [label="Postponed exit from lambda"]; + 56 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 57 [label="Exit safe call"]; + 58 [label="Exit block"]; + } + 59 [label="Exit when branch result"]; + 60 [label="Merge postponed lambda exits"]; + 61 [label="Exit when"]; } - 52 [label="Variable declaration: lval cacheBaseDir: R|java/io/File?|"]; - 53 [label="Exit block"]; + 62 [label="Variable declaration: lval cacheBaseDir: R|java/io/File?|"]; + 63 [label="Exit block"]; } - 54 [label="Exit function test" style="filled" fillcolor=red]; + 64 [label="Exit function test" style="filled" fillcolor=red]; } - 6 -> {7}; - 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {14 33}; + 13 -> {14}; 14 -> {15}; - 15 -> {16}; + 15 -> {16 39}; 16 -> {17}; 17 -> {18}; - 18 -> {19 28}; + 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {23}; + 22 -> {23 34}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {51}; + 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {51}; - 33 -> {34}; + 32 -> {33}; + 33 -> {61}; 34 -> {35}; - 35 -> {36 47}; + 35 -> {36}; 36 -> {37}; - 37 -> {38 46}; - 37 -> {45} [style=dotted]; - 37 -> {38} [style=dashed]; - 38 -> {39}; + 37 -> {38}; + 38 -> {61}; 39 -> {40}; 40 -> {41}; - 41 -> {42}; + 41 -> {42 57}; 42 -> {43}; 43 -> {44}; - 44 -> {45}; - 45 -> {46} [color=green]; - 45 -> {50} [color=red]; + 44 -> {45 54}; + 44 -> {55} [style=dotted]; + 44 -> {45} [style=dashed]; + 45 -> {46}; 46 -> {47}; - 47 -> {48 50}; + 47 -> {48}; 48 -> {49}; - 49 -> {51}; - 50 -> {51} [color=red]; + 49 -> {50}; + 50 -> {51}; 51 -> {52}; 52 -> {53}; - 53 -> {54}; + 53 -> {55}; + 54 -> {56}; + 55 -> {56} [color=green]; + 55 -> {60} [color=red]; + 56 -> {57}; + 57 -> {58 60}; + 58 -> {59}; + 59 -> {61}; + 60 -> {61} [color=red]; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot index f8d12baa843..8b6de3681c8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot @@ -59,30 +59,40 @@ digraph inPlaceLambdas_kt { subgraph cluster_9 { color=blue 19 [label="Enter block"]; - 20 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue - 21 [label="Enter function " style="filled" fillcolor=red]; + 20 [label="Function call arguments enter"]; + 21 [label="Postponed enter to lambda"]; subgraph cluster_11 { color=blue - 22 [label="Enter block"]; - 23 [label="Access variable R|/x|"]; - 24 [label="Smart cast: R|/x|"]; - 25 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 26 [label="Exit block"]; + 22 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 23 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 24 [label="Function call arguments enter"]; + 25 [label="Access variable R|/x|"]; + 26 [label="Smart cast: R|/x|"]; + 27 [label="Function call arguments exit"]; + } + 28 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 29 [label="Exit block"]; + } + 30 [label="Exit function " style="filled" fillcolor=red]; } - 27 [label="Exit function " style="filled" fillcolor=red]; + 31 [label="Function call arguments exit"]; } - 28 [label="Postponed exit from lambda"]; - 29 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; + 32 [label="Postponed exit from lambda"]; + 33 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 34 [label="Exit block"]; } - 31 [label="Exit when branch result"]; - 32 [label="Exit when"]; + 35 [label="Exit when branch result"]; + 36 [label="Exit when"]; } - 33 [label="Exit block"]; + 37 [label="Exit block"]; } - 34 [label="Exit function test_1" style="filled" fillcolor=red]; + 38 [label="Exit function test_1" style="filled" fillcolor=red]; } 10 -> {11}; 11 -> {12}; @@ -91,13 +101,13 @@ digraph inPlaceLambdas_kt { 14 -> {15}; 15 -> {16}; 16 -> {17 18}; - 17 -> {32}; + 17 -> {36}; 18 -> {19}; 19 -> {20}; - 20 -> {21 29}; - 20 -> {28} [style=dotted]; - 20 -> {21} [style=dashed]; - 21 -> {22}; + 20 -> {21}; + 21 -> {22 31}; + 21 -> {32} [style=dotted]; + 21 -> {22} [style=dashed]; 22 -> {23}; 23 -> {24}; 24 -> {25}; @@ -106,131 +116,156 @@ digraph inPlaceLambdas_kt { 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31}; - 31 -> {32}; + 30 -> {32}; + 31 -> {33}; 32 -> {33}; 33 -> {34}; - - subgraph cluster_12 { - color=red - 35 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 36 [label="Enter block"]; - 37 [label="Postponed enter to lambda"]; - subgraph cluster_14 { - color=blue - 38 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 39 [label="Enter block"]; - 40 [label="Access variable R|/x|"]; - 41 [label="Type operator: (R|/x| as R|B|)"]; - 42 [label="Exit block"]; - } - 43 [label="Exit function " style="filled" fillcolor=red]; - } - 44 [label="Postponed exit from lambda"]; - 45 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 46 [label="Access variable R|/x|"]; - 47 [label="Smart cast: R|/x|"]; - 48 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 49 [label="Exit block"]; - } - 50 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38 45}; - 37 -> {44} [style=dotted]; - 37 -> {38} [style=dashed]; - 38 -> {39}; + 37 -> {38}; + + subgraph cluster_14 { + color=red + 39 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 40 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 41 [label="Function call arguments enter"]; + 42 [label="Postponed enter to lambda"]; + subgraph cluster_17 { + color=blue + 43 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 44 [label="Enter block"]; + 45 [label="Access variable R|/x|"]; + 46 [label="Type operator: (R|/x| as R|B|)"]; + 47 [label="Exit block"]; + } + 48 [label="Exit function " style="filled" fillcolor=red]; + } + 49 [label="Function call arguments exit"]; + } + 50 [label="Postponed exit from lambda"]; + 51 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_19 { + color=blue + 52 [label="Function call arguments enter"]; + 53 [label="Access variable R|/x|"]; + 54 [label="Smart cast: R|/x|"]; + 55 [label="Function call arguments exit"]; + } + 56 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 57 [label="Exit block"]; + } + 58 [label="Exit function test_2" style="filled" fillcolor=red]; + } 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43}; + 42 -> {43 49}; + 42 -> {50} [style=dotted]; + 42 -> {43} [style=dashed]; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {49}; - 49 -> {50}; - - subgraph cluster_16 { - color=red - 51 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 52 [label="Enter block"]; - subgraph cluster_18 { - color=blue - 53 [label="Enter when"]; - subgraph cluster_19 { - color=blue - 54 [label="Enter when branch condition "]; - 55 [label="Access variable R|/x|"]; - 56 [label="Type operator: (R|/x| is R|A|)"]; - 57 [label="Exit when branch condition"]; - } - 58 [label="Synthetic else branch"]; - 59 [label="Enter when branch result"]; - subgraph cluster_20 { - color=blue - 60 [label="Enter block"]; - 61 [label="Postponed enter to lambda"]; - subgraph cluster_21 { - color=blue - 62 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 63 [label="Enter block"]; - 64 [label="Access variable R|/x|"]; - 65 [label="Smart cast: R|/x|"]; - 66 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 67 [label="Access variable R|/x|"]; - 68 [label="Smart cast: R|/x|"]; - 69 [label="Type operator: (R|/x| as R|B|)"]; - 70 [label="Exit block"]; - } - 71 [label="Exit function " style="filled" fillcolor=red]; - } - 72 [label="Postponed exit from lambda"]; - 73 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 74 [label="Access variable R|/x|"]; - 75 [label="Smart cast: R|/x|"]; - 76 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 77 [label="Exit block"]; - } - 78 [label="Exit when branch result"]; - 79 [label="Exit when"]; - } - 80 [label="Exit block"]; - } - 81 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 48 -> {50}; + 49 -> {51}; + 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58 59}; - 58 -> {79}; + 57 -> {58}; + + subgraph cluster_20 { + color=red + 59 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 60 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 61 [label="Enter when"]; + subgraph cluster_23 { + color=blue + 62 [label="Enter when branch condition "]; + 63 [label="Access variable R|/x|"]; + 64 [label="Type operator: (R|/x| is R|A|)"]; + 65 [label="Exit when branch condition"]; + } + 66 [label="Synthetic else branch"]; + 67 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 68 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 69 [label="Function call arguments enter"]; + 70 [label="Postponed enter to lambda"]; + subgraph cluster_26 { + color=blue + 71 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_27 { + color=blue + 72 [label="Enter block"]; + subgraph cluster_28 { + color=blue + 73 [label="Function call arguments enter"]; + 74 [label="Access variable R|/x|"]; + 75 [label="Smart cast: R|/x|"]; + 76 [label="Function call arguments exit"]; + } + 77 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 78 [label="Access variable R|/x|"]; + 79 [label="Smart cast: R|/x|"]; + 80 [label="Type operator: (R|/x| as R|B|)"]; + 81 [label="Exit block"]; + } + 82 [label="Exit function " style="filled" fillcolor=red]; + } + 83 [label="Function call arguments exit"]; + } + 84 [label="Postponed exit from lambda"]; + 85 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_29 { + color=blue + 86 [label="Function call arguments enter"]; + 87 [label="Access variable R|/x|"]; + 88 [label="Smart cast: R|/x|"]; + 89 [label="Function call arguments exit"]; + } + 90 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 91 [label="Exit block"]; + } + 92 [label="Exit when branch result"]; + 93 [label="Exit when"]; + } + 94 [label="Exit block"]; + } + 95 [label="Exit function test_3" style="filled" fillcolor=red]; + } 59 -> {60}; 60 -> {61}; - 61 -> {62 73}; - 61 -> {72} [style=dotted]; - 61 -> {62} [style=dashed]; + 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {66}; - 66 -> {67}; + 65 -> {66 67}; + 66 -> {93}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; + 70 -> {71 83}; + 70 -> {84} [style=dotted]; + 70 -> {71} [style=dashed]; 71 -> {72}; 72 -> {73}; 73 -> {74}; @@ -241,5 +276,19 @@ digraph inPlaceLambdas_kt { 78 -> {79}; 79 -> {80}; 80 -> {81}; + 81 -> {82}; + 82 -> {84}; + 83 -> {85}; + 84 -> {85}; + 85 -> {86}; + 86 -> {87}; + 87 -> {88}; + 88 -> {89}; + 89 -> {90}; + 90 -> {91}; + 91 -> {92}; + 92 -> {93}; + 93 -> {94}; + 94 -> {95}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot index 58f51580afd..9904f0f33b4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot @@ -144,70 +144,75 @@ digraph lambdaInWhenBranch_kt { subgraph cluster_18 { color=blue 49 [label="Enter block"]; - 50 [label="Const: String()"]; - 51 [label="Postponed enter to lambda"]; subgraph cluster_19 { color=blue - 52 [label="Enter function " style="filled" fillcolor=red]; + 50 [label="Function call arguments enter"]; + 51 [label="Const: String()"]; + 52 [label="Postponed enter to lambda"]; subgraph cluster_20 { color=blue - 53 [label="Enter block"]; - 54 [label="Access variable R|/it|"]; - 55 [label="Exit block"]; + 53 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 54 [label="Enter block"]; + 55 [label="Access variable R|/it|"]; + 56 [label="Exit block"]; + } + 57 [label="Exit function " style="filled" fillcolor=red]; } - 56 [label="Exit function " style="filled" fillcolor=red]; + 58 [label="Function call arguments exit"]; } - 57 [label="Postponed exit from lambda"]; - 58 [label="Function call: String().R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 59 [label="Exit block"]; + 59 [label="Postponed exit from lambda"]; + 60 [label="Function call: String().R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 61 [label="Exit block"]; } - 60 [label="Exit when branch result"]; - 61 [label="Exit when"]; + 62 [label="Exit when branch result"]; + 63 [label="Exit when"]; } - 62 [label="Access variable R|/p|"]; - 63 [label="Access variable #"]; - subgraph cluster_21 { + 64 [label="Access variable R|/p|"]; + 65 [label="Access variable #"]; + subgraph cluster_22 { color=blue - 64 [label="Enter when"]; - 65 [label="Access variable R|/p|"]; - subgraph cluster_22 { - color=blue - 66 [label="Enter when branch condition "]; - 67 [label="Exit $subj"]; - 68 [label="Type operator: ($subj$ is R|SubClass1|)"]; - 69 [label="Exit when branch condition"]; - } + 66 [label="Enter when"]; + 67 [label="Access variable R|/p|"]; subgraph cluster_23 { color=blue - 70 [label="Enter when branch condition "]; - 71 [label="Exit $subj"]; - 72 [label="Type operator: ($subj$ is R|SubClass2|)"]; - 73 [label="Exit when branch condition"]; + 68 [label="Enter when branch condition "]; + 69 [label="Exit $subj"]; + 70 [label="Type operator: ($subj$ is R|SubClass1|)"]; + 71 [label="Exit when branch condition"]; } - 74 [label="Enter when branch result"]; subgraph cluster_24 { color=blue - 75 [label="Enter block"]; - 76 [label="Const: String(2)"]; - 77 [label="Exit block"]; + 72 [label="Enter when branch condition "]; + 73 [label="Exit $subj"]; + 74 [label="Type operator: ($subj$ is R|SubClass2|)"]; + 75 [label="Exit when branch condition"]; } - 78 [label="Exit when branch result"]; - 79 [label="Enter when branch result"]; + 76 [label="Enter when branch result"]; subgraph cluster_25 { color=blue - 80 [label="Enter block"]; - 81 [label="Access variable R|/p|"]; - 82 [label="Smart cast: R|/p|"]; - 83 [label="Access variable R|/SubClass1.t|"]; - 84 [label="Exit block"]; + 77 [label="Enter block"]; + 78 [label="Const: String(2)"]; + 79 [label="Exit block"]; } - 85 [label="Exit when branch result"]; - 86 [label="Exit when"]; + 80 [label="Exit when branch result"]; + 81 [label="Enter when branch result"]; + subgraph cluster_26 { + color=blue + 82 [label="Enter block"]; + 83 [label="Access variable R|/p|"]; + 84 [label="Smart cast: R|/p|"]; + 85 [label="Access variable R|/SubClass1.t|"]; + 86 [label="Exit block"]; + } + 87 [label="Exit when branch result"]; + 88 [label="Exit when"]; } - 87 [label="Access variable R|kotlin/String.length|"]; - 88 [label="Exit block"]; + 89 [label="Access variable R|kotlin/String.length|"]; + 90 [label="Exit block"]; } - 89 [label="Exit function foo" style="filled" fillcolor=red]; + 91 [label="Exit function foo" style="filled" fillcolor=red]; } 31 -> {32}; 32 -> {33}; @@ -225,22 +230,22 @@ digraph lambdaInWhenBranch_kt { 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {61}; + 47 -> {63}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52 58}; - 51 -> {57} [style=dotted]; - 51 -> {52} [style=dashed]; - 52 -> {53}; + 51 -> {52}; + 52 -> {53 58}; + 52 -> {59} [style=dotted]; + 52 -> {53} [style=dashed]; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58} [color=green]; - 57 -> {61} [color=red]; - 58 -> {59}; - 59 -> {60}; + 57 -> {59}; + 58 -> {60}; + 59 -> {60} [color=green]; + 59 -> {63} [color=red]; 60 -> {61}; 61 -> {62}; 62 -> {63}; @@ -250,18 +255,18 @@ digraph lambdaInWhenBranch_kt { 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {70 79}; + 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {72 81}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; - 78 -> {86}; + 78 -> {79}; 79 -> {80}; - 80 -> {81}; + 80 -> {88}; 81 -> {82}; 82 -> {83}; 83 -> {84}; @@ -270,5 +275,7 @@ digraph lambdaInWhenBranch_kt { 86 -> {87}; 87 -> {88}; 88 -> {89}; + 89 -> {90}; + 90 -> {91}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot index 0ab9079fb61..61c17fd560b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot @@ -32,15 +32,20 @@ digraph smartcastOnLambda_kt { subgraph cluster_5 { color=blue 12 [label="Enter block"]; - 13 [label="Function call: R|/func|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; + subgraph cluster_6 { + color=blue + 13 [label="Function call arguments enter"]; + 14 [label="Function call arguments exit"]; + } + 15 [label="Function call: R|/func|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 16 [label="Exit block"]; } - 15 [label="Exit when branch result"]; - 16 [label="Exit when"]; + 17 [label="Exit when branch result"]; + 18 [label="Exit when"]; } - 17 [label="Exit block"]; + 19 [label="Exit block"]; } - 18 [label="Exit function test" style="filled" fillcolor=red]; + 20 [label="Exit function test" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -50,7 +55,7 @@ digraph smartcastOnLambda_kt { 7 -> {8}; 8 -> {9}; 9 -> {10 11}; - 10 -> {16}; + 10 -> {18}; 11 -> {12}; 12 -> {13}; 13 -> {14}; @@ -58,5 +63,7 @@ digraph smartcastOnLambda_kt { 15 -> {16}; 16 -> {17}; 17 -> {18}; + 18 -> {19}; + 19 -> {20}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot index c8c72728cc8..deafe41146c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot @@ -71,18 +71,23 @@ digraph dataFlowInfoFromWhileCondition_kt { subgraph cluster_11 { color=blue 26 [label="Enter block"]; - 27 [label="Access variable R|/a|"]; - 28 [label="Smart cast: R|/a|"]; - 29 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; + subgraph cluster_12 { + color=blue + 27 [label="Function call arguments enter"]; + 28 [label="Access variable R|/a|"]; + 29 [label="Smart cast: R|/a|"]; + 30 [label="Function call arguments exit"]; + } + 31 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 31 [label="Exit loop block"]; + 33 [label="Exit loop block"]; } - 32 [label="Exit while loop"]; + 34 [label="Exit while loop"]; } - 33 [label="Exit block"]; + 35 [label="Exit block"]; } - 34 [label="Exit function test" style="filled" fillcolor=red]; + 36 [label="Exit function test" style="filled" fillcolor=red]; } 10 -> {11}; 11 -> {12}; @@ -98,15 +103,17 @@ digraph dataFlowInfoFromWhileCondition_kt { 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25 32}; + 24 -> {25 34}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {15} [color=green style=dashed]; + 31 -> {32}; 32 -> {33}; - 33 -> {34}; + 33 -> {15} [color=green style=dashed]; + 34 -> {35}; + 35 -> {36}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot index 9f4a91c5955..8cbddb4a161 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot @@ -74,12 +74,17 @@ digraph endlessLoops_kt { } 30 [label="Exit while loop"]; } - 31 [label="Access variable R|/x|"]; - 32 [label="Smart cast: R|/x|"]; - 33 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 34 [label="Exit block"]; + subgraph cluster_12 { + color=blue + 31 [label="Function call arguments enter"]; + 32 [label="Access variable R|/x|"]; + 33 [label="Smart cast: R|/x|"]; + 34 [label="Function call arguments exit"]; + } + 35 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 36 [label="Exit block"]; } - 35 [label="Exit function test_1" style="filled" fillcolor=red]; + 37 [label="Exit function test_1" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; @@ -112,459 +117,422 @@ digraph endlessLoops_kt { 32 -> {33}; 33 -> {34}; 34 -> {35}; + 35 -> {36}; + 36 -> {37}; - subgraph cluster_12 { + subgraph cluster_13 { color=red - 36 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_13 { + 38 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_14 { color=blue - 37 [label="Enter block"]; - subgraph cluster_14 { + 39 [label="Enter block"]; + subgraph cluster_15 { color=blue - 38 [label="Enter while loop"]; - subgraph cluster_15 { - color=blue - 39 [label="Enter loop condition"]; - 40 [label="Const: Boolean(true)"]; - 41 [label="Exit loop condition"]; - } + 40 [label="Enter while loop"]; subgraph cluster_16 { color=blue - 42 [label="Enter loop block"]; - subgraph cluster_17 { + 41 [label="Enter loop condition"]; + 42 [label="Const: Boolean(true)"]; + 43 [label="Exit loop condition"]; + } + subgraph cluster_17 { + color=blue + 44 [label="Enter loop block"]; + subgraph cluster_18 { color=blue - 43 [label="Enter block"]; - subgraph cluster_18 { + 45 [label="Enter block"]; + subgraph cluster_19 { color=blue - 44 [label="Enter when"]; - subgraph cluster_19 { - color=blue - 45 [label="Enter when branch condition "]; - 46 [label="Access variable R|/b|"]; - 47 [label="Exit when branch condition"]; - } - 48 [label="Synthetic else branch"]; - 49 [label="Enter when branch result"]; + 46 [label="Enter when"]; subgraph cluster_20 { color=blue - 50 [label="Enter block"]; - 51 [label="Access variable R|/x|"]; - 52 [label="Type operator: (R|/x| as R|A|)"]; - 53 [label="Jump: break@@@[Boolean(true)] "]; - 54 [label="Stub" style="filled" fillcolor=gray]; - 55 [label="Exit block" style="filled" fillcolor=gray]; + 47 [label="Enter when branch condition "]; + 48 [label="Access variable R|/b|"]; + 49 [label="Exit when branch condition"]; } - 56 [label="Exit when branch result" style="filled" fillcolor=gray]; - 57 [label="Exit when"]; + 50 [label="Synthetic else branch"]; + 51 [label="Enter when branch result"]; + subgraph cluster_21 { + color=blue + 52 [label="Enter block"]; + 53 [label="Access variable R|/x|"]; + 54 [label="Type operator: (R|/x| as R|A|)"]; + 55 [label="Jump: break@@@[Boolean(true)] "]; + 56 [label="Stub" style="filled" fillcolor=gray]; + 57 [label="Exit block" style="filled" fillcolor=gray]; + } + 58 [label="Exit when branch result" style="filled" fillcolor=gray]; + 59 [label="Exit when"]; } - 58 [label="Exit block"]; + 60 [label="Exit block"]; } - 59 [label="Exit loop block"]; + 61 [label="Exit loop block"]; } - 60 [label="Exit while loop"]; + 62 [label="Exit while loop"]; } - 61 [label="Access variable R|/x|"]; - 62 [label="Smart cast: R|/x|"]; - 63 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 64 [label="Exit block"]; + subgraph cluster_22 { + color=blue + 63 [label="Function call arguments enter"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Smart cast: R|/x|"]; + 66 [label="Function call arguments exit"]; + } + 67 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 68 [label="Exit block"]; } - 65 [label="Exit function test_2" style="filled" fillcolor=red]; + 69 [label="Exit function test_2" style="filled" fillcolor=red]; } - 36 -> {37}; - 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 41 -> {60} [style=dotted]; 42 -> {43}; 43 -> {44}; + 43 -> {62} [style=dotted]; 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48 49}; - 48 -> {57}; - 49 -> {50}; - 50 -> {51}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50 51}; + 50 -> {59}; 51 -> {52}; 52 -> {53}; - 53 -> {60}; - 53 -> {54} [style=dotted]; - 54 -> {55} [style=dotted]; + 53 -> {54}; + 54 -> {55}; + 55 -> {62}; 55 -> {56} [style=dotted]; 56 -> {57} [style=dotted]; - 57 -> {58}; - 58 -> {59}; - 59 -> {39} [color=green style=dashed]; + 57 -> {58} [style=dotted]; + 58 -> {59} [style=dotted]; + 59 -> {60}; 60 -> {61}; - 61 -> {62}; + 61 -> {41} [color=green style=dashed]; 62 -> {63}; 63 -> {64}; 64 -> {65}; - - subgraph cluster_21 { - color=red - 66 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 67 [label="Enter block"]; - subgraph cluster_23 { - color=blue - 68 [label="Enter while loop"]; - subgraph cluster_24 { - color=blue - 69 [label="Enter loop condition"]; - 70 [label="Const: Boolean(true)"]; - 71 [label="Exit loop condition"]; - } - subgraph cluster_25 { - color=blue - 72 [label="Enter loop block"]; - subgraph cluster_26 { - color=blue - 73 [label="Enter block"]; - 74 [label="Access variable R|/x|"]; - 75 [label="Type operator: (R|/x| as R|A|)"]; - subgraph cluster_27 { - color=blue - 76 [label="Enter when"]; - subgraph cluster_28 { - color=blue - 77 [label="Enter when branch condition "]; - 78 [label="Access variable R|/b|"]; - 79 [label="Exit when branch condition"]; - } - 80 [label="Synthetic else branch"]; - 81 [label="Enter when branch result"]; - subgraph cluster_29 { - color=blue - 82 [label="Enter block"]; - 83 [label="Jump: break@@@[Boolean(true)] "]; - 84 [label="Stub" style="filled" fillcolor=gray]; - 85 [label="Exit block" style="filled" fillcolor=gray]; - } - 86 [label="Exit when branch result" style="filled" fillcolor=gray]; - 87 [label="Exit when"]; - } - subgraph cluster_30 { - color=blue - 88 [label="Enter when"]; - subgraph cluster_31 { - color=blue - 89 [label="Enter when branch condition "]; - 90 [label="Access variable R|/b|"]; - 91 [label="Exit when branch condition"]; - } - 92 [label="Synthetic else branch"]; - 93 [label="Enter when branch result"]; - subgraph cluster_32 { - color=blue - 94 [label="Enter block"]; - 95 [label="Jump: break@@@[Boolean(true)] "]; - 96 [label="Stub" style="filled" fillcolor=gray]; - 97 [label="Exit block" style="filled" fillcolor=gray]; - } - 98 [label="Exit when branch result" style="filled" fillcolor=gray]; - 99 [label="Exit when"]; - } - 100 [label="Exit block"]; - } - 101 [label="Exit loop block"]; - } - 102 [label="Exit while loop"]; - } - 103 [label="Access variable R|/x|"]; - 104 [label="Smart cast: R|/x|"]; - 105 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 106 [label="Exit block"]; - } - 107 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {70}; + + subgraph cluster_23 { + color=red + 70 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 71 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 72 [label="Enter while loop"]; + subgraph cluster_26 { + color=blue + 73 [label="Enter loop condition"]; + 74 [label="Const: Boolean(true)"]; + 75 [label="Exit loop condition"]; + } + subgraph cluster_27 { + color=blue + 76 [label="Enter loop block"]; + subgraph cluster_28 { + color=blue + 77 [label="Enter block"]; + 78 [label="Access variable R|/x|"]; + 79 [label="Type operator: (R|/x| as R|A|)"]; + subgraph cluster_29 { + color=blue + 80 [label="Enter when"]; + subgraph cluster_30 { + color=blue + 81 [label="Enter when branch condition "]; + 82 [label="Access variable R|/b|"]; + 83 [label="Exit when branch condition"]; + } + 84 [label="Synthetic else branch"]; + 85 [label="Enter when branch result"]; + subgraph cluster_31 { + color=blue + 86 [label="Enter block"]; + 87 [label="Jump: break@@@[Boolean(true)] "]; + 88 [label="Stub" style="filled" fillcolor=gray]; + 89 [label="Exit block" style="filled" fillcolor=gray]; + } + 90 [label="Exit when branch result" style="filled" fillcolor=gray]; + 91 [label="Exit when"]; + } + subgraph cluster_32 { + color=blue + 92 [label="Enter when"]; + subgraph cluster_33 { + color=blue + 93 [label="Enter when branch condition "]; + 94 [label="Access variable R|/b|"]; + 95 [label="Exit when branch condition"]; + } + 96 [label="Synthetic else branch"]; + 97 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 98 [label="Enter block"]; + 99 [label="Jump: break@@@[Boolean(true)] "]; + 100 [label="Stub" style="filled" fillcolor=gray]; + 101 [label="Exit block" style="filled" fillcolor=gray]; + } + 102 [label="Exit when branch result" style="filled" fillcolor=gray]; + 103 [label="Exit when"]; + } + 104 [label="Exit block"]; + } + 105 [label="Exit loop block"]; + } + 106 [label="Exit while loop"]; + } + subgraph cluster_35 { + color=blue + 107 [label="Function call arguments enter"]; + 108 [label="Access variable R|/x|"]; + 109 [label="Smart cast: R|/x|"]; + 110 [label="Function call arguments exit"]; + } + 111 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 112 [label="Exit block"]; + } + 113 [label="Exit function test_3" style="filled" fillcolor=red]; + } 70 -> {71}; 71 -> {72}; - 71 -> {102} [style=dotted]; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; + 75 -> {106} [style=dotted]; 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {80 81}; - 80 -> {87}; + 79 -> {80}; + 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {102}; - 83 -> {84} [style=dotted]; - 84 -> {85} [style=dotted]; - 85 -> {86} [style=dotted]; - 86 -> {87} [style=dotted]; - 87 -> {88}; - 88 -> {89}; - 89 -> {90}; - 90 -> {91}; - 91 -> {92 93}; - 92 -> {99}; + 83 -> {84 85}; + 84 -> {91}; + 85 -> {86}; + 86 -> {87}; + 87 -> {106}; + 87 -> {88} [style=dotted]; + 88 -> {89} [style=dotted]; + 89 -> {90} [style=dotted]; + 90 -> {91} [style=dotted]; + 91 -> {92}; + 92 -> {93}; 93 -> {94}; 94 -> {95}; - 95 -> {102}; - 95 -> {96} [style=dotted]; - 96 -> {97} [style=dotted]; - 97 -> {98} [style=dotted]; - 98 -> {99} [style=dotted]; - 99 -> {100}; - 100 -> {101}; - 101 -> {69} [color=green style=dashed]; - 102 -> {103}; + 95 -> {96 97}; + 96 -> {103}; + 97 -> {98}; + 98 -> {99}; + 99 -> {106}; + 99 -> {100} [style=dotted]; + 100 -> {101} [style=dotted]; + 101 -> {102} [style=dotted]; + 102 -> {103} [style=dotted]; 103 -> {104}; 104 -> {105}; - 105 -> {106}; + 105 -> {73} [color=green style=dashed]; 106 -> {107}; - - subgraph cluster_33 { - color=red - 108 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_34 { - color=blue - 109 [label="Enter block"]; - subgraph cluster_35 { - color=blue - 110 [label="Enter while loop"]; - subgraph cluster_36 { - color=blue - 111 [label="Enter loop condition"]; - 112 [label="Const: Boolean(true)"]; - 113 [label="Exit loop condition"]; - } - subgraph cluster_37 { - color=blue - 114 [label="Enter loop block"]; - subgraph cluster_38 { - color=blue - 115 [label="Enter block"]; - subgraph cluster_39 { - color=blue - 116 [label="Enter when"]; - subgraph cluster_40 { - color=blue - 117 [label="Enter when branch condition "]; - 118 [label="Access variable R|/b|"]; - 119 [label="Exit when branch condition"]; - } - 120 [label="Synthetic else branch"]; - 121 [label="Enter when branch result"]; - subgraph cluster_41 { - color=blue - 122 [label="Enter block"]; - 123 [label="Access variable R|/x|"]; - 124 [label="Type operator: (R|/x| as R|A|)"]; - 125 [label="Jump: break@@@[Boolean(true)] "]; - 126 [label="Stub" style="filled" fillcolor=gray]; - 127 [label="Exit block" style="filled" fillcolor=gray]; - } - 128 [label="Exit when branch result" style="filled" fillcolor=gray]; - 129 [label="Exit when"]; - } - 130 [label="Jump: break@@@[Boolean(true)] "]; - 131 [label="Stub" style="filled" fillcolor=gray]; - 132 [label="Exit block" style="filled" fillcolor=gray]; - } - 133 [label="Exit loop block" style="filled" fillcolor=gray]; - } - 134 [label="Exit while loop"]; - } - 135 [label="Access variable R|/x|"]; - 136 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 137 [label="Exit block"]; - } - 138 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 107 -> {108}; 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; - 113 -> {114}; - 113 -> {134} [style=dotted]; + + subgraph cluster_36 { + color=red + 114 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_37 { + color=blue + 115 [label="Enter block"]; + subgraph cluster_38 { + color=blue + 116 [label="Enter while loop"]; + subgraph cluster_39 { + color=blue + 117 [label="Enter loop condition"]; + 118 [label="Const: Boolean(true)"]; + 119 [label="Exit loop condition"]; + } + subgraph cluster_40 { + color=blue + 120 [label="Enter loop block"]; + subgraph cluster_41 { + color=blue + 121 [label="Enter block"]; + subgraph cluster_42 { + color=blue + 122 [label="Enter when"]; + subgraph cluster_43 { + color=blue + 123 [label="Enter when branch condition "]; + 124 [label="Access variable R|/b|"]; + 125 [label="Exit when branch condition"]; + } + 126 [label="Synthetic else branch"]; + 127 [label="Enter when branch result"]; + subgraph cluster_44 { + color=blue + 128 [label="Enter block"]; + 129 [label="Access variable R|/x|"]; + 130 [label="Type operator: (R|/x| as R|A|)"]; + 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]; + 135 [label="Exit when"]; + } + 136 [label="Jump: break@@@[Boolean(true)] "]; + 137 [label="Stub" style="filled" fillcolor=gray]; + 138 [label="Exit block" style="filled" fillcolor=gray]; + } + 139 [label="Exit loop block" style="filled" fillcolor=gray]; + } + 140 [label="Exit while loop"]; + } + subgraph cluster_45 { + color=blue + 141 [label="Function call arguments enter"]; + 142 [label="Access variable R|/x|"]; + 143 [label="Function call arguments exit"]; + } + 144 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 145 [label="Exit block"]; + } + 146 [label="Exit function test_4" style="filled" fillcolor=red]; + } 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; 118 -> {119}; - 119 -> {120 121}; - 120 -> {129}; + 119 -> {120}; + 119 -> {140} [style=dotted]; + 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; - 125 -> {134}; - 125 -> {126} [style=dotted]; - 126 -> {127} [style=dotted]; - 127 -> {128} [style=dotted]; - 128 -> {129} [style=dotted]; + 125 -> {126 127}; + 126 -> {135}; + 127 -> {128}; + 128 -> {129}; 129 -> {130}; - 130 -> {134}; - 130 -> {131} [style=dotted]; + 130 -> {131}; + 131 -> {140}; 131 -> {132} [style=dotted]; 132 -> {133} [style=dotted]; - 133 -> {111} [color=green style=dotted]; - 134 -> {135}; + 133 -> {134} [style=dotted]; + 134 -> {135} [style=dotted]; 135 -> {136}; - 136 -> {137}; - 137 -> {138}; - - subgraph cluster_42 { - color=red - 139 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_43 { - color=blue - 140 [label="Enter block"]; - subgraph cluster_44 { - color=blue - 141 [label="Enter do-while loop"]; - subgraph cluster_45 { - color=blue - 142 [label="Enter loop block"]; - subgraph cluster_46 { - color=blue - 143 [label="Enter block"]; - subgraph cluster_47 { - color=blue - 144 [label="Enter when"]; - subgraph cluster_48 { - color=blue - 145 [label="Enter when branch condition "]; - 146 [label="Access variable R|/b|"]; - 147 [label="Exit when branch condition"]; - } - 148 [label="Synthetic else branch"]; - 149 [label="Enter when branch result"]; - subgraph cluster_49 { - color=blue - 150 [label="Enter block"]; - 151 [label="Access variable R|/x|"]; - 152 [label="Type operator: (R|/x| as R|A|)"]; - 153 [label="Jump: break@@@[Boolean(true)] "]; - 154 [label="Stub" style="filled" fillcolor=gray]; - 155 [label="Exit block" style="filled" fillcolor=gray]; - } - 156 [label="Exit when branch result" style="filled" fillcolor=gray]; - 157 [label="Exit when"]; - } - 158 [label="Exit block"]; - } - 159 [label="Exit loop block"]; - } - subgraph cluster_50 { - color=blue - 160 [label="Enter loop condition"]; - 161 [label="Const: Boolean(true)"]; - 162 [label="Exit loop condition"]; - } - 163 [label="Exit do-while loop"]; - } - 164 [label="Access variable R|/x|"]; - 165 [label="Smart cast: R|/x|"]; - 166 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 167 [label="Exit block"]; - } - 168 [label="Exit function test_5" style="filled" fillcolor=red]; - } - 139 -> {140}; + 136 -> {140}; + 136 -> {137} [style=dotted]; + 137 -> {138} [style=dotted]; + 138 -> {139} [style=dotted]; + 139 -> {117} [color=green style=dotted]; 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; - 146 -> {147}; - 147 -> {148 149}; - 148 -> {157}; + + subgraph cluster_46 { + color=red + 147 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_47 { + color=blue + 148 [label="Enter block"]; + subgraph cluster_48 { + color=blue + 149 [label="Enter do-while loop"]; + subgraph cluster_49 { + color=blue + 150 [label="Enter loop block"]; + subgraph cluster_50 { + color=blue + 151 [label="Enter block"]; + subgraph cluster_51 { + color=blue + 152 [label="Enter when"]; + subgraph cluster_52 { + color=blue + 153 [label="Enter when branch condition "]; + 154 [label="Access variable R|/b|"]; + 155 [label="Exit when branch condition"]; + } + 156 [label="Synthetic else branch"]; + 157 [label="Enter when branch result"]; + subgraph cluster_53 { + color=blue + 158 [label="Enter block"]; + 159 [label="Access variable R|/x|"]; + 160 [label="Type operator: (R|/x| as R|A|)"]; + 161 [label="Jump: break@@@[Boolean(true)] "]; + 162 [label="Stub" style="filled" fillcolor=gray]; + 163 [label="Exit block" style="filled" fillcolor=gray]; + } + 164 [label="Exit when branch result" style="filled" fillcolor=gray]; + 165 [label="Exit when"]; + } + 166 [label="Exit block"]; + } + 167 [label="Exit loop block"]; + } + subgraph cluster_54 { + color=blue + 168 [label="Enter loop condition"]; + 169 [label="Const: Boolean(true)"]; + 170 [label="Exit loop condition"]; + } + 171 [label="Exit do-while loop"]; + } + subgraph cluster_55 { + color=blue + 172 [label="Function call arguments enter"]; + 173 [label="Access variable R|/x|"]; + 174 [label="Smart cast: R|/x|"]; + 175 [label="Function call arguments exit"]; + } + 176 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 177 [label="Exit block"]; + } + 178 [label="Exit function test_5" style="filled" fillcolor=red]; + } + 147 -> {148}; + 148 -> {149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; 152 -> {153}; - 153 -> {163}; - 153 -> {154} [style=dotted]; - 154 -> {155} [style=dotted]; - 155 -> {156} [style=dotted]; - 156 -> {157} [style=dotted]; + 153 -> {154}; + 154 -> {155}; + 155 -> {156 157}; + 156 -> {165}; 157 -> {158}; 158 -> {159}; 159 -> {160}; 160 -> {161}; - 161 -> {162}; - 162 -> {142} [color=green style=dashed]; + 161 -> {171}; + 161 -> {162} [style=dotted]; 162 -> {163} [style=dotted]; - 163 -> {164}; - 164 -> {165}; + 163 -> {164} [style=dotted]; + 164 -> {165} [style=dotted]; 165 -> {166}; 166 -> {167}; 167 -> {168}; - - subgraph cluster_51 { - color=red - 169 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_52 { - color=blue - 170 [label="Enter block"]; - subgraph cluster_53 { - color=blue - 171 [label="Enter do-while loop"]; - subgraph cluster_54 { - color=blue - 172 [label="Enter loop block"]; - subgraph cluster_55 { - color=blue - 173 [label="Enter block"]; - 174 [label="Access variable R|/x|"]; - 175 [label="Type operator: (R|/x| as R|A|)"]; - subgraph cluster_56 { - color=blue - 176 [label="Enter when"]; - subgraph cluster_57 { - color=blue - 177 [label="Enter when branch condition "]; - 178 [label="Access variable R|/b|"]; - 179 [label="Exit when branch condition"]; - } - 180 [label="Synthetic else branch"]; - 181 [label="Enter when branch result"]; - subgraph cluster_58 { - color=blue - 182 [label="Enter block"]; - 183 [label="Jump: break@@@[Boolean(true)] "]; - 184 [label="Stub" style="filled" fillcolor=gray]; - 185 [label="Exit block" style="filled" fillcolor=gray]; - } - 186 [label="Exit when branch result" style="filled" fillcolor=gray]; - 187 [label="Exit when"]; - } - 188 [label="Exit block"]; - } - 189 [label="Exit loop block"]; - } - subgraph cluster_59 { - color=blue - 190 [label="Enter loop condition"]; - 191 [label="Const: Boolean(true)"]; - 192 [label="Exit loop condition"]; - } - 193 [label="Exit do-while loop"]; - } - 194 [label="Access variable R|/x|"]; - 195 [label="Smart cast: R|/x|"]; - 196 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 197 [label="Exit block"]; - } - 198 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 168 -> {169}; 169 -> {170}; - 170 -> {171}; + 170 -> {150} [color=green style=dashed]; + 170 -> {171} [style=dotted]; 171 -> {172}; 172 -> {173}; 173 -> {174}; @@ -572,69 +540,95 @@ digraph endlessLoops_kt { 175 -> {176}; 176 -> {177}; 177 -> {178}; - 178 -> {179}; - 179 -> {180 181}; - 180 -> {187}; + + subgraph cluster_56 { + color=red + 179 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_57 { + color=blue + 180 [label="Enter block"]; + subgraph cluster_58 { + color=blue + 181 [label="Enter do-while loop"]; + subgraph cluster_59 { + color=blue + 182 [label="Enter loop block"]; + subgraph cluster_60 { + color=blue + 183 [label="Enter block"]; + 184 [label="Access variable R|/x|"]; + 185 [label="Type operator: (R|/x| as R|A|)"]; + subgraph cluster_61 { + color=blue + 186 [label="Enter when"]; + subgraph cluster_62 { + color=blue + 187 [label="Enter when branch condition "]; + 188 [label="Access variable R|/b|"]; + 189 [label="Exit when branch condition"]; + } + 190 [label="Synthetic else branch"]; + 191 [label="Enter when branch result"]; + subgraph cluster_63 { + color=blue + 192 [label="Enter block"]; + 193 [label="Jump: break@@@[Boolean(true)] "]; + 194 [label="Stub" style="filled" fillcolor=gray]; + 195 [label="Exit block" style="filled" fillcolor=gray]; + } + 196 [label="Exit when branch result" style="filled" fillcolor=gray]; + 197 [label="Exit when"]; + } + 198 [label="Exit block"]; + } + 199 [label="Exit loop block"]; + } + subgraph cluster_64 { + color=blue + 200 [label="Enter loop condition"]; + 201 [label="Const: Boolean(true)"]; + 202 [label="Exit loop condition"]; + } + 203 [label="Exit do-while loop"]; + } + subgraph cluster_65 { + color=blue + 204 [label="Function call arguments enter"]; + 205 [label="Access variable R|/x|"]; + 206 [label="Smart cast: R|/x|"]; + 207 [label="Function call arguments exit"]; + } + 208 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 209 [label="Exit block"]; + } + 210 [label="Exit function test_6" style="filled" fillcolor=red]; + } + 179 -> {180}; + 180 -> {181}; 181 -> {182}; 182 -> {183}; - 183 -> {193}; - 183 -> {184} [style=dotted]; - 184 -> {185} [style=dotted]; - 185 -> {186} [style=dotted]; - 186 -> {187} [style=dotted]; + 183 -> {184}; + 184 -> {185}; + 185 -> {186}; + 186 -> {187}; 187 -> {188}; 188 -> {189}; - 189 -> {190}; - 190 -> {191}; + 189 -> {190 191}; + 190 -> {197}; 191 -> {192}; - 192 -> {172} [color=green style=dashed]; - 192 -> {193} [style=dotted]; - 193 -> {194}; - 194 -> {195}; - 195 -> {196}; - 196 -> {197}; + 192 -> {193}; + 193 -> {203}; + 193 -> {194} [style=dotted]; + 194 -> {195} [style=dotted]; + 195 -> {196} [style=dotted]; + 196 -> {197} [style=dotted]; 197 -> {198}; - - subgraph cluster_60 { - color=red - 199 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_61 { - color=blue - 200 [label="Enter block"]; - subgraph cluster_62 { - color=blue - 201 [label="Enter do-while loop"]; - subgraph cluster_63 { - color=blue - 202 [label="Enter loop block"]; - subgraph cluster_64 { - color=blue - 203 [label="Enter block"]; - 204 [label="Access variable R|/x|"]; - 205 [label="Type operator: (R|/x| as R|A|)"]; - 206 [label="Exit block"]; - } - 207 [label="Exit loop block"]; - } - subgraph cluster_65 { - color=blue - 208 [label="Enter loop condition"]; - 209 [label="Const: Boolean(true)"]; - 210 [label="Exit loop condition"]; - } - 211 [label="Exit do-while loop" style="filled" fillcolor=gray]; - } - 212 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 213 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; - 214 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=gray]; - 215 [label="Exit block" style="filled" fillcolor=gray]; - } - 216 [label="Exit function test_7" style="filled" fillcolor=gray]; - } + 198 -> {199}; 199 -> {200}; 200 -> {201}; 201 -> {202}; - 202 -> {203}; + 202 -> {182} [color=green style=dashed]; + 202 -> {203} [style=dotted]; 203 -> {204}; 204 -> {205}; 205 -> {206}; @@ -642,12 +636,67 @@ digraph endlessLoops_kt { 207 -> {208}; 208 -> {209}; 209 -> {210}; - 210 -> {202} [color=green style=dashed]; - 210 -> {211} [style=dotted]; - 211 -> {212} [style=dotted]; - 212 -> {213} [style=dotted]; - 213 -> {214} [style=dotted]; - 214 -> {215} [style=dotted]; - 215 -> {216} [style=dotted]; + + subgraph cluster_66 { + color=red + 211 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_67 { + color=blue + 212 [label="Enter block"]; + subgraph cluster_68 { + color=blue + 213 [label="Enter do-while loop"]; + subgraph cluster_69 { + color=blue + 214 [label="Enter loop block"]; + subgraph cluster_70 { + color=blue + 215 [label="Enter block"]; + 216 [label="Access variable R|/x|"]; + 217 [label="Type operator: (R|/x| as R|A|)"]; + 218 [label="Exit block"]; + } + 219 [label="Exit loop block"]; + } + subgraph cluster_71 { + color=blue + 220 [label="Enter loop condition"]; + 221 [label="Const: Boolean(true)"]; + 222 [label="Exit loop condition"]; + } + 223 [label="Exit do-while loop" style="filled" fillcolor=gray]; + } + subgraph cluster_72 { + color=blue + 224 [label="Function call arguments enter" style="filled" fillcolor=gray]; + 225 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 226 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; + 227 [label="Function call arguments exit" style="filled" fillcolor=gray]; + } + 228 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=gray]; + 229 [label="Exit block" style="filled" fillcolor=gray]; + } + 230 [label="Exit function test_7" style="filled" fillcolor=gray]; + } + 211 -> {212}; + 212 -> {213}; + 213 -> {214}; + 214 -> {215}; + 215 -> {216}; + 216 -> {217}; + 217 -> {218}; + 218 -> {219}; + 219 -> {220}; + 220 -> {221}; + 221 -> {222}; + 222 -> {214} [color=green style=dashed]; + 222 -> {223} [style=dotted]; + 223 -> {224} [style=dotted]; + 224 -> {225} [style=dotted]; + 225 -> {226} [style=dotted]; + 226 -> {227} [style=dotted]; + 227 -> {228} [style=dotted]; + 228 -> {229} [style=dotted]; + 229 -> {230} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot index cc8382d5d7b..0a4b6aebfd0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot @@ -65,23 +65,43 @@ digraph multipleCasts_kt { subgraph cluster_8 { color=blue 18 [label="Enter block"]; - 19 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; - 20 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + subgraph cluster_9 { + color=blue + 19 [label="Function call arguments enter"]; + 20 [label="Function call arguments exit"]; + } 21 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; - 22 [label="Variable declaration: lval b: R|kotlin/Any?|"]; - 23 [label="Access variable R|/a|"]; - 24 [label="Type operator: (R|/a| as R|A|)"]; - 25 [label="Access variable R|/a|"]; - 26 [label="Smart cast: R|/a|"]; - 27 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 28 [label="Access variable R|/b|"]; - 29 [label="Type operator: (R|/b| as R|B|)"]; - 30 [label="Access variable R|/b|"]; - 31 [label="Smart cast: R|/b|"]; - 32 [label="Function call: R|/b|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 33 [label="Exit block"]; + 22 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + subgraph cluster_10 { + color=blue + 23 [label="Function call arguments enter"]; + 24 [label="Function call arguments exit"]; + } + 25 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; + 26 [label="Variable declaration: lval b: R|kotlin/Any?|"]; + 27 [label="Access variable R|/a|"]; + 28 [label="Type operator: (R|/a| as R|A|)"]; + subgraph cluster_11 { + color=blue + 29 [label="Function call arguments enter"]; + 30 [label="Access variable R|/a|"]; + 31 [label="Smart cast: R|/a|"]; + 32 [label="Function call arguments exit"]; + } + 33 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 34 [label="Access variable R|/b|"]; + 35 [label="Type operator: (R|/b| as R|B|)"]; + subgraph cluster_12 { + color=blue + 36 [label="Function call arguments enter"]; + 37 [label="Access variable R|/b|"]; + 38 [label="Smart cast: R|/b|"]; + 39 [label="Function call arguments exit"]; + } + 40 [label="Function call: R|/b|.R|/B.foo|()" style="filled" fillcolor=yellow]; + 41 [label="Exit block"]; } - 34 [label="Exit function test_0" style="filled" fillcolor=red]; + 42 [label="Exit function test_0" style="filled" fillcolor=red]; } 17 -> {18}; 18 -> {19}; @@ -100,56 +120,7 @@ digraph multipleCasts_kt { 31 -> {32}; 32 -> {33}; 33 -> {34}; - - subgraph cluster_9 { - color=red - 35 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 36 [label="Enter block"]; - 37 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; - 38 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 39 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; - 40 [label="Variable declaration: lval b: R|kotlin/Any?|"]; - subgraph cluster_11 { - color=blue - 41 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 42 [label="Enter when branch condition "]; - subgraph cluster_13 { - color=blue - 43 [label="Enter &&"]; - 44 [label="Access variable R|/a|"]; - 45 [label="Type operator: (R|/a| is R|A|)"]; - 46 [label="Exit left part of &&"]; - 47 [label="Enter right part of &&"]; - 48 [label="Access variable R|/b|"]; - 49 [label="Type operator: (R|/b| is R|B|)"]; - 50 [label="Exit &&"]; - } - 51 [label="Exit when branch condition"]; - } - 52 [label="Synthetic else branch"]; - 53 [label="Enter when branch result"]; - subgraph cluster_14 { - color=blue - 54 [label="Enter block"]; - 55 [label="Access variable R|/a|"]; - 56 [label="Smart cast: R|/a|"]; - 57 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 58 [label="Access variable R|/b|"]; - 59 [label="Smart cast: R|/b|"]; - 60 [label="Function call: R|/b|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 61 [label="Exit block"]; - } - 62 [label="Exit when branch result"]; - 63 [label="Exit when"]; - } - 64 [label="Exit block"]; - } - 65 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; @@ -157,28 +128,113 @@ digraph multipleCasts_kt { 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43}; + + subgraph cluster_13 { + color=red + 43 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 44 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 45 [label="Function call arguments enter"]; + 46 [label="Function call arguments exit"]; + } + 47 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; + 48 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + subgraph cluster_16 { + color=blue + 49 [label="Function call arguments enter"]; + 50 [label="Function call arguments exit"]; + } + 51 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; + 52 [label="Variable declaration: lval b: R|kotlin/Any?|"]; + subgraph cluster_17 { + color=blue + 53 [label="Enter when"]; + subgraph cluster_18 { + color=blue + 54 [label="Enter when branch condition "]; + subgraph cluster_19 { + color=blue + 55 [label="Enter &&"]; + 56 [label="Access variable R|/a|"]; + 57 [label="Type operator: (R|/a| is R|A|)"]; + 58 [label="Exit left part of &&"]; + 59 [label="Enter right part of &&"]; + 60 [label="Access variable R|/b|"]; + 61 [label="Type operator: (R|/b| is R|B|)"]; + 62 [label="Exit &&"]; + } + 63 [label="Exit when branch condition"]; + } + 64 [label="Synthetic else branch"]; + 65 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 66 [label="Enter block"]; + subgraph cluster_21 { + color=blue + 67 [label="Function call arguments enter"]; + 68 [label="Access variable R|/a|"]; + 69 [label="Smart cast: R|/a|"]; + 70 [label="Function call arguments exit"]; + } + 71 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_22 { + color=blue + 72 [label="Function call arguments enter"]; + 73 [label="Access variable R|/b|"]; + 74 [label="Smart cast: R|/b|"]; + 75 [label="Function call arguments exit"]; + } + 76 [label="Function call: R|/b|.R|/B.foo|()" style="filled" fillcolor=yellow]; + 77 [label="Exit block"]; + } + 78 [label="Exit when branch result"]; + 79 [label="Exit when"]; + } + 80 [label="Exit block"]; + } + 81 [label="Exit function test_1" style="filled" fillcolor=red]; + } 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47 50}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52 53}; - 52 -> {63}; + 51 -> {52}; + 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {59}; + 58 -> {59 62}; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {64}; - 64 -> {65}; + 63 -> {64 65}; + 64 -> {79}; + 65 -> {66}; + 66 -> {67}; + 67 -> {68}; + 68 -> {69}; + 69 -> {70}; + 70 -> {71}; + 71 -> {72}; + 72 -> {73}; + 73 -> {74}; + 74 -> {75}; + 75 -> {76}; + 76 -> {77}; + 77 -> {78}; + 78 -> {79}; + 79 -> {80}; + 80 -> {81}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot index dc80f5e2fb7..f2fcccc3791 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot @@ -241,29 +241,44 @@ digraph nullability_kt { subgraph cluster_29 { color=blue 76 [label="Enter block"]; - 77 [label="Access variable R|/x|"]; - 78 [label="Smart cast: R|/x|"]; - 79 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 80 [label="Exit block"]; + subgraph cluster_30 { + color=blue + 77 [label="Function call arguments enter"]; + 78 [label="Access variable R|/x|"]; + 79 [label="Smart cast: R|/x|"]; + 80 [label="Function call arguments exit"]; + } + 81 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 82 [label="Exit block"]; } - 81 [label="Exit when branch result"]; - 82 [label="Enter when branch result"]; - subgraph cluster_30 { + 83 [label="Exit when branch result"]; + 84 [label="Enter when branch result"]; + subgraph cluster_31 { color=blue - 83 [label="Enter block"]; - 84 [label="Access variable R|/x|"]; - 85 [label="Smart cast: R|/x|"]; - 86 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 87 [label="Exit block"]; + 85 [label="Enter block"]; + subgraph cluster_32 { + color=blue + 86 [label="Function call arguments enter"]; + 87 [label="Access variable R|/x|"]; + 88 [label="Smart cast: R|/x|"]; + 89 [label="Function call arguments exit"]; + } + 90 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 91 [label="Exit block"]; } - 88 [label="Exit when branch result"]; - 89 [label="Exit when"]; + 92 [label="Exit when branch result"]; + 93 [label="Exit when"]; } - 90 [label="Access variable R|/x|"]; - 91 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 92 [label="Exit block"]; + subgraph cluster_33 { + color=blue + 94 [label="Function call arguments enter"]; + 95 [label="Access variable R|/x|"]; + 96 [label="Function call arguments exit"]; + } + 97 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 98 [label="Exit block"]; } - 93 [label="Exit function test_1" style="filled" fillcolor=red]; + 99 [label="Exit function test_1" style="filled" fillcolor=red]; } 65 -> {66}; 66 -> {67}; @@ -272,7 +287,7 @@ digraph nullability_kt { 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {73 82}; + 72 -> {73 84}; 73 -> {74}; 74 -> {75}; 75 -> {76}; @@ -281,9 +296,9 @@ digraph nullability_kt { 78 -> {79}; 79 -> {80}; 80 -> {81}; - 81 -> {89}; + 81 -> {82}; 82 -> {83}; - 83 -> {84}; + 83 -> {93}; 84 -> {85}; 85 -> {86}; 86 -> {87}; @@ -293,74 +308,89 @@ digraph nullability_kt { 90 -> {91}; 91 -> {92}; 92 -> {93}; - - subgraph cluster_31 { - color=red - 94 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 95 [label="Enter block"]; - subgraph cluster_33 { - color=blue - 96 [label="Enter when"]; - subgraph cluster_34 { - color=blue - 97 [label="Enter when branch condition "]; - 98 [label="Access variable R|/x|"]; - 99 [label="Const: Null(null)"]; - 100 [label="Equality operator =="]; - 101 [label="Exit when branch condition"]; - } - subgraph cluster_35 { - color=blue - 102 [label="Enter when branch condition else"]; - 103 [label="Exit when branch condition"]; - } - 104 [label="Enter when branch result"]; - subgraph cluster_36 { - color=blue - 105 [label="Enter block"]; - 106 [label="Access variable R|/x|"]; - 107 [label="Smart cast: R|/x|"]; - 108 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 109 [label="Exit block"]; - } - 110 [label="Exit when branch result"]; - 111 [label="Enter when branch result"]; - subgraph cluster_37 { - color=blue - 112 [label="Enter block"]; - 113 [label="Access variable R|/x|"]; - 114 [label="Smart cast: R|/x|"]; - 115 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 116 [label="Exit block"]; - } - 117 [label="Exit when branch result"]; - 118 [label="Exit when"]; - } - 119 [label="Access variable R|/x|"]; - 120 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 121 [label="Exit block"]; - } - 122 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 93 -> {94}; 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; - 99 -> {100}; + + subgraph cluster_34 { + color=red + 100 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_35 { + color=blue + 101 [label="Enter block"]; + subgraph cluster_36 { + color=blue + 102 [label="Enter when"]; + subgraph cluster_37 { + color=blue + 103 [label="Enter when branch condition "]; + 104 [label="Access variable R|/x|"]; + 105 [label="Const: Null(null)"]; + 106 [label="Equality operator =="]; + 107 [label="Exit when branch condition"]; + } + subgraph cluster_38 { + color=blue + 108 [label="Enter when branch condition else"]; + 109 [label="Exit when branch condition"]; + } + 110 [label="Enter when branch result"]; + subgraph cluster_39 { + color=blue + 111 [label="Enter block"]; + subgraph cluster_40 { + color=blue + 112 [label="Function call arguments enter"]; + 113 [label="Access variable R|/x|"]; + 114 [label="Smart cast: R|/x|"]; + 115 [label="Function call arguments exit"]; + } + 116 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 117 [label="Exit block"]; + } + 118 [label="Exit when branch result"]; + 119 [label="Enter when branch result"]; + subgraph cluster_41 { + color=blue + 120 [label="Enter block"]; + subgraph cluster_42 { + color=blue + 121 [label="Function call arguments enter"]; + 122 [label="Access variable R|/x|"]; + 123 [label="Smart cast: R|/x|"]; + 124 [label="Function call arguments exit"]; + } + 125 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 126 [label="Exit block"]; + } + 127 [label="Exit when branch result"]; + 128 [label="Exit when"]; + } + subgraph cluster_43 { + color=blue + 129 [label="Function call arguments enter"]; + 130 [label="Access variable R|/x|"]; + 131 [label="Function call arguments exit"]; + } + 132 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 133 [label="Exit block"]; + } + 134 [label="Exit function test_2" style="filled" fillcolor=red]; + } 100 -> {101}; - 101 -> {102 111}; + 101 -> {102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {108}; + 107 -> {108 119}; 108 -> {109}; 109 -> {110}; - 110 -> {118}; + 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; @@ -368,352 +398,335 @@ digraph nullability_kt { 115 -> {116}; 116 -> {117}; 117 -> {118}; - 118 -> {119}; + 118 -> {128}; 119 -> {120}; 120 -> {121}; 121 -> {122}; - - subgraph cluster_38 { - color=red - 123 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_39 { - color=blue - 124 [label="Enter block"]; - 125 [label="Access variable R|/x|"]; - 126 [label="Exit lhs of ?:"]; - 127 [label="Enter rhs of ?:"]; - 128 [label="Jump: ^test_3 Unit"]; - 129 [label="Stub" style="filled" fillcolor=gray]; - 130 [label="Lhs of ?: is not null"]; - 131 [label="Exit ?:"]; - 132 [label="Access variable R|/x|"]; - 133 [label="Smart cast: R|/x|"]; - 134 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 135 [label="Exit block"]; - } - 136 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; - 126 -> {127 130}; + 126 -> {127}; 127 -> {128}; - 128 -> {136}; - 128 -> {129} [style=dotted]; - 129 -> {131} [style=dotted]; + 128 -> {129}; + 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; 133 -> {134}; - 134 -> {135}; - 135 -> {136}; - subgraph cluster_40 { + subgraph cluster_44 { color=red - 137 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_41 { + 135 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_45 { color=blue - 138 [label="Enter block"]; - subgraph cluster_42 { + 136 [label="Enter block"]; + 137 [label="Access variable R|/x|"]; + 138 [label="Exit lhs of ?:"]; + 139 [label="Enter rhs of ?:"]; + 140 [label="Jump: ^test_3 Unit"]; + 141 [label="Stub" style="filled" fillcolor=gray]; + 142 [label="Lhs of ?: is not null"]; + 143 [label="Exit ?:"]; + subgraph cluster_46 { color=blue - 139 [label="Enter when"]; - subgraph cluster_43 { - color=blue - 140 [label="Enter when branch condition "]; - 141 [label="Access variable R|/x|"]; - 142 [label="Enter safe call"]; - 143 [label="Function call: $subj$.R|/A.getA|()" style="filled" fillcolor=yellow]; - 144 [label="Exit safe call"]; - 145 [label="Const: Null(null)"]; - 146 [label="Equality operator =="]; - 147 [label="Exit when branch condition"]; - } - 148 [label="Synthetic else branch"]; - 149 [label="Enter when branch result"]; - subgraph cluster_44 { - color=blue - 150 [label="Enter block"]; - 151 [label="Jump: ^test_4 Unit"]; - 152 [label="Stub" style="filled" fillcolor=gray]; - 153 [label="Exit block" style="filled" fillcolor=gray]; - } - 154 [label="Exit when branch result" style="filled" fillcolor=gray]; - 155 [label="Exit when"]; + 144 [label="Function call arguments enter"]; + 145 [label="Access variable R|/x|"]; + 146 [label="Smart cast: R|/x|"]; + 147 [label="Function call arguments exit"]; } - 156 [label="Access variable R|/x|"]; - 157 [label="Smart cast: R|/x|"]; - 158 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 159 [label="Exit block"]; + 148 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 149 [label="Exit block"]; } - 160 [label="Exit function test_4" style="filled" fillcolor=red]; + 150 [label="Exit function test_3" style="filled" fillcolor=red]; } + 135 -> {136}; + 136 -> {137}; 137 -> {138}; - 138 -> {139}; + 138 -> {139 142}; 139 -> {140}; - 140 -> {141}; - 141 -> {142 144}; + 140 -> {150}; + 140 -> {141} [style=dotted]; + 141 -> {143} [style=dotted]; 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; - 147 -> {148 149}; - 148 -> {155}; + 147 -> {148}; + 148 -> {149}; 149 -> {150}; - 150 -> {151}; - 151 -> {160}; - 151 -> {152} [style=dotted]; - 152 -> {153} [style=dotted]; - 153 -> {154} [style=dotted]; - 154 -> {155} [style=dotted]; - 155 -> {156}; + + subgraph cluster_47 { + color=red + 151 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_48 { + color=blue + 152 [label="Enter block"]; + subgraph cluster_49 { + color=blue + 153 [label="Enter when"]; + subgraph cluster_50 { + color=blue + 154 [label="Enter when branch condition "]; + 155 [label="Access variable R|/x|"]; + 156 [label="Enter safe call"]; + subgraph cluster_51 { + color=blue + 157 [label="Function call arguments enter"]; + 158 [label="Function call arguments exit"]; + } + 159 [label="Function call: $subj$.R|/A.getA|()" style="filled" fillcolor=yellow]; + 160 [label="Exit safe call"]; + 161 [label="Const: Null(null)"]; + 162 [label="Equality operator =="]; + 163 [label="Exit when branch condition"]; + } + 164 [label="Synthetic else branch"]; + 165 [label="Enter when branch result"]; + subgraph cluster_52 { + color=blue + 166 [label="Enter block"]; + 167 [label="Jump: ^test_4 Unit"]; + 168 [label="Stub" style="filled" fillcolor=gray]; + 169 [label="Exit block" style="filled" fillcolor=gray]; + } + 170 [label="Exit when branch result" style="filled" fillcolor=gray]; + 171 [label="Exit when"]; + } + subgraph cluster_53 { + color=blue + 172 [label="Function call arguments enter"]; + 173 [label="Access variable R|/x|"]; + 174 [label="Smart cast: R|/x|"]; + 175 [label="Function call arguments exit"]; + } + 176 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 177 [label="Exit block"]; + } + 178 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 151 -> {152}; + 152 -> {153}; + 153 -> {154}; + 154 -> {155}; + 155 -> {156 160}; 156 -> {157}; 157 -> {158}; 158 -> {159}; 159 -> {160}; - - subgraph cluster_45 { - color=red - 161 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_46 { - color=blue - 162 [label="Enter block"]; - subgraph cluster_47 { - color=blue - 163 [label="Enter when"]; - subgraph cluster_48 { - color=blue - 164 [label="Enter when branch condition "]; - 165 [label="Access variable R|/q|"]; - 166 [label="Enter safe call"]; - 167 [label="Access variable R|/Q.data|"]; - 168 [label="Enter safe call"]; - 169 [label="Access variable R|/MyData.s|"]; - 170 [label="Enter safe call"]; - 171 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 172 [label="Exit safe call"]; - 173 [label="Exit safe call"]; - 174 [label="Exit safe call"]; - 175 [label="Const: Null(null)"]; - 176 [label="Equality operator !="]; - 177 [label="Exit when branch condition"]; - } - 178 [label="Synthetic else branch"]; - 179 [label="Enter when branch result"]; - subgraph cluster_49 { - color=blue - 180 [label="Enter block"]; - 181 [label="Access variable R|/q|"]; - 182 [label="Smart cast: R|/q|"]; - 183 [label="Access variable R|/Q.data|"]; - 184 [label="Smart cast: R|/q|.R|/Q.data|"]; - 185 [label="Access variable R|/q|"]; - 186 [label="Smart cast: R|/q|"]; - 187 [label="Access variable R|/Q.data|"]; - 188 [label="Smart cast: R|/q|.R|/Q.data|"]; - 189 [label="Access variable R|/MyData.s#|"]; - 190 [label="Access variable R|/q|"]; - 191 [label="Smart cast: R|/q|"]; - 192 [label="Access variable R|/Q.data|"]; - 193 [label="Smart cast: R|/q|.R|/Q.data|"]; - 194 [label="Access variable R|/MyData.s#|"]; - 195 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 196 [label="Exit block"]; - } - 197 [label="Exit when branch result"]; - 198 [label="Exit when"]; - } - 199 [label="Exit block"]; - } - 200 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 160 -> {161}; 161 -> {162}; 162 -> {163}; - 163 -> {164}; - 164 -> {165}; - 165 -> {166 172}; + 163 -> {164 165}; + 164 -> {171}; + 165 -> {166}; 166 -> {167}; - 167 -> {168 172}; - 168 -> {169}; - 169 -> {170 173}; - 170 -> {171}; - 171 -> {174}; + 167 -> {178}; + 167 -> {168} [style=dotted]; + 168 -> {169} [style=dotted]; + 169 -> {170} [style=dotted]; + 170 -> {171} [style=dotted]; + 171 -> {172}; 172 -> {173}; 173 -> {174}; 174 -> {175}; 175 -> {176}; 176 -> {177}; - 177 -> {178 179}; - 178 -> {198}; + 177 -> {178}; + + subgraph cluster_54 { + color=red + 179 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_55 { + color=blue + 180 [label="Enter block"]; + subgraph cluster_56 { + color=blue + 181 [label="Enter when"]; + subgraph cluster_57 { + color=blue + 182 [label="Enter when branch condition "]; + 183 [label="Access variable R|/q|"]; + 184 [label="Enter safe call"]; + 185 [label="Access variable R|/Q.data|"]; + 186 [label="Enter safe call"]; + 187 [label="Access variable R|/MyData.s|"]; + 188 [label="Enter safe call"]; + subgraph cluster_58 { + color=blue + 189 [label="Function call arguments enter"]; + 190 [label="Function call arguments exit"]; + } + 191 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 192 [label="Exit safe call"]; + 193 [label="Exit safe call"]; + 194 [label="Exit safe call"]; + 195 [label="Const: Null(null)"]; + 196 [label="Equality operator !="]; + 197 [label="Exit when branch condition"]; + } + 198 [label="Synthetic else branch"]; + 199 [label="Enter when branch result"]; + subgraph cluster_59 { + color=blue + 200 [label="Enter block"]; + 201 [label="Access variable R|/q|"]; + 202 [label="Smart cast: R|/q|"]; + 203 [label="Access variable R|/Q.data|"]; + 204 [label="Smart cast: R|/q|.R|/Q.data|"]; + 205 [label="Access variable R|/q|"]; + 206 [label="Smart cast: R|/q|"]; + 207 [label="Access variable R|/Q.data|"]; + 208 [label="Smart cast: R|/q|.R|/Q.data|"]; + 209 [label="Access variable R|/MyData.s#|"]; + subgraph cluster_60 { + color=blue + 210 [label="Function call arguments enter"]; + 211 [label="Access variable R|/q|"]; + 212 [label="Smart cast: R|/q|"]; + 213 [label="Access variable R|/Q.data|"]; + 214 [label="Smart cast: R|/q|.R|/Q.data|"]; + 215 [label="Access variable R|/MyData.s#|"]; + 216 [label="Function call arguments exit"]; + } + 217 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 218 [label="Exit block"]; + } + 219 [label="Exit when branch result"]; + 220 [label="Exit when"]; + } + 221 [label="Exit block"]; + } + 222 [label="Exit function test_5" style="filled" fillcolor=red]; + } 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; - 183 -> {184}; + 183 -> {184 192}; 184 -> {185}; - 185 -> {186}; + 185 -> {186 192}; 186 -> {187}; - 187 -> {188}; + 187 -> {188 193}; 188 -> {189}; 189 -> {190}; 190 -> {191}; - 191 -> {192}; + 191 -> {194}; 192 -> {193}; 193 -> {194}; 194 -> {195}; 195 -> {196}; 196 -> {197}; - 197 -> {198}; - 198 -> {199}; + 197 -> {198 199}; + 198 -> {220}; 199 -> {200}; - - subgraph cluster_50 { - color=red - 201 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_51 { - color=blue - 202 [label="Enter block"]; - 203 [label="Access variable R|/q|"]; - 204 [label="Enter safe call"]; - 205 [label="Access variable R|/Q.data|"]; - 206 [label="Enter safe call"]; - 207 [label="Access variable R|/MyData.s|"]; - 208 [label="Enter safe call"]; - 209 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 210 [label="Exit safe call"]; - 211 [label="Exit lhs of ?:"]; - 212 [label="Lhs of ?: is not null"]; - 213 [label="Exit safe call"]; - 214 [label="Exit safe call"]; - 215 [label="Enter rhs of ?:"]; - 216 [label="Jump: ^test_6 Unit"]; - 217 [label="Stub" style="filled" fillcolor=gray]; - 218 [label="Exit ?:"]; - 219 [label="Access variable R|/q|"]; - 220 [label="Smart cast: R|/q|"]; - 221 [label="Access variable R|/Q.data|"]; - 222 [label="Smart cast: R|/q|.R|/Q.data|"]; - 223 [label="Access variable R|/q|"]; - 224 [label="Smart cast: R|/q|"]; - 225 [label="Access variable R|/Q.data|"]; - 226 [label="Smart cast: R|/q|.R|/Q.data|"]; - 227 [label="Access variable R|/MyData.s#|"]; - 228 [label="Access variable R|/q|"]; - 229 [label="Smart cast: R|/q|"]; - 230 [label="Access variable R|/Q.data|"]; - 231 [label="Smart cast: R|/q|.R|/Q.data|"]; - 232 [label="Access variable R|/MyData.s#|"]; - 233 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 234 [label="Exit block"]; - } - 235 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 200 -> {201}; 201 -> {202}; 202 -> {203}; - 203 -> {204 213}; + 203 -> {204}; 204 -> {205}; - 205 -> {206 213}; + 205 -> {206}; 206 -> {207}; - 207 -> {208 214}; + 207 -> {208}; 208 -> {209}; 209 -> {210}; 210 -> {211}; - 211 -> {212 215}; - 212 -> {218}; + 211 -> {212}; + 212 -> {213}; 213 -> {214}; 214 -> {215}; 215 -> {216}; - 216 -> {235}; - 216 -> {217} [style=dotted]; - 217 -> {218} [style=dotted]; + 216 -> {217}; + 217 -> {218}; 218 -> {219}; 219 -> {220}; 220 -> {221}; 221 -> {222}; - 222 -> {223}; + + subgraph cluster_61 { + color=red + 223 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_62 { + color=blue + 224 [label="Enter block"]; + 225 [label="Access variable R|/q|"]; + 226 [label="Enter safe call"]; + 227 [label="Access variable R|/Q.data|"]; + 228 [label="Enter safe call"]; + 229 [label="Access variable R|/MyData.s|"]; + 230 [label="Enter safe call"]; + subgraph cluster_63 { + color=blue + 231 [label="Function call arguments enter"]; + 232 [label="Function call arguments exit"]; + } + 233 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 234 [label="Exit safe call"]; + 235 [label="Exit lhs of ?:"]; + 236 [label="Lhs of ?: is not null"]; + 237 [label="Exit safe call"]; + 238 [label="Exit safe call"]; + 239 [label="Enter rhs of ?:"]; + 240 [label="Jump: ^test_6 Unit"]; + 241 [label="Stub" style="filled" fillcolor=gray]; + 242 [label="Exit ?:"]; + 243 [label="Access variable R|/q|"]; + 244 [label="Smart cast: R|/q|"]; + 245 [label="Access variable R|/Q.data|"]; + 246 [label="Smart cast: R|/q|.R|/Q.data|"]; + 247 [label="Access variable R|/q|"]; + 248 [label="Smart cast: R|/q|"]; + 249 [label="Access variable R|/Q.data|"]; + 250 [label="Smart cast: R|/q|.R|/Q.data|"]; + 251 [label="Access variable R|/MyData.s#|"]; + subgraph cluster_64 { + color=blue + 252 [label="Function call arguments enter"]; + 253 [label="Access variable R|/q|"]; + 254 [label="Smart cast: R|/q|"]; + 255 [label="Access variable R|/Q.data|"]; + 256 [label="Smart cast: R|/q|.R|/Q.data|"]; + 257 [label="Access variable R|/MyData.s#|"]; + 258 [label="Function call arguments exit"]; + } + 259 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 260 [label="Exit block"]; + } + 261 [label="Exit function test_6" style="filled" fillcolor=red]; + } 223 -> {224}; 224 -> {225}; - 225 -> {226}; + 225 -> {226 237}; 226 -> {227}; - 227 -> {228}; + 227 -> {228 237}; 228 -> {229}; - 229 -> {230}; + 229 -> {230 238}; 230 -> {231}; 231 -> {232}; 232 -> {233}; 233 -> {234}; 234 -> {235}; - - subgraph cluster_52 { - color=red - 236 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_53 { - color=blue - 237 [label="Enter block"]; - subgraph cluster_54 { - color=blue - 238 [label="Enter when"]; - subgraph cluster_55 { - color=blue - 239 [label="Enter when branch condition "]; - 240 [label="Access variable R|/q|"]; - 241 [label="Enter safe call"]; - 242 [label="Function call: $subj$.R|/Q.fdata|()" style="filled" fillcolor=yellow]; - 243 [label="Enter safe call"]; - 244 [label="Function call: $subj$.R|/MyData.fs|()" style="filled" fillcolor=yellow]; - 245 [label="Enter safe call"]; - 246 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 247 [label="Exit safe call"]; - 248 [label="Exit safe call"]; - 249 [label="Exit safe call"]; - 250 [label="Const: Null(null)"]; - 251 [label="Equality operator !="]; - 252 [label="Exit when branch condition"]; - } - 253 [label="Synthetic else branch"]; - 254 [label="Enter when branch result"]; - subgraph cluster_56 { - color=blue - 255 [label="Enter block"]; - 256 [label="Access variable R|/q|"]; - 257 [label="Smart cast: R|/q|"]; - 258 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; - 259 [label="Access variable R|/q|"]; - 260 [label="Smart cast: R|/q|"]; - 261 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; - 262 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|()" style="filled" fillcolor=yellow]; - 263 [label="Access variable R|/q|"]; - 264 [label="Smart cast: R|/q|"]; - 265 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; - 266 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|()" style="filled" fillcolor=yellow]; - 267 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|().R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 268 [label="Exit block"]; - } - 269 [label="Exit when branch result"]; - 270 [label="Exit when"]; - } - 271 [label="Exit block"]; - } - 272 [label="Exit function test_7" style="filled" fillcolor=red]; - } - 236 -> {237}; + 235 -> {236 239}; + 236 -> {242}; 237 -> {238}; 238 -> {239}; 239 -> {240}; - 240 -> {241 247}; - 241 -> {242}; - 242 -> {243 247}; + 240 -> {261}; + 240 -> {241} [style=dotted]; + 241 -> {242} [style=dotted]; + 242 -> {243}; 243 -> {244}; - 244 -> {245 248}; + 244 -> {245}; 245 -> {246}; - 246 -> {249}; + 246 -> {247}; 247 -> {248}; 248 -> {249}; 249 -> {250}; 250 -> {251}; 251 -> {252}; - 252 -> {253 254}; - 253 -> {270}; + 252 -> {253}; + 253 -> {254}; 254 -> {255}; 255 -> {256}; 256 -> {257}; @@ -721,185 +734,134 @@ digraph nullability_kt { 258 -> {259}; 259 -> {260}; 260 -> {261}; - 261 -> {262}; + + subgraph cluster_65 { + color=red + 262 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_66 { + color=blue + 263 [label="Enter block"]; + subgraph cluster_67 { + color=blue + 264 [label="Enter when"]; + subgraph cluster_68 { + color=blue + 265 [label="Enter when branch condition "]; + 266 [label="Access variable R|/q|"]; + 267 [label="Enter safe call"]; + subgraph cluster_69 { + color=blue + 268 [label="Function call arguments enter"]; + 269 [label="Function call arguments exit"]; + } + 270 [label="Function call: $subj$.R|/Q.fdata|()" style="filled" fillcolor=yellow]; + 271 [label="Enter safe call"]; + subgraph cluster_70 { + color=blue + 272 [label="Function call arguments enter"]; + 273 [label="Function call arguments exit"]; + } + 274 [label="Function call: $subj$.R|/MyData.fs|()" style="filled" fillcolor=yellow]; + 275 [label="Enter safe call"]; + subgraph cluster_71 { + color=blue + 276 [label="Function call arguments enter"]; + 277 [label="Function call arguments exit"]; + } + 278 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 279 [label="Exit safe call"]; + 280 [label="Exit safe call"]; + 281 [label="Exit safe call"]; + 282 [label="Const: Null(null)"]; + 283 [label="Equality operator !="]; + 284 [label="Exit when branch condition"]; + } + 285 [label="Synthetic else branch"]; + 286 [label="Enter when branch result"]; + subgraph cluster_72 { + color=blue + 287 [label="Enter block"]; + subgraph cluster_73 { + color=blue + 288 [label="Function call arguments enter"]; + 289 [label="Access variable R|/q|"]; + 290 [label="Smart cast: R|/q|"]; + 291 [label="Function call arguments exit"]; + } + 292 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; + subgraph cluster_74 { + color=blue + 293 [label="Function call arguments enter"]; + subgraph cluster_75 { + color=blue + 294 [label="Function call arguments enter"]; + 295 [label="Access variable R|/q|"]; + 296 [label="Smart cast: R|/q|"]; + 297 [label="Function call arguments exit"]; + } + 298 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; + 299 [label="Function call arguments exit"]; + } + 300 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|()" style="filled" fillcolor=yellow]; + subgraph cluster_76 { + color=blue + 301 [label="Function call arguments enter"]; + subgraph cluster_77 { + color=blue + 302 [label="Function call arguments enter"]; + subgraph cluster_78 { + color=blue + 303 [label="Function call arguments enter"]; + 304 [label="Access variable R|/q|"]; + 305 [label="Smart cast: R|/q|"]; + 306 [label="Function call arguments exit"]; + } + 307 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; + 308 [label="Function call arguments exit"]; + } + 309 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|()" style="filled" fillcolor=yellow]; + 310 [label="Function call arguments exit"]; + } + 311 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|().R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 312 [label="Exit block"]; + } + 313 [label="Exit when branch result"]; + 314 [label="Exit when"]; + } + 315 [label="Exit block"]; + } + 316 [label="Exit function test_7" style="filled" fillcolor=red]; + } 262 -> {263}; 263 -> {264}; 264 -> {265}; 265 -> {266}; - 266 -> {267}; + 266 -> {267 279}; 267 -> {268}; 268 -> {269}; 269 -> {270}; - 270 -> {271}; + 270 -> {271 279}; 271 -> {272}; - - subgraph cluster_57 { - color=red - 273 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_58 { - color=blue - 274 [label="Enter block"]; - subgraph cluster_59 { - color=blue - 275 [label="Enter when"]; - subgraph cluster_60 { - color=blue - 276 [label="Enter when branch condition "]; - 277 [label="Access variable R|/b|"]; - 278 [label="Const: Boolean(true)"]; - 279 [label="Equality operator =="]; - 280 [label="Exit when branch condition"]; - } - 281 [label="Synthetic else branch"]; - 282 [label="Enter when branch result"]; - subgraph cluster_61 { - color=blue - 283 [label="Enter block"]; - 284 [label="Access variable R|/b|"]; - 285 [label="Smart cast: R|/b|"]; - 286 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 287 [label="Exit block"]; - } - 288 [label="Exit when branch result"]; - 289 [label="Exit when"]; - } - 290 [label="Exit block"]; - } - 291 [label="Exit function test_8" style="filled" fillcolor=red]; - } + 272 -> {273}; 273 -> {274}; - 274 -> {275}; + 274 -> {275 280}; 275 -> {276}; 276 -> {277}; 277 -> {278}; - 278 -> {279}; + 278 -> {281}; 279 -> {280}; - 280 -> {281 282}; - 281 -> {289}; + 280 -> {281}; + 281 -> {282}; 282 -> {283}; 283 -> {284}; - 284 -> {285}; - 285 -> {286}; + 284 -> {285 286}; + 285 -> {314}; 286 -> {287}; 287 -> {288}; 288 -> {289}; 289 -> {290}; 290 -> {291}; - - subgraph cluster_62 { - color=red - 292 [label="Enter function test_9" style="filled" fillcolor=red]; - subgraph cluster_63 { - color=blue - 293 [label="Enter block"]; - subgraph cluster_64 { - color=blue - 294 [label="Enter when"]; - subgraph cluster_65 { - color=blue - 295 [label="Enter when branch condition "]; - 296 [label="Access variable R|/a|"]; - 297 [label="Access variable R|/b|"]; - 298 [label="Equality operator =="]; - 299 [label="Exit when branch condition"]; - } - 300 [label="Synthetic else branch"]; - 301 [label="Enter when branch result"]; - subgraph cluster_66 { - color=blue - 302 [label="Enter block"]; - 303 [label="Access variable R|/b|"]; - 304 [label="Smart cast: R|/b|"]; - 305 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 306 [label="Exit block"]; - } - 307 [label="Exit when branch result"]; - 308 [label="Exit when"]; - } - 309 [label="Access variable R|/b|"]; - 310 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_67 { - color=blue - 311 [label="Enter when"]; - subgraph cluster_68 { - color=blue - 312 [label="Enter when branch condition "]; - 313 [label="Access variable R|/a|"]; - 314 [label="Access variable R|/b|"]; - 315 [label="Equality operator ==="]; - 316 [label="Exit when branch condition"]; - } - 317 [label="Synthetic else branch"]; - 318 [label="Enter when branch result"]; - subgraph cluster_69 { - color=blue - 319 [label="Enter block"]; - 320 [label="Access variable R|/b|"]; - 321 [label="Smart cast: R|/b|"]; - 322 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 323 [label="Exit block"]; - } - 324 [label="Exit when branch result"]; - 325 [label="Exit when"]; - } - 326 [label="Access variable R|/b|"]; - 327 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_70 { - color=blue - 328 [label="Enter when"]; - subgraph cluster_71 { - color=blue - 329 [label="Enter when branch condition "]; - 330 [label="Access variable R|/b|"]; - 331 [label="Access variable R|/a|"]; - 332 [label="Equality operator =="]; - 333 [label="Exit when branch condition"]; - } - 334 [label="Synthetic else branch"]; - 335 [label="Enter when branch result"]; - subgraph cluster_72 { - color=blue - 336 [label="Enter block"]; - 337 [label="Access variable R|/b|"]; - 338 [label="Smart cast: R|/b|"]; - 339 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 340 [label="Exit block"]; - } - 341 [label="Exit when branch result"]; - 342 [label="Exit when"]; - } - 343 [label="Access variable R|/b|"]; - 344 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_73 { - color=blue - 345 [label="Enter when"]; - subgraph cluster_74 { - color=blue - 346 [label="Enter when branch condition "]; - 347 [label="Access variable R|/b|"]; - 348 [label="Access variable R|/a|"]; - 349 [label="Equality operator ==="]; - 350 [label="Exit when branch condition"]; - } - 351 [label="Synthetic else branch"]; - 352 [label="Enter when branch result"]; - subgraph cluster_75 { - color=blue - 353 [label="Enter block"]; - 354 [label="Access variable R|/b|"]; - 355 [label="Smart cast: R|/b|"]; - 356 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 357 [label="Exit block"]; - } - 358 [label="Exit when branch result"]; - 359 [label="Exit when"]; - } - 360 [label="Access variable R|/b|"]; - 361 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 362 [label="Exit block"]; - } - 363 [label="Exit function test_9" style="filled" fillcolor=red]; - } + 291 -> {292}; 292 -> {293}; 293 -> {294}; 294 -> {295}; @@ -907,8 +869,8 @@ digraph nullability_kt { 296 -> {297}; 297 -> {298}; 298 -> {299}; - 299 -> {300 301}; - 300 -> {308}; + 299 -> {300}; + 300 -> {301}; 301 -> {302}; 302 -> {303}; 303 -> {304}; @@ -924,16 +886,55 @@ digraph nullability_kt { 313 -> {314}; 314 -> {315}; 315 -> {316}; - 316 -> {317 318}; - 317 -> {325}; + + subgraph cluster_79 { + color=red + 317 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_80 { + color=blue + 318 [label="Enter block"]; + subgraph cluster_81 { + color=blue + 319 [label="Enter when"]; + subgraph cluster_82 { + color=blue + 320 [label="Enter when branch condition "]; + 321 [label="Access variable R|/b|"]; + 322 [label="Const: Boolean(true)"]; + 323 [label="Equality operator =="]; + 324 [label="Exit when branch condition"]; + } + 325 [label="Synthetic else branch"]; + 326 [label="Enter when branch result"]; + subgraph cluster_83 { + color=blue + 327 [label="Enter block"]; + subgraph cluster_84 { + color=blue + 328 [label="Function call arguments enter"]; + 329 [label="Access variable R|/b|"]; + 330 [label="Smart cast: R|/b|"]; + 331 [label="Function call arguments exit"]; + } + 332 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 333 [label="Exit block"]; + } + 334 [label="Exit when branch result"]; + 335 [label="Exit when"]; + } + 336 [label="Exit block"]; + } + 337 [label="Exit function test_8" style="filled" fillcolor=red]; + } + 317 -> {318}; 318 -> {319}; 319 -> {320}; 320 -> {321}; 321 -> {322}; 322 -> {323}; 323 -> {324}; - 324 -> {325}; - 325 -> {326}; + 324 -> {325 326}; + 325 -> {335}; 326 -> {327}; 327 -> {328}; 328 -> {329}; @@ -941,11 +942,165 @@ digraph nullability_kt { 330 -> {331}; 331 -> {332}; 332 -> {333}; - 333 -> {334 335}; - 334 -> {342}; + 333 -> {334}; + 334 -> {335}; 335 -> {336}; 336 -> {337}; - 337 -> {338}; + + subgraph cluster_85 { + color=red + 338 [label="Enter function test_9" style="filled" fillcolor=red]; + subgraph cluster_86 { + color=blue + 339 [label="Enter block"]; + subgraph cluster_87 { + color=blue + 340 [label="Enter when"]; + subgraph cluster_88 { + color=blue + 341 [label="Enter when branch condition "]; + 342 [label="Access variable R|/a|"]; + 343 [label="Access variable R|/b|"]; + 344 [label="Equality operator =="]; + 345 [label="Exit when branch condition"]; + } + 346 [label="Synthetic else branch"]; + 347 [label="Enter when branch result"]; + subgraph cluster_89 { + color=blue + 348 [label="Enter block"]; + subgraph cluster_90 { + color=blue + 349 [label="Function call arguments enter"]; + 350 [label="Access variable R|/b|"]; + 351 [label="Smart cast: R|/b|"]; + 352 [label="Function call arguments exit"]; + } + 353 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 354 [label="Exit block"]; + } + 355 [label="Exit when branch result"]; + 356 [label="Exit when"]; + } + subgraph cluster_91 { + color=blue + 357 [label="Function call arguments enter"]; + 358 [label="Access variable R|/b|"]; + 359 [label="Function call arguments exit"]; + } + 360 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_92 { + color=blue + 361 [label="Enter when"]; + subgraph cluster_93 { + color=blue + 362 [label="Enter when branch condition "]; + 363 [label="Access variable R|/a|"]; + 364 [label="Access variable R|/b|"]; + 365 [label="Equality operator ==="]; + 366 [label="Exit when branch condition"]; + } + 367 [label="Synthetic else branch"]; + 368 [label="Enter when branch result"]; + subgraph cluster_94 { + color=blue + 369 [label="Enter block"]; + subgraph cluster_95 { + color=blue + 370 [label="Function call arguments enter"]; + 371 [label="Access variable R|/b|"]; + 372 [label="Smart cast: R|/b|"]; + 373 [label="Function call arguments exit"]; + } + 374 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 375 [label="Exit block"]; + } + 376 [label="Exit when branch result"]; + 377 [label="Exit when"]; + } + subgraph cluster_96 { + color=blue + 378 [label="Function call arguments enter"]; + 379 [label="Access variable R|/b|"]; + 380 [label="Function call arguments exit"]; + } + 381 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_97 { + color=blue + 382 [label="Enter when"]; + subgraph cluster_98 { + color=blue + 383 [label="Enter when branch condition "]; + 384 [label="Access variable R|/b|"]; + 385 [label="Access variable R|/a|"]; + 386 [label="Equality operator =="]; + 387 [label="Exit when branch condition"]; + } + 388 [label="Synthetic else branch"]; + 389 [label="Enter when branch result"]; + subgraph cluster_99 { + color=blue + 390 [label="Enter block"]; + subgraph cluster_100 { + color=blue + 391 [label="Function call arguments enter"]; + 392 [label="Access variable R|/b|"]; + 393 [label="Smart cast: R|/b|"]; + 394 [label="Function call arguments exit"]; + } + 395 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 396 [label="Exit block"]; + } + 397 [label="Exit when branch result"]; + 398 [label="Exit when"]; + } + subgraph cluster_101 { + color=blue + 399 [label="Function call arguments enter"]; + 400 [label="Access variable R|/b|"]; + 401 [label="Function call arguments exit"]; + } + 402 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_102 { + color=blue + 403 [label="Enter when"]; + subgraph cluster_103 { + color=blue + 404 [label="Enter when branch condition "]; + 405 [label="Access variable R|/b|"]; + 406 [label="Access variable R|/a|"]; + 407 [label="Equality operator ==="]; + 408 [label="Exit when branch condition"]; + } + 409 [label="Synthetic else branch"]; + 410 [label="Enter when branch result"]; + subgraph cluster_104 { + color=blue + 411 [label="Enter block"]; + subgraph cluster_105 { + color=blue + 412 [label="Function call arguments enter"]; + 413 [label="Access variable R|/b|"]; + 414 [label="Smart cast: R|/b|"]; + 415 [label="Function call arguments exit"]; + } + 416 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 417 [label="Exit block"]; + } + 418 [label="Exit when branch result"]; + 419 [label="Exit when"]; + } + subgraph cluster_106 { + color=blue + 420 [label="Function call arguments enter"]; + 421 [label="Access variable R|/b|"]; + 422 [label="Function call arguments exit"]; + } + 423 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 424 [label="Exit block"]; + } + 425 [label="Exit function test_9" style="filled" fillcolor=red]; + } 338 -> {339}; 339 -> {340}; 340 -> {341}; @@ -953,13 +1108,13 @@ digraph nullability_kt { 342 -> {343}; 343 -> {344}; 344 -> {345}; - 345 -> {346}; - 346 -> {347}; + 345 -> {346 347}; + 346 -> {356}; 347 -> {348}; 348 -> {349}; 349 -> {350}; - 350 -> {351 352}; - 351 -> {359}; + 350 -> {351}; + 351 -> {352}; 352 -> {353}; 353 -> {354}; 354 -> {355}; @@ -971,126 +1126,16 @@ digraph nullability_kt { 360 -> {361}; 361 -> {362}; 362 -> {363}; - - subgraph cluster_76 { - color=red - 364 [label="Enter function test_10" style="filled" fillcolor=red]; - subgraph cluster_77 { - color=blue - 365 [label="Enter block"]; - subgraph cluster_78 { - color=blue - 366 [label="Enter when"]; - subgraph cluster_79 { - color=blue - 367 [label="Enter when branch condition "]; - 368 [label="Access variable R|/a|"]; - 369 [label="Access variable R|/b|"]; - 370 [label="Equality operator =="]; - 371 [label="Exit when branch condition"]; - } - 372 [label="Synthetic else branch"]; - 373 [label="Enter when branch result"]; - subgraph cluster_80 { - color=blue - 374 [label="Enter block"]; - 375 [label="Access variable R|/b|"]; - 376 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 377 [label="Exit block"]; - } - 378 [label="Exit when branch result"]; - 379 [label="Exit when"]; - } - 380 [label="Access variable R|/b|"]; - 381 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_81 { - color=blue - 382 [label="Enter when"]; - subgraph cluster_82 { - color=blue - 383 [label="Enter when branch condition "]; - 384 [label="Access variable R|/a|"]; - 385 [label="Access variable R|/b|"]; - 386 [label="Equality operator ==="]; - 387 [label="Exit when branch condition"]; - } - 388 [label="Synthetic else branch"]; - 389 [label="Enter when branch result"]; - subgraph cluster_83 { - color=blue - 390 [label="Enter block"]; - 391 [label="Access variable R|/b|"]; - 392 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 393 [label="Exit block"]; - } - 394 [label="Exit when branch result"]; - 395 [label="Exit when"]; - } - 396 [label="Access variable R|/b|"]; - 397 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_84 { - color=blue - 398 [label="Enter when"]; - subgraph cluster_85 { - color=blue - 399 [label="Enter when branch condition "]; - 400 [label="Access variable R|/b|"]; - 401 [label="Access variable R|/a|"]; - 402 [label="Equality operator =="]; - 403 [label="Exit when branch condition"]; - } - 404 [label="Synthetic else branch"]; - 405 [label="Enter when branch result"]; - subgraph cluster_86 { - color=blue - 406 [label="Enter block"]; - 407 [label="Access variable R|/b|"]; - 408 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 409 [label="Exit block"]; - } - 410 [label="Exit when branch result"]; - 411 [label="Exit when"]; - } - 412 [label="Access variable R|/b|"]; - 413 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_87 { - color=blue - 414 [label="Enter when"]; - subgraph cluster_88 { - color=blue - 415 [label="Enter when branch condition "]; - 416 [label="Access variable R|/b|"]; - 417 [label="Access variable R|/a|"]; - 418 [label="Equality operator ==="]; - 419 [label="Exit when branch condition"]; - } - 420 [label="Synthetic else branch"]; - 421 [label="Enter when branch result"]; - subgraph cluster_89 { - color=blue - 422 [label="Enter block"]; - 423 [label="Access variable R|/b|"]; - 424 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 425 [label="Exit block"]; - } - 426 [label="Exit when branch result"]; - 427 [label="Exit when"]; - } - 428 [label="Access variable R|/b|"]; - 429 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 430 [label="Exit block"]; - } - 431 [label="Exit function test_10" style="filled" fillcolor=red]; - } + 363 -> {364}; 364 -> {365}; 365 -> {366}; - 366 -> {367}; - 367 -> {368}; + 366 -> {367 368}; + 367 -> {377}; 368 -> {369}; 369 -> {370}; 370 -> {371}; - 371 -> {372 373}; - 372 -> {379}; + 371 -> {372}; + 372 -> {373}; 373 -> {374}; 374 -> {375}; 375 -> {376}; @@ -1106,7 +1151,7 @@ digraph nullability_kt { 385 -> {386}; 386 -> {387}; 387 -> {388 389}; - 388 -> {395}; + 388 -> {398}; 389 -> {390}; 390 -> {391}; 391 -> {392}; @@ -1121,13 +1166,13 @@ digraph nullability_kt { 400 -> {401}; 401 -> {402}; 402 -> {403}; - 403 -> {404 405}; - 404 -> {411}; + 403 -> {404}; + 404 -> {405}; 405 -> {406}; 406 -> {407}; 407 -> {408}; - 408 -> {409}; - 409 -> {410}; + 408 -> {409 410}; + 409 -> {419}; 410 -> {411}; 411 -> {412}; 412 -> {413}; @@ -1137,137 +1182,192 @@ digraph nullability_kt { 416 -> {417}; 417 -> {418}; 418 -> {419}; - 419 -> {420 421}; - 420 -> {427}; + 419 -> {420}; + 420 -> {421}; 421 -> {422}; 422 -> {423}; 423 -> {424}; 424 -> {425}; - 425 -> {426}; + + subgraph cluster_107 { + color=red + 426 [label="Enter function test_10" style="filled" fillcolor=red]; + subgraph cluster_108 { + color=blue + 427 [label="Enter block"]; + subgraph cluster_109 { + color=blue + 428 [label="Enter when"]; + subgraph cluster_110 { + color=blue + 429 [label="Enter when branch condition "]; + 430 [label="Access variable R|/a|"]; + 431 [label="Access variable R|/b|"]; + 432 [label="Equality operator =="]; + 433 [label="Exit when branch condition"]; + } + 434 [label="Synthetic else branch"]; + 435 [label="Enter when branch result"]; + subgraph cluster_111 { + color=blue + 436 [label="Enter block"]; + subgraph cluster_112 { + color=blue + 437 [label="Function call arguments enter"]; + 438 [label="Access variable R|/b|"]; + 439 [label="Function call arguments exit"]; + } + 440 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 441 [label="Exit block"]; + } + 442 [label="Exit when branch result"]; + 443 [label="Exit when"]; + } + subgraph cluster_113 { + color=blue + 444 [label="Function call arguments enter"]; + 445 [label="Access variable R|/b|"]; + 446 [label="Function call arguments exit"]; + } + 447 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_114 { + color=blue + 448 [label="Enter when"]; + subgraph cluster_115 { + color=blue + 449 [label="Enter when branch condition "]; + 450 [label="Access variable R|/a|"]; + 451 [label="Access variable R|/b|"]; + 452 [label="Equality operator ==="]; + 453 [label="Exit when branch condition"]; + } + 454 [label="Synthetic else branch"]; + 455 [label="Enter when branch result"]; + subgraph cluster_116 { + color=blue + 456 [label="Enter block"]; + subgraph cluster_117 { + color=blue + 457 [label="Function call arguments enter"]; + 458 [label="Access variable R|/b|"]; + 459 [label="Function call arguments exit"]; + } + 460 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 461 [label="Exit block"]; + } + 462 [label="Exit when branch result"]; + 463 [label="Exit when"]; + } + subgraph cluster_118 { + color=blue + 464 [label="Function call arguments enter"]; + 465 [label="Access variable R|/b|"]; + 466 [label="Function call arguments exit"]; + } + 467 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_119 { + color=blue + 468 [label="Enter when"]; + subgraph cluster_120 { + color=blue + 469 [label="Enter when branch condition "]; + 470 [label="Access variable R|/b|"]; + 471 [label="Access variable R|/a|"]; + 472 [label="Equality operator =="]; + 473 [label="Exit when branch condition"]; + } + 474 [label="Synthetic else branch"]; + 475 [label="Enter when branch result"]; + subgraph cluster_121 { + color=blue + 476 [label="Enter block"]; + subgraph cluster_122 { + color=blue + 477 [label="Function call arguments enter"]; + 478 [label="Access variable R|/b|"]; + 479 [label="Function call arguments exit"]; + } + 480 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 481 [label="Exit block"]; + } + 482 [label="Exit when branch result"]; + 483 [label="Exit when"]; + } + subgraph cluster_123 { + color=blue + 484 [label="Function call arguments enter"]; + 485 [label="Access variable R|/b|"]; + 486 [label="Function call arguments exit"]; + } + 487 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_124 { + color=blue + 488 [label="Enter when"]; + subgraph cluster_125 { + color=blue + 489 [label="Enter when branch condition "]; + 490 [label="Access variable R|/b|"]; + 491 [label="Access variable R|/a|"]; + 492 [label="Equality operator ==="]; + 493 [label="Exit when branch condition"]; + } + 494 [label="Synthetic else branch"]; + 495 [label="Enter when branch result"]; + subgraph cluster_126 { + color=blue + 496 [label="Enter block"]; + subgraph cluster_127 { + color=blue + 497 [label="Function call arguments enter"]; + 498 [label="Access variable R|/b|"]; + 499 [label="Function call arguments exit"]; + } + 500 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 501 [label="Exit block"]; + } + 502 [label="Exit when branch result"]; + 503 [label="Exit when"]; + } + subgraph cluster_128 { + color=blue + 504 [label="Function call arguments enter"]; + 505 [label="Access variable R|/b|"]; + 506 [label="Function call arguments exit"]; + } + 507 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 508 [label="Exit block"]; + } + 509 [label="Exit function test_10" style="filled" fillcolor=red]; + } 426 -> {427}; 427 -> {428}; 428 -> {429}; 429 -> {430}; 430 -> {431}; - - subgraph cluster_90 { - color=red - 432 [label="Enter function test_11" style="filled" fillcolor=red]; - subgraph cluster_91 { - color=blue - 433 [label="Enter block"]; - subgraph cluster_92 { - color=blue - 434 [label="Enter when"]; - subgraph cluster_93 { - color=blue - 435 [label="Enter when branch condition "]; - 436 [label="Access variable R|/q|"]; - 437 [label="Enter safe call"]; - 438 [label="Access variable R|/QImpl.data|"]; - 439 [label="Enter safe call"]; - 440 [label="Access variable R|/MyData.s|"]; - 441 [label="Enter safe call"]; - 442 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 443 [label="Exit safe call"]; - 444 [label="Exit safe call"]; - 445 [label="Exit safe call"]; - 446 [label="Const: Null(null)"]; - 447 [label="Equality operator !="]; - 448 [label="Exit when branch condition"]; - } - 449 [label="Synthetic else branch"]; - 450 [label="Enter when branch result"]; - subgraph cluster_94 { - color=blue - 451 [label="Enter block"]; - 452 [label="Access variable R|/q|"]; - 453 [label="Smart cast: R|/q|"]; - 454 [label="Access variable R|/QImpl.data|"]; - 455 [label="Smart cast: R|/q|.R|/QImpl.data|"]; - 456 [label="Access variable R|/q|"]; - 457 [label="Smart cast: R|/q|"]; - 458 [label="Access variable R|/QImpl.data|"]; - 459 [label="Smart cast: R|/q|.R|/QImpl.data|"]; - 460 [label="Access variable R|/MyData.s|"]; - 461 [label="Access variable R|/q|"]; - 462 [label="Smart cast: R|/q|"]; - 463 [label="Access variable R|/QImpl.data|"]; - 464 [label="Smart cast: R|/q|.R|/QImpl.data|"]; - 465 [label="Access variable R|/MyData.s|"]; - 466 [label="Function call: R|/q|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 467 [label="Access variable R|/q2|"]; - 468 [label="Access variable R|/QImpl.data|"]; - 469 [label="Access variable R|/q2|"]; - 470 [label="Access variable R|/QImpl.data|"]; - 471 [label="Access variable R|/MyData.s#|"]; - 472 [label="Access variable R|/q2|"]; - 473 [label="Access variable R|/QImpl.data|"]; - 474 [label="Access variable R|/MyData.s#|"]; - 475 [label="Function call: R|/q2|.R|/QImpl.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - subgraph cluster_95 { - color=blue - 476 [label="Enter when"]; - subgraph cluster_96 { - color=blue - 477 [label="Enter when branch condition "]; - 478 [label="Access variable R|/q2|"]; - 479 [label="Access variable R|/QImpl.data|"]; - 480 [label="Const: Null(null)"]; - 481 [label="Equality operator !="]; - 482 [label="Exit when branch condition"]; - } - 483 [label="Synthetic else branch"]; - 484 [label="Enter when branch result"]; - subgraph cluster_97 { - color=blue - 485 [label="Enter block"]; - 486 [label="Access variable R|/q2|"]; - 487 [label="Access variable R|/QImpl.data|"]; - 488 [label="Smart cast: R|/q2|.R|/QImpl.data|"]; - 489 [label="Access variable R|/MyData.s|"]; - 490 [label="Access variable R|/q2|"]; - 491 [label="Access variable R|/QImpl.data|"]; - 492 [label="Smart cast: R|/q2|.R|/QImpl.data|"]; - 493 [label="Access variable R|/MyData.s|"]; - 494 [label="Function call: R|/q2|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 495 [label="Exit block"]; - } - 496 [label="Exit when branch result"]; - 497 [label="Exit when"]; - } - 498 [label="Exit block"]; - } - 499 [label="Exit when branch result"]; - 500 [label="Exit when"]; - } - 501 [label="Exit block"]; - } - 502 [label="Exit function test_11" style="filled" fillcolor=red]; - } + 431 -> {432}; 432 -> {433}; - 433 -> {434}; - 434 -> {435}; + 433 -> {434 435}; + 434 -> {443}; 435 -> {436}; - 436 -> {437 443}; + 436 -> {437}; 437 -> {438}; - 438 -> {439 443}; + 438 -> {439}; 439 -> {440}; - 440 -> {441 444}; + 440 -> {441}; 441 -> {442}; - 442 -> {445}; + 442 -> {443}; 443 -> {444}; 444 -> {445}; 445 -> {446}; 446 -> {447}; 447 -> {448}; - 448 -> {449 450}; - 449 -> {500}; + 448 -> {449}; + 449 -> {450}; 450 -> {451}; 451 -> {452}; 452 -> {453}; - 453 -> {454}; - 454 -> {455}; + 453 -> {454 455}; + 454 -> {463}; 455 -> {456}; 456 -> {457}; 457 -> {458}; @@ -1286,8 +1386,8 @@ digraph nullability_kt { 470 -> {471}; 471 -> {472}; 472 -> {473}; - 473 -> {474}; - 474 -> {475}; + 473 -> {474 475}; + 474 -> {483}; 475 -> {476}; 476 -> {477}; 477 -> {478}; @@ -1295,8 +1395,8 @@ digraph nullability_kt { 479 -> {480}; 480 -> {481}; 481 -> {482}; - 482 -> {483 484}; - 483 -> {497}; + 482 -> {483}; + 483 -> {484}; 484 -> {485}; 485 -> {486}; 486 -> {487}; @@ -1306,8 +1406,8 @@ digraph nullability_kt { 490 -> {491}; 491 -> {492}; 492 -> {493}; - 493 -> {494}; - 494 -> {495}; + 493 -> {494 495}; + 494 -> {503}; 495 -> {496}; 496 -> {497}; 497 -> {498}; @@ -1315,89 +1415,149 @@ digraph nullability_kt { 499 -> {500}; 500 -> {501}; 501 -> {502}; - - subgraph cluster_98 { - color=red - 503 [label="Enter function test_12" style="filled" fillcolor=red]; - subgraph cluster_99 { - color=blue - 504 [label="Enter block"]; - subgraph cluster_100 { - color=blue - 505 [label="Enter when"]; - subgraph cluster_101 { - color=blue - 506 [label="Enter when branch condition "]; - 507 [label="Access variable R|/q|"]; - 508 [label="Enter safe call"]; - 509 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 510 [label="Enter safe call"]; - 511 [label="Access variable R|/MyData.s|"]; - 512 [label="Enter safe call"]; - 513 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 514 [label="Exit safe call"]; - 515 [label="Exit safe call"]; - 516 [label="Exit safe call"]; - 517 [label="Const: Null(null)"]; - 518 [label="Equality operator !="]; - 519 [label="Exit when branch condition"]; - } - 520 [label="Synthetic else branch"]; - 521 [label="Enter when branch result"]; - subgraph cluster_102 { - color=blue - 522 [label="Enter block"]; - 523 [label="Access variable R|/q|"]; - 524 [label="Smart cast: R|/q|"]; - 525 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 526 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; - 527 [label="Access variable R|/q|"]; - 528 [label="Smart cast: R|/q|"]; - 529 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 530 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; - 531 [label="Access variable R|/MyData.s#|"]; - 532 [label="Access variable R|/q|"]; - 533 [label="Smart cast: R|/q|"]; - 534 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 535 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; - 536 [label="Access variable R|/MyData.s#|"]; - 537 [label="Function call: R|/q|.R|/QImplWithCustomGetter.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 538 [label="Exit block"]; - } - 539 [label="Exit when branch result"]; - 540 [label="Exit when"]; - } - 541 [label="Exit block"]; - } - 542 [label="Exit function test_12" style="filled" fillcolor=red]; - } + 502 -> {503}; 503 -> {504}; 504 -> {505}; 505 -> {506}; 506 -> {507}; - 507 -> {508 514}; + 507 -> {508}; 508 -> {509}; - 509 -> {510 514}; + + subgraph cluster_129 { + color=red + 510 [label="Enter function test_11" style="filled" fillcolor=red]; + subgraph cluster_130 { + color=blue + 511 [label="Enter block"]; + subgraph cluster_131 { + color=blue + 512 [label="Enter when"]; + subgraph cluster_132 { + color=blue + 513 [label="Enter when branch condition "]; + 514 [label="Access variable R|/q|"]; + 515 [label="Enter safe call"]; + 516 [label="Access variable R|/QImpl.data|"]; + 517 [label="Enter safe call"]; + 518 [label="Access variable R|/MyData.s|"]; + 519 [label="Enter safe call"]; + subgraph cluster_133 { + color=blue + 520 [label="Function call arguments enter"]; + 521 [label="Function call arguments exit"]; + } + 522 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 523 [label="Exit safe call"]; + 524 [label="Exit safe call"]; + 525 [label="Exit safe call"]; + 526 [label="Const: Null(null)"]; + 527 [label="Equality operator !="]; + 528 [label="Exit when branch condition"]; + } + 529 [label="Synthetic else branch"]; + 530 [label="Enter when branch result"]; + subgraph cluster_134 { + color=blue + 531 [label="Enter block"]; + 532 [label="Access variable R|/q|"]; + 533 [label="Smart cast: R|/q|"]; + 534 [label="Access variable R|/QImpl.data|"]; + 535 [label="Smart cast: R|/q|.R|/QImpl.data|"]; + 536 [label="Access variable R|/q|"]; + 537 [label="Smart cast: R|/q|"]; + 538 [label="Access variable R|/QImpl.data|"]; + 539 [label="Smart cast: R|/q|.R|/QImpl.data|"]; + 540 [label="Access variable R|/MyData.s|"]; + subgraph cluster_135 { + color=blue + 541 [label="Function call arguments enter"]; + 542 [label="Access variable R|/q|"]; + 543 [label="Smart cast: R|/q|"]; + 544 [label="Access variable R|/QImpl.data|"]; + 545 [label="Smart cast: R|/q|.R|/QImpl.data|"]; + 546 [label="Access variable R|/MyData.s|"]; + 547 [label="Function call arguments exit"]; + } + 548 [label="Function call: R|/q|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 549 [label="Access variable R|/q2|"]; + 550 [label="Access variable R|/QImpl.data|"]; + 551 [label="Access variable R|/q2|"]; + 552 [label="Access variable R|/QImpl.data|"]; + 553 [label="Access variable R|/MyData.s#|"]; + subgraph cluster_136 { + color=blue + 554 [label="Function call arguments enter"]; + 555 [label="Access variable R|/q2|"]; + 556 [label="Access variable R|/QImpl.data|"]; + 557 [label="Access variable R|/MyData.s#|"]; + 558 [label="Function call arguments exit"]; + } + 559 [label="Function call: R|/q2|.R|/QImpl.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_137 { + color=blue + 560 [label="Enter when"]; + subgraph cluster_138 { + color=blue + 561 [label="Enter when branch condition "]; + 562 [label="Access variable R|/q2|"]; + 563 [label="Access variable R|/QImpl.data|"]; + 564 [label="Const: Null(null)"]; + 565 [label="Equality operator !="]; + 566 [label="Exit when branch condition"]; + } + 567 [label="Synthetic else branch"]; + 568 [label="Enter when branch result"]; + subgraph cluster_139 { + color=blue + 569 [label="Enter block"]; + 570 [label="Access variable R|/q2|"]; + 571 [label="Access variable R|/QImpl.data|"]; + 572 [label="Smart cast: R|/q2|.R|/QImpl.data|"]; + 573 [label="Access variable R|/MyData.s|"]; + subgraph cluster_140 { + color=blue + 574 [label="Function call arguments enter"]; + 575 [label="Access variable R|/q2|"]; + 576 [label="Access variable R|/QImpl.data|"]; + 577 [label="Smart cast: R|/q2|.R|/QImpl.data|"]; + 578 [label="Access variable R|/MyData.s|"]; + 579 [label="Function call arguments exit"]; + } + 580 [label="Function call: R|/q2|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 581 [label="Exit block"]; + } + 582 [label="Exit when branch result"]; + 583 [label="Exit when"]; + } + 584 [label="Exit block"]; + } + 585 [label="Exit when branch result"]; + 586 [label="Exit when"]; + } + 587 [label="Exit block"]; + } + 588 [label="Exit function test_11" style="filled" fillcolor=red]; + } 510 -> {511}; - 511 -> {512 515}; + 511 -> {512}; 512 -> {513}; - 513 -> {516}; - 514 -> {515}; + 513 -> {514}; + 514 -> {515 523}; 515 -> {516}; - 516 -> {517}; + 516 -> {517 523}; 517 -> {518}; - 518 -> {519}; - 519 -> {520 521}; - 520 -> {540}; + 518 -> {519 524}; + 519 -> {520}; + 520 -> {521}; 521 -> {522}; - 522 -> {523}; + 522 -> {525}; 523 -> {524}; 524 -> {525}; 525 -> {526}; 526 -> {527}; 527 -> {528}; - 528 -> {529}; - 529 -> {530}; + 528 -> {529 530}; + 529 -> {586}; 530 -> {531}; 531 -> {532}; 532 -> {533}; @@ -1410,87 +1570,32 @@ digraph nullability_kt { 539 -> {540}; 540 -> {541}; 541 -> {542}; - - subgraph cluster_103 { - color=red - 543 [label="Enter function test_13" style="filled" fillcolor=red]; - subgraph cluster_104 { - color=blue - 544 [label="Enter block"]; - subgraph cluster_105 { - color=blue - 545 [label="Enter when"]; - subgraph cluster_106 { - color=blue - 546 [label="Enter when branch condition "]; - 547 [label="Access variable R|/q|"]; - 548 [label="Enter safe call"]; - 549 [label="Access variable R|/QImplMutable.data|"]; - 550 [label="Enter safe call"]; - 551 [label="Access variable R|/MyData.s|"]; - 552 [label="Enter safe call"]; - 553 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 554 [label="Exit safe call"]; - 555 [label="Exit safe call"]; - 556 [label="Exit safe call"]; - 557 [label="Const: Null(null)"]; - 558 [label="Equality operator !="]; - 559 [label="Exit when branch condition"]; - } - 560 [label="Synthetic else branch"]; - 561 [label="Enter when branch result"]; - subgraph cluster_107 { - color=blue - 562 [label="Enter block"]; - 563 [label="Access variable R|/q|"]; - 564 [label="Smart cast: R|/q|"]; - 565 [label="Access variable R|/QImplMutable.data|"]; - 566 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; - 567 [label="Access variable R|/q|"]; - 568 [label="Smart cast: R|/q|"]; - 569 [label="Access variable R|/QImplMutable.data|"]; - 570 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; - 571 [label="Access variable R|/MyData.s#|"]; - 572 [label="Access variable R|/q|"]; - 573 [label="Smart cast: R|/q|"]; - 574 [label="Access variable R|/QImplMutable.data|"]; - 575 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; - 576 [label="Access variable R|/MyData.s#|"]; - 577 [label="Function call: R|/q|.R|/QImplMutable.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 578 [label="Exit block"]; - } - 579 [label="Exit when branch result"]; - 580 [label="Exit when"]; - } - 581 [label="Exit block"]; - } - 582 [label="Exit function test_13" style="filled" fillcolor=red]; - } + 542 -> {543}; 543 -> {544}; 544 -> {545}; 545 -> {546}; 546 -> {547}; - 547 -> {548 554}; + 547 -> {548}; 548 -> {549}; - 549 -> {550 554}; + 549 -> {550}; 550 -> {551}; - 551 -> {552 555}; + 551 -> {552}; 552 -> {553}; - 553 -> {556}; + 553 -> {554}; 554 -> {555}; 555 -> {556}; 556 -> {557}; 557 -> {558}; 558 -> {559}; - 559 -> {560 561}; - 560 -> {580}; + 559 -> {560}; + 560 -> {561}; 561 -> {562}; 562 -> {563}; 563 -> {564}; 564 -> {565}; 565 -> {566}; - 566 -> {567}; - 567 -> {568}; + 566 -> {567 568}; + 567 -> {583}; 568 -> {569}; 569 -> {570}; 570 -> {571}; @@ -1505,62 +1610,286 @@ digraph nullability_kt { 579 -> {580}; 580 -> {581}; 581 -> {582}; - - subgraph cluster_108 { - color=red - 583 [label="Enter function test_14" style="filled" fillcolor=red]; - subgraph cluster_109 { - color=blue - 584 [label="Enter block"]; - subgraph cluster_110 { - color=blue - 585 [label="Enter when"]; - subgraph cluster_111 { - color=blue - 586 [label="Enter when branch condition "]; - 587 [label="Access variable R|/q|"]; - 588 [label="Access variable R|/Q.data|"]; - 589 [label="Const: Null(null)"]; - 590 [label="Equality operator =="]; - 591 [label="Exit when branch condition"]; - } - 592 [label="Synthetic else branch"]; - 593 [label="Enter when branch result"]; - subgraph cluster_112 { - color=blue - 594 [label="Enter block"]; - 595 [label="Access variable R|/q|"]; - 596 [label="Access variable R|/Q.data|"]; - 597 [label="Smart cast: R|/q|.R|/Q.data|"]; - 598 [label="Access variable R|/MyData.s#|"]; - 599 [label="Exit block"]; - } - 600 [label="Exit when branch result"]; - 601 [label="Exit when"]; - } - 602 [label="Exit block"]; - } - 603 [label="Exit function test_14" style="filled" fillcolor=red]; - } + 582 -> {583}; 583 -> {584}; 584 -> {585}; 585 -> {586}; 586 -> {587}; 587 -> {588}; - 588 -> {589}; + + subgraph cluster_141 { + color=red + 589 [label="Enter function test_12" style="filled" fillcolor=red]; + subgraph cluster_142 { + color=blue + 590 [label="Enter block"]; + subgraph cluster_143 { + color=blue + 591 [label="Enter when"]; + subgraph cluster_144 { + color=blue + 592 [label="Enter when branch condition "]; + 593 [label="Access variable R|/q|"]; + 594 [label="Enter safe call"]; + 595 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 596 [label="Enter safe call"]; + 597 [label="Access variable R|/MyData.s|"]; + 598 [label="Enter safe call"]; + subgraph cluster_145 { + color=blue + 599 [label="Function call arguments enter"]; + 600 [label="Function call arguments exit"]; + } + 601 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 602 [label="Exit safe call"]; + 603 [label="Exit safe call"]; + 604 [label="Exit safe call"]; + 605 [label="Const: Null(null)"]; + 606 [label="Equality operator !="]; + 607 [label="Exit when branch condition"]; + } + 608 [label="Synthetic else branch"]; + 609 [label="Enter when branch result"]; + subgraph cluster_146 { + color=blue + 610 [label="Enter block"]; + 611 [label="Access variable R|/q|"]; + 612 [label="Smart cast: R|/q|"]; + 613 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 614 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; + 615 [label="Access variable R|/q|"]; + 616 [label="Smart cast: R|/q|"]; + 617 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 618 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; + 619 [label="Access variable R|/MyData.s#|"]; + subgraph cluster_147 { + color=blue + 620 [label="Function call arguments enter"]; + 621 [label="Access variable R|/q|"]; + 622 [label="Smart cast: R|/q|"]; + 623 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 624 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; + 625 [label="Access variable R|/MyData.s#|"]; + 626 [label="Function call arguments exit"]; + } + 627 [label="Function call: R|/q|.R|/QImplWithCustomGetter.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 628 [label="Exit block"]; + } + 629 [label="Exit when branch result"]; + 630 [label="Exit when"]; + } + 631 [label="Exit block"]; + } + 632 [label="Exit function test_12" style="filled" fillcolor=red]; + } 589 -> {590}; 590 -> {591}; - 591 -> {592 593}; - 592 -> {601}; - 593 -> {594}; + 591 -> {592}; + 592 -> {593}; + 593 -> {594 602}; 594 -> {595}; - 595 -> {596}; + 595 -> {596 602}; 596 -> {597}; - 597 -> {598}; + 597 -> {598 603}; 598 -> {599}; 599 -> {600}; 600 -> {601}; - 601 -> {602}; + 601 -> {604}; 602 -> {603}; + 603 -> {604}; + 604 -> {605}; + 605 -> {606}; + 606 -> {607}; + 607 -> {608 609}; + 608 -> {630}; + 609 -> {610}; + 610 -> {611}; + 611 -> {612}; + 612 -> {613}; + 613 -> {614}; + 614 -> {615}; + 615 -> {616}; + 616 -> {617}; + 617 -> {618}; + 618 -> {619}; + 619 -> {620}; + 620 -> {621}; + 621 -> {622}; + 622 -> {623}; + 623 -> {624}; + 624 -> {625}; + 625 -> {626}; + 626 -> {627}; + 627 -> {628}; + 628 -> {629}; + 629 -> {630}; + 630 -> {631}; + 631 -> {632}; + + subgraph cluster_148 { + color=red + 633 [label="Enter function test_13" style="filled" fillcolor=red]; + subgraph cluster_149 { + color=blue + 634 [label="Enter block"]; + subgraph cluster_150 { + color=blue + 635 [label="Enter when"]; + subgraph cluster_151 { + color=blue + 636 [label="Enter when branch condition "]; + 637 [label="Access variable R|/q|"]; + 638 [label="Enter safe call"]; + 639 [label="Access variable R|/QImplMutable.data|"]; + 640 [label="Enter safe call"]; + 641 [label="Access variable R|/MyData.s|"]; + 642 [label="Enter safe call"]; + subgraph cluster_152 { + color=blue + 643 [label="Function call arguments enter"]; + 644 [label="Function call arguments exit"]; + } + 645 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 646 [label="Exit safe call"]; + 647 [label="Exit safe call"]; + 648 [label="Exit safe call"]; + 649 [label="Const: Null(null)"]; + 650 [label="Equality operator !="]; + 651 [label="Exit when branch condition"]; + } + 652 [label="Synthetic else branch"]; + 653 [label="Enter when branch result"]; + subgraph cluster_153 { + color=blue + 654 [label="Enter block"]; + 655 [label="Access variable R|/q|"]; + 656 [label="Smart cast: R|/q|"]; + 657 [label="Access variable R|/QImplMutable.data|"]; + 658 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; + 659 [label="Access variable R|/q|"]; + 660 [label="Smart cast: R|/q|"]; + 661 [label="Access variable R|/QImplMutable.data|"]; + 662 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; + 663 [label="Access variable R|/MyData.s#|"]; + subgraph cluster_154 { + color=blue + 664 [label="Function call arguments enter"]; + 665 [label="Access variable R|/q|"]; + 666 [label="Smart cast: R|/q|"]; + 667 [label="Access variable R|/QImplMutable.data|"]; + 668 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; + 669 [label="Access variable R|/MyData.s#|"]; + 670 [label="Function call arguments exit"]; + } + 671 [label="Function call: R|/q|.R|/QImplMutable.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 672 [label="Exit block"]; + } + 673 [label="Exit when branch result"]; + 674 [label="Exit when"]; + } + 675 [label="Exit block"]; + } + 676 [label="Exit function test_13" style="filled" fillcolor=red]; + } + 633 -> {634}; + 634 -> {635}; + 635 -> {636}; + 636 -> {637}; + 637 -> {638 646}; + 638 -> {639}; + 639 -> {640 646}; + 640 -> {641}; + 641 -> {642 647}; + 642 -> {643}; + 643 -> {644}; + 644 -> {645}; + 645 -> {648}; + 646 -> {647}; + 647 -> {648}; + 648 -> {649}; + 649 -> {650}; + 650 -> {651}; + 651 -> {652 653}; + 652 -> {674}; + 653 -> {654}; + 654 -> {655}; + 655 -> {656}; + 656 -> {657}; + 657 -> {658}; + 658 -> {659}; + 659 -> {660}; + 660 -> {661}; + 661 -> {662}; + 662 -> {663}; + 663 -> {664}; + 664 -> {665}; + 665 -> {666}; + 666 -> {667}; + 667 -> {668}; + 668 -> {669}; + 669 -> {670}; + 670 -> {671}; + 671 -> {672}; + 672 -> {673}; + 673 -> {674}; + 674 -> {675}; + 675 -> {676}; + + subgraph cluster_155 { + color=red + 677 [label="Enter function test_14" style="filled" fillcolor=red]; + subgraph cluster_156 { + color=blue + 678 [label="Enter block"]; + subgraph cluster_157 { + color=blue + 679 [label="Enter when"]; + subgraph cluster_158 { + color=blue + 680 [label="Enter when branch condition "]; + 681 [label="Access variable R|/q|"]; + 682 [label="Access variable R|/Q.data|"]; + 683 [label="Const: Null(null)"]; + 684 [label="Equality operator =="]; + 685 [label="Exit when branch condition"]; + } + 686 [label="Synthetic else branch"]; + 687 [label="Enter when branch result"]; + subgraph cluster_159 { + color=blue + 688 [label="Enter block"]; + 689 [label="Access variable R|/q|"]; + 690 [label="Access variable R|/Q.data|"]; + 691 [label="Smart cast: R|/q|.R|/Q.data|"]; + 692 [label="Access variable R|/MyData.s#|"]; + 693 [label="Exit block"]; + } + 694 [label="Exit when branch result"]; + 695 [label="Exit when"]; + } + 696 [label="Exit block"]; + } + 697 [label="Exit function test_14" style="filled" fillcolor=red]; + } + 677 -> {678}; + 678 -> {679}; + 679 -> {680}; + 680 -> {681}; + 681 -> {682}; + 682 -> {683}; + 683 -> {684}; + 684 -> {685}; + 685 -> {686 687}; + 686 -> {695}; + 687 -> {688}; + 688 -> {689}; + 689 -> {690}; + 690 -> {691}; + 691 -> {692}; + 692 -> {693}; + 693 -> {694}; + 694 -> {695}; + 695 -> {696}; + 696 -> {697}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot index 76722b66b02..e3b7dfe2540 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot @@ -113,31 +113,61 @@ digraph implicitReceivers_kt { subgraph cluster_16 { color=blue 34 [label="Enter block"]; - 35 [label="Access variable this@R|/test_1|"]; - 36 [label="Function call: this@R|/test_1|.#()" style="filled" fillcolor=yellow]; - 37 [label="Function call: #()" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; + subgraph cluster_17 { + color=blue + 35 [label="Function call arguments enter"]; + 36 [label="Access variable this@R|/test_1|"]; + 37 [label="Function call arguments exit"]; + } + 38 [label="Function call: this@R|/test_1|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_18 { + color=blue + 39 [label="Function call arguments enter"]; + 40 [label="Function call arguments exit"]; + } + 41 [label="Function call: #()" style="filled" fillcolor=yellow]; + 42 [label="Exit block"]; } - 39 [label="Exit when branch result"]; - 40 [label="Enter when branch result"]; - subgraph cluster_17 { + 43 [label="Exit when branch result"]; + 44 [label="Enter when branch result"]; + subgraph cluster_19 { color=blue - 41 [label="Enter block"]; - 42 [label="Access variable this@R|/test_1|"]; - 43 [label="Smart cast: this@R|/test_1|"]; - 44 [label="Function call: this@R|/test_1|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 45 [label="Function call: this@R|/test_1|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 46 [label="Exit block"]; + 45 [label="Enter block"]; + subgraph cluster_20 { + color=blue + 46 [label="Function call arguments enter"]; + 47 [label="Access variable this@R|/test_1|"]; + 48 [label="Smart cast: this@R|/test_1|"]; + 49 [label="Function call arguments exit"]; + } + 50 [label="Function call: this@R|/test_1|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_21 { + color=blue + 51 [label="Function call arguments enter"]; + 52 [label="Function call arguments exit"]; + } + 53 [label="Function call: this@R|/test_1|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 54 [label="Exit block"]; } - 47 [label="Exit when branch result"]; - 48 [label="Exit when"]; + 55 [label="Exit when branch result"]; + 56 [label="Exit when"]; } - 49 [label="Access variable this@R|/test_1|"]; - 50 [label="Function call: this@R|/test_1|.#()" style="filled" fillcolor=yellow]; - 51 [label="Function call: #()" style="filled" fillcolor=yellow]; - 52 [label="Exit block"]; + subgraph cluster_22 { + color=blue + 57 [label="Function call arguments enter"]; + 58 [label="Access variable this@R|/test_1|"]; + 59 [label="Function call arguments exit"]; + } + 60 [label="Function call: this@R|/test_1|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_23 { + color=blue + 61 [label="Function call arguments enter"]; + 62 [label="Function call arguments exit"]; + } + 63 [label="Function call: #()" style="filled" fillcolor=yellow]; + 64 [label="Exit block"]; } - 53 [label="Exit function test_1" style="filled" fillcolor=red]; + 65 [label="Exit function test_1" style="filled" fillcolor=red]; } 24 -> {25}; 25 -> {26}; @@ -145,7 +175,7 @@ digraph implicitReceivers_kt { 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31 40}; + 30 -> {31 44}; 31 -> {32}; 32 -> {33}; 33 -> {34}; @@ -154,11 +184,11 @@ digraph implicitReceivers_kt { 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {48}; + 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {44}; + 43 -> {56}; 44 -> {45}; 45 -> {46}; 46 -> {47}; @@ -168,77 +198,107 @@ digraph implicitReceivers_kt { 50 -> {51}; 51 -> {52}; 52 -> {53}; - - subgraph cluster_18 { - color=red - 54 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 55 [label="Enter block"]; - subgraph cluster_20 { - color=blue - 56 [label="Enter when"]; - subgraph cluster_21 { - color=blue - 57 [label="Enter when branch condition "]; - 58 [label="Access variable this@R|/test_2|"]; - 59 [label="Type operator: (this@R|/test_2| !is R|A|)"]; - 60 [label="Exit when branch condition"]; - } - subgraph cluster_22 { - color=blue - 61 [label="Enter when branch condition else"]; - 62 [label="Exit when branch condition"]; - } - 63 [label="Enter when branch result"]; - subgraph cluster_23 { - color=blue - 64 [label="Enter block"]; - 65 [label="Access variable this@R|/test_2|"]; - 66 [label="Smart cast: this@R|/test_2|"]; - 67 [label="Function call: this@R|/test_2|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 68 [label="Function call: this@R|/test_2|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 69 [label="Exit block"]; - } - 70 [label="Exit when branch result"]; - 71 [label="Enter when branch result"]; - subgraph cluster_24 { - color=blue - 72 [label="Enter block"]; - 73 [label="Access variable this@R|/test_2|"]; - 74 [label="Function call: this@R|/test_2|.#()" style="filled" fillcolor=yellow]; - 75 [label="Function call: #()" style="filled" fillcolor=yellow]; - 76 [label="Exit block"]; - } - 77 [label="Exit when branch result"]; - 78 [label="Exit when"]; - } - 79 [label="Access variable this@R|/test_2|"]; - 80 [label="Function call: this@R|/test_2|.#()" style="filled" fillcolor=yellow]; - 81 [label="Function call: #()" style="filled" fillcolor=yellow]; - 82 [label="Exit block"]; - } - 83 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {61 71}; + 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {66}; + + subgraph cluster_24 { + color=red + 66 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_25 { + color=blue + 67 [label="Enter block"]; + subgraph cluster_26 { + color=blue + 68 [label="Enter when"]; + subgraph cluster_27 { + color=blue + 69 [label="Enter when branch condition "]; + 70 [label="Access variable this@R|/test_2|"]; + 71 [label="Type operator: (this@R|/test_2| !is R|A|)"]; + 72 [label="Exit when branch condition"]; + } + subgraph cluster_28 { + color=blue + 73 [label="Enter when branch condition else"]; + 74 [label="Exit when branch condition"]; + } + 75 [label="Enter when branch result"]; + subgraph cluster_29 { + color=blue + 76 [label="Enter block"]; + subgraph cluster_30 { + color=blue + 77 [label="Function call arguments enter"]; + 78 [label="Access variable this@R|/test_2|"]; + 79 [label="Smart cast: this@R|/test_2|"]; + 80 [label="Function call arguments exit"]; + } + 81 [label="Function call: this@R|/test_2|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_31 { + color=blue + 82 [label="Function call arguments enter"]; + 83 [label="Function call arguments exit"]; + } + 84 [label="Function call: this@R|/test_2|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 85 [label="Exit block"]; + } + 86 [label="Exit when branch result"]; + 87 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 88 [label="Enter block"]; + subgraph cluster_33 { + color=blue + 89 [label="Function call arguments enter"]; + 90 [label="Access variable this@R|/test_2|"]; + 91 [label="Function call arguments exit"]; + } + 92 [label="Function call: this@R|/test_2|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_34 { + color=blue + 93 [label="Function call arguments enter"]; + 94 [label="Function call arguments exit"]; + } + 95 [label="Function call: #()" style="filled" fillcolor=yellow]; + 96 [label="Exit block"]; + } + 97 [label="Exit when branch result"]; + 98 [label="Exit when"]; + } + subgraph cluster_35 { + color=blue + 99 [label="Function call arguments enter"]; + 100 [label="Access variable this@R|/test_2|"]; + 101 [label="Function call arguments exit"]; + } + 102 [label="Function call: this@R|/test_2|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_36 { + color=blue + 103 [label="Function call arguments enter"]; + 104 [label="Function call arguments exit"]; + } + 105 [label="Function call: #()" style="filled" fillcolor=yellow]; + 106 [label="Exit block"]; + } + 107 [label="Exit function test_2" style="filled" fillcolor=red]; + } 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {78}; + 70 -> {71}; 71 -> {72}; - 72 -> {73}; + 72 -> {73 87}; 73 -> {74}; 74 -> {75}; 75 -> {76}; @@ -249,87 +309,19 @@ digraph implicitReceivers_kt { 80 -> {81}; 81 -> {82}; 82 -> {83}; - - subgraph cluster_25 { - color=red - 84 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_26 { - color=blue - 85 [label="Enter block"]; - 86 [label="Access variable R|/a|"]; - 87 [label="Postponed enter to lambda"]; - subgraph cluster_27 { - color=blue - 88 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 89 [label="Enter block"]; - 90 [label="Access variable R|/b|"]; - 91 [label="Postponed enter to lambda"]; - subgraph cluster_29 { - color=blue - 92 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_30 { - color=blue - 93 [label="Enter block"]; - 94 [label="Access variable R|/c|"]; - 95 [label="Postponed enter to lambda"]; - subgraph cluster_31 { - color=blue - 96 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 97 [label="Enter block"]; - 98 [label="Access variable this@R|special/anonymous|"]; - 99 [label="Type operator: (this@R|special/anonymous| as R|A|)"]; - 100 [label="Access variable this@R|special/anonymous|"]; - 101 [label="Smart cast: this@R|special/anonymous|"]; - 102 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 103 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 104 [label="Exit block"]; - } - 105 [label="Exit function " style="filled" fillcolor=red]; - } - 106 [label="Postponed exit from lambda"]; - 107 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 108 [label="Access variable this@R|special/anonymous|"]; - 109 [label="Smart cast: this@R|special/anonymous|"]; - 110 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 111 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 112 [label="Exit block"]; - } - 113 [label="Exit function " style="filled" fillcolor=red]; - } - 114 [label="Postponed exit from lambda"]; - 115 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 116 [label="Exit block"]; - } - 117 [label="Exit function " style="filled" fillcolor=red]; - } - 118 [label="Postponed exit from lambda"]; - 119 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 120 [label="Exit block"]; - } - 121 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 83 -> {84}; 84 -> {85}; 85 -> {86}; - 86 -> {87}; - 87 -> {88 119}; - 87 -> {118} [style=dotted]; - 87 -> {88} [style=dashed]; + 86 -> {98}; + 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; - 91 -> {92 115}; - 91 -> {114} [style=dotted]; - 91 -> {92} [style=dashed]; + 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; - 95 -> {96 107}; - 95 -> {106} [style=dotted]; - 95 -> {96} [style=dashed]; + 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; @@ -341,122 +333,140 @@ digraph implicitReceivers_kt { 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {108}; + + subgraph cluster_37 { + color=red + 108 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 109 [label="Enter block"]; + subgraph cluster_39 { + color=blue + 110 [label="Function call arguments enter"]; + 111 [label="Access variable R|/a|"]; + 112 [label="Postponed enter to lambda"]; + subgraph cluster_40 { + color=blue + 113 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_41 { + color=blue + 114 [label="Enter block"]; + subgraph cluster_42 { + color=blue + 115 [label="Function call arguments enter"]; + 116 [label="Access variable R|/b|"]; + 117 [label="Postponed enter to lambda"]; + subgraph cluster_43 { + color=blue + 118 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_44 { + color=blue + 119 [label="Enter block"]; + subgraph cluster_45 { + color=blue + 120 [label="Function call arguments enter"]; + 121 [label="Access variable R|/c|"]; + 122 [label="Postponed enter to lambda"]; + subgraph cluster_46 { + color=blue + 123 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_47 { + color=blue + 124 [label="Enter block"]; + 125 [label="Access variable this@R|special/anonymous|"]; + 126 [label="Type operator: (this@R|special/anonymous| as R|A|)"]; + subgraph cluster_48 { + color=blue + 127 [label="Function call arguments enter"]; + 128 [label="Access variable this@R|special/anonymous|"]; + 129 [label="Smart cast: this@R|special/anonymous|"]; + 130 [label="Function call arguments exit"]; + } + 131 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_49 { + color=blue + 132 [label="Function call arguments enter"]; + 133 [label="Function call arguments exit"]; + } + 134 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 135 [label="Exit block"]; + } + 136 [label="Exit function " style="filled" fillcolor=red]; + } + 137 [label="Function call arguments exit"]; + } + 138 [label="Postponed exit from lambda"]; + 139 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_50 { + color=blue + 140 [label="Function call arguments enter"]; + 141 [label="Access variable this@R|special/anonymous|"]; + 142 [label="Smart cast: this@R|special/anonymous|"]; + 143 [label="Function call arguments exit"]; + } + 144 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_51 { + color=blue + 145 [label="Function call arguments enter"]; + 146 [label="Function call arguments exit"]; + } + 147 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 148 [label="Exit block"]; + } + 149 [label="Exit function " style="filled" fillcolor=red]; + } + 150 [label="Function call arguments exit"]; + } + 151 [label="Postponed exit from lambda"]; + 152 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 153 [label="Exit block"]; + } + 154 [label="Exit function " style="filled" fillcolor=red]; + } + 155 [label="Function call arguments exit"]; + } + 156 [label="Postponed exit from lambda"]; + 157 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 158 [label="Exit block"]; + } + 159 [label="Exit function test_3" style="filled" fillcolor=red]; + } 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; + 112 -> {113 155}; + 112 -> {156} [style=dotted]; + 112 -> {113} [style=dashed]; 113 -> {114}; - 114 -> {115} [color=green]; - 114 -> {119} [color=red]; + 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {118}; + 117 -> {118 150}; + 117 -> {151} [style=dotted]; + 117 -> {118} [style=dashed]; 118 -> {119}; 119 -> {120}; 120 -> {121}; - - subgraph cluster_33 { - color=red - 122 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_34 { - color=blue - 123 [label="Enter block"]; - subgraph cluster_35 { - color=blue - 124 [label="Enter when"]; - subgraph cluster_36 { - color=blue - 125 [label="Enter when branch condition "]; - 126 [label="Access variable this@R|/test_4|"]; - 127 [label="Type operator: (this@R|/test_4| !is R|A|)"]; - 128 [label="Exit when branch condition"]; - } - subgraph cluster_37 { - color=blue - 129 [label="Enter when branch condition "]; - 130 [label="Access variable this@R|/test_4|"]; - 131 [label="Smart cast: this@R|/test_4|"]; - 132 [label="Type operator: (this@R|/test_4| !is R|B|)"]; - 133 [label="Exit when branch condition"]; - } - subgraph cluster_38 { - color=blue - 134 [label="Enter when branch condition else"]; - 135 [label="Exit when branch condition"]; - } - 136 [label="Enter when branch result"]; - subgraph cluster_39 { - color=blue - 137 [label="Enter block"]; - 138 [label="Access variable this@R|/test_4|"]; - 139 [label="Smart cast: this@R|/test_4|"]; - 140 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 141 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 142 [label="Access variable this@R|/test_4|"]; - 143 [label="Smart cast: this@R|/test_4|"]; - 144 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 145 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 146 [label="Exit block"]; - } - 147 [label="Exit when branch result"]; - 148 [label="Enter when branch result"]; - subgraph cluster_40 { - color=blue - 149 [label="Enter block"]; - 150 [label="Access variable this@R|/test_4|"]; - 151 [label="Smart cast: this@R|/test_4|"]; - 152 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; - 153 [label="Function call: #()" style="filled" fillcolor=yellow]; - 154 [label="Access variable this@R|/test_4|"]; - 155 [label="Smart cast: this@R|/test_4|"]; - 156 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 157 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 158 [label="Exit block"]; - } - 159 [label="Exit when branch result"]; - 160 [label="Enter when branch result"]; - subgraph cluster_41 { - color=blue - 161 [label="Enter block"]; - 162 [label="Access variable this@R|/test_4|"]; - 163 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; - 164 [label="Function call: #()" style="filled" fillcolor=yellow]; - 165 [label="Access variable this@R|/test_4|"]; - 166 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; - 167 [label="Function call: #()" style="filled" fillcolor=yellow]; - 168 [label="Exit block"]; - } - 169 [label="Exit when branch result"]; - 170 [label="Exit when"]; - } - 171 [label="Access variable this@R|/test_4|"]; - 172 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; - 173 [label="Function call: #()" style="filled" fillcolor=yellow]; - 174 [label="Access variable this@R|/test_4|"]; - 175 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; - 176 [label="Function call: #()" style="filled" fillcolor=yellow]; - 177 [label="Exit block"]; - } - 178 [label="Exit function test_4" style="filled" fillcolor=red]; - } - 122 -> {123}; + 121 -> {122}; + 122 -> {123 137}; + 122 -> {138} [style=dotted]; + 122 -> {123} [style=dashed]; 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; - 128 -> {129 160}; + 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {134 148}; + 133 -> {134}; 134 -> {135}; 135 -> {136}; - 136 -> {137}; - 137 -> {138}; + 136 -> {138}; + 137 -> {139}; 138 -> {139}; 139 -> {140}; 140 -> {141}; @@ -466,93 +476,328 @@ digraph implicitReceivers_kt { 144 -> {145}; 145 -> {146}; 146 -> {147}; - 147 -> {170}; + 147 -> {148}; 148 -> {149}; - 149 -> {150}; - 150 -> {151}; - 151 -> {152}; + 149 -> {151}; + 150 -> {152}; + 151 -> {152} [color=green]; + 151 -> {157} [color=red]; 152 -> {153}; 153 -> {154}; - 154 -> {155}; - 155 -> {156}; + 154 -> {156}; + 155 -> {157}; 156 -> {157}; 157 -> {158}; 158 -> {159}; - 159 -> {170}; + + subgraph cluster_52 { + color=red + 160 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_53 { + color=blue + 161 [label="Enter block"]; + subgraph cluster_54 { + color=blue + 162 [label="Enter when"]; + subgraph cluster_55 { + color=blue + 163 [label="Enter when branch condition "]; + 164 [label="Access variable this@R|/test_4|"]; + 165 [label="Type operator: (this@R|/test_4| !is R|A|)"]; + 166 [label="Exit when branch condition"]; + } + subgraph cluster_56 { + color=blue + 167 [label="Enter when branch condition "]; + 168 [label="Access variable this@R|/test_4|"]; + 169 [label="Smart cast: this@R|/test_4|"]; + 170 [label="Type operator: (this@R|/test_4| !is R|B|)"]; + 171 [label="Exit when branch condition"]; + } + subgraph cluster_57 { + color=blue + 172 [label="Enter when branch condition else"]; + 173 [label="Exit when branch condition"]; + } + 174 [label="Enter when branch result"]; + subgraph cluster_58 { + color=blue + 175 [label="Enter block"]; + subgraph cluster_59 { + color=blue + 176 [label="Function call arguments enter"]; + 177 [label="Access variable this@R|/test_4|"]; + 178 [label="Smart cast: this@R|/test_4|"]; + 179 [label="Function call arguments exit"]; + } + 180 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_60 { + color=blue + 181 [label="Function call arguments enter"]; + 182 [label="Function call arguments exit"]; + } + 183 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_61 { + color=blue + 184 [label="Function call arguments enter"]; + 185 [label="Access variable this@R|/test_4|"]; + 186 [label="Smart cast: this@R|/test_4|"]; + 187 [label="Function call arguments exit"]; + } + 188 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow]; + subgraph cluster_62 { + color=blue + 189 [label="Function call arguments enter"]; + 190 [label="Function call arguments exit"]; + } + 191 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 192 [label="Exit block"]; + } + 193 [label="Exit when branch result"]; + 194 [label="Enter when branch result"]; + subgraph cluster_63 { + color=blue + 195 [label="Enter block"]; + subgraph cluster_64 { + color=blue + 196 [label="Function call arguments enter"]; + 197 [label="Access variable this@R|/test_4|"]; + 198 [label="Smart cast: this@R|/test_4|"]; + 199 [label="Function call arguments exit"]; + } + 200 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_65 { + color=blue + 201 [label="Function call arguments enter"]; + 202 [label="Function call arguments exit"]; + } + 203 [label="Function call: #()" style="filled" fillcolor=yellow]; + subgraph cluster_66 { + color=blue + 204 [label="Function call arguments enter"]; + 205 [label="Access variable this@R|/test_4|"]; + 206 [label="Smart cast: this@R|/test_4|"]; + 207 [label="Function call arguments exit"]; + } + 208 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_67 { + color=blue + 209 [label="Function call arguments enter"]; + 210 [label="Function call arguments exit"]; + } + 211 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 212 [label="Exit block"]; + } + 213 [label="Exit when branch result"]; + 214 [label="Enter when branch result"]; + subgraph cluster_68 { + color=blue + 215 [label="Enter block"]; + subgraph cluster_69 { + color=blue + 216 [label="Function call arguments enter"]; + 217 [label="Access variable this@R|/test_4|"]; + 218 [label="Function call arguments exit"]; + } + 219 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_70 { + color=blue + 220 [label="Function call arguments enter"]; + 221 [label="Function call arguments exit"]; + } + 222 [label="Function call: #()" style="filled" fillcolor=yellow]; + subgraph cluster_71 { + color=blue + 223 [label="Function call arguments enter"]; + 224 [label="Access variable this@R|/test_4|"]; + 225 [label="Function call arguments exit"]; + } + 226 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_72 { + color=blue + 227 [label="Function call arguments enter"]; + 228 [label="Function call arguments exit"]; + } + 229 [label="Function call: #()" style="filled" fillcolor=yellow]; + 230 [label="Exit block"]; + } + 231 [label="Exit when branch result"]; + 232 [label="Exit when"]; + } + subgraph cluster_73 { + color=blue + 233 [label="Function call arguments enter"]; + 234 [label="Access variable this@R|/test_4|"]; + 235 [label="Function call arguments exit"]; + } + 236 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_74 { + color=blue + 237 [label="Function call arguments enter"]; + 238 [label="Function call arguments exit"]; + } + 239 [label="Function call: #()" style="filled" fillcolor=yellow]; + subgraph cluster_75 { + color=blue + 240 [label="Function call arguments enter"]; + 241 [label="Access variable this@R|/test_4|"]; + 242 [label="Function call arguments exit"]; + } + 243 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_76 { + color=blue + 244 [label="Function call arguments enter"]; + 245 [label="Function call arguments exit"]; + } + 246 [label="Function call: #()" style="filled" fillcolor=yellow]; + 247 [label="Exit block"]; + } + 248 [label="Exit function test_4" style="filled" fillcolor=red]; + } 160 -> {161}; 161 -> {162}; 162 -> {163}; 163 -> {164}; 164 -> {165}; 165 -> {166}; - 166 -> {167}; + 166 -> {167 214}; 167 -> {168}; 168 -> {169}; 169 -> {170}; 170 -> {171}; - 171 -> {172}; + 171 -> {172 194}; 172 -> {173}; 173 -> {174}; 174 -> {175}; 175 -> {176}; 176 -> {177}; 177 -> {178}; + 178 -> {179}; + 179 -> {180}; + 180 -> {181}; + 181 -> {182}; + 182 -> {183}; + 183 -> {184}; + 184 -> {185}; + 185 -> {186}; + 186 -> {187}; + 187 -> {188}; + 188 -> {189}; + 189 -> {190}; + 190 -> {191}; + 191 -> {192}; + 192 -> {193}; + 193 -> {232}; + 194 -> {195}; + 195 -> {196}; + 196 -> {197}; + 197 -> {198}; + 198 -> {199}; + 199 -> {200}; + 200 -> {201}; + 201 -> {202}; + 202 -> {203}; + 203 -> {204}; + 204 -> {205}; + 205 -> {206}; + 206 -> {207}; + 207 -> {208}; + 208 -> {209}; + 209 -> {210}; + 210 -> {211}; + 211 -> {212}; + 212 -> {213}; + 213 -> {232}; + 214 -> {215}; + 215 -> {216}; + 216 -> {217}; + 217 -> {218}; + 218 -> {219}; + 219 -> {220}; + 220 -> {221}; + 221 -> {222}; + 222 -> {223}; + 223 -> {224}; + 224 -> {225}; + 225 -> {226}; + 226 -> {227}; + 227 -> {228}; + 228 -> {229}; + 229 -> {230}; + 230 -> {231}; + 231 -> {232}; + 232 -> {233}; + 233 -> {234}; + 234 -> {235}; + 235 -> {236}; + 236 -> {237}; + 237 -> {238}; + 238 -> {239}; + 239 -> {240}; + 240 -> {241}; + 241 -> {242}; + 242 -> {243}; + 243 -> {244}; + 244 -> {245}; + 245 -> {246}; + 246 -> {247}; + 247 -> {248}; - subgraph cluster_42 { + subgraph cluster_77 { color=red - 179 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_43 { + 249 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_78 { color=blue - 180 [label="Enter block"]; - subgraph cluster_44 { + 250 [label="Enter block"]; + subgraph cluster_79 { color=blue - 181 [label="Enter when"]; - subgraph cluster_45 { + 251 [label="Enter when"]; + subgraph cluster_80 { color=blue - 182 [label="Enter when branch condition "]; - 183 [label="Access variable this@R|/test_5|"]; - 184 [label="Type operator: (this@R|/test_5| is R|kotlin/collections/List<*>|)"]; - 185 [label="Exit when branch condition"]; + 252 [label="Enter when branch condition "]; + 253 [label="Access variable this@R|/test_5|"]; + 254 [label="Type operator: (this@R|/test_5| is R|kotlin/collections/List<*>|)"]; + 255 [label="Exit when branch condition"]; } - subgraph cluster_46 { + subgraph cluster_81 { color=blue - 186 [label="Enter when branch condition "]; - 187 [label="Access variable this@R|/test_5|"]; - 188 [label="Type operator: (this@R|/test_5| is R|kotlin/String|)"]; - 189 [label="Exit when branch condition"]; + 256 [label="Enter when branch condition "]; + 257 [label="Access variable this@R|/test_5|"]; + 258 [label="Type operator: (this@R|/test_5| is R|kotlin/String|)"]; + 259 [label="Exit when branch condition"]; } - subgraph cluster_47 { + subgraph cluster_82 { color=blue - 190 [label="Enter when branch condition else"]; - 191 [label="Exit when branch condition"]; + 260 [label="Enter when branch condition else"]; + 261 [label="Exit when branch condition"]; } - 192 [label="Enter when branch result"]; - subgraph cluster_48 { + 262 [label="Enter when branch result"]; + subgraph cluster_83 { color=blue - 193 [label="Enter block"]; - 194 [label="Const: Int(0)"]; - 195 [label="Exit block"]; + 263 [label="Enter block"]; + 264 [label="Const: Int(0)"]; + 265 [label="Exit block"]; } - 196 [label="Exit when branch result"]; - 197 [label="Enter when branch result"]; - subgraph cluster_49 { + 266 [label="Exit when branch result"]; + 267 [label="Enter when branch result"]; + subgraph cluster_84 { color=blue - 198 [label="Enter block"]; - 199 [label="Access variable R|kotlin/String.length|"]; - 200 [label="Exit block"]; + 268 [label="Enter block"]; + 269 [label="Access variable R|kotlin/String.length|"]; + 270 [label="Exit block"]; } - 201 [label="Exit when branch result"]; - 202 [label="Enter when branch result"]; - subgraph cluster_50 { + 271 [label="Exit when branch result"]; + 272 [label="Enter when branch result"]; + subgraph cluster_85 { color=blue - 203 [label="Enter block"]; - 204 [label="Access variable R|SubstitutionOverride|"]; - 205 [label="Exit block"]; + 273 [label="Enter block"]; + 274 [label="Access variable R|SubstitutionOverride|"]; + 275 [label="Exit block"]; } - 206 [label="Exit when branch result"]; - 207 [label="Exit when"]; + 276 [label="Exit when branch result"]; + 277 [label="Exit when"]; } - 208 [label="Jump: ^test_5 when () { + 278 [label="Jump: ^test_5 when () { (this@R|/test_5| is R|kotlin/collections/List<*>|) -> { this@R|/test_5|.R|SubstitutionOverride| } @@ -564,71 +809,71 @@ digraph implicitReceivers_kt { } } "]; - 209 [label="Stub" style="filled" fillcolor=gray]; - 210 [label="Exit block" style="filled" fillcolor=gray]; + 279 [label="Stub" style="filled" fillcolor=gray]; + 280 [label="Exit block" style="filled" fillcolor=gray]; } - 211 [label="Exit function test_5" style="filled" fillcolor=red]; + 281 [label="Exit function test_5" style="filled" fillcolor=red]; } - 179 -> {180}; - 180 -> {181}; - 181 -> {182}; - 182 -> {183}; - 183 -> {184}; - 184 -> {185}; - 185 -> {186 202}; - 186 -> {187}; - 187 -> {188}; - 188 -> {189}; - 189 -> {190 197}; - 190 -> {191}; - 191 -> {192}; - 192 -> {193}; - 193 -> {194}; - 194 -> {195}; - 195 -> {196}; - 196 -> {207}; - 197 -> {198}; - 198 -> {199}; - 199 -> {200}; - 200 -> {201}; - 201 -> {207}; - 202 -> {203}; - 203 -> {204}; - 204 -> {205}; - 205 -> {206}; - 206 -> {207}; - 207 -> {208}; - 208 -> {211}; - 208 -> {209} [style=dotted]; - 209 -> {210} [style=dotted]; - 210 -> {211} [style=dotted]; + 249 -> {250}; + 250 -> {251}; + 251 -> {252}; + 252 -> {253}; + 253 -> {254}; + 254 -> {255}; + 255 -> {256 272}; + 256 -> {257}; + 257 -> {258}; + 258 -> {259}; + 259 -> {260 267}; + 260 -> {261}; + 261 -> {262}; + 262 -> {263}; + 263 -> {264}; + 264 -> {265}; + 265 -> {266}; + 266 -> {277}; + 267 -> {268}; + 268 -> {269}; + 269 -> {270}; + 270 -> {271}; + 271 -> {277}; + 272 -> {273}; + 273 -> {274}; + 274 -> {275}; + 275 -> {276}; + 276 -> {277}; + 277 -> {278}; + 278 -> {281}; + 278 -> {279} [style=dotted]; + 279 -> {280} [style=dotted]; + 280 -> {281} [style=dotted]; - subgraph cluster_51 { + subgraph cluster_86 { color=red - 212 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_52 { + 282 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_87 { color=blue - 213 [label="Enter block"]; - 214 [label="Access variable this@R|/test_6|"]; - 215 [label="Type operator: (this@R|/test_6| as R|kotlin/collections/List<*>|)"]; - 216 [label="Access variable R|SubstitutionOverride|"]; - 217 [label="Access variable this@R|/test_6|"]; - 218 [label="Smart cast: this@R|/test_6|"]; - 219 [label="Type operator: (this@R|/test_6| as R|kotlin/String|)"]; - 220 [label="Access variable R|kotlin/String.length|"]; - 221 [label="Exit block"]; + 283 [label="Enter block"]; + 284 [label="Access variable this@R|/test_6|"]; + 285 [label="Type operator: (this@R|/test_6| as R|kotlin/collections/List<*>|)"]; + 286 [label="Access variable R|SubstitutionOverride|"]; + 287 [label="Access variable this@R|/test_6|"]; + 288 [label="Smart cast: this@R|/test_6|"]; + 289 [label="Type operator: (this@R|/test_6| as R|kotlin/String|)"]; + 290 [label="Access variable R|kotlin/String.length|"]; + 291 [label="Exit block"]; } - 222 [label="Exit function test_6" style="filled" fillcolor=red]; + 292 [label="Exit function test_6" style="filled" fillcolor=red]; } - 212 -> {213}; - 213 -> {214}; - 214 -> {215}; - 215 -> {216}; - 216 -> {217}; - 217 -> {218}; - 218 -> {219}; - 219 -> {220}; - 220 -> {221}; - 221 -> {222}; + 282 -> {283}; + 283 -> {284}; + 284 -> {285}; + 285 -> {286}; + 286 -> {287}; + 287 -> {288}; + 288 -> {289}; + 289 -> {290}; + 290 -> {291}; + 291 -> {292}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot index 05822d2ca8c..0cda31bdc27 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot @@ -99,17 +99,22 @@ digraph assignSafeCall_kt { subgraph cluster_12 { color=blue 36 [label="Enter block"]; - 37 [label="Access variable R|/a|"]; - 38 [label="Smart cast: R|/a|"]; - 39 [label="Function call: R|/a|.R|/A.bar|()" style="filled" fillcolor=yellow]; - 40 [label="Exit block"]; + subgraph cluster_13 { + color=blue + 37 [label="Function call arguments enter"]; + 38 [label="Access variable R|/a|"]; + 39 [label="Smart cast: R|/a|"]; + 40 [label="Function call arguments exit"]; + } + 41 [label="Function call: R|/a|.R|/A.bar|()" style="filled" fillcolor=yellow]; + 42 [label="Exit block"]; } - 41 [label="Exit when branch result"]; - 42 [label="Exit when"]; + 43 [label="Exit when branch result"]; + 44 [label="Exit when"]; } - 43 [label="Exit block"]; + 45 [label="Exit block"]; } - 44 [label="Exit function test_1" style="filled" fillcolor=red]; + 46 [label="Exit function test_1" style="filled" fillcolor=red]; } 21 -> {22}; 22 -> {23}; @@ -124,7 +129,7 @@ digraph assignSafeCall_kt { 31 -> {32}; 32 -> {33}; 33 -> {34 35}; - 34 -> {42}; + 34 -> {44}; 35 -> {36}; 36 -> {37}; 37 -> {38}; @@ -134,51 +139,61 @@ digraph assignSafeCall_kt { 41 -> {42}; 42 -> {43}; 43 -> {44}; - - subgraph cluster_13 { - color=red - 45 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 46 [label="Enter block"]; - 47 [label="Access variable R|/a|"]; - 48 [label="Enter safe call"]; - 49 [label="Function call: $subj$.R|/A.foo|()" style="filled" fillcolor=yellow]; - 50 [label="Exit safe call"]; - 51 [label="Variable declaration: lval x: R|kotlin/Int?|"]; - subgraph cluster_15 { - color=blue - 52 [label="Enter when"]; - subgraph cluster_16 { - color=blue - 53 [label="Enter when branch condition "]; - 54 [label="Access variable R|/x|"]; - 55 [label="Const: Null(null)"]; - 56 [label="Equality operator !="]; - 57 [label="Exit when branch condition"]; - } - 58 [label="Synthetic else branch"]; - 59 [label="Enter when branch result"]; - subgraph cluster_17 { - color=blue - 60 [label="Enter block"]; - 61 [label="Access variable R|/a|"]; - 62 [label="Smart cast: R|/a|"]; - 63 [label="Function call: R|/a|.R|/A.bar|()" style="filled" fillcolor=yellow]; - 64 [label="Exit block"]; - } - 65 [label="Exit when branch result"]; - 66 [label="Exit when"]; - } - 67 [label="Exit block"]; - } - 68 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 44 -> {45}; 45 -> {46}; - 46 -> {47}; - 47 -> {48 50}; + + subgraph cluster_14 { + color=red + 47 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 48 [label="Enter block"]; + 49 [label="Access variable R|/a|"]; + 50 [label="Enter safe call"]; + subgraph cluster_16 { + color=blue + 51 [label="Function call arguments enter"]; + 52 [label="Function call arguments exit"]; + } + 53 [label="Function call: $subj$.R|/A.foo|()" style="filled" fillcolor=yellow]; + 54 [label="Exit safe call"]; + 55 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + subgraph cluster_17 { + color=blue + 56 [label="Enter when"]; + subgraph cluster_18 { + color=blue + 57 [label="Enter when branch condition "]; + 58 [label="Access variable R|/x|"]; + 59 [label="Const: Null(null)"]; + 60 [label="Equality operator !="]; + 61 [label="Exit when branch condition"]; + } + 62 [label="Synthetic else branch"]; + 63 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 64 [label="Enter block"]; + subgraph cluster_20 { + color=blue + 65 [label="Function call arguments enter"]; + 66 [label="Access variable R|/a|"]; + 67 [label="Smart cast: R|/a|"]; + 68 [label="Function call arguments exit"]; + } + 69 [label="Function call: R|/a|.R|/A.bar|()" style="filled" fillcolor=yellow]; + 70 [label="Exit block"]; + } + 71 [label="Exit when branch result"]; + 72 [label="Exit when"]; + } + 73 [label="Exit block"]; + } + 74 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 47 -> {48}; 48 -> {49}; - 49 -> {50}; + 49 -> {50 54}; 50 -> {51}; 51 -> {52}; 52 -> {53}; @@ -186,135 +201,150 @@ digraph assignSafeCall_kt { 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58 59}; - 58 -> {66}; + 57 -> {58}; + 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {62}; - 62 -> {63}; + 61 -> {62 63}; + 62 -> {72}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - - subgraph cluster_18 { - color=red - 69 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 70 [label="Enter block"]; - 71 [label="Access variable R|/x|"]; - 72 [label="Type operator: (R|/x| as? R|A|)"]; - 73 [label="Exit lhs of ?:"]; - 74 [label="Enter rhs of ?:"]; - 75 [label="Jump: ^test_3 Unit"]; - 76 [label="Stub" style="filled" fillcolor=gray]; - 77 [label="Lhs of ?: is not null"]; - 78 [label="Exit ?:"]; - 79 [label="Variable declaration: lval a: R|A|"]; - 80 [label="Access variable R|/a|"]; - 81 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 82 [label="Access variable R|/x|"]; - 83 [label="Smart cast: R|/x|"]; - 84 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 85 [label="Exit block"]; - } - 86 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {74 77}; - 74 -> {75}; - 75 -> {86}; - 75 -> {76} [style=dotted]; - 76 -> {78} [style=dotted]; - 77 -> {78}; - 78 -> {79}; - 79 -> {80}; - 80 -> {81}; - 81 -> {82}; - 82 -> {83}; - 83 -> {84}; - 84 -> {85}; - 85 -> {86}; - - subgraph cluster_20 { - color=red - 87 [label="Enter class B" style="filled" fillcolor=red]; - 88 [label="Exit class B" style="filled" fillcolor=red]; - } - 87 -> {88} [color=green]; + 73 -> {74}; subgraph cluster_21 { color=red - 89 [label="Enter function foo" style="filled" fillcolor=red]; - 90 [label="Exit function foo" style="filled" fillcolor=red]; - } - 89 -> {90}; - - subgraph cluster_22 { - color=red - 91 [label="Enter function bar" style="filled" fillcolor=red]; - 92 [label="Exit function bar" style="filled" fillcolor=red]; - } - 91 -> {92}; - - subgraph cluster_23 { - color=red - 93 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_24 { + 75 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 94 [label="Enter block"]; - 95 [label="Access variable R|/a|"]; - 96 [label="Enter safe call"]; - 97 [label="Access variable R|/B.x|"]; - 98 [label="Exit safe call"]; - 99 [label="Variable declaration: lval x: R|kotlin/Int?|"]; - subgraph cluster_25 { + 76 [label="Enter block"]; + 77 [label="Access variable R|/x|"]; + 78 [label="Type operator: (R|/x| as? R|A|)"]; + 79 [label="Exit lhs of ?:"]; + 80 [label="Enter rhs of ?:"]; + 81 [label="Jump: ^test_3 Unit"]; + 82 [label="Stub" style="filled" fillcolor=gray]; + 83 [label="Lhs of ?: is not null"]; + 84 [label="Exit ?:"]; + 85 [label="Variable declaration: lval a: R|A|"]; + subgraph cluster_23 { color=blue - 100 [label="Enter when"]; - subgraph cluster_26 { - color=blue - 101 [label="Enter when branch condition "]; - 102 [label="Access variable R|/x|"]; - 103 [label="Const: Null(null)"]; - 104 [label="Equality operator !="]; - 105 [label="Exit when branch condition"]; - } - 106 [label="Synthetic else branch"]; - 107 [label="Enter when branch result"]; - subgraph cluster_27 { - color=blue - 108 [label="Enter block"]; - 109 [label="Access variable R|/a|"]; - 110 [label="Smart cast: R|/a|"]; - 111 [label="Function call: R|/a|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 112 [label="Exit block"]; - } - 113 [label="Exit when branch result"]; - 114 [label="Exit when"]; + 86 [label="Function call arguments enter"]; + 87 [label="Access variable R|/a|"]; + 88 [label="Function call arguments exit"]; } - 115 [label="Exit block"]; + 89 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_24 { + color=blue + 90 [label="Function call arguments enter"]; + 91 [label="Access variable R|/x|"]; + 92 [label="Smart cast: R|/x|"]; + 93 [label="Function call arguments exit"]; + } + 94 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 95 [label="Exit block"]; } - 116 [label="Exit function test_1" style="filled" fillcolor=red]; + 96 [label="Exit function test_3" style="filled" fillcolor=red]; } + 75 -> {76}; + 76 -> {77}; + 77 -> {78}; + 78 -> {79}; + 79 -> {80 83}; + 80 -> {81}; + 81 -> {96}; + 81 -> {82} [style=dotted]; + 82 -> {84} [style=dotted]; + 83 -> {84}; + 84 -> {85}; + 85 -> {86}; + 86 -> {87}; + 87 -> {88}; + 88 -> {89}; + 89 -> {90}; + 90 -> {91}; + 91 -> {92}; + 92 -> {93}; 93 -> {94}; 94 -> {95}; - 95 -> {96 98}; - 96 -> {97}; - 97 -> {98}; - 98 -> {99}; + 95 -> {96}; + + subgraph cluster_25 { + color=red + 97 [label="Enter class B" style="filled" fillcolor=red]; + 98 [label="Exit class B" style="filled" fillcolor=red]; + } + 97 -> {98} [color=green]; + + subgraph cluster_26 { + color=red + 99 [label="Enter function foo" style="filled" fillcolor=red]; + 100 [label="Exit function foo" style="filled" fillcolor=red]; + } 99 -> {100}; - 100 -> {101}; + + subgraph cluster_27 { + color=red + 101 [label="Enter function bar" style="filled" fillcolor=red]; + 102 [label="Exit function bar" style="filled" fillcolor=red]; + } 101 -> {102}; - 102 -> {103}; + + subgraph cluster_28 { + color=red + 103 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 104 [label="Enter block"]; + 105 [label="Access variable R|/a|"]; + 106 [label="Enter safe call"]; + 107 [label="Access variable R|/B.x|"]; + 108 [label="Exit safe call"]; + 109 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + subgraph cluster_30 { + color=blue + 110 [label="Enter when"]; + subgraph cluster_31 { + color=blue + 111 [label="Enter when branch condition "]; + 112 [label="Access variable R|/x|"]; + 113 [label="Const: Null(null)"]; + 114 [label="Equality operator !="]; + 115 [label="Exit when branch condition"]; + } + 116 [label="Synthetic else branch"]; + 117 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 118 [label="Enter block"]; + subgraph cluster_33 { + color=blue + 119 [label="Function call arguments enter"]; + 120 [label="Access variable R|/a|"]; + 121 [label="Smart cast: R|/a|"]; + 122 [label="Function call arguments exit"]; + } + 123 [label="Function call: R|/a|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 124 [label="Exit block"]; + } + 125 [label="Exit when branch result"]; + 126 [label="Exit when"]; + } + 127 [label="Exit block"]; + } + 128 [label="Exit function test_1" style="filled" fillcolor=red]; + } 103 -> {104}; 104 -> {105}; - 105 -> {106 107}; - 106 -> {114}; + 105 -> {106 108}; + 106 -> {107}; 107 -> {108}; 108 -> {109}; 109 -> {110}; @@ -323,50 +353,11 @@ digraph assignSafeCall_kt { 112 -> {113}; 113 -> {114}; 114 -> {115}; - 115 -> {116}; - - subgraph cluster_28 { - color=red - 117 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 118 [label="Enter block"]; - 119 [label="Access variable R|/a|"]; - 120 [label="Enter safe call"]; - 121 [label="Function call: $subj$.R|/B.foo|()" style="filled" fillcolor=yellow]; - 122 [label="Exit safe call"]; - 123 [label="Variable declaration: lval x: R|kotlin/Int?|"]; - subgraph cluster_30 { - color=blue - 124 [label="Enter when"]; - subgraph cluster_31 { - color=blue - 125 [label="Enter when branch condition "]; - 126 [label="Access variable R|/x|"]; - 127 [label="Const: Null(null)"]; - 128 [label="Equality operator !="]; - 129 [label="Exit when branch condition"]; - } - 130 [label="Synthetic else branch"]; - 131 [label="Enter when branch result"]; - subgraph cluster_32 { - color=blue - 132 [label="Enter block"]; - 133 [label="Access variable R|/a|"]; - 134 [label="Smart cast: R|/a|"]; - 135 [label="Function call: R|/a|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 136 [label="Exit block"]; - } - 137 [label="Exit when branch result"]; - 138 [label="Exit when"]; - } - 139 [label="Exit block"]; - } - 140 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 115 -> {116 117}; + 116 -> {126}; 117 -> {118}; 118 -> {119}; - 119 -> {120 122}; + 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; @@ -375,10 +366,59 @@ digraph assignSafeCall_kt { 125 -> {126}; 126 -> {127}; 127 -> {128}; - 128 -> {129}; - 129 -> {130 131}; - 130 -> {138}; - 131 -> {132}; + + subgraph cluster_34 { + color=red + 129 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_35 { + color=blue + 130 [label="Enter block"]; + 131 [label="Access variable R|/a|"]; + 132 [label="Enter safe call"]; + subgraph cluster_36 { + color=blue + 133 [label="Function call arguments enter"]; + 134 [label="Function call arguments exit"]; + } + 135 [label="Function call: $subj$.R|/B.foo|()" style="filled" fillcolor=yellow]; + 136 [label="Exit safe call"]; + 137 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + subgraph cluster_37 { + color=blue + 138 [label="Enter when"]; + subgraph cluster_38 { + color=blue + 139 [label="Enter when branch condition "]; + 140 [label="Access variable R|/x|"]; + 141 [label="Const: Null(null)"]; + 142 [label="Equality operator !="]; + 143 [label="Exit when branch condition"]; + } + 144 [label="Synthetic else branch"]; + 145 [label="Enter when branch result"]; + subgraph cluster_39 { + color=blue + 146 [label="Enter block"]; + subgraph cluster_40 { + color=blue + 147 [label="Function call arguments enter"]; + 148 [label="Access variable R|/a|"]; + 149 [label="Smart cast: R|/a|"]; + 150 [label="Function call arguments exit"]; + } + 151 [label="Function call: R|/a|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 152 [label="Exit block"]; + } + 153 [label="Exit when branch result"]; + 154 [label="Exit when"]; + } + 155 [label="Exit block"]; + } + 156 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 129 -> {130}; + 130 -> {131}; + 131 -> {132 136}; 132 -> {133}; 133 -> {134}; 134 -> {135}; @@ -387,40 +427,15 @@ digraph assignSafeCall_kt { 137 -> {138}; 138 -> {139}; 139 -> {140}; - - subgraph cluster_33 { - color=red - 141 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_34 { - color=blue - 142 [label="Enter block"]; - 143 [label="Access variable R|/x|"]; - 144 [label="Type operator: (R|/x| as? R|B|)"]; - 145 [label="Exit lhs of ?:"]; - 146 [label="Enter rhs of ?:"]; - 147 [label="Jump: ^test_3 Unit"]; - 148 [label="Stub" style="filled" fillcolor=gray]; - 149 [label="Lhs of ?: is not null"]; - 150 [label="Exit ?:"]; - 151 [label="Variable declaration: lval a: R|B|"]; - 152 [label="Access variable R|/a|"]; - 153 [label="Function call: R|/a|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 154 [label="Access variable R|/x|"]; - 155 [label="Smart cast: R|/x|"]; - 156 [label="Function call: R|/x|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 157 [label="Exit block"]; - } - 158 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 140 -> {141}; 141 -> {142}; 142 -> {143}; - 143 -> {144}; - 144 -> {145}; - 145 -> {146 149}; + 143 -> {144 145}; + 144 -> {154}; + 145 -> {146}; 146 -> {147}; - 147 -> {158}; - 147 -> {148} [style=dotted]; - 148 -> {150} [style=dotted]; + 147 -> {148}; + 148 -> {149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; @@ -428,7 +443,62 @@ digraph assignSafeCall_kt { 153 -> {154}; 154 -> {155}; 155 -> {156}; - 156 -> {157}; + + subgraph cluster_41 { + color=red + 157 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_42 { + color=blue + 158 [label="Enter block"]; + 159 [label="Access variable R|/x|"]; + 160 [label="Type operator: (R|/x| as? R|B|)"]; + 161 [label="Exit lhs of ?:"]; + 162 [label="Enter rhs of ?:"]; + 163 [label="Jump: ^test_3 Unit"]; + 164 [label="Stub" style="filled" fillcolor=gray]; + 165 [label="Lhs of ?: is not null"]; + 166 [label="Exit ?:"]; + 167 [label="Variable declaration: lval a: R|B|"]; + subgraph cluster_43 { + color=blue + 168 [label="Function call arguments enter"]; + 169 [label="Access variable R|/a|"]; + 170 [label="Function call arguments exit"]; + } + 171 [label="Function call: R|/a|.R|/B.foo|()" style="filled" fillcolor=yellow]; + subgraph cluster_44 { + color=blue + 172 [label="Function call arguments enter"]; + 173 [label="Access variable R|/x|"]; + 174 [label="Smart cast: R|/x|"]; + 175 [label="Function call arguments exit"]; + } + 176 [label="Function call: R|/x|.R|/B.foo|()" style="filled" fillcolor=yellow]; + 177 [label="Exit block"]; + } + 178 [label="Exit function test_3" style="filled" fillcolor=red]; + } 157 -> {158}; + 158 -> {159}; + 159 -> {160}; + 160 -> {161}; + 161 -> {162 165}; + 162 -> {163}; + 163 -> {178}; + 163 -> {164} [style=dotted]; + 164 -> {166} [style=dotted]; + 165 -> {166}; + 166 -> {167}; + 167 -> {168}; + 168 -> {169}; + 169 -> {170}; + 170 -> {171}; + 171 -> {172}; + 172 -> {173}; + 173 -> {174}; + 174 -> {175}; + 175 -> {176}; + 176 -> {177}; + 177 -> {178}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot index 7cf3f2830e1..1e0edae5436 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot @@ -45,63 +45,68 @@ digraph safeCallAndEqualityToBool_kt { 12 [label="Enter when branch condition "]; 13 [label="Access variable R|/s|"]; 14 [label="Enter safe call"]; - 15 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; - 16 [label="Exit safe call"]; - 17 [label="Const: Boolean(true)"]; - 18 [label="Equality operator =="]; - 19 [label="Exit when branch condition"]; - } - subgraph cluster_7 { - color=blue - 20 [label="Enter when branch condition else"]; + subgraph cluster_7 { + color=blue + 15 [label="Function call arguments enter"]; + 16 [label="Function call arguments exit"]; + } + 17 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; + 18 [label="Exit safe call"]; + 19 [label="Const: Boolean(true)"]; + 20 [label="Equality operator =="]; 21 [label="Exit when branch condition"]; } - 22 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 23 [label="Enter block"]; - 24 [label="Access variable R|/s|"]; - 25 [label="Access variable R|kotlin/String.length#|"]; - 26 [label="Exit block"]; + 22 [label="Enter when branch condition else"]; + 23 [label="Exit when branch condition"]; } - 27 [label="Exit when branch result"]; - 28 [label="Enter when branch result"]; + 24 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 29 [label="Enter block"]; - 30 [label="Access variable R|/s|"]; - 31 [label="Smart cast: R|/s|"]; - 32 [label="Access variable R|kotlin/String.length|"]; - 33 [label="Exit block"]; + 25 [label="Enter block"]; + 26 [label="Access variable R|/s|"]; + 27 [label="Access variable R|kotlin/String.length#|"]; + 28 [label="Exit block"]; } - 34 [label="Exit when branch result"]; - 35 [label="Exit when"]; + 29 [label="Exit when branch result"]; + 30 [label="Enter when branch result"]; + subgraph cluster_10 { + color=blue + 31 [label="Enter block"]; + 32 [label="Access variable R|/s|"]; + 33 [label="Smart cast: R|/s|"]; + 34 [label="Access variable R|kotlin/String.length|"]; + 35 [label="Exit block"]; + } + 36 [label="Exit when branch result"]; + 37 [label="Exit when"]; } - 36 [label="Exit block"]; + 38 [label="Exit block"]; } - 37 [label="Exit function test_1" style="filled" fillcolor=red]; + 39 [label="Exit function test_1" style="filled" fillcolor=red]; } 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {14 16}; + 13 -> {14 18}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 28}; + 19 -> {20}; 20 -> {21}; - 21 -> {22}; + 21 -> {22 30}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {35}; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; + 29 -> {37}; 30 -> {31}; 31 -> {32}; 32 -> {33}; @@ -109,226 +114,241 @@ digraph safeCallAndEqualityToBool_kt { 34 -> {35}; 35 -> {36}; 36 -> {37}; + 37 -> {38}; + 38 -> {39}; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 38 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { + 40 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 39 [label="Enter block"]; - subgraph cluster_12 { + 41 [label="Enter block"]; + subgraph cluster_13 { color=blue - 40 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 41 [label="Enter when branch condition "]; - 42 [label="Access variable R|/s|"]; - 43 [label="Enter safe call"]; - 44 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; - 45 [label="Exit safe call"]; - 46 [label="Const: Boolean(false)"]; - 47 [label="Equality operator =="]; - 48 [label="Exit when branch condition"]; - } + 42 [label="Enter when"]; subgraph cluster_14 { color=blue - 49 [label="Enter when branch condition else"]; - 50 [label="Exit when branch condition"]; + 43 [label="Enter when branch condition "]; + 44 [label="Access variable R|/s|"]; + 45 [label="Enter safe call"]; + subgraph cluster_15 { + color=blue + 46 [label="Function call arguments enter"]; + 47 [label="Function call arguments exit"]; + } + 48 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; + 49 [label="Exit safe call"]; + 50 [label="Const: Boolean(false)"]; + 51 [label="Equality operator =="]; + 52 [label="Exit when branch condition"]; } - 51 [label="Enter when branch result"]; - subgraph cluster_15 { - color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/s|"]; - 54 [label="Access variable R|kotlin/String.length#|"]; - 55 [label="Exit block"]; - } - 56 [label="Exit when branch result"]; - 57 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 58 [label="Enter block"]; - 59 [label="Access variable R|/s|"]; - 60 [label="Smart cast: R|/s|"]; - 61 [label="Access variable R|kotlin/String.length|"]; - 62 [label="Exit block"]; + 53 [label="Enter when branch condition else"]; + 54 [label="Exit when branch condition"]; } - 63 [label="Exit when branch result"]; - 64 [label="Exit when"]; + 55 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 56 [label="Enter block"]; + 57 [label="Access variable R|/s|"]; + 58 [label="Access variable R|kotlin/String.length#|"]; + 59 [label="Exit block"]; + } + 60 [label="Exit when branch result"]; + 61 [label="Enter when branch result"]; + subgraph cluster_18 { + color=blue + 62 [label="Enter block"]; + 63 [label="Access variable R|/s|"]; + 64 [label="Smart cast: R|/s|"]; + 65 [label="Access variable R|kotlin/String.length|"]; + 66 [label="Exit block"]; + } + 67 [label="Exit when branch result"]; + 68 [label="Exit when"]; } - 65 [label="Exit block"]; + 69 [label="Exit block"]; } - 66 [label="Exit function test_2" style="filled" fillcolor=red]; + 70 [label="Exit function test_2" style="filled" fillcolor=red]; } - 38 -> {39}; - 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {43 45}; + 42 -> {43}; 43 -> {44}; - 44 -> {45}; + 44 -> {45 49}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {49 57}; + 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {53}; + 52 -> {53 61}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {64}; + 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {61}; + 60 -> {68}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - - subgraph cluster_17 { - color=red - 67 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 68 [label="Enter block"]; - subgraph cluster_19 { - color=blue - 69 [label="Enter when"]; - subgraph cluster_20 { - color=blue - 70 [label="Enter when branch condition "]; - 71 [label="Access variable R|/s|"]; - 72 [label="Enter safe call"]; - 73 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; - 74 [label="Exit safe call"]; - 75 [label="Const: Boolean(true)"]; - 76 [label="Equality operator !="]; - 77 [label="Exit when branch condition"]; - } - subgraph cluster_21 { - color=blue - 78 [label="Enter when branch condition else"]; - 79 [label="Exit when branch condition"]; - } - 80 [label="Enter when branch result"]; - subgraph cluster_22 { - color=blue - 81 [label="Enter block"]; - 82 [label="Access variable R|/s|"]; - 83 [label="Smart cast: R|/s|"]; - 84 [label="Access variable R|kotlin/String.length|"]; - 85 [label="Exit block"]; - } - 86 [label="Exit when branch result"]; - 87 [label="Enter when branch result"]; - subgraph cluster_23 { - color=blue - 88 [label="Enter block"]; - 89 [label="Access variable R|/s|"]; - 90 [label="Access variable R|kotlin/String.length#|"]; - 91 [label="Exit block"]; - } - 92 [label="Exit when branch result"]; - 93 [label="Exit when"]; - } - 94 [label="Exit block"]; - } - 95 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; - 71 -> {72 74}; + + subgraph cluster_19 { + color=red + 71 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 72 [label="Enter block"]; + subgraph cluster_21 { + color=blue + 73 [label="Enter when"]; + subgraph cluster_22 { + color=blue + 74 [label="Enter when branch condition "]; + 75 [label="Access variable R|/s|"]; + 76 [label="Enter safe call"]; + subgraph cluster_23 { + color=blue + 77 [label="Function call arguments enter"]; + 78 [label="Function call arguments exit"]; + } + 79 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; + 80 [label="Exit safe call"]; + 81 [label="Const: Boolean(true)"]; + 82 [label="Equality operator !="]; + 83 [label="Exit when branch condition"]; + } + subgraph cluster_24 { + color=blue + 84 [label="Enter when branch condition else"]; + 85 [label="Exit when branch condition"]; + } + 86 [label="Enter when branch result"]; + subgraph cluster_25 { + color=blue + 87 [label="Enter block"]; + 88 [label="Access variable R|/s|"]; + 89 [label="Smart cast: R|/s|"]; + 90 [label="Access variable R|kotlin/String.length|"]; + 91 [label="Exit block"]; + } + 92 [label="Exit when branch result"]; + 93 [label="Enter when branch result"]; + subgraph cluster_26 { + color=blue + 94 [label="Enter block"]; + 95 [label="Access variable R|/s|"]; + 96 [label="Access variable R|kotlin/String.length#|"]; + 97 [label="Exit block"]; + } + 98 [label="Exit when branch result"]; + 99 [label="Exit when"]; + } + 100 [label="Exit block"]; + } + 101 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76}; + 75 -> {76 80}; 76 -> {77}; - 77 -> {78 87}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {84}; + 83 -> {84 93}; 84 -> {85}; 85 -> {86}; - 86 -> {93}; + 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; - 92 -> {93}; + 92 -> {99}; 93 -> {94}; 94 -> {95}; - - subgraph cluster_24 { - color=red - 96 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 97 [label="Enter block"]; - subgraph cluster_26 { - color=blue - 98 [label="Enter when"]; - subgraph cluster_27 { - color=blue - 99 [label="Enter when branch condition "]; - 100 [label="Access variable R|/s|"]; - 101 [label="Enter safe call"]; - 102 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; - 103 [label="Exit safe call"]; - 104 [label="Const: Boolean(false)"]; - 105 [label="Equality operator !="]; - 106 [label="Exit when branch condition"]; - } - subgraph cluster_28 { - color=blue - 107 [label="Enter when branch condition else"]; - 108 [label="Exit when branch condition"]; - } - 109 [label="Enter when branch result"]; - subgraph cluster_29 { - color=blue - 110 [label="Enter block"]; - 111 [label="Access variable R|/s|"]; - 112 [label="Smart cast: R|/s|"]; - 113 [label="Access variable R|kotlin/String.length|"]; - 114 [label="Exit block"]; - } - 115 [label="Exit when branch result"]; - 116 [label="Enter when branch result"]; - subgraph cluster_30 { - color=blue - 117 [label="Enter block"]; - 118 [label="Access variable R|/s|"]; - 119 [label="Access variable R|kotlin/String.length#|"]; - 120 [label="Exit block"]; - } - 121 [label="Exit when branch result"]; - 122 [label="Exit when"]; - } - 123 [label="Exit block"]; - } - 124 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; - 100 -> {101 103}; - 101 -> {102}; + 100 -> {101}; + + subgraph cluster_27 { + color=red + 102 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 103 [label="Enter block"]; + subgraph cluster_29 { + color=blue + 104 [label="Enter when"]; + subgraph cluster_30 { + color=blue + 105 [label="Enter when branch condition "]; + 106 [label="Access variable R|/s|"]; + 107 [label="Enter safe call"]; + subgraph cluster_31 { + color=blue + 108 [label="Function call arguments enter"]; + 109 [label="Function call arguments exit"]; + } + 110 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; + 111 [label="Exit safe call"]; + 112 [label="Const: Boolean(false)"]; + 113 [label="Equality operator !="]; + 114 [label="Exit when branch condition"]; + } + subgraph cluster_32 { + color=blue + 115 [label="Enter when branch condition else"]; + 116 [label="Exit when branch condition"]; + } + 117 [label="Enter when branch result"]; + subgraph cluster_33 { + color=blue + 118 [label="Enter block"]; + 119 [label="Access variable R|/s|"]; + 120 [label="Smart cast: R|/s|"]; + 121 [label="Access variable R|kotlin/String.length|"]; + 122 [label="Exit block"]; + } + 123 [label="Exit when branch result"]; + 124 [label="Enter when branch result"]; + subgraph cluster_34 { + color=blue + 125 [label="Enter block"]; + 126 [label="Access variable R|/s|"]; + 127 [label="Access variable R|kotlin/String.length#|"]; + 128 [label="Exit block"]; + } + 129 [label="Exit when branch result"]; + 130 [label="Exit when"]; + } + 131 [label="Exit block"]; + } + 132 [label="Exit function test_4" style="filled" fillcolor=red]; + } 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; - 106 -> {107 116}; + 106 -> {107 111}; 107 -> {108}; 108 -> {109}; 109 -> {110}; @@ -336,8 +356,8 @@ digraph safeCallAndEqualityToBool_kt { 111 -> {112}; 112 -> {113}; 113 -> {114}; - 114 -> {115}; - 115 -> {122}; + 114 -> {115 124}; + 115 -> {116}; 116 -> {117}; 117 -> {118}; 118 -> {119}; @@ -345,6 +365,14 @@ digraph safeCallAndEqualityToBool_kt { 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124}; + 123 -> {130}; + 124 -> {125}; + 125 -> {126}; + 126 -> {127}; + 127 -> {128}; + 128 -> {129}; + 129 -> {130}; + 130 -> {131}; + 131 -> {132}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot index 35f2c1faff0..95489615aa3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot @@ -53,22 +53,27 @@ digraph safeCalls_kt { 14 [label="Enter block"]; 15 [label="Access variable R|/x|"]; 16 [label="Enter safe call"]; - 17 [label="Access variable R|/x|"]; - 18 [label="Smart cast: R|/x|"]; - 19 [label="Access variable R|kotlin/String.length|"]; - 20 [label="Const: Int(1)"]; - 21 [label="Equality operator =="]; - 22 [label="Function call: $subj$.R|/foo|(...)" style="filled" fillcolor=yellow]; - 23 [label="Exit safe call"]; - 24 [label="Access variable R|/x|"]; - 25 [label="Access variable R|kotlin/String.length#|"]; - 26 [label="Exit block"]; + subgraph cluster_7 { + color=blue + 17 [label="Function call arguments enter"]; + 18 [label="Access variable R|/x|"]; + 19 [label="Smart cast: R|/x|"]; + 20 [label="Access variable R|kotlin/String.length|"]; + 21 [label="Const: Int(1)"]; + 22 [label="Equality operator =="]; + 23 [label="Function call arguments exit"]; + } + 24 [label="Function call: $subj$.R|/foo|(...)" style="filled" fillcolor=yellow]; + 25 [label="Exit safe call"]; + 26 [label="Access variable R|/x|"]; + 27 [label="Access variable R|kotlin/String.length#|"]; + 28 [label="Exit block"]; } - 27 [label="Exit function test" style="filled" fillcolor=red]; + 29 [label="Exit function test" style="filled" fillcolor=red]; } 13 -> {14}; 14 -> {15}; - 15 -> {16 23}; + 15 -> {16 25}; 16 -> {17}; 17 -> {18}; 18 -> {19}; @@ -80,246 +85,346 @@ digraph safeCalls_kt { 24 -> {25}; 25 -> {26}; 26 -> {27}; - - subgraph cluster_7 { - color=red - 28 [label="Enter class A" style="filled" fillcolor=red]; - 29 [label="Exit class A" style="filled" fillcolor=red]; - } - 28 -> {29} [color=green]; + 27 -> {28}; + 28 -> {29}; subgraph cluster_8 { color=red - 30 [label="Enter function bar" style="filled" fillcolor=red]; - 31 [label="Exit function bar" style="filled" fillcolor=red]; + 30 [label="Enter class A" style="filled" fillcolor=red]; + 31 [label="Exit class A" style="filled" fillcolor=red]; } - 30 -> {31}; + 30 -> {31} [color=green]; subgraph cluster_9 { color=red - 32 [label="Enter function bool" style="filled" fillcolor=red]; - 33 [label="Exit function bool" style="filled" fillcolor=red]; + 32 [label="Enter function bar" style="filled" fillcolor=red]; + 33 [label="Exit function bar" style="filled" fillcolor=red]; } 32 -> {33}; subgraph cluster_10 { color=red - 34 [label="Enter function id" style="filled" fillcolor=red]; - 35 [label="Exit function id" style="filled" fillcolor=red]; + 34 [label="Enter function bool" style="filled" fillcolor=red]; + 35 [label="Exit function bool" style="filled" fillcolor=red]; } 34 -> {35}; subgraph cluster_11 { color=red - 36 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 37 [label="Enter block"]; - 38 [label="Access variable R|/x|"]; - 39 [label="Type operator: (R|/x| as? R|A|)"]; - 40 [label="Enter safe call"]; - 41 [label="Access variable R|/x|"]; - 42 [label="Smart cast: R|/x|"]; - 43 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; - 44 [label="Exit safe call"]; - 45 [label="Exit block"]; - } - 46 [label="Exit function test_2" style="filled" fillcolor=red]; + 36 [label="Enter function id" style="filled" fillcolor=red]; + 37 [label="Exit function id" style="filled" fillcolor=red]; } 36 -> {37}; - 37 -> {38}; + + subgraph cluster_12 { + color=red + 38 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 39 [label="Enter block"]; + 40 [label="Access variable R|/x|"]; + 41 [label="Type operator: (R|/x| as? R|A|)"]; + 42 [label="Enter safe call"]; + subgraph cluster_14 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Access variable R|/x|"]; + 45 [label="Smart cast: R|/x|"]; + 46 [label="Function call arguments exit"]; + } + 47 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; + 48 [label="Exit safe call"]; + 49 [label="Exit block"]; + } + 50 [label="Exit function test_2" style="filled" fillcolor=red]; + } 38 -> {39}; - 39 -> {40 44}; + 39 -> {40}; 40 -> {41}; - 41 -> {42}; + 41 -> {42 48}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - - subgraph cluster_13 { - color=red - 47 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 48 [label="Enter block"]; - 49 [label="Access variable R|/x|"]; - 50 [label="Type operator: (R|/x| as? R|A|)"]; - 51 [label="Enter safe call"]; - 52 [label="Access variable R|/x|"]; - 53 [label="Smart cast: R|/x|"]; - 54 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; - 55 [label="Enter safe call"]; - 56 [label="Access variable R|/x|"]; - 57 [label="Smart cast: R|/x|"]; - 58 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; - 59 [label="Function call: $subj$.R|/foo|(...)" style="filled" fillcolor=yellow]; - 60 [label="Enter safe call"]; - 61 [label="Postponed enter to lambda"]; - subgraph cluster_15 { - color=blue - 62 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 63 [label="Enter block"]; - 64 [label="Access variable R|/x|"]; - 65 [label="Smart cast: R|/x|"]; - 66 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; - 67 [label="Exit block"]; - } - 68 [label="Exit function " style="filled" fillcolor=red]; - } - 69 [label="Postponed exit from lambda"]; - 70 [label="Function call: $subj$.R|/let|(...)" style="filled" fillcolor=yellow]; - 71 [label="Exit safe call"]; - 72 [label="Exit safe call"]; - 73 [label="Exit safe call"]; - 74 [label="Access variable R|/x|"]; - 75 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 76 [label="Exit block"]; - } - 77 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {51 71}; + + subgraph cluster_15 { + color=red + 51 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 52 [label="Enter block"]; + 53 [label="Access variable R|/x|"]; + 54 [label="Type operator: (R|/x| as? R|A|)"]; + 55 [label="Enter safe call"]; + subgraph cluster_17 { + color=blue + 56 [label="Function call arguments enter"]; + 57 [label="Access variable R|/x|"]; + 58 [label="Smart cast: R|/x|"]; + 59 [label="Function call arguments exit"]; + } + 60 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; + 61 [label="Enter safe call"]; + subgraph cluster_18 { + color=blue + 62 [label="Function call arguments enter"]; + subgraph cluster_19 { + color=blue + 63 [label="Function call arguments enter"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Smart cast: R|/x|"]; + 66 [label="Function call arguments exit"]; + } + 67 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; + 68 [label="Function call arguments exit"]; + } + 69 [label="Function call: $subj$.R|/foo|(...)" style="filled" fillcolor=yellow]; + 70 [label="Enter safe call"]; + subgraph cluster_20 { + color=blue + 71 [label="Function call arguments enter"]; + 72 [label="Postponed enter to lambda"]; + subgraph cluster_21 { + color=blue + 73 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 74 [label="Enter block"]; + subgraph cluster_23 { + color=blue + 75 [label="Function call arguments enter"]; + 76 [label="Access variable R|/x|"]; + 77 [label="Smart cast: R|/x|"]; + 78 [label="Function call arguments exit"]; + } + 79 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; + 80 [label="Exit block"]; + } + 81 [label="Exit function " style="filled" fillcolor=red]; + } + 82 [label="Function call arguments exit"]; + } + 83 [label="Postponed exit from lambda"]; + 84 [label="Function call: $subj$.R|/let|(...)" style="filled" fillcolor=yellow]; + 85 [label="Exit safe call"]; + 86 [label="Exit safe call"]; + 87 [label="Exit safe call"]; + subgraph cluster_24 { + color=blue + 88 [label="Function call arguments enter"]; + 89 [label="Access variable R|/x|"]; + 90 [label="Function call arguments exit"]; + } + 91 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 92 [label="Exit block"]; + } + 93 [label="Exit function test_3" style="filled" fillcolor=red]; + } 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {55 71}; + 54 -> {55 85}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; - 59 -> {60 72}; - 60 -> {61}; - 61 -> {62 69 70}; - 61 -> {62} [style=dashed]; + 59 -> {60}; + 60 -> {61 85}; + 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - 69 -> {70}; - 70 -> {73}; + 68 -> {69}; + 69 -> {70 86}; + 70 -> {71}; 71 -> {72}; - 72 -> {73}; + 72 -> {73 82 83}; + 72 -> {73} [style=dashed]; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; - - subgraph cluster_17 { - color=red - 78 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 79 [label="Enter block"]; - 80 [label="Access variable R|/x|"]; - 81 [label="Enter safe call"]; - 82 [label="Function call: $subj$.R|/A.id|()" style="filled" fillcolor=yellow]; - 83 [label="Enter safe call"]; - 84 [label="Function call: $subj$.R|/A.bool|()" style="filled" fillcolor=yellow]; - 85 [label="Exit safe call"]; - 86 [label="Exit safe call"]; - 87 [label="Access variable R|/x|"]; - 88 [label="Function call: R|/x|.R|/A.id#|()" style="filled" fillcolor=yellow]; - 89 [label="Exit block"]; - } - 90 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {81 85}; - 81 -> {82}; - 82 -> {83 85}; + 80 -> {81}; + 82 -> {84}; 83 -> {84}; - 84 -> {86}; + 84 -> {87}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; - - subgraph cluster_19 { - color=red - 91 [label="Enter function boo" style="filled" fillcolor=red]; - subgraph cluster_20 { - color=blue - 92 [label="Enter block"]; - 93 [label="Exit block"]; - } - 94 [label="Exit function boo" style="filled" fillcolor=red]; - } + 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {94}; - subgraph cluster_21 { + subgraph cluster_25 { color=red - 95 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_22 { + 94 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_26 { color=blue - 96 [label="Enter block"]; - 97 [label="Access variable R|/x|"]; - 98 [label="Enter safe call"]; - 99 [label="Postponed enter to lambda"]; - subgraph cluster_23 { + 95 [label="Enter block"]; + 96 [label="Access variable R|/x|"]; + 97 [label="Enter safe call"]; + subgraph cluster_27 { color=blue - 100 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 101 [label="Enter block"]; - 102 [label="Jump: ^test_5 Unit"]; - 103 [label="Stub" style="filled" fillcolor=gray]; - 104 [label="Exit block" style="filled" fillcolor=gray]; - } - 105 [label="Exit function " style="filled" fillcolor=gray]; + 98 [label="Function call arguments enter"]; + 99 [label="Function call arguments exit"]; } - 106 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 107 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=gray]; - 108 [label="Stub" style="filled" fillcolor=gray]; - 109 [label="Enter safe call" style="filled" fillcolor=gray]; - 110 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 111 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; - 112 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=gray]; - 113 [label="Function call: $subj$.R|/boo|(...)" style="filled" fillcolor=gray]; - 114 [label="Exit safe call"]; - 115 [label="Exit safe call"]; - 116 [label="Access variable R|/x|"]; - 117 [label="Function call: R|/x|.R|/A.id#|()" style="filled" fillcolor=yellow]; - 118 [label="Exit block"]; + 100 [label="Function call: $subj$.R|/A.id|()" style="filled" fillcolor=yellow]; + 101 [label="Enter safe call"]; + subgraph cluster_28 { + color=blue + 102 [label="Function call arguments enter"]; + 103 [label="Function call arguments exit"]; + } + 104 [label="Function call: $subj$.R|/A.bool|()" style="filled" fillcolor=yellow]; + 105 [label="Exit safe call"]; + 106 [label="Exit safe call"]; + subgraph cluster_29 { + color=blue + 107 [label="Function call arguments enter"]; + 108 [label="Access variable R|/x|"]; + 109 [label="Function call arguments exit"]; + } + 110 [label="Function call: R|/x|.R|/A.id#|()" style="filled" fillcolor=yellow]; + 111 [label="Exit block"]; } - 119 [label="Exit function test_5" style="filled" fillcolor=red]; + 112 [label="Exit function test_4" style="filled" fillcolor=red]; } + 94 -> {95}; 95 -> {96}; - 96 -> {97}; - 97 -> {98 114}; + 96 -> {97 105}; + 97 -> {98}; 98 -> {99}; 99 -> {100}; - 99 -> {106 107} [style=dotted]; - 99 -> {100} [style=dashed]; - 100 -> {101}; + 100 -> {101 105}; 101 -> {102}; - 102 -> {119}; - 102 -> {103} [style=dotted]; - 103 -> {104} [style=dotted]; - 104 -> {105} [style=dotted]; - 105 -> {106} [style=dotted]; - 106 -> {107} [style=dotted]; - 107 -> {108} [style=dotted]; - 108 -> {109 114} [style=dotted]; - 109 -> {110} [style=dotted]; - 110 -> {111} [style=dotted]; - 111 -> {112} [style=dotted]; - 112 -> {113} [style=dotted]; - 113 -> {115} [style=dotted]; + 102 -> {103}; + 103 -> {104}; + 104 -> {106}; + 105 -> {106}; + 106 -> {107}; + 107 -> {108}; + 108 -> {109}; + 109 -> {110}; + 110 -> {111}; + 111 -> {112}; + + subgraph cluster_30 { + color=red + 113 [label="Enter function boo" style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 114 [label="Enter block"]; + 115 [label="Exit block"]; + } + 116 [label="Exit function boo" style="filled" fillcolor=red]; + } + 113 -> {114}; 114 -> {115}; 115 -> {116}; - 116 -> {117}; + + subgraph cluster_32 { + color=red + 117 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_33 { + color=blue + 118 [label="Enter block"]; + 119 [label="Access variable R|/x|"]; + 120 [label="Enter safe call"]; + subgraph cluster_34 { + color=blue + 121 [label="Function call arguments enter"]; + 122 [label="Postponed enter to lambda"]; + subgraph cluster_35 { + color=blue + 123 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_36 { + color=blue + 124 [label="Enter block"]; + 125 [label="Jump: ^test_5 Unit"]; + 126 [label="Stub" style="filled" fillcolor=gray]; + 127 [label="Exit block" style="filled" fillcolor=gray]; + } + 128 [label="Exit function " style="filled" fillcolor=gray]; + } + 129 [label="Function call arguments exit"]; + } + 130 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 131 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=gray]; + 132 [label="Stub" style="filled" fillcolor=gray]; + 133 [label="Enter safe call" style="filled" fillcolor=gray]; + subgraph cluster_37 { + color=blue + 134 [label="Function call arguments enter" style="filled" fillcolor=gray]; + subgraph cluster_38 { + color=blue + 135 [label="Function call arguments enter" style="filled" fillcolor=gray]; + 136 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 137 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; + 138 [label="Function call arguments exit" style="filled" fillcolor=gray]; + } + 139 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=gray]; + 140 [label="Function call arguments exit" style="filled" fillcolor=gray]; + } + 141 [label="Function call: $subj$.R|/boo|(...)" style="filled" fillcolor=gray]; + 142 [label="Exit safe call"]; + 143 [label="Exit safe call"]; + subgraph cluster_39 { + color=blue + 144 [label="Function call arguments enter"]; + 145 [label="Access variable R|/x|"]; + 146 [label="Function call arguments exit"]; + } + 147 [label="Function call: R|/x|.R|/A.id#|()" style="filled" fillcolor=yellow]; + 148 [label="Exit block"]; + } + 149 [label="Exit function test_5" style="filled" fillcolor=red]; + } 117 -> {118}; 118 -> {119}; + 119 -> {120 142}; + 120 -> {121}; + 121 -> {122}; + 122 -> {123 129}; + 122 -> {130} [style=dotted]; + 122 -> {123} [style=dashed]; + 123 -> {124}; + 124 -> {125}; + 125 -> {149}; + 125 -> {126} [style=dotted]; + 126 -> {127} [style=dotted]; + 127 -> {128} [style=dotted]; + 128 -> {130} [style=dotted]; + 129 -> {131} [style=dotted]; + 130 -> {131} [style=dotted]; + 131 -> {132} [style=dotted]; + 132 -> {133 142} [style=dotted]; + 133 -> {134} [style=dotted]; + 134 -> {135} [style=dotted]; + 135 -> {136} [style=dotted]; + 136 -> {137} [style=dotted]; + 137 -> {138} [style=dotted]; + 138 -> {139} [style=dotted]; + 139 -> {140} [style=dotted]; + 140 -> {141} [style=dotted]; + 141 -> {143} [style=dotted]; + 142 -> {143}; + 143 -> {144}; + 144 -> {145}; + 145 -> {146}; + 146 -> {147}; + 147 -> {148}; + 148 -> {149}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot index e31ab22826a..6b635b264d5 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot @@ -37,62 +37,83 @@ digraph smartCastInInit_kt { subgraph cluster_5 { color=blue 9 [label="Enter block"]; - 10 [label="Function call: R|kotlin/TODO|()" style="filled" fillcolor=yellow]; - 11 [label="Stub" style="filled" fillcolor=gray]; - 12 [label="Jump: ^s R|kotlin/TODO|()" style="filled" fillcolor=gray]; + subgraph cluster_6 { + color=blue + 10 [label="Function call arguments enter"]; + 11 [label="Function call arguments exit"]; + } + 12 [label="Function call: R|kotlin/TODO|()" style="filled" fillcolor=yellow]; 13 [label="Stub" style="filled" fillcolor=gray]; - 14 [label="Exit block" style="filled" fillcolor=gray]; + 14 [label="Jump: ^s R|kotlin/TODO|()" style="filled" fillcolor=gray]; + 15 [label="Stub" style="filled" fillcolor=gray]; + 16 [label="Exit block" style="filled" fillcolor=gray]; } - 15 [label="Exit function s" style="filled" fillcolor=gray]; + 17 [label="Exit function s" style="filled" fillcolor=gray]; } 8 -> {9}; 9 -> {10}; - 10 -> {11} [style=dotted]; - 11 -> {12} [style=dotted]; - 12 -> {13 15} [style=dotted]; + 10 -> {11}; + 11 -> {12}; + 12 -> {13} [style=dotted]; 13 -> {14} [style=dotted]; - 14 -> {15} [style=dotted]; + 14 -> {15 17} [style=dotted]; + 15 -> {16} [style=dotted]; + 16 -> {17} [style=dotted]; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 16 [label="Enter class Main" style="filled" fillcolor=red]; - subgraph cluster_7 { + 18 [label="Enter class Main" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 17 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_8 { + 19 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 18 [label="Enter block"]; - 19 [label="Function call: R|/s|()" style="filled" fillcolor=yellow]; - 20 [label="Assignment: R|/Main.x|"]; - 21 [label="Access variable R|/Main.x|"]; - 22 [label="Smart cast: this@R|/Main|.R|/Main.x|"]; - 23 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()" style="filled" fillcolor=yellow]; - 24 [label="Exit block"]; + 20 [label="Enter block"]; + subgraph cluster_10 { + color=blue + 21 [label="Function call arguments enter"]; + 22 [label="Function call arguments exit"]; + } + 23 [label="Function call: R|/s|()" style="filled" fillcolor=yellow]; + 24 [label="Assignment: R|/Main.x|"]; + subgraph cluster_11 { + color=blue + 25 [label="Function call arguments enter"]; + 26 [label="Access variable R|/Main.x|"]; + 27 [label="Smart cast: this@R|/Main|.R|/Main.x|"]; + 28 [label="Function call arguments exit"]; + } + 29 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; } - 25 [label="Exit init block" style="filled" fillcolor=red]; + 31 [label="Exit init block" style="filled" fillcolor=red]; } - subgraph cluster_9 { + subgraph cluster_12 { color=blue - 26 [label="Enter function " style="filled" fillcolor=red]; - 27 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 28 [label="Exit function " style="filled" fillcolor=red]; + 32 [label="Enter function " style="filled" fillcolor=red]; + 33 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 34 [label="Exit function " style="filled" fillcolor=red]; } - 29 [label="Exit class Main" style="filled" fillcolor=red]; + 35 [label="Exit class Main" style="filled" fillcolor=red]; } - 16 -> {17} [color=green]; - 16 -> {29} [style=dotted]; - 16 -> {17 26} [style=dashed]; - 17 -> {18}; - 18 -> {19}; + 18 -> {19} [color=green]; + 18 -> {35} [style=dotted]; + 18 -> {19 32} [style=dashed]; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {26} [color=green]; + 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29} [color=green]; + 28 -> {29}; + 29 -> {30}; + 30 -> {31}; + 31 -> {32} [color=green]; + 32 -> {33}; + 33 -> {34}; + 34 -> {35} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot index 86ccdd5fb53..fe85c7418a0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot @@ -98,41 +98,51 @@ digraph smartcastInByClause_kt { 34 [label="Lhs of ?: is not null"]; 35 [label="Exit ?:"]; 36 [label="Variable declaration: lval path: R|kotlin/String|"]; - 37 [label="Access variable R|/a|"]; - 38 [label="Smart cast: R|/a|"]; - 39 [label="Access variable R|/A.index|"]; - 40 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow]; - 41 [label="Enter anonymous object"]; subgraph cluster_11 { color=blue - 42 [label="Enter class " style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 43 [label="Enter field" style="filled" fillcolor=red]; - 44 [label="Access variable R|/a|"]; - 45 [label="Smart cast: R|/a|"]; - 46 [label="Access variable R|/A.index|"]; - 47 [label="Function call: R|/Derived.Derived|(...)" style="filled" fillcolor=yellow]; - 48 [label="Exit field" style="filled" fillcolor=red]; - } + 37 [label="Function call arguments enter"]; + 38 [label="Access variable R|/a|"]; + 39 [label="Smart cast: R|/a|"]; + 40 [label="Access variable R|/A.index|"]; + 41 [label="Function call arguments exit"]; + } + 42 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow]; + 43 [label="Enter anonymous object"]; + subgraph cluster_12 { + color=blue + 44 [label="Enter class " style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 49 [label="Enter property" style="filled" fillcolor=red]; - 50 [label="Access variable R|/a|"]; - 51 [label="Smart cast: R|/a|"]; - 52 [label="Access variable R|/A.index|"]; - 53 [label="Exit property" style="filled" fillcolor=red]; + 45 [label="Enter field" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 46 [label="Function call arguments enter"]; + 47 [label="Access variable R|/a|"]; + 48 [label="Smart cast: R|/a|"]; + 49 [label="Access variable R|/A.index|"]; + 50 [label="Function call arguments exit"]; + } + 51 [label="Function call: R|/Derived.Derived|(...)" style="filled" fillcolor=yellow]; + 52 [label="Exit field" style="filled" fillcolor=red]; } - subgraph cluster_14 { + subgraph cluster_15 { color=blue - 54 [label="Enter function " style="filled" fillcolor=red]; - 55 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 56 [label="Exit function " style="filled" fillcolor=red]; + 53 [label="Enter property" style="filled" fillcolor=red]; + 54 [label="Access variable R|/a|"]; + 55 [label="Smart cast: R|/a|"]; + 56 [label="Access variable R|/A.index|"]; + 57 [label="Exit property" style="filled" fillcolor=red]; } - 57 [label="Exit class " style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 58 [label="Enter function " style="filled" fillcolor=red]; + 59 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 60 [label="Exit function " style="filled" fillcolor=red]; + } + 61 [label="Exit class " style="filled" fillcolor=red]; } - 58 [label="Exit anonymous object expression"]; - 59 [label="Jump: ^test object : R|Base| { + 62 [label="Exit anonymous object expression"]; + 63 [label="Jump: ^test object : R|Base| { private constructor(): R|| { super() } @@ -148,24 +158,29 @@ digraph smartcastInByClause_kt { } "]; - 60 [label="Stub" style="filled" fillcolor=gray]; - 61 [label="Exit block" style="filled" fillcolor=gray]; + 64 [label="Stub" style="filled" fillcolor=gray]; + 65 [label="Exit block" style="filled" fillcolor=gray]; } - 62 [label="Exit function test" style="filled" fillcolor=red]; + 66 [label="Exit function test" style="filled" fillcolor=red]; } - subgraph cluster_15 { + subgraph cluster_17 { color=blue - 63 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_16 { + 67 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_18 { color=blue - 64 [label="Enter block"]; - 65 [label="Access variable R|/a|"]; - 66 [label="Smart cast: R|/a|"]; - 67 [label="Access variable R|/A.index|"]; - 68 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow]; - 69 [label="Exit block"]; + 68 [label="Enter block"]; + subgraph cluster_19 { + color=blue + 69 [label="Function call arguments enter"]; + 70 [label="Access variable R|/a|"]; + 71 [label="Smart cast: R|/a|"]; + 72 [label="Access variable R|/A.index|"]; + 73 [label="Function call arguments exit"]; + } + 74 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow]; + 75 [label="Exit block"]; } - 70 [label="Exit function foo" style="filled" fillcolor=red]; + 76 [label="Exit function foo" style="filled" fillcolor=red]; } 23 -> {24}; 24 -> {25}; @@ -176,7 +191,7 @@ digraph smartcastInByClause_kt { 29 -> {30 34}; 30 -> {31}; 31 -> {32}; - 32 -> {62}; + 32 -> {66}; 32 -> {33} [style=dotted]; 33 -> {35} [style=dotted]; 34 -> {35}; @@ -187,56 +202,62 @@ digraph smartcastInByClause_kt { 39 -> {40}; 40 -> {41}; 41 -> {42}; - 41 -> {58} [style=dotted]; - 41 -> {42} [style=dashed]; 42 -> {43}; - 42 -> {49 54 63} [color=red]; - 42 -> {57} [style=dotted]; - 42 -> {43 49 54} [style=dashed]; 43 -> {44}; + 43 -> {62} [style=dotted]; + 43 -> {44} [style=dashed]; 44 -> {45}; + 44 -> {53 58 67} [color=red]; + 44 -> {61} [style=dotted]; + 44 -> {45 53 58} [style=dashed]; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {49} [color=green]; - 48 -> {57} [color=red]; + 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {53}; - 53 -> {54} [color=green]; - 53 -> {57} [color=red]; + 52 -> {53} [color=green]; + 52 -> {61} [color=red]; + 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58}; - 57 -> {63} [color=green]; - 57 -> {63} [style=dashed]; + 57 -> {58} [color=green]; + 57 -> {61} [color=red]; 58 -> {59}; - 59 -> {62}; - 59 -> {60} [style=dotted]; - 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; - 63 -> {64}; - 64 -> {65}; - 65 -> {66}; - 66 -> {67}; + 59 -> {60}; + 60 -> {61}; + 61 -> {62}; + 61 -> {67} [color=green]; + 61 -> {67} [style=dashed]; + 62 -> {63}; + 63 -> {66}; + 63 -> {64} [style=dotted]; + 64 -> {65} [style=dotted]; + 65 -> {66} [style=dotted]; 67 -> {68}; 68 -> {69}; 69 -> {70}; - - subgraph cluster_17 { - color=red - 71 [label="Enter function takeInt" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 72 [label="Enter block"]; - 73 [label="Exit block"]; - } - 74 [label="Exit function takeInt" style="filled" fillcolor=red]; - } + 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; + 74 -> {75}; + 75 -> {76}; + + subgraph cluster_20 { + color=red + 77 [label="Enter function takeInt" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 78 [label="Enter block"]; + 79 [label="Exit block"]; + } + 80 [label="Exit function takeInt" style="filled" fillcolor=red]; + } + 77 -> {78}; + 78 -> {79}; + 79 -> {80}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot index 39616642fd3..599d2ae0226 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot @@ -16,244 +16,269 @@ digraph smartcastToNothing_kt { subgraph cluster_2 { color=blue 3 [label="Enter block"]; - 4 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 5 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 6 [label="Stub" style="filled" fillcolor=gray]; - 7 [label="Jump: ^getNothing throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + subgraph cluster_3 { + color=blue + 4 [label="Function call arguments enter"]; + 5 [label="Function call arguments exit"]; + } + 6 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 7 [label="Throw: throw R|java/lang/Exception.Exception|()"]; 8 [label="Stub" style="filled" fillcolor=gray]; - 9 [label="Exit block" style="filled" fillcolor=gray]; + 9 [label="Jump: ^getNothing throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + 10 [label="Stub" style="filled" fillcolor=gray]; + 11 [label="Exit block" style="filled" fillcolor=gray]; } - 10 [label="Exit function getNothing" style="filled" fillcolor=gray]; + 12 [label="Exit function getNothing" style="filled" fillcolor=gray]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; - 5 -> {6} [style=dotted]; - 6 -> {7} [style=dotted]; - 7 -> {8 10} [style=dotted]; + 5 -> {6}; + 6 -> {7}; + 7 -> {8} [style=dotted]; 8 -> {9} [style=dotted]; - 9 -> {10} [style=dotted]; + 9 -> {10 12} [style=dotted]; + 10 -> {11} [style=dotted]; + 11 -> {12} [style=dotted]; - subgraph cluster_3 { + subgraph cluster_4 { color=red - 11 [label="Enter function getNullableNothing" style="filled" fillcolor=red]; - subgraph cluster_4 { + 13 [label="Enter function getNullableNothing" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 12 [label="Enter block"]; - 13 [label="Const: Null(null)"]; - 14 [label="Jump: ^getNullableNothing Null(null)"]; - 15 [label="Stub" style="filled" fillcolor=gray]; - 16 [label="Exit block" style="filled" fillcolor=gray]; + 14 [label="Enter block"]; + 15 [label="Const: Null(null)"]; + 16 [label="Jump: ^getNullableNothing Null(null)"]; + 17 [label="Stub" style="filled" fillcolor=gray]; + 18 [label="Exit block" style="filled" fillcolor=gray]; } - 17 [label="Exit function getNullableNothing" style="filled" fillcolor=red]; + 19 [label="Exit function getNullableNothing" style="filled" fillcolor=red]; } - 11 -> {12}; - 12 -> {13}; 13 -> {14}; - 14 -> {17}; - 14 -> {15} [style=dotted]; - 15 -> {16} [style=dotted]; + 14 -> {15}; + 15 -> {16}; + 16 -> {19}; 16 -> {17} [style=dotted]; + 17 -> {18} [style=dotted]; + 18 -> {19} [style=dotted]; - subgraph cluster_5 { + subgraph cluster_6 { color=red - 18 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_6 { + 20 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 19 [label="Enter block"]; - 20 [label="Const: Int(1)"]; - 21 [label="Jump: ^ Int(1)"]; - 22 [label="Stub" style="filled" fillcolor=gray]; - 23 [label="Exit block" style="filled" fillcolor=gray]; + 21 [label="Enter block"]; + 22 [label="Const: Int(1)"]; + 23 [label="Jump: ^ Int(1)"]; + 24 [label="Stub" style="filled" fillcolor=gray]; + 25 [label="Exit block" style="filled" fillcolor=gray]; } - 24 [label="Exit function " style="filled" fillcolor=red]; + 26 [label="Exit function " style="filled" fillcolor=red]; } - 18 -> {19}; - 19 -> {20}; 20 -> {21}; - 21 -> {24}; - 21 -> {22} [style=dotted]; - 22 -> {23} [style=dotted]; + 21 -> {22}; + 22 -> {23}; + 23 -> {26}; 23 -> {24} [style=dotted]; + 24 -> {25} [style=dotted]; + 25 -> {26} [style=dotted]; - subgraph cluster_7 { + subgraph cluster_8 { color=red - 25 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_8 { + 27 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 26 [label="Enter block"]; - 27 [label="Const: Int(2)"]; - 28 [label="Jump: ^ Int(2)"]; - 29 [label="Stub" style="filled" fillcolor=gray]; - 30 [label="Exit block" style="filled" fillcolor=gray]; + 28 [label="Enter block"]; + 29 [label="Const: Int(2)"]; + 30 [label="Jump: ^ Int(2)"]; + 31 [label="Stub" style="filled" fillcolor=gray]; + 32 [label="Exit block" style="filled" fillcolor=gray]; } - 31 [label="Exit function " style="filled" fillcolor=red]; + 33 [label="Exit function " style="filled" fillcolor=red]; } - 25 -> {26}; - 26 -> {27}; 27 -> {28}; - 28 -> {31}; - 28 -> {29} [style=dotted]; - 29 -> {30} [style=dotted]; + 28 -> {29}; + 29 -> {30}; + 30 -> {33}; 30 -> {31} [style=dotted]; + 31 -> {32} [style=dotted]; + 32 -> {33} [style=dotted]; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 32 [label="Enter function myListOf" style="filled" fillcolor=red]; - subgraph cluster_10 { + 34 [label="Enter function myListOf" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 33 [label="Enter block"]; - 34 [label="Const: Null(null)"]; - 35 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 36 [label="Stub" style="filled" fillcolor=gray]; - 37 [label="Jump: ^myListOf Null(null)!!" style="filled" fillcolor=gray]; + 35 [label="Enter block"]; + 36 [label="Const: Null(null)"]; + 37 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; 38 [label="Stub" style="filled" fillcolor=gray]; - 39 [label="Exit block" style="filled" fillcolor=gray]; + 39 [label="Jump: ^myListOf Null(null)!!" style="filled" fillcolor=gray]; + 40 [label="Stub" style="filled" fillcolor=gray]; + 41 [label="Exit block" style="filled" fillcolor=gray]; } - 40 [label="Exit function myListOf" style="filled" fillcolor=gray]; + 42 [label="Exit function myListOf" style="filled" fillcolor=gray]; } - 32 -> {33}; - 33 -> {34}; 34 -> {35}; - 35 -> {36} [style=dotted]; - 36 -> {37} [style=dotted]; - 37 -> {38 40} [style=dotted]; + 35 -> {36}; + 36 -> {37}; + 37 -> {38} [style=dotted]; 38 -> {39} [style=dotted]; - 39 -> {40} [style=dotted]; + 39 -> {40 42} [style=dotted]; + 40 -> {41} [style=dotted]; + 41 -> {42} [style=dotted]; - subgraph cluster_11 { + subgraph cluster_12 { color=red - 41 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 42 [label="Enter property" style="filled" fillcolor=red]; - 43 [label="Const: Int(1)"]; - 44 [label="Exit property" style="filled" fillcolor=red]; - } + 43 [label="Enter class A" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 45 [label="Enter property" style="filled" fillcolor=red]; - 46 [label="Const: Boolean(true)"]; - 47 [label="Exit property" style="filled" fillcolor=red]; + 44 [label="Enter property" style="filled" fillcolor=red]; + 45 [label="Const: Int(1)"]; + 46 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_14 { color=blue - 48 [label="Enter function " style="filled" fillcolor=red]; - 49 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 50 [label="Exit function " style="filled" fillcolor=red]; + 47 [label="Enter property" style="filled" fillcolor=red]; + 48 [label="Const: Boolean(true)"]; + 49 [label="Exit property" style="filled" fillcolor=red]; } - 51 [label="Exit class A" style="filled" fillcolor=red]; - } - 41 -> {42} [color=green]; - 41 -> {51} [style=dotted]; - 41 -> {42 45 48} [style=dashed]; - 42 -> {43}; - 43 -> {44}; - 44 -> {45} [color=green]; - 45 -> {46}; - 46 -> {47}; - 47 -> {48} [color=green]; - 48 -> {49}; - 49 -> {50}; - 50 -> {51} [color=green]; - - subgraph cluster_15 { - color=red - 52 [label="Enter function test_0" style="filled" fillcolor=red]; - subgraph cluster_16 { + subgraph cluster_15 { color=blue - 53 [label="Enter block"]; - 54 [label="Const: Null(null)"]; - 55 [label="Variable declaration: lvar s: R|A?|"]; - subgraph cluster_17 { - color=blue - 56 [label="Enter block"]; - 57 [label="Access variable R|/results|"]; - 58 [label="Function call: R|/results|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; - 59 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; - subgraph cluster_18 { - color=blue - 60 [label="Enter while loop"]; - subgraph cluster_19 { - color=blue - 61 [label="Enter loop condition"]; - 62 [label="Access variable R|/|"]; - 63 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 64 [label="Exit loop condition"]; - } - subgraph cluster_20 { - color=blue - 65 [label="Enter loop block"]; - subgraph cluster_21 { - color=blue - 66 [label="Enter block"]; - 67 [label="Access variable R|/|"]; - 68 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 69 [label="Stub" style="filled" fillcolor=gray]; - 70 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray]; - subgraph cluster_22 { - color=blue - 71 [label="Enter block" style="filled" fillcolor=gray]; - 72 [label="Access variable R|/result|" style="filled" fillcolor=gray]; - 73 [label="Stub" style="filled" fillcolor=gray]; - 74 [label="Assignment: R|/s|" style="filled" fillcolor=gray]; - subgraph cluster_23 { - color=blue - 75 [label="Enter when" style="filled" fillcolor=gray]; - subgraph cluster_24 { - color=blue - 76 [label="Enter when branch condition " style="filled" fillcolor=gray]; - 77 [label="Access variable R|/result|" style="filled" fillcolor=gray]; - 78 [label="Stub" style="filled" fillcolor=gray]; - 79 [label="Access variable #" style="filled" fillcolor=gray]; - 80 [label="Exit when branch condition" style="filled" fillcolor=gray]; - } - 81 [label="Synthetic else branch" style="filled" fillcolor=gray]; - 82 [label="Enter when branch result" style="filled" fillcolor=gray]; - subgraph cluster_25 { - color=blue - 83 [label="Enter block" style="filled" fillcolor=gray]; - 84 [label="Jump: break@@@[R|/|.R|SubstitutionOverride|()] " style="filled" fillcolor=gray]; - 85 [label="Stub" style="filled" fillcolor=gray]; - 86 [label="Exit block" style="filled" fillcolor=gray]; - } - 87 [label="Exit when branch result" style="filled" fillcolor=gray]; - 88 [label="Exit when" style="filled" fillcolor=gray]; - } - 89 [label="Exit block" style="filled" fillcolor=gray]; - } - 90 [label="Exit block" style="filled" fillcolor=gray]; - } - 91 [label="Exit loop block" style="filled" fillcolor=gray]; - } - 92 [label="Exit while loop"]; - } - 93 [label="Exit block"]; - } - 94 [label="Access variable R|/s|"]; - 95 [label="Enter safe call"]; - 96 [label="Postponed enter to lambda"]; - subgraph cluster_26 { - color=blue - 97 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 98 [label="Enter block"]; - 99 [label="Access variable R|/it|"]; - 100 [label="Access variable R|/A.a|"]; - 101 [label="Exit block"]; - } - 102 [label="Exit function " style="filled" fillcolor=red]; - } - 103 [label="Postponed exit from lambda"]; - 104 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 105 [label="Exit safe call"]; - 106 [label="Exit block"]; + 50 [label="Enter function " style="filled" fillcolor=red]; + 51 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 52 [label="Exit function " style="filled" fillcolor=red]; } - 107 [label="Exit function test_0" style="filled" fillcolor=red]; + 53 [label="Exit class A" style="filled" fillcolor=red]; + } + 43 -> {44} [color=green]; + 43 -> {53} [style=dotted]; + 43 -> {44 47 50} [style=dashed]; + 44 -> {45}; + 45 -> {46}; + 46 -> {47} [color=green]; + 47 -> {48}; + 48 -> {49}; + 49 -> {50} [color=green]; + 50 -> {51}; + 51 -> {52}; + 52 -> {53} [color=green]; + + subgraph cluster_16 { + color=red + 54 [label="Enter function test_0" style="filled" fillcolor=red]; + subgraph cluster_17 { + color=blue + 55 [label="Enter block"]; + 56 [label="Const: Null(null)"]; + 57 [label="Variable declaration: lvar s: R|A?|"]; + subgraph cluster_18 { + color=blue + 58 [label="Enter block"]; + subgraph cluster_19 { + color=blue + 59 [label="Function call arguments enter"]; + 60 [label="Access variable R|/results|"]; + 61 [label="Function call arguments exit"]; + } + 62 [label="Function call: R|/results|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; + 63 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; + subgraph cluster_20 { + color=blue + 64 [label="Enter while loop"]; + subgraph cluster_21 { + color=blue + 65 [label="Enter loop condition"]; + subgraph cluster_22 { + color=blue + 66 [label="Function call arguments enter"]; + 67 [label="Access variable R|/|"]; + 68 [label="Function call arguments exit"]; + } + 69 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 70 [label="Exit loop condition"]; + } + subgraph cluster_23 { + color=blue + 71 [label="Enter loop block"]; + subgraph cluster_24 { + color=blue + 72 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 73 [label="Function call arguments enter"]; + 74 [label="Access variable R|/|"]; + 75 [label="Function call arguments exit"]; + } + 76 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 77 [label="Stub" style="filled" fillcolor=gray]; + 78 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray]; + subgraph cluster_26 { + color=blue + 79 [label="Enter block" style="filled" fillcolor=gray]; + 80 [label="Access variable R|/result|" style="filled" fillcolor=gray]; + 81 [label="Stub" style="filled" fillcolor=gray]; + 82 [label="Assignment: R|/s|" style="filled" fillcolor=gray]; + subgraph cluster_27 { + color=blue + 83 [label="Enter when" style="filled" fillcolor=gray]; + subgraph cluster_28 { + color=blue + 84 [label="Enter when branch condition " style="filled" fillcolor=gray]; + 85 [label="Access variable R|/result|" style="filled" fillcolor=gray]; + 86 [label="Stub" style="filled" fillcolor=gray]; + 87 [label="Access variable #" style="filled" fillcolor=gray]; + 88 [label="Exit when branch condition" style="filled" fillcolor=gray]; + } + 89 [label="Synthetic else branch" style="filled" fillcolor=gray]; + 90 [label="Enter when branch result" style="filled" fillcolor=gray]; + subgraph cluster_29 { + color=blue + 91 [label="Enter block" style="filled" fillcolor=gray]; + 92 [label="Jump: break@@@[R|/|.R|SubstitutionOverride|()] " style="filled" fillcolor=gray]; + 93 [label="Stub" style="filled" fillcolor=gray]; + 94 [label="Exit block" style="filled" fillcolor=gray]; + } + 95 [label="Exit when branch result" style="filled" fillcolor=gray]; + 96 [label="Exit when" style="filled" fillcolor=gray]; + } + 97 [label="Exit block" style="filled" fillcolor=gray]; + } + 98 [label="Exit block" style="filled" fillcolor=gray]; + } + 99 [label="Exit loop block" style="filled" fillcolor=gray]; + } + 100 [label="Exit while loop"]; + } + 101 [label="Exit block"]; + } + 102 [label="Access variable R|/s|"]; + 103 [label="Enter safe call"]; + subgraph cluster_30 { + color=blue + 104 [label="Function call arguments enter"]; + 105 [label="Postponed enter to lambda"]; + subgraph cluster_31 { + color=blue + 106 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 107 [label="Enter block"]; + 108 [label="Access variable R|/it|"]; + 109 [label="Access variable R|/A.a|"]; + 110 [label="Exit block"]; + } + 111 [label="Exit function " style="filled" fillcolor=red]; + } + 112 [label="Function call arguments exit"]; + } + 113 [label="Postponed exit from lambda"]; + 114 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 115 [label="Exit safe call"]; + 116 [label="Exit block"]; + } + 117 [label="Exit function test_0" style="filled" fillcolor=red]; } - 52 -> {53}; - 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; @@ -264,137 +289,137 @@ digraph smartcastToNothing_kt { 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {65 92}; + 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - 68 -> {69} [style=dotted]; - 69 -> {70} [style=dotted]; - 70 -> {71} [style=dotted]; - 71 -> {72} [style=dotted]; - 72 -> {73} [style=dotted]; - 73 -> {74} [style=dotted]; - 74 -> {75} [style=dotted]; - 75 -> {76} [style=dotted]; + 68 -> {69}; + 69 -> {70}; + 70 -> {71 100}; + 71 -> {72}; + 72 -> {73}; + 73 -> {74}; + 74 -> {75}; + 75 -> {76}; 76 -> {77} [style=dotted]; 77 -> {78} [style=dotted]; 78 -> {79} [style=dotted]; 79 -> {80} [style=dotted]; - 80 -> {81 82} [style=dotted]; - 81 -> {88} [style=dotted]; + 80 -> {81} [style=dotted]; + 81 -> {82} [style=dotted]; 82 -> {83} [style=dotted]; 83 -> {84} [style=dotted]; - 84 -> {85 92} [style=dotted]; + 84 -> {85} [style=dotted]; 85 -> {86} [style=dotted]; 86 -> {87} [style=dotted]; 87 -> {88} [style=dotted]; - 88 -> {89} [style=dotted]; - 89 -> {90} [style=dotted]; + 88 -> {89 90} [style=dotted]; + 89 -> {96} [style=dotted]; 90 -> {91} [style=dotted]; - 91 -> {61} [color=green style=dotted]; - 92 -> {93}; - 93 -> {94}; - 94 -> {95 105}; - 95 -> {96}; - 96 -> {97 104}; - 96 -> {103} [style=dotted]; - 96 -> {97} [style=dashed]; - 97 -> {98}; - 98 -> {99}; - 99 -> {100}; + 91 -> {92} [style=dotted]; + 92 -> {93 100} [style=dotted]; + 93 -> {94} [style=dotted]; + 94 -> {95} [style=dotted]; + 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; + 97 -> {98} [style=dotted]; + 98 -> {99} [style=dotted]; + 99 -> {65} [color=green style=dotted]; 100 -> {101}; 101 -> {102}; - 102 -> {103}; + 102 -> {103 115}; 103 -> {104}; 104 -> {105}; - 105 -> {106}; + 105 -> {106 112}; + 105 -> {113} [style=dotted]; + 105 -> {106} [style=dashed]; 106 -> {107}; - - subgraph cluster_28 { - color=red - 108 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 109 [label="Enter block"]; - subgraph cluster_30 { - color=blue - 110 [label="Enter when"]; - subgraph cluster_31 { - color=blue - 111 [label="Enter when branch condition "]; - 112 [label="Access variable R|/a|"]; - 113 [label="Type operator: (R|/a| is R|kotlin/Nothing?|)"]; - 114 [label="Exit when branch condition"]; - } - 115 [label="Synthetic else branch"]; - 116 [label="Enter when branch result"]; - subgraph cluster_32 { - color=blue - 117 [label="Enter block"]; - 118 [label="Access variable R|/a|"]; - 119 [label="Smart cast: R|/a|"]; - 120 [label="Enter safe call"]; - 121 [label="Access variable R|kotlin/String.length|"]; - 122 [label="Exit safe call"]; - 123 [label="Variable declaration: lval b: R|kotlin/Int?|"]; - 124 [label="Exit block"]; - } - 125 [label="Exit when branch result"]; - 126 [label="Exit when"]; - } - subgraph cluster_33 { - color=blue - 127 [label="Enter when"]; - subgraph cluster_34 { - color=blue - 128 [label="Enter when branch condition "]; - 129 [label="Access variable R|/a|"]; - 130 [label="Type operator: (R|/a| is R|kotlin/Nothing|)"]; - 131 [label="Exit when branch condition"]; - } - 132 [label="Synthetic else branch"]; - 133 [label="Enter when branch result"]; - subgraph cluster_35 { - color=blue - 134 [label="Enter block"]; - 135 [label="Access variable R|/a|"]; - 136 [label="Smart cast: R|/a|"]; - 137 [label="Access variable R|kotlin/String.length|"]; - 138 [label="Variable declaration: lval b: R|kotlin/Int|"]; - 139 [label="Exit block"]; - } - 140 [label="Exit when branch result"]; - 141 [label="Exit when"]; - } - 142 [label="Exit block"]; - } - 143 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 107 -> {108}; 108 -> {109}; 109 -> {110}; 110 -> {111}; - 111 -> {112}; - 112 -> {113}; + 111 -> {113}; + 112 -> {114}; 113 -> {114}; - 114 -> {115 116}; - 115 -> {126}; + 114 -> {115}; + 115 -> {116}; 116 -> {117}; - 117 -> {118}; + + subgraph cluster_33 { + color=red + 118 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 119 [label="Enter block"]; + subgraph cluster_35 { + color=blue + 120 [label="Enter when"]; + subgraph cluster_36 { + color=blue + 121 [label="Enter when branch condition "]; + 122 [label="Access variable R|/a|"]; + 123 [label="Type operator: (R|/a| is R|kotlin/Nothing?|)"]; + 124 [label="Exit when branch condition"]; + } + 125 [label="Synthetic else branch"]; + 126 [label="Enter when branch result"]; + subgraph cluster_37 { + color=blue + 127 [label="Enter block"]; + 128 [label="Access variable R|/a|"]; + 129 [label="Smart cast: R|/a|"]; + 130 [label="Enter safe call"]; + 131 [label="Access variable R|kotlin/String.length|"]; + 132 [label="Exit safe call"]; + 133 [label="Variable declaration: lval b: R|kotlin/Int?|"]; + 134 [label="Exit block"]; + } + 135 [label="Exit when branch result"]; + 136 [label="Exit when"]; + } + subgraph cluster_38 { + color=blue + 137 [label="Enter when"]; + subgraph cluster_39 { + color=blue + 138 [label="Enter when branch condition "]; + 139 [label="Access variable R|/a|"]; + 140 [label="Type operator: (R|/a| is R|kotlin/Nothing|)"]; + 141 [label="Exit when branch condition"]; + } + 142 [label="Synthetic else branch"]; + 143 [label="Enter when branch result"]; + subgraph cluster_40 { + color=blue + 144 [label="Enter block"]; + 145 [label="Access variable R|/a|"]; + 146 [label="Smart cast: R|/a|"]; + 147 [label="Access variable R|kotlin/String.length|"]; + 148 [label="Variable declaration: lval b: R|kotlin/Int|"]; + 149 [label="Exit block"]; + } + 150 [label="Exit when branch result"]; + 151 [label="Exit when"]; + } + 152 [label="Exit block"]; + } + 153 [label="Exit function test_1" style="filled" fillcolor=red]; + } 118 -> {119}; - 119 -> {120 122}; + 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; - 124 -> {125}; - 125 -> {126}; + 124 -> {125 126}; + 125 -> {136}; 126 -> {127}; 127 -> {128}; 128 -> {129}; - 129 -> {130}; + 129 -> {130 132}; 130 -> {131}; - 131 -> {132 133}; - 132 -> {141}; + 131 -> {132}; + 132 -> {133}; 133 -> {134}; 134 -> {135}; 135 -> {136}; @@ -403,7 +428,17 @@ digraph smartcastToNothing_kt { 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {142}; - 142 -> {143}; + 141 -> {142 143}; + 142 -> {151}; + 143 -> {144}; + 144 -> {145}; + 145 -> {146}; + 146 -> {147}; + 147 -> {148}; + 148 -> {149}; + 149 -> {150}; + 150 -> {151}; + 151 -> {152}; + 152 -> {153}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot index f17b8f610bd..55e733df60c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot @@ -76,21 +76,36 @@ digraph delayedAssignment_kt { subgraph cluster_11 { color=blue 27 [label="Enter block"]; - 28 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; - 29 [label="Assignment: R|/a|"]; - 30 [label="Access variable R|/a|"]; - 31 [label="Smart cast: R|/a|"]; - 32 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 33 [label="Exit block"]; + subgraph cluster_12 { + color=blue + 28 [label="Function call arguments enter"]; + 29 [label="Function call arguments exit"]; + } + 30 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; + 31 [label="Assignment: R|/a|"]; + subgraph cluster_13 { + color=blue + 32 [label="Function call arguments enter"]; + 33 [label="Access variable R|/a|"]; + 34 [label="Smart cast: R|/a|"]; + 35 [label="Function call arguments exit"]; + } + 36 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 37 [label="Exit block"]; } - 34 [label="Exit when branch result"]; - 35 [label="Exit when"]; + 38 [label="Exit when branch result"]; + 39 [label="Exit when"]; } - 36 [label="Access variable R|/a|"]; - 37 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; + subgraph cluster_14 { + color=blue + 40 [label="Function call arguments enter"]; + 41 [label="Access variable R|/a|"]; + 42 [label="Function call arguments exit"]; + } + 43 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 44 [label="Exit block"]; } - 39 [label="Exit function test" style="filled" fillcolor=red]; + 45 [label="Exit function test" style="filled" fillcolor=red]; } 11 -> {12}; 12 -> {13}; @@ -106,7 +121,7 @@ digraph delayedAssignment_kt { 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {35}; + 25 -> {39}; 26 -> {27}; 27 -> {28}; 28 -> {29}; @@ -120,5 +135,11 @@ digraph delayedAssignment_kt { 36 -> {37}; 37 -> {38}; 38 -> {39}; + 39 -> {40}; + 40 -> {41}; + 41 -> {42}; + 42 -> {43}; + 43 -> {44}; + 44 -> {45}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot index 7f14d09462e..b1db8a3c272 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot @@ -30,89 +30,127 @@ digraph complexPostponedCfg_kt { subgraph cluster_4 { color=blue 7 [label="Enter block"]; - 8 [label="Access variable R|/statements|"]; - 9 [label="Function call: R|/statements|.R|kotlin/collections/last|()" style="filled" fillcolor=yellow]; - 10 [label="Type operator: (R|/statements|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; - 11 [label="Postponed enter to lambda"]; subgraph cluster_5 { color=blue - 12 [label="Enter function " style="filled" fillcolor=red]; + 8 [label="Function call arguments enter"]; subgraph cluster_6 { color=blue - 13 [label="Enter block"]; - 14 [label="Postponed enter to lambda"]; - subgraph cluster_7 { - color=blue - 15 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 16 [label="Enter block"]; - 17 [label="Access variable this@R|special/anonymous|"]; - 18 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 19 [label="Access variable R|/arguments|"]; - 20 [label="Function call: R|/arguments|.R|kotlin/collections/last|()" style="filled" fillcolor=yellow]; - 21 [label="Type operator: (R|/arguments|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; - 22 [label="Postponed enter to lambda"]; - subgraph cluster_9 { - color=blue - 23 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 24 [label="Enter block"]; - 25 [label="Access variable this@R|special/anonymous|"]; - 26 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 27 [label="Access variable R|/explicitReceiver|"]; - 28 [label="Type operator: (R|/explicitReceiver| as R|FirFunctionCall|)"]; - 29 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; - } - 31 [label="Exit function " style="filled" fillcolor=red]; - } - 32 [label="Postponed exit from lambda"]; - 33 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 34 [label="Exit block"]; - } - 35 [label="Exit function " style="filled" fillcolor=red]; - } - 36 [label="Postponed exit from lambda"]; - 37 [label="Function call: R|kotlin/collections/buildList|(...)" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; + 9 [label="Function call arguments enter"]; + 10 [label="Access variable R|/statements|"]; + 11 [label="Function call arguments exit"]; } - 39 [label="Exit function " style="filled" fillcolor=red]; + 12 [label="Function call: R|/statements|.R|kotlin/collections/last|()" style="filled" fillcolor=yellow]; + 13 [label="Type operator: (R|/statements|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; + 14 [label="Postponed enter to lambda"]; + subgraph cluster_7 { + color=blue + 15 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 16 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 17 [label="Function call arguments enter"]; + 18 [label="Postponed enter to lambda"]; + subgraph cluster_10 { + color=blue + 19 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 20 [label="Enter block"]; + subgraph cluster_12 { + color=blue + 21 [label="Function call arguments enter"]; + 22 [label="Access variable this@R|special/anonymous|"]; + 23 [label="Function call arguments exit"]; + } + 24 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_13 { + color=blue + 25 [label="Function call arguments enter"]; + subgraph cluster_14 { + color=blue + 26 [label="Function call arguments enter"]; + 27 [label="Access variable R|/arguments|"]; + 28 [label="Function call arguments exit"]; + } + 29 [label="Function call: R|/arguments|.R|kotlin/collections/last|()" style="filled" fillcolor=yellow]; + 30 [label="Type operator: (R|/arguments|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; + 31 [label="Postponed enter to lambda"]; + subgraph cluster_15 { + color=blue + 32 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 33 [label="Enter block"]; + subgraph cluster_17 { + color=blue + 34 [label="Function call arguments enter"]; + 35 [label="Access variable this@R|special/anonymous|"]; + 36 [label="Function call arguments exit"]; + } + 37 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_18 { + color=blue + 38 [label="Function call arguments enter"]; + 39 [label="Access variable R|/explicitReceiver|"]; + 40 [label="Type operator: (R|/explicitReceiver| as R|FirFunctionCall|)"]; + 41 [label="Function call arguments exit"]; + } + 42 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 43 [label="Exit block"]; + } + 44 [label="Exit function " style="filled" fillcolor=red]; + } + 45 [label="Function call arguments exit"]; + } + 46 [label="Postponed exit from lambda"]; + 47 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 48 [label="Exit block"]; + } + 49 [label="Exit function " style="filled" fillcolor=red]; + } + 50 [label="Function call arguments exit"]; + } + 51 [label="Postponed exit from lambda"]; + 52 [label="Function call: R|kotlin/collections/buildList|(...)" style="filled" fillcolor=yellow]; + 53 [label="Exit block"]; + } + 54 [label="Exit function " style="filled" fillcolor=red]; + } + 55 [label="Function call arguments exit"]; } - 40 [label="Postponed exit from lambda"]; - 41 [label="Function call: R|kotlin/with||>(...)" style="filled" fillcolor=yellow]; - 42 [label="Variable declaration: lval firstCalls: R|kotlin/collections/List|"]; - 43 [label="Access variable R|/firstCalls|"]; - 44 [label="Jump: ^foo R|/firstCalls|"]; - 45 [label="Stub" style="filled" fillcolor=gray]; - 46 [label="Exit block" style="filled" fillcolor=gray]; + 56 [label="Postponed exit from lambda"]; + 57 [label="Function call: R|kotlin/with||>(...)" style="filled" fillcolor=yellow]; + 58 [label="Variable declaration: lval firstCalls: R|kotlin/collections/List|"]; + 59 [label="Access variable R|/firstCalls|"]; + 60 [label="Jump: ^foo R|/firstCalls|"]; + 61 [label="Stub" style="filled" fillcolor=gray]; + 62 [label="Exit block" style="filled" fillcolor=gray]; } - 47 [label="Exit function foo" style="filled" fillcolor=red]; + 63 [label="Exit function foo" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {12 41}; - 11 -> {40} [style=dotted]; - 11 -> {12} [style=dashed]; + 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15 37}; - 14 -> {36} [style=dotted]; + 14 -> {15 55}; + 14 -> {56} [style=dotted]; 14 -> {15} [style=dashed]; 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {19}; + 18 -> {19 50}; + 18 -> {51} [style=dotted]; + 18 -> {19} [style=dashed]; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {23 33}; - 22 -> {32} [style=dotted]; - 22 -> {23} [style=dashed]; + 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; @@ -121,13 +159,14 @@ digraph complexPostponedCfg_kt { 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32}; + 31 -> {32 45}; + 31 -> {46} [style=dotted]; + 31 -> {32} [style=dashed]; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37} [color=green]; - 36 -> {41} [color=red]; + 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; @@ -135,9 +174,26 @@ digraph complexPostponedCfg_kt { 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {47}; - 44 -> {45} [style=dotted]; - 45 -> {46} [style=dotted]; - 46 -> {47} [style=dotted]; + 44 -> {46}; + 45 -> {47}; + 46 -> {47}; + 47 -> {48}; + 48 -> {49}; + 49 -> {51}; + 50 -> {52}; + 51 -> {52} [color=green]; + 51 -> {57} [color=red]; + 52 -> {53}; + 53 -> {54}; + 54 -> {56}; + 55 -> {57}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; + 59 -> {60}; + 60 -> {63}; + 60 -> {61} [style=dotted]; + 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot index 5fc294f4dec..44b38a8bd8a 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot @@ -17,403 +17,501 @@ digraph callsInPlace_kt { color=blue 3 [label="Enter block"]; 4 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 5 [label="Postponed enter to lambda"]; subgraph cluster_3 { color=blue - 6 [label="Enter function " style="filled" fillcolor=red]; + 5 [label="Function call arguments enter"]; + 6 [label="Postponed enter to lambda"]; subgraph cluster_4 { color=blue - 7 [label="Enter block"]; - 8 [label="Const: Int(1)"]; - 9 [label="Assignment: R|/x|"]; - 10 [label="Exit block"]; + 7 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 8 [label="Enter block"]; + 9 [label="Const: Int(1)"]; + 10 [label="Assignment: R|/x|"]; + 11 [label="Exit block"]; + } + 12 [label="Exit function " style="filled" fillcolor=red]; } - 11 [label="Exit function " style="filled" fillcolor=red]; + 13 [label="Function call arguments exit"]; } - 12 [label="Postponed exit from lambda"]; - 13 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 14 [label="Access variable R|/x|"]; - 15 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 16 [label="Exit block"]; + 14 [label="Postponed exit from lambda"]; + 15 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_6 { + color=blue + 16 [label="Function call arguments enter"]; + 17 [label="Access variable R|/x|"]; + 18 [label="Function call arguments exit"]; + } + 19 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 20 [label="Exit block"]; } - 17 [label="Exit function test" style="filled" fillcolor=red]; + 21 [label="Exit function test" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; - 5 -> {6 13}; - 5 -> {12} [style=dotted]; - 5 -> {6} [style=dashed]; - 6 -> {7}; + 5 -> {6}; + 6 -> {7 13}; + 6 -> {14} [style=dotted]; + 6 -> {7} [style=dashed]; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {13}; - 13 -> {14}; + 12 -> {14}; + 13 -> {15}; 14 -> {15}; 15 -> {16}; 16 -> {17}; - - subgraph cluster_5 { - color=red - 18 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 19 [label="Enter block"]; - 20 [label="Const: Int(10)"]; - 21 [label="Postponed enter to lambda"]; - subgraph cluster_7 { - color=blue - 22 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 23 [label="Enter block"]; - 24 [label="Const: String(test_2)"]; - 25 [label="Exit block"]; - } - 26 [label="Exit function " style="filled" fillcolor=red]; - } - 27 [label="Postponed exit from lambda"]; - 28 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; - 29 [label="Exit block"]; - } - 30 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22 27 28}; - 21 -> {22} [style=dashed]; + + subgraph cluster_7 { + color=red + 22 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 23 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 24 [label="Function call arguments enter"]; + 25 [label="Const: Int(10)"]; + 26 [label="Postponed enter to lambda"]; + subgraph cluster_10 { + color=blue + 27 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 28 [label="Enter block"]; + 29 [label="Const: String(test_2)"]; + 30 [label="Exit block"]; + } + 31 [label="Exit function " style="filled" fillcolor=red]; + } + 32 [label="Function call arguments exit"]; + } + 33 [label="Postponed exit from lambda"]; + 34 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; + 35 [label="Exit block"]; + } + 36 [label="Exit function test_2" style="filled" fillcolor=red]; + } 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {27}; + 26 -> {27 32 33}; + 26 -> {27} [style=dashed]; 27 -> {28}; - 27 -> {21} [color=green style=dashed]; 28 -> {29}; 29 -> {30}; - - subgraph cluster_9 { - color=red - 31 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 32 [label="Enter block"]; - 33 [label="Const: Int(10)"]; - 34 [label="Postponed enter to lambda"]; - subgraph cluster_11 { - color=blue - 35 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 36 [label="Enter block"]; - 37 [label="Const: String(test_3)"]; - 38 [label="Exit block"]; - } - 39 [label="Exit function " style="filled" fillcolor=red]; - } - 40 [label="Postponed exit from lambda"]; - 41 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; - 42 [label="Exit block"]; - } - 43 [label="Exit function test_3" style="filled" fillcolor=red]; - } - 31 -> {32}; - 32 -> {33}; + 30 -> {31}; + 31 -> {33}; + 32 -> {34}; 33 -> {34}; - 34 -> {35 40 41}; - 34 -> {35} [style=dashed]; + 33 -> {26} [color=green style=dashed]; + 34 -> {35}; 35 -> {36}; - 36 -> {37}; + + subgraph cluster_12 { + color=red + 37 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 38 [label="Enter block"]; + subgraph cluster_14 { + color=blue + 39 [label="Function call arguments enter"]; + 40 [label="Const: Int(10)"]; + 41 [label="Postponed enter to lambda"]; + subgraph cluster_15 { + color=blue + 42 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 43 [label="Enter block"]; + 44 [label="Const: String(test_3)"]; + 45 [label="Exit block"]; + } + 46 [label="Exit function " style="filled" fillcolor=red]; + } + 47 [label="Function call arguments exit"]; + } + 48 [label="Postponed exit from lambda"]; + 49 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; + 50 [label="Exit block"]; + } + 51 [label="Exit function test_3" style="filled" fillcolor=red]; + } 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 40 -> {34} [color=green style=dashed]; - 41 -> {42}; + 41 -> {42 47 48}; + 41 -> {42} [style=dashed]; 42 -> {43}; - - subgraph cluster_13 { - color=red - 44 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 45 [label="Enter block"]; - 46 [label="Const: Int(1)"]; - 47 [label="Postponed enter to lambda"]; - subgraph cluster_15 { - color=blue - 48 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 49 [label="Enter block"]; - 50 [label="Const: String(test_4)"]; - 51 [label="Access variable R|/it|"]; - 52 [label="Const: Int(0)"]; - 53 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; - 54 [label="Comparison >"]; - 55 [label="Exit block"]; - } - 56 [label="Exit function " style="filled" fillcolor=red]; - } - 57 [label="Postponed exit from lambda"]; - 58 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; - 59 [label="Exit block"]; - } - 60 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47}; - 47 -> {48 58}; - 47 -> {57} [style=dotted]; - 47 -> {48} [style=dashed]; + 46 -> {48}; + 47 -> {49}; 48 -> {49}; + 48 -> {41} [color=green style=dashed]; 49 -> {50}; 50 -> {51}; - 51 -> {52}; + + subgraph cluster_17 { + color=red + 52 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 53 [label="Enter block"]; + subgraph cluster_19 { + color=blue + 54 [label="Function call arguments enter"]; + 55 [label="Const: Int(1)"]; + 56 [label="Postponed enter to lambda"]; + subgraph cluster_20 { + color=blue + 57 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 58 [label="Enter block"]; + 59 [label="Const: String(test_4)"]; + subgraph cluster_22 { + color=blue + 60 [label="Function call arguments enter"]; + 61 [label="Access variable R|/it|"]; + 62 [label="Const: Int(0)"]; + 63 [label="Function call arguments exit"]; + } + 64 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; + 65 [label="Comparison >"]; + 66 [label="Exit block"]; + } + 67 [label="Exit function " style="filled" fillcolor=red]; + } + 68 [label="Function call arguments exit"]; + } + 69 [label="Postponed exit from lambda"]; + 70 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; + 71 [label="Exit block"]; + } + 72 [label="Exit function test_4" style="filled" fillcolor=red]; + } 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57}; + 56 -> {57 68}; + 56 -> {69} [style=dotted]; + 56 -> {57} [style=dashed]; 57 -> {58}; 58 -> {59}; 59 -> {60}; - - subgraph cluster_17 { - color=red - 61 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 62 [label="Enter block"]; - 63 [label="Const: Int(1)"]; - 64 [label="Postponed enter to lambda"]; - subgraph cluster_19 { - color=blue - 65 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_20 { - color=blue - 66 [label="Enter block"]; - 67 [label="Const: String(test_5)"]; - 68 [label="Access variable R|/it|"]; - 69 [label="Const: Int(0)"]; - 70 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; - 71 [label="Comparison >"]; - 72 [label="Exit block"]; - } - 73 [label="Exit function " style="filled" fillcolor=red]; - } - 74 [label="Postponed exit from lambda"]; - 75 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; - 76 [label="Exit block"]; - } - 77 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {65 75}; - 64 -> {74} [style=dotted]; - 64 -> {65} [style=dashed]; + 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {68}; - 68 -> {69}; + 67 -> {69}; + 68 -> {70}; 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {73}; + + subgraph cluster_23 { + color=red + 73 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 74 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 75 [label="Function call arguments enter"]; + 76 [label="Const: Int(1)"]; + 77 [label="Postponed enter to lambda"]; + subgraph cluster_26 { + color=blue + 78 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_27 { + color=blue + 79 [label="Enter block"]; + 80 [label="Const: String(test_5)"]; + subgraph cluster_28 { + color=blue + 81 [label="Function call arguments enter"]; + 82 [label="Access variable R|/it|"]; + 83 [label="Const: Int(0)"]; + 84 [label="Function call arguments exit"]; + } + 85 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; + 86 [label="Comparison >"]; + 87 [label="Exit block"]; + } + 88 [label="Exit function " style="filled" fillcolor=red]; + } + 89 [label="Function call arguments exit"]; + } + 90 [label="Postponed exit from lambda"]; + 91 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; + 92 [label="Exit block"]; + } + 93 [label="Exit function test_5" style="filled" fillcolor=red]; + } 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; - - subgraph cluster_21 { - color=red - 78 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 79 [label="Enter block"]; - 80 [label="Function call: R|/block1|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 81 [label="Function call: R|/block2|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 82 [label="Exit block"]; - } - 83 [label="Exit function myRun" style="filled" fillcolor=red]; - } + 77 -> {78 89}; + 77 -> {90} [style=dotted]; + 77 -> {78} [style=dashed]; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; - - subgraph cluster_23 { - color=red - 84 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 85 [label="Enter block"]; - 86 [label="Postponed enter to lambda"]; - subgraph cluster_25 { - color=blue - 87 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_26 { - color=blue - 88 [label="Enter block"]; - 89 [label="Const: String(test_6_2)"]; - 90 [label="Exit block"]; - } - 91 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_27 { - color=blue - 92 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 93 [label="Enter block"]; - 94 [label="Const: String(test_6_1)"]; - 95 [label="Exit block"]; - } - 96 [label="Exit function " style="filled" fillcolor=red]; - } - 97 [label="Postponed exit from lambda"]; - 98 [label="Postponed exit from lambda"]; - 99 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 100 [label="Exit block"]; - } - 101 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 83 -> {84}; 84 -> {85}; 85 -> {86}; - 86 -> {87 92 97 98 99}; - 86 -> {87 92} [style=dashed]; + 86 -> {87}; 87 -> {88}; - 88 -> {89}; - 89 -> {90}; + 88 -> {90}; + 89 -> {91}; 90 -> {91}; - 91 -> {97}; + 91 -> {92}; 92 -> {93}; - 93 -> {94}; - 94 -> {95}; - 95 -> {96}; - 96 -> {98}; - 97 -> {99}; - 97 -> {86} [color=green style=dashed]; - 98 -> {99}; - 98 -> {86} [color=green style=dashed]; - 99 -> {100}; - 100 -> {101}; subgraph cluster_29 { color=red - 102 [label="Enter function test_7" style="filled" fillcolor=red]; + 94 [label="Enter function myRun" style="filled" fillcolor=red]; subgraph cluster_30 { color=blue - 103 [label="Enter block"]; - 104 [label="Postponed enter to lambda"]; + 95 [label="Enter block"]; subgraph cluster_31 { color=blue - 105 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 106 [label="Enter block"]; - 107 [label="Const: String(test_7_1)"]; - 108 [label="Exit block"]; - } - 109 [label="Exit function " style="filled" fillcolor=red]; + 96 [label="Function call arguments enter"]; + 97 [label="Function call arguments exit"]; } - subgraph cluster_33 { + 98 [label="Function call: R|/block1|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + subgraph cluster_32 { color=blue - 110 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_34 { - color=blue - 111 [label="Enter block"]; - 112 [label="Const: String(test_7_2)"]; - 113 [label="Exit block"]; - } - 114 [label="Exit function " style="filled" fillcolor=red]; + 99 [label="Function call arguments enter"]; + 100 [label="Function call arguments exit"]; } - 115 [label="Postponed exit from lambda"]; - 116 [label="Postponed exit from lambda"]; - 117 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 118 [label="Exit block"]; + 101 [label="Function call: R|/block2|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 102 [label="Exit block"]; } - 119 [label="Exit function test_7" style="filled" fillcolor=red]; + 103 [label="Exit function myRun" style="filled" fillcolor=red]; } + 94 -> {95}; + 95 -> {96}; + 96 -> {97}; + 97 -> {98}; + 98 -> {99}; + 99 -> {100}; + 100 -> {101}; + 101 -> {102}; 102 -> {103}; - 103 -> {104}; - 104 -> {105 110 115 116 117}; - 104 -> {105 110} [style=dashed]; + + subgraph cluster_33 { + color=red + 104 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 105 [label="Enter block"]; + subgraph cluster_35 { + color=blue + 106 [label="Function call arguments enter"]; + 107 [label="Postponed enter to lambda"]; + subgraph cluster_36 { + color=blue + 108 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_37 { + color=blue + 109 [label="Enter block"]; + 110 [label="Const: String(test_6_2)"]; + 111 [label="Exit block"]; + } + 112 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_38 { + color=blue + 113 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_39 { + color=blue + 114 [label="Enter block"]; + 115 [label="Const: String(test_6_1)"]; + 116 [label="Exit block"]; + } + 117 [label="Exit function " style="filled" fillcolor=red]; + } + 118 [label="Function call arguments exit"]; + } + 119 [label="Postponed exit from lambda"]; + 120 [label="Postponed exit from lambda"]; + 121 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 122 [label="Exit block"]; + } + 123 [label="Exit function test_6" style="filled" fillcolor=red]; + } + 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {108}; + 107 -> {108 113 118 119 120}; + 107 -> {108 113} [style=dashed]; 108 -> {109}; - 109 -> {115}; + 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; + 112 -> {119}; 113 -> {114}; - 114 -> {116}; - 115 -> {117}; - 115 -> {104} [color=green style=dashed]; + 114 -> {115}; + 115 -> {116}; 116 -> {117}; - 116 -> {104} [color=green style=dashed]; - 117 -> {118}; - 118 -> {119}; - - subgraph cluster_35 { - color=red - 120 [label="Enter function myDummyRun" style="filled" fillcolor=red]; - subgraph cluster_36 { - color=blue - 121 [label="Enter block"]; - 122 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 123 [label="Exit block"]; - } - 124 [label="Exit function myDummyRun" style="filled" fillcolor=red]; - } + 117 -> {120}; + 118 -> {121}; + 119 -> {121}; + 119 -> {107} [color=green style=dashed]; 120 -> {121}; + 120 -> {107} [color=green style=dashed]; 121 -> {122}; 122 -> {123}; - 123 -> {124}; - subgraph cluster_37 { + subgraph cluster_40 { color=red - 125 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_38 { + 124 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_41 { color=blue - 126 [label="Enter block"]; - 127 [label="Postponed enter to lambda"]; - subgraph cluster_39 { + 125 [label="Enter block"]; + subgraph cluster_42 { color=blue - 128 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_40 { + 126 [label="Function call arguments enter"]; + 127 [label="Postponed enter to lambda"]; + subgraph cluster_43 { color=blue - 129 [label="Enter block"]; - 130 [label="Const: String(test_8)"]; - 131 [label="Exit block"]; + 128 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_44 { + color=blue + 129 [label="Enter block"]; + 130 [label="Const: String(test_7_1)"]; + 131 [label="Exit block"]; + } + 132 [label="Exit function " style="filled" fillcolor=red]; } - 132 [label="Exit function " style="filled" fillcolor=red]; + subgraph cluster_45 { + color=blue + 133 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_46 { + color=blue + 134 [label="Enter block"]; + 135 [label="Const: String(test_7_2)"]; + 136 [label="Exit block"]; + } + 137 [label="Exit function " style="filled" fillcolor=red]; + } + 138 [label="Function call arguments exit"]; } - 133 [label="Postponed exit from lambda"]; - 134 [label="Function call: R|/myDummyRun|(...)" style="filled" fillcolor=yellow]; - 135 [label="Exit block"]; + 139 [label="Postponed exit from lambda"]; + 140 [label="Postponed exit from lambda"]; + 141 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 142 [label="Exit block"]; } - 136 [label="Exit function test_8" style="filled" fillcolor=red]; + 143 [label="Exit function test_7" style="filled" fillcolor=red]; } + 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {128 133 134}; - 127 -> {128} [style=dashed]; + 127 -> {128 133 138 139 140}; + 127 -> {128 133} [style=dashed]; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; + 132 -> {139}; 133 -> {134}; 134 -> {135}; 135 -> {136}; + 136 -> {137}; + 137 -> {140}; + 138 -> {141}; + 139 -> {141}; + 139 -> {127} [color=green style=dashed]; + 140 -> {141}; + 140 -> {127} [color=green style=dashed]; + 141 -> {142}; + 142 -> {143}; + + subgraph cluster_47 { + color=red + 144 [label="Enter function myDummyRun" style="filled" fillcolor=red]; + subgraph cluster_48 { + color=blue + 145 [label="Enter block"]; + subgraph cluster_49 { + color=blue + 146 [label="Function call arguments enter"]; + 147 [label="Function call arguments exit"]; + } + 148 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 149 [label="Exit block"]; + } + 150 [label="Exit function myDummyRun" style="filled" fillcolor=red]; + } + 144 -> {145}; + 145 -> {146}; + 146 -> {147}; + 147 -> {148}; + 148 -> {149}; + 149 -> {150}; + + subgraph cluster_50 { + color=red + 151 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_51 { + color=blue + 152 [label="Enter block"]; + subgraph cluster_52 { + color=blue + 153 [label="Function call arguments enter"]; + 154 [label="Postponed enter to lambda"]; + subgraph cluster_53 { + color=blue + 155 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_54 { + color=blue + 156 [label="Enter block"]; + 157 [label="Const: String(test_8)"]; + 158 [label="Exit block"]; + } + 159 [label="Exit function " style="filled" fillcolor=red]; + } + 160 [label="Function call arguments exit"]; + } + 161 [label="Postponed exit from lambda"]; + 162 [label="Function call: R|/myDummyRun|(...)" style="filled" fillcolor=yellow]; + 163 [label="Exit block"]; + } + 164 [label="Exit function test_8" style="filled" fillcolor=red]; + } + 151 -> {152}; + 152 -> {153}; + 153 -> {154}; + 154 -> {155 160 161}; + 154 -> {155} [style=dashed]; + 155 -> {156}; + 156 -> {157}; + 157 -> {158}; + 158 -> {159}; + 160 -> {162}; + 161 -> {162}; + 162 -> {163}; + 163 -> {164}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot index e3d4895bc99..2a088fe8605 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot @@ -16,15 +16,25 @@ digraph conditionalEffects_kt { subgraph cluster_2 { color=blue 3 [label="Enter block"]; - 4 [label="Access variable R|/x|"]; - 5 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 6 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 7 [label="Access variable R|/x|"]; - 8 [label="Smart cast: R|/x|"]; - 9 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 10 [label="Exit block"]; + subgraph cluster_3 { + color=blue + 4 [label="Function call arguments enter"]; + 5 [label="Access variable R|/x|"]; + 6 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 7 [label="Function call arguments exit"]; + } + 8 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_4 { + color=blue + 9 [label="Function call arguments enter"]; + 10 [label="Access variable R|/x|"]; + 11 [label="Smart cast: R|/x|"]; + 12 [label="Function call arguments exit"]; + } + 13 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; } - 11 [label="Exit function test_1" style="filled" fillcolor=red]; + 15 [label="Exit function test_1" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -35,174 +45,194 @@ digraph conditionalEffects_kt { 8 -> {9}; 9 -> {10}; 10 -> {11}; - - subgraph cluster_3 { - color=red - 12 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 13 [label="Enter block"]; - 14 [label="Access variable R|/x|"]; - 15 [label="Function call: R|kotlin/requireNotNull|(...)" style="filled" fillcolor=yellow]; - 16 [label="Access variable R|/x|"]; - 17 [label="Smart cast: R|/x|"]; - 18 [label="Access variable R|kotlin/String.length|"]; - 19 [label="Exit block"]; - } - 20 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16}; + + subgraph cluster_5 { + color=red + 16 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 17 [label="Enter block"]; + subgraph cluster_7 { + color=blue + 18 [label="Function call arguments enter"]; + 19 [label="Access variable R|/x|"]; + 20 [label="Function call arguments exit"]; + } + 21 [label="Function call: R|kotlin/requireNotNull|(...)" style="filled" fillcolor=yellow]; + 22 [label="Access variable R|/x|"]; + 23 [label="Smart cast: R|/x|"]; + 24 [label="Access variable R|kotlin/String.length|"]; + 25 [label="Exit block"]; + } + 26 [label="Exit function test_2" style="filled" fillcolor=red]; + } 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - - subgraph cluster_5 { - color=red - 21 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 22 [label="Enter block"]; - 23 [label="Access variable R|/x|"]; - 24 [label="Const: Null(null)"]; - 25 [label="Equality operator !="]; - 26 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 27 [label="Access variable R|/x|"]; - 28 [label="Smart cast: R|/x|"]; - 29 [label="Access variable R|kotlin/String.length|"]; - 30 [label="Exit block"]; - } - 31 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {27}; + + subgraph cluster_8 { + color=red + 27 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 28 [label="Enter block"]; + subgraph cluster_10 { + color=blue + 29 [label="Function call arguments enter"]; + 30 [label="Access variable R|/x|"]; + 31 [label="Const: Null(null)"]; + 32 [label="Equality operator !="]; + 33 [label="Function call arguments exit"]; + } + 34 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 35 [label="Access variable R|/x|"]; + 36 [label="Smart cast: R|/x|"]; + 37 [label="Access variable R|kotlin/String.length|"]; + 38 [label="Exit block"]; + } + 39 [label="Exit function test_3" style="filled" fillcolor=red]; + } 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; - - subgraph cluster_7 { - color=red - 32 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 33 [label="Enter block"]; - subgraph cluster_9 { - color=blue - 34 [label="Enter &&"]; - 35 [label="Access variable R|/x|"]; - 36 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 37 [label="Exit left part of &&"]; - 38 [label="Enter right part of &&"]; - 39 [label="Access variable R|/y|"]; - 40 [label="Const: Null(null)"]; - 41 [label="Equality operator !="]; - 42 [label="Exit &&"]; - } - 43 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 44 [label="Access variable R|/x|"]; - 45 [label="Smart cast: R|/x|"]; - 46 [label="Access variable R|kotlin/String.length|"]; - 47 [label="Access variable R|/y|"]; - 48 [label="Smart cast: R|/y|"]; - 49 [label="Access variable R|kotlin/String.length|"]; - 50 [label="Exit block"]; - } - 51 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38 42}; + 37 -> {38}; 38 -> {39}; - 39 -> {40}; + + subgraph cluster_11 { + color=red + 40 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 41 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 42 [label="Function call arguments enter"]; + subgraph cluster_14 { + color=blue + 43 [label="Enter &&"]; + 44 [label="Access variable R|/x|"]; + 45 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 46 [label="Exit left part of &&"]; + 47 [label="Enter right part of &&"]; + 48 [label="Access variable R|/y|"]; + 49 [label="Const: Null(null)"]; + 50 [label="Equality operator !="]; + 51 [label="Exit &&"]; + } + 52 [label="Function call arguments exit"]; + } + 53 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 54 [label="Access variable R|/x|"]; + 55 [label="Smart cast: R|/x|"]; + 56 [label="Access variable R|kotlin/String.length|"]; + 57 [label="Access variable R|/y|"]; + 58 [label="Smart cast: R|/y|"]; + 59 [label="Access variable R|kotlin/String.length|"]; + 60 [label="Exit block"]; + } + 61 [label="Exit function test_4" style="filled" fillcolor=red]; + } 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47}; + 46 -> {47 51}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - - subgraph cluster_10 { - color=red - 52 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 53 [label="Enter block"]; - subgraph cluster_12 { - color=blue - 54 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 55 [label="Enter when branch condition "]; - 56 [label="Access variable R|/b|"]; - 57 [label="Exit when branch condition"]; - } - subgraph cluster_14 { - color=blue - 58 [label="Enter when branch condition else"]; - 59 [label="Exit when branch condition"]; - } - 60 [label="Enter when branch result"]; - subgraph cluster_15 { - color=blue - 61 [label="Enter block"]; - 62 [label="Access variable R|/x|"]; - 63 [label="Access variable #"]; - 64 [label="Exit block"]; - } - 65 [label="Exit when branch result"]; - 66 [label="Enter when branch result"]; - subgraph cluster_16 { - color=blue - 67 [label="Enter block"]; - 68 [label="Access variable R|/x|"]; - 69 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 70 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 71 [label="Access variable R|/x|"]; - 72 [label="Smart cast: R|/x|"]; - 73 [label="Access variable R|kotlin/String.length|"]; - 74 [label="Exit block"]; - } - 75 [label="Exit when branch result"]; - 76 [label="Exit when"]; - } - 77 [label="Access variable R|/x|"]; - 78 [label="Access variable #"]; - 79 [label="Exit block"]; - } - 80 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58 66}; + 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {62}; + + subgraph cluster_15 { + color=red + 62 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 63 [label="Enter block"]; + subgraph cluster_17 { + color=blue + 64 [label="Enter when"]; + subgraph cluster_18 { + color=blue + 65 [label="Enter when branch condition "]; + 66 [label="Access variable R|/b|"]; + 67 [label="Exit when branch condition"]; + } + subgraph cluster_19 { + color=blue + 68 [label="Enter when branch condition else"]; + 69 [label="Exit when branch condition"]; + } + 70 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 71 [label="Enter block"]; + 72 [label="Access variable R|/x|"]; + 73 [label="Access variable #"]; + 74 [label="Exit block"]; + } + 75 [label="Exit when branch result"]; + 76 [label="Enter when branch result"]; + subgraph cluster_21 { + color=blue + 77 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 78 [label="Function call arguments enter"]; + 79 [label="Access variable R|/x|"]; + 80 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 81 [label="Function call arguments exit"]; + } + 82 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 83 [label="Access variable R|/x|"]; + 84 [label="Smart cast: R|/x|"]; + 85 [label="Access variable R|kotlin/String.length|"]; + 86 [label="Exit block"]; + } + 87 [label="Exit when branch result"]; + 88 [label="Exit when"]; + } + 89 [label="Access variable R|/x|"]; + 90 [label="Access variable #"]; + 91 [label="Exit block"]; + } + 92 [label="Exit function test_5" style="filled" fillcolor=red]; + } 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {76}; + 65 -> {66}; 66 -> {67}; - 67 -> {68}; + 67 -> {68 76}; 68 -> {69}; 69 -> {70}; 70 -> {71}; @@ -210,85 +240,95 @@ digraph conditionalEffects_kt { 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76}; + 75 -> {88}; 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; - - subgraph cluster_17 { - color=red - 81 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 82 [label="Enter block"]; - subgraph cluster_19 { - color=blue - 83 [label="Enter when"]; - subgraph cluster_20 { - color=blue - 84 [label="Enter when branch condition "]; - 85 [label="Access variable R|/b|"]; - 86 [label="Exit when branch condition"]; - } - subgraph cluster_21 { - color=blue - 87 [label="Enter when branch condition else"]; - 88 [label="Exit when branch condition"]; - } - 89 [label="Enter when branch result"]; - subgraph cluster_22 { - color=blue - 90 [label="Enter block"]; - 91 [label="Access variable R|/x|"]; - 92 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 93 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 94 [label="Access variable R|/x|"]; - 95 [label="Smart cast: R|/x|"]; - 96 [label="Access variable R|kotlin/String.length|"]; - 97 [label="Exit block"]; - } - 98 [label="Exit when branch result"]; - 99 [label="Enter when branch result"]; - subgraph cluster_23 { - color=blue - 100 [label="Enter block"]; - 101 [label="Access variable R|/x|"]; - 102 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 103 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 104 [label="Access variable R|/x|"]; - 105 [label="Smart cast: R|/x|"]; - 106 [label="Access variable R|kotlin/String.length|"]; - 107 [label="Exit block"]; - } - 108 [label="Exit when branch result"]; - 109 [label="Exit when"]; - } - 110 [label="Access variable R|/x|"]; - 111 [label="Smart cast: R|/x|"]; - 112 [label="Access variable R|kotlin/String.length|"]; - 113 [label="Exit block"]; - } - 114 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; - 86 -> {87 99}; + 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; - 92 -> {93}; + + subgraph cluster_23 { + color=red + 93 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 94 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 95 [label="Enter when"]; + subgraph cluster_26 { + color=blue + 96 [label="Enter when branch condition "]; + 97 [label="Access variable R|/b|"]; + 98 [label="Exit when branch condition"]; + } + subgraph cluster_27 { + color=blue + 99 [label="Enter when branch condition else"]; + 100 [label="Exit when branch condition"]; + } + 101 [label="Enter when branch result"]; + subgraph cluster_28 { + color=blue + 102 [label="Enter block"]; + subgraph cluster_29 { + color=blue + 103 [label="Function call arguments enter"]; + 104 [label="Access variable R|/x|"]; + 105 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 106 [label="Function call arguments exit"]; + } + 107 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 108 [label="Access variable R|/x|"]; + 109 [label="Smart cast: R|/x|"]; + 110 [label="Access variable R|kotlin/String.length|"]; + 111 [label="Exit block"]; + } + 112 [label="Exit when branch result"]; + 113 [label="Enter when branch result"]; + subgraph cluster_30 { + color=blue + 114 [label="Enter block"]; + subgraph cluster_31 { + color=blue + 115 [label="Function call arguments enter"]; + 116 [label="Access variable R|/x|"]; + 117 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 118 [label="Function call arguments exit"]; + } + 119 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 120 [label="Access variable R|/x|"]; + 121 [label="Smart cast: R|/x|"]; + 122 [label="Access variable R|kotlin/String.length|"]; + 123 [label="Exit block"]; + } + 124 [label="Exit when branch result"]; + 125 [label="Exit when"]; + } + 126 [label="Access variable R|/x|"]; + 127 [label="Smart cast: R|/x|"]; + 128 [label="Access variable R|kotlin/String.length|"]; + 129 [label="Exit block"]; + } + 130 [label="Exit function test_6" style="filled" fillcolor=red]; + } 93 -> {94}; 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {109}; + 98 -> {99 113}; 99 -> {100}; 100 -> {101}; 101 -> {102}; @@ -302,7 +342,23 @@ digraph conditionalEffects_kt { 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; + 112 -> {125}; 113 -> {114}; + 114 -> {115}; + 115 -> {116}; + 116 -> {117}; + 117 -> {118}; + 118 -> {119}; + 119 -> {120}; + 120 -> {121}; + 121 -> {122}; + 122 -> {123}; + 123 -> {124}; + 124 -> {125}; + 125 -> {126}; + 126 -> {127}; + 127 -> {128}; + 128 -> {129}; + 129 -> {130}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot index fecb19eeead..12d1f6a0644 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot @@ -53,23 +53,38 @@ digraph inAnonymousObject_kt { } 21 [label="Exit anonymous object expression"]; 22 [label="Variable declaration: lval obj: R||"]; - 23 [label="Access variable R|/obj|"]; - 24 [label="Function call: R|/obj|.R|/.run|()" style="filled" fillcolor=yellow]; - 25 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 26 [label="Exit block"]; + subgraph cluster_9 { + color=blue + 23 [label="Function call arguments enter"]; + 24 [label="Access variable R|/obj|"]; + 25 [label="Function call arguments exit"]; + } + 26 [label="Function call: R|/obj|.R|/.run|()" style="filled" fillcolor=yellow]; + subgraph cluster_10 { + color=blue + 27 [label="Function call arguments enter"]; + 28 [label="Function call arguments exit"]; + } + 29 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; } - 27 [label="Exit function foo" style="filled" fillcolor=red]; + 31 [label="Exit function foo" style="filled" fillcolor=red]; } - subgraph cluster_9 { + subgraph cluster_11 { color=blue - 28 [label="Enter function run" style="filled" fillcolor=red]; - subgraph cluster_10 { + 32 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 29 [label="Enter block"]; - 30 [label="Function call: R|/c|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 31 [label="Exit block"]; + 33 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 34 [label="Function call arguments enter"]; + 35 [label="Function call arguments exit"]; + } + 36 [label="Function call: R|/c|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 37 [label="Exit block"]; } - 32 [label="Exit function run" style="filled" fillcolor=red]; + 38 [label="Exit function run" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -79,7 +94,7 @@ digraph inAnonymousObject_kt { 6 -> {21} [style=dotted]; 6 -> {7} [style=dashed]; 7 -> {8}; - 7 -> {11 17 28} [color=red]; + 7 -> {11 17 32} [color=red]; 7 -> {20} [style=dotted]; 7 -> {8 11 17} [style=dashed]; 8 -> {9}; @@ -97,17 +112,23 @@ digraph inAnonymousObject_kt { 18 -> {19}; 19 -> {20}; 20 -> {21}; - 20 -> {28} [color=green]; - 20 -> {28} [style=dashed]; + 20 -> {32} [color=green]; + 20 -> {32} [style=dashed]; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; + 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32}; + 32 -> {33}; + 33 -> {34}; + 34 -> {35}; + 35 -> {36}; + 36 -> {37}; + 37 -> {38}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot index d6e7d9bc96a..12dad6d5953 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot @@ -22,79 +22,104 @@ digraph inLocalClass_kt { 5 [label="Exit block"]; } 6 [label="Local class declaration"]; - 7 [label="Function call: R|/LocalClass.LocalClass|()" style="filled" fillcolor=yellow]; - 8 [label="Function call: R|/LocalClass.LocalClass|().R|/run|()" style="filled" fillcolor=yellow]; - 9 [label="Function call: R|/e|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 10 [label="Exit block"]; - } - 11 [label="Exit function foo" style="filled" fillcolor=red]; - } - subgraph cluster_4 { - color=blue - 12 [label="Enter class LocalClass" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 13 [label="Enter property" style="filled" fillcolor=red]; - 14 [label="Access variable R|/a|"]; - 15 [label="Exit property" style="filled" fillcolor=red]; - } - subgraph cluster_6 { - color=blue - 16 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_7 { + subgraph cluster_4 { color=blue - 17 [label="Enter block"]; - 18 [label="Access variable R|/c|"]; - 19 [label="Assignment: R|/leaked|"]; - 20 [label="Exit block"]; + 7 [label="Function call arguments enter"]; + subgraph cluster_5 { + color=blue + 8 [label="Function call arguments enter"]; + 9 [label="Function call arguments exit"]; + } + 10 [label="Function call: R|/LocalClass.LocalClass|()" style="filled" fillcolor=yellow]; + 11 [label="Function call arguments exit"]; } - 21 [label="Exit init block" style="filled" fillcolor=red]; + 12 [label="Function call: R|/LocalClass.LocalClass|().R|/run|()" style="filled" fillcolor=yellow]; + subgraph cluster_6 { + color=blue + 13 [label="Function call arguments enter"]; + 14 [label="Function call arguments exit"]; + } + 15 [label="Function call: R|/e|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 16 [label="Exit block"]; } + 17 [label="Exit function foo" style="filled" fillcolor=red]; + } + subgraph cluster_7 { + color=blue + 18 [label="Enter class LocalClass" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 22 [label="Enter function " style="filled" fillcolor=red]; - 23 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - subgraph cluster_9 { + 19 [label="Enter property" style="filled" fillcolor=red]; + 20 [label="Access variable R|/a|"]; + 21 [label="Exit property" style="filled" fillcolor=red]; + } + subgraph cluster_9 { + color=blue + 22 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 24 [label="Enter block"]; - 25 [label="Function call: R|/b|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 23 [label="Enter block"]; + 24 [label="Access variable R|/c|"]; + 25 [label="Assignment: R|/leaked|"]; 26 [label="Exit block"]; } - 27 [label="Exit function " style="filled" fillcolor=red]; + 27 [label="Exit init block" style="filled" fillcolor=red]; } - 28 [label="Exit class LocalClass" style="filled" fillcolor=red]; - } - subgraph cluster_10 { - color=blue - 29 [label="Enter function run" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 30 [label="Enter block"]; - 31 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; + 28 [label="Enter function " style="filled" fillcolor=red]; + 29 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + subgraph cluster_12 { + color=blue + 30 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 31 [label="Function call arguments enter"]; + 32 [label="Function call arguments exit"]; + } + 33 [label="Function call: R|/b|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 34 [label="Exit block"]; + } + 35 [label="Exit function " style="filled" fillcolor=red]; } - 33 [label="Exit function run" style="filled" fillcolor=red]; + 36 [label="Exit class LocalClass" style="filled" fillcolor=red]; + } + subgraph cluster_14 { + color=blue + 37 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 38 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 39 [label="Function call arguments enter"]; + 40 [label="Function call arguments exit"]; + } + 41 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 42 [label="Exit block"]; + } + 43 [label="Exit function run" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - 6 -> {7 12}; - 6 -> {12} [style=dashed]; + 6 -> {7 18}; + 6 -> {18} [style=dashed]; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; + 11 -> {12}; 12 -> {13}; - 12 -> {16 22 29} [color=red]; - 12 -> {28} [style=dotted]; - 12 -> {13 16 22} [style=dashed]; 13 -> {14}; 14 -> {15}; - 15 -> {16} [color=green]; + 15 -> {16}; 16 -> {17}; - 17 -> {18}; 18 -> {19}; + 18 -> {22 28 37} [color=red]; + 18 -> {36} [style=dotted]; + 18 -> {19 22 28} [style=dashed]; 19 -> {20}; 20 -> {21}; 21 -> {22} [color=green]; @@ -104,11 +129,21 @@ digraph inLocalClass_kt { 25 -> {26}; 26 -> {27}; 27 -> {28} [color=green]; - 28 -> {29} [color=green]; - 28 -> {29} [style=dashed]; + 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; + 33 -> {34}; + 34 -> {35}; + 35 -> {36} [color=green]; + 36 -> {37} [color=green]; + 36 -> {37} [style=dashed]; + 37 -> {38}; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; + 41 -> {42}; + 42 -> {43}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalFunction.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalFunction.dot index 27fb82b9fd8..f7aae6bb281 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalFunction.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalFunction.dot @@ -22,39 +22,67 @@ digraph inLocalFunction_kt { 5 [label="Exit block"]; } 6 [label="Local function declaration"]; - 7 [label="Function call: R|/localFun|()" style="filled" fillcolor=yellow]; - 8 [label="Function call: R|/b|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 9 [label="Exit block"]; + subgraph cluster_4 { + color=blue + 7 [label="Function call arguments enter"]; + 8 [label="Function call arguments exit"]; + } + 9 [label="Function call: R|/localFun|()" style="filled" fillcolor=yellow]; + subgraph cluster_5 { + color=blue + 10 [label="Function call arguments enter"]; + 11 [label="Function call arguments exit"]; + } + 12 [label="Function call: R|/b|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 13 [label="Exit block"]; } - 10 [label="Exit function foo" style="filled" fillcolor=red]; + 14 [label="Exit function foo" style="filled" fillcolor=red]; } - subgraph cluster_4 { + subgraph cluster_6 { color=blue - 11 [label="Enter function localFun" style="filled" fillcolor=red]; - subgraph cluster_5 { + 15 [label="Enter function localFun" style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 12 [label="Enter block"]; - 13 [label="Access variable R|/a|"]; - 14 [label="Function call: R|/a|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 15 [label="Function call: R|/a|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 16 [label="Exit block"]; + 16 [label="Enter block"]; + subgraph cluster_8 { + color=blue + 17 [label="Function call arguments enter"]; + 18 [label="Access variable R|/a|"]; + 19 [label="Function call arguments exit"]; + } + 20 [label="Function call: R|/a|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + subgraph cluster_9 { + color=blue + 21 [label="Function call arguments enter"]; + 22 [label="Function call arguments exit"]; + } + 23 [label="Function call: R|/a|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 24 [label="Exit block"]; } - 17 [label="Exit function localFun" style="filled" fillcolor=red]; + 25 [label="Exit function localFun" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - 6 -> {7 11}; - 6 -> {11} [style=dashed]; + 6 -> {7 15}; + 6 -> {15} [style=dashed]; 7 -> {8}; 8 -> {9}; 9 -> {10}; + 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15}; 15 -> {16}; 16 -> {17}; + 17 -> {18}; + 18 -> {19}; + 19 -> {20}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/toLocalVariables.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/toLocalVariables.dot index eb948413de5..90545c5da29 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/toLocalVariables.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/toLocalVariables.dot @@ -55,28 +55,43 @@ digraph toLocalVariables_kt { 17 [label="Enter block"]; 18 [label="Access variable R|/y|"]; 19 [label="Variable declaration: lval yCopy: R|() -> kotlin/Unit|"]; - 20 [label="Function call: R|/yCopy|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 21 [label="Exit block"]; + subgraph cluster_10 { + color=blue + 20 [label="Function call arguments enter"]; + 21 [label="Function call arguments exit"]; + } + 22 [label="Function call: R|/yCopy|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 23 [label="Exit block"]; } - 22 [label="Exit when branch result"]; - 23 [label="Enter when branch result"]; - subgraph cluster_10 { + 24 [label="Exit when branch result"]; + 25 [label="Enter when branch result"]; + subgraph cluster_11 { color=blue - 24 [label="Enter block"]; - 25 [label="Access variable R|/x|"]; - 26 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; + 26 [label="Enter block"]; + subgraph cluster_12 { + color=blue + 27 [label="Function call arguments enter"]; + 28 [label="Access variable R|/x|"]; + 29 [label="Function call arguments exit"]; + } + 30 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 31 [label="Exit block"]; } - 28 [label="Exit when branch result"]; - 29 [label="Exit when"]; + 32 [label="Exit when branch result"]; + 33 [label="Exit when"]; } - 30 [label="Variable declaration: lval zCopy: R|() -> kotlin/Unit|"]; - 31 [label="Access variable R|/z|"]; - 32 [label="Assignment: R|/zCopy|"]; - 33 [label="Function call: R|/zCopy|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 34 [label="Exit block"]; + 34 [label="Variable declaration: lval zCopy: R|() -> kotlin/Unit|"]; + 35 [label="Access variable R|/z|"]; + 36 [label="Assignment: R|/zCopy|"]; + subgraph cluster_13 { + color=blue + 37 [label="Function call arguments enter"]; + 38 [label="Function call arguments exit"]; + } + 39 [label="Function call: R|/zCopy|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 40 [label="Exit block"]; } - 35 [label="Exit function foo" style="filled" fillcolor=red]; + 41 [label="Exit function foo" style="filled" fillcolor=red]; } 6 -> {7}; 7 -> {8}; @@ -85,7 +100,7 @@ digraph toLocalVariables_kt { 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {14 23}; + 13 -> {14 25}; 14 -> {15}; 15 -> {16}; 16 -> {17}; @@ -94,9 +109,9 @@ digraph toLocalVariables_kt { 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {29}; + 22 -> {23}; 23 -> {24}; - 24 -> {25}; + 24 -> {33}; 25 -> {26}; 26 -> {27}; 27 -> {28}; @@ -107,5 +122,11 @@ digraph toLocalVariables_kt { 32 -> {33}; 33 -> {34}; 34 -> {35}; + 35 -> {36}; + 36 -> {37}; + 37 -> {38}; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot index 81a0c646bbc..090eebcfaa3 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot @@ -21,10 +21,15 @@ digraph atLeastOnce_kt { 4 [label="Enter block"]; 5 [label="Exit block"]; } - 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 7 [label="Exit block"]; + subgraph cluster_4 { + color=blue + 6 [label="Function call arguments enter"]; + 7 [label="Function call arguments exit"]; + } + 8 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 9 [label="Exit block"]; } - 8 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 10 [label="Exit function inlineRun" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -32,122 +37,159 @@ digraph atLeastOnce_kt { 5 -> {6}; 6 -> {7}; 7 -> {8}; - - subgraph cluster_4 { - color=red - 9 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 10 [label="Enter block"]; - subgraph cluster_6 { - color=blue - 11 [label="Enter block"]; - 12 [label="Exit block"]; - } - 13 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; - } - 15 [label="Exit function myRun" style="filled" fillcolor=red]; - } + 8 -> {9}; 9 -> {10}; - 10 -> {11}; + + subgraph cluster_5 { + color=red + 11 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 12 [label="Enter block"]; + subgraph cluster_7 { + color=blue + 13 [label="Enter block"]; + 14 [label="Exit block"]; + } + subgraph cluster_8 { + color=blue + 15 [label="Function call arguments enter"]; + 16 [label="Function call arguments exit"]; + } + 17 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 18 [label="Exit block"]; + } + 19 [label="Exit function myRun" style="filled" fillcolor=red]; + } 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - - subgraph cluster_7 { - color=red - 16 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 17 [label="Enter block"]; - 18 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 19 [label="Postponed enter to lambda"]; - subgraph cluster_9 { - color=blue - 20 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 21 [label="Enter block"]; - 22 [label="Const: Int(1)"]; - 23 [label="Assignment: R|/x|"]; - 24 [label="Exit block"]; - } - 25 [label="Exit function " style="filled" fillcolor=red]; - } - 26 [label="Postponed exit from lambda"]; - 27 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 28 [label="Access variable R|/x|"]; - 29 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; - } - 31 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 27}; - 19 -> {26} [style=dotted]; - 19 -> {20} [style=dashed]; + + subgraph cluster_9 { + color=red + 20 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 21 [label="Enter block"]; + 22 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_11 { + color=blue + 23 [label="Function call arguments enter"]; + 24 [label="Postponed enter to lambda"]; + subgraph cluster_12 { + color=blue + 25 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 26 [label="Enter block"]; + 27 [label="Const: Int(1)"]; + 28 [label="Assignment: R|/x|"]; + 29 [label="Exit block"]; + } + 30 [label="Exit function " style="filled" fillcolor=red]; + } + 31 [label="Function call arguments exit"]; + } + 32 [label="Postponed exit from lambda"]; + 33 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_14 { + color=blue + 34 [label="Function call arguments enter"]; + 35 [label="Access variable R|/x|"]; + 36 [label="Function call arguments exit"]; + } + 37 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; + } + 39 [label="Exit function test_1" style="filled" fillcolor=red]; + } 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25}; + 24 -> {25 31}; + 24 -> {32} [style=dotted]; + 24 -> {25} [style=dashed]; 25 -> {26}; 26 -> {27}; - 26 -> {19} [color=green style=dashed]; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31}; - - subgraph cluster_11 { - color=red - 32 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 33 [label="Enter block"]; - 34 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 35 [label="Postponed enter to lambda"]; - subgraph cluster_13 { - color=blue - 36 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 37 [label="Enter block"]; - 38 [label="Const: Int(1)"]; - 39 [label="Assignment: R|/x|"]; - 40 [label="Exit block"]; - } - 41 [label="Exit function " style="filled" fillcolor=red]; - } - 42 [label="Postponed exit from lambda"]; - 43 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 44 [label="Access variable R|/x|"]; - 45 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 46 [label="Exit block"]; - } - 47 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 30 -> {32}; + 31 -> {33}; 32 -> {33}; + 32 -> {24} [color=green style=dashed]; 33 -> {34}; 34 -> {35}; - 35 -> {36 43}; - 35 -> {42} [style=dotted]; - 35 -> {36} [style=dashed]; + 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40}; + + subgraph cluster_15 { + color=red + 40 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 41 [label="Enter block"]; + 42 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_17 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Postponed enter to lambda"]; + subgraph cluster_18 { + color=blue + 45 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_19 { + color=blue + 46 [label="Enter block"]; + 47 [label="Const: Int(1)"]; + 48 [label="Assignment: R|/x|"]; + 49 [label="Exit block"]; + } + 50 [label="Exit function " style="filled" fillcolor=red]; + } + 51 [label="Function call arguments exit"]; + } + 52 [label="Postponed exit from lambda"]; + 53 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_20 { + color=blue + 54 [label="Function call arguments enter"]; + 55 [label="Access variable R|/x|"]; + 56 [label="Function call arguments exit"]; + } + 57 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 58 [label="Exit block"]; + } + 59 [label="Exit function test_2" style="filled" fillcolor=red]; + } 40 -> {41}; 41 -> {42}; 42 -> {43}; - 42 -> {35} [color=green style=dashed]; 43 -> {44}; - 44 -> {45}; + 44 -> {45 51}; + 44 -> {52} [style=dotted]; + 44 -> {45} [style=dashed]; 45 -> {46}; 46 -> {47}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50}; + 50 -> {52}; + 51 -> {53}; + 52 -> {53}; + 52 -> {44} [color=green style=dashed]; + 53 -> {54}; + 54 -> {55}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot index f19f019d83f..b199c844318 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot @@ -21,10 +21,15 @@ digraph atMostOnce_kt { 4 [label="Enter block"]; 5 [label="Exit block"]; } - 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 7 [label="Exit block"]; + subgraph cluster_4 { + color=blue + 6 [label="Function call arguments enter"]; + 7 [label="Function call arguments exit"]; + } + 8 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 9 [label="Exit block"]; } - 8 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 10 [label="Exit function inlineRun" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -32,118 +37,155 @@ digraph atMostOnce_kt { 5 -> {6}; 6 -> {7}; 7 -> {8}; - - subgraph cluster_4 { - color=red - 9 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 10 [label="Enter block"]; - subgraph cluster_6 { - color=blue - 11 [label="Enter block"]; - 12 [label="Exit block"]; - } - 13 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; - } - 15 [label="Exit function myRun" style="filled" fillcolor=red]; - } + 8 -> {9}; 9 -> {10}; - 10 -> {11}; + + subgraph cluster_5 { + color=red + 11 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 12 [label="Enter block"]; + subgraph cluster_7 { + color=blue + 13 [label="Enter block"]; + 14 [label="Exit block"]; + } + subgraph cluster_8 { + color=blue + 15 [label="Function call arguments enter"]; + 16 [label="Function call arguments exit"]; + } + 17 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 18 [label="Exit block"]; + } + 19 [label="Exit function myRun" style="filled" fillcolor=red]; + } 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - - subgraph cluster_7 { - color=red - 16 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 17 [label="Enter block"]; - 18 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 19 [label="Postponed enter to lambda"]; - subgraph cluster_9 { - color=blue - 20 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 21 [label="Enter block"]; - 22 [label="Const: Int(1)"]; - 23 [label="Assignment: R|/x|"]; - 24 [label="Exit block"]; - } - 25 [label="Exit function " style="filled" fillcolor=red]; - } - 26 [label="Postponed exit from lambda"]; - 27 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 28 [label="Access variable R|/x|"]; - 29 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; - } - 31 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 26 27}; - 19 -> {20} [style=dashed]; + + subgraph cluster_9 { + color=red + 20 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 21 [label="Enter block"]; + 22 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_11 { + color=blue + 23 [label="Function call arguments enter"]; + 24 [label="Postponed enter to lambda"]; + subgraph cluster_12 { + color=blue + 25 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 26 [label="Enter block"]; + 27 [label="Const: Int(1)"]; + 28 [label="Assignment: R|/x|"]; + 29 [label="Exit block"]; + } + 30 [label="Exit function " style="filled" fillcolor=red]; + } + 31 [label="Function call arguments exit"]; + } + 32 [label="Postponed exit from lambda"]; + 33 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_14 { + color=blue + 34 [label="Function call arguments enter"]; + 35 [label="Access variable R|/x|"]; + 36 [label="Function call arguments exit"]; + } + 37 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; + } + 39 [label="Exit function test_1" style="filled" fillcolor=red]; + } 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25}; + 24 -> {25 31 32}; + 24 -> {25} [style=dashed]; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31}; - - subgraph cluster_11 { - color=red - 32 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 33 [label="Enter block"]; - 34 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 35 [label="Postponed enter to lambda"]; - subgraph cluster_13 { - color=blue - 36 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 37 [label="Enter block"]; - 38 [label="Const: Int(1)"]; - 39 [label="Assignment: R|/x|"]; - 40 [label="Exit block"]; - } - 41 [label="Exit function " style="filled" fillcolor=red]; - } - 42 [label="Postponed exit from lambda"]; - 43 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 44 [label="Access variable R|/x|"]; - 45 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 46 [label="Exit block"]; - } - 47 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 30 -> {32}; + 31 -> {33}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36 42 43}; - 35 -> {36} [style=dashed]; + 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40}; + + subgraph cluster_15 { + color=red + 40 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 41 [label="Enter block"]; + 42 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_17 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Postponed enter to lambda"]; + subgraph cluster_18 { + color=blue + 45 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_19 { + color=blue + 46 [label="Enter block"]; + 47 [label="Const: Int(1)"]; + 48 [label="Assignment: R|/x|"]; + 49 [label="Exit block"]; + } + 50 [label="Exit function " style="filled" fillcolor=red]; + } + 51 [label="Function call arguments exit"]; + } + 52 [label="Postponed exit from lambda"]; + 53 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_20 { + color=blue + 54 [label="Function call arguments enter"]; + 55 [label="Access variable R|/x|"]; + 56 [label="Function call arguments exit"]; + } + 57 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 58 [label="Exit block"]; + } + 59 [label="Exit function test_2" style="filled" fillcolor=red]; + } 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45}; + 44 -> {45 51 52}; + 44 -> {45} [style=dashed]; 45 -> {46}; 46 -> {47}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50}; + 50 -> {52}; + 51 -> {53}; + 52 -> {53}; + 53 -> {54}; + 54 -> {55}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot index 3fe8278e50f..f0a2b87b00e 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot @@ -21,11 +21,16 @@ digraph contractsUsage_kt { 4 [label="Enter block"]; 5 [label="Exit block"]; } - 6 [label="Access variable R|/x|"]; - 7 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 8 [label="Exit block"]; + subgraph cluster_4 { + color=blue + 6 [label="Function call arguments enter"]; + 7 [label="Access variable R|/x|"]; + 8 [label="Function call arguments exit"]; + } + 9 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 10 [label="Exit block"]; } - 9 [label="Exit function bar" style="filled" fillcolor=red]; + 11 [label="Exit function bar" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -34,126 +39,156 @@ digraph contractsUsage_kt { 6 -> {7}; 7 -> {8}; 8 -> {9}; + 9 -> {10}; + 10 -> {11}; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 10 [label="Enter function baz" style="filled" fillcolor=red]; - subgraph cluster_5 { + 12 [label="Enter function baz" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 11 [label="Enter block"]; - subgraph cluster_6 { - color=blue - 12 [label="Enter block"]; - 13 [label="Exit block"]; - } + 13 [label="Enter block"]; subgraph cluster_7 { color=blue - 14 [label="Enter when"]; - subgraph cluster_8 { - color=blue - 15 [label="Enter when branch condition "]; - 16 [label="Const: Boolean(true)"]; - 17 [label="Exit when branch condition"]; - } - 18 [label="Synthetic else branch"]; - 19 [label="Enter when branch result"]; + 14 [label="Enter block"]; + 15 [label="Exit block"]; + } + subgraph cluster_8 { + color=blue + 16 [label="Enter when"]; subgraph cluster_9 { color=blue - 20 [label="Enter block"]; - 21 [label="Access variable this@R|/baz|"]; - 22 [label="Function call: this@R|/baz|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 23 [label="Exit block"]; + 17 [label="Enter when branch condition "]; + 18 [label="Const: Boolean(true)"]; + 19 [label="Exit when branch condition"]; } - 24 [label="Exit when branch result"]; - 25 [label="Exit when"]; + 20 [label="Synthetic else branch"]; + 21 [label="Enter when branch result"]; + subgraph cluster_10 { + color=blue + 22 [label="Enter block"]; + subgraph cluster_11 { + color=blue + 23 [label="Function call arguments enter"]; + 24 [label="Access variable this@R|/baz|"]; + 25 [label="Function call arguments exit"]; + } + 26 [label="Function call: this@R|/baz|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 27 [label="Exit block"]; + } + 28 [label="Exit when branch result"]; + 29 [label="Exit when"]; } - 26 [label="Exit block"]; + 30 [label="Exit block"]; } - 27 [label="Exit function baz" style="filled" fillcolor=red]; + 31 [label="Exit function baz" style="filled" fillcolor=red]; } - 10 -> {11}; - 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {18 19}; - 18 -> {25}; - 19 -> {20}; - 20 -> {21}; + 17 -> {18}; + 18 -> {19}; + 19 -> {20 21}; + 20 -> {29}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - - subgraph cluster_10 { - color=red - 28 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 29 [label="Enter block"]; - subgraph cluster_12 { - color=blue - 30 [label="Enter block"]; - 31 [label="Exit block"]; - } - subgraph cluster_13 { - color=blue - 32 [label="Enter when"]; - subgraph cluster_14 { - color=blue - 33 [label="Enter when branch condition "]; - 34 [label="Const: Boolean(true)"]; - 35 [label="Exit when branch condition"]; - } - 36 [label="Synthetic else branch"]; - 37 [label="Enter when branch result"]; - subgraph cluster_15 { - color=blue - 38 [label="Enter block"]; - 39 [label="Access variable R|/x|"]; - 40 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 41 [label="Access variable R|/y|"]; - 42 [label="Function call: R|/y|.R|/baz|()" style="filled" fillcolor=yellow]; - 43 [label="Jump: ^foo Unit"]; - 44 [label="Stub" style="filled" fillcolor=gray]; - 45 [label="Exit block" style="filled" fillcolor=gray]; - } - 46 [label="Exit when branch result" style="filled" fillcolor=gray]; - 47 [label="Exit when"]; - } - 48 [label="Access variable R|/x|"]; - 49 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 50 [label="Exit block"]; - } - 51 [label="Exit function foo" style="filled" fillcolor=red]; - } + 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32}; + + subgraph cluster_12 { + color=red + 32 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 33 [label="Enter block"]; + subgraph cluster_14 { + color=blue + 34 [label="Enter block"]; + 35 [label="Exit block"]; + } + subgraph cluster_15 { + color=blue + 36 [label="Enter when"]; + subgraph cluster_16 { + color=blue + 37 [label="Enter when branch condition "]; + 38 [label="Const: Boolean(true)"]; + 39 [label="Exit when branch condition"]; + } + 40 [label="Synthetic else branch"]; + 41 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 42 [label="Enter block"]; + subgraph cluster_18 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Access variable R|/x|"]; + 45 [label="Function call arguments exit"]; + } + 46 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + subgraph cluster_19 { + color=blue + 47 [label="Function call arguments enter"]; + 48 [label="Access variable R|/y|"]; + 49 [label="Function call arguments exit"]; + } + 50 [label="Function call: R|/y|.R|/baz|()" style="filled" fillcolor=yellow]; + 51 [label="Jump: ^foo Unit"]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; + } + 54 [label="Exit when branch result" style="filled" fillcolor=gray]; + 55 [label="Exit when"]; + } + subgraph cluster_20 { + color=blue + 56 [label="Function call arguments enter"]; + 57 [label="Access variable R|/x|"]; + 58 [label="Function call arguments exit"]; + } + 59 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 60 [label="Exit block"]; + } + 61 [label="Exit function foo" style="filled" fillcolor=red]; + } 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36 37}; - 36 -> {47}; + 35 -> {36}; + 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40}; - 40 -> {41}; + 39 -> {40 41}; + 40 -> {55}; 41 -> {42}; 42 -> {43}; - 43 -> {51}; - 43 -> {44} [style=dotted]; - 44 -> {45} [style=dotted]; - 45 -> {46} [style=dotted]; - 46 -> {47} [style=dotted]; + 43 -> {44}; + 44 -> {45}; + 45 -> {46}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; + 51 -> {61}; + 51 -> {52} [style=dotted]; + 52 -> {53} [style=dotted]; + 53 -> {54} [style=dotted]; + 54 -> {55} [style=dotted]; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; + 59 -> {60}; + 60 -> {61}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot index f1f6e71eb55..264e365db67 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot @@ -21,10 +21,15 @@ digraph exactlyOnce_kt { 4 [label="Enter block"]; 5 [label="Exit block"]; } - 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 7 [label="Exit block"]; + subgraph cluster_4 { + color=blue + 6 [label="Function call arguments enter"]; + 7 [label="Function call arguments exit"]; + } + 8 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 9 [label="Exit block"]; } - 8 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 10 [label="Exit function inlineRun" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -32,120 +37,157 @@ digraph exactlyOnce_kt { 5 -> {6}; 6 -> {7}; 7 -> {8}; - - subgraph cluster_4 { - color=red - 9 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 10 [label="Enter block"]; - subgraph cluster_6 { - color=blue - 11 [label="Enter block"]; - 12 [label="Exit block"]; - } - 13 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; - } - 15 [label="Exit function myRun" style="filled" fillcolor=red]; - } + 8 -> {9}; 9 -> {10}; - 10 -> {11}; + + subgraph cluster_5 { + color=red + 11 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 12 [label="Enter block"]; + subgraph cluster_7 { + color=blue + 13 [label="Enter block"]; + 14 [label="Exit block"]; + } + subgraph cluster_8 { + color=blue + 15 [label="Function call arguments enter"]; + 16 [label="Function call arguments exit"]; + } + 17 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 18 [label="Exit block"]; + } + 19 [label="Exit function myRun" style="filled" fillcolor=red]; + } 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - - subgraph cluster_7 { - color=red - 16 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 17 [label="Enter block"]; - 18 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 19 [label="Postponed enter to lambda"]; - subgraph cluster_9 { - color=blue - 20 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 21 [label="Enter block"]; - 22 [label="Const: Int(1)"]; - 23 [label="Assignment: R|/x|"]; - 24 [label="Exit block"]; - } - 25 [label="Exit function " style="filled" fillcolor=red]; - } - 26 [label="Postponed exit from lambda"]; - 27 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 28 [label="Access variable R|/x|"]; - 29 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; - } - 31 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 27}; - 19 -> {26} [style=dotted]; - 19 -> {20} [style=dashed]; + + subgraph cluster_9 { + color=red + 20 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 21 [label="Enter block"]; + 22 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_11 { + color=blue + 23 [label="Function call arguments enter"]; + 24 [label="Postponed enter to lambda"]; + subgraph cluster_12 { + color=blue + 25 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 26 [label="Enter block"]; + 27 [label="Const: Int(1)"]; + 28 [label="Assignment: R|/x|"]; + 29 [label="Exit block"]; + } + 30 [label="Exit function " style="filled" fillcolor=red]; + } + 31 [label="Function call arguments exit"]; + } + 32 [label="Postponed exit from lambda"]; + 33 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_14 { + color=blue + 34 [label="Function call arguments enter"]; + 35 [label="Access variable R|/x|"]; + 36 [label="Function call arguments exit"]; + } + 37 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; + } + 39 [label="Exit function test_1" style="filled" fillcolor=red]; + } 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25}; + 24 -> {25 31}; + 24 -> {32} [style=dotted]; + 24 -> {25} [style=dashed]; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31}; - - subgraph cluster_11 { - color=red - 32 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 33 [label="Enter block"]; - 34 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 35 [label="Postponed enter to lambda"]; - subgraph cluster_13 { - color=blue - 36 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 37 [label="Enter block"]; - 38 [label="Const: Int(1)"]; - 39 [label="Assignment: R|/x|"]; - 40 [label="Exit block"]; - } - 41 [label="Exit function " style="filled" fillcolor=red]; - } - 42 [label="Postponed exit from lambda"]; - 43 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 44 [label="Access variable R|/x|"]; - 45 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 46 [label="Exit block"]; - } - 47 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 30 -> {32}; + 31 -> {33}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36 43}; - 35 -> {42} [style=dotted]; - 35 -> {36} [style=dashed]; + 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40}; + + subgraph cluster_15 { + color=red + 40 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 41 [label="Enter block"]; + 42 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_17 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Postponed enter to lambda"]; + subgraph cluster_18 { + color=blue + 45 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_19 { + color=blue + 46 [label="Enter block"]; + 47 [label="Const: Int(1)"]; + 48 [label="Assignment: R|/x|"]; + 49 [label="Exit block"]; + } + 50 [label="Exit function " style="filled" fillcolor=red]; + } + 51 [label="Function call arguments exit"]; + } + 52 [label="Postponed exit from lambda"]; + 53 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_20 { + color=blue + 54 [label="Function call arguments enter"]; + 55 [label="Access variable R|/x|"]; + 56 [label="Function call arguments exit"]; + } + 57 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 58 [label="Exit block"]; + } + 59 [label="Exit function test_2" style="filled" fillcolor=red]; + } 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45}; + 44 -> {45 51}; + 44 -> {52} [style=dotted]; + 44 -> {45} [style=dashed]; 45 -> {46}; 46 -> {47}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50}; + 50 -> {52}; + 51 -> {53}; + 52 -> {53}; + 53 -> {54}; + 54 -> {55}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot index 95994cfba1d..939c6579df6 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot @@ -35,20 +35,30 @@ digraph flow_kt { subgraph cluster_6 { color=blue 12 [label="Enter block"]; - 13 [label="Access variable R|/x|"]; - 14 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 15 [label="Jump: ^bar Unit"]; - 16 [label="Stub" style="filled" fillcolor=gray]; - 17 [label="Exit block" style="filled" fillcolor=gray]; + subgraph cluster_7 { + color=blue + 13 [label="Function call arguments enter"]; + 14 [label="Access variable R|/x|"]; + 15 [label="Function call arguments exit"]; + } + 16 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 17 [label="Jump: ^bar Unit"]; + 18 [label="Stub" style="filled" fillcolor=gray]; + 19 [label="Exit block" style="filled" fillcolor=gray]; } - 18 [label="Exit when branch result" style="filled" fillcolor=gray]; - 19 [label="Exit when"]; + 20 [label="Exit when branch result" style="filled" fillcolor=gray]; + 21 [label="Exit when"]; } - 20 [label="Access variable R|/x|"]; - 21 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 22 [label="Exit block"]; + subgraph cluster_8 { + color=blue + 22 [label="Function call arguments enter"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Function call arguments exit"]; + } + 25 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 26 [label="Exit block"]; } - 23 [label="Exit function bar" style="filled" fillcolor=red]; + 27 [label="Exit function bar" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -58,209 +68,259 @@ digraph flow_kt { 7 -> {8}; 8 -> {9}; 9 -> {10 11}; - 10 -> {19}; + 10 -> {21}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {23}; - 15 -> {16} [style=dotted]; - 16 -> {17} [style=dotted]; + 15 -> {16}; + 16 -> {17}; + 17 -> {27}; 17 -> {18} [style=dotted]; 18 -> {19} [style=dotted]; - 19 -> {20}; - 20 -> {21}; + 19 -> {20} [style=dotted]; + 20 -> {21} [style=dotted]; 21 -> {22}; 22 -> {23}; - - subgraph cluster_7 { - color=red - 24 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 25 [label="Enter block"]; - subgraph cluster_9 { - color=blue - 26 [label="Enter block"]; - 27 [label="Exit block"]; - } - subgraph cluster_10 { - color=blue - 28 [label="Enter when"]; - subgraph cluster_11 { - color=blue - 29 [label="Enter when branch condition "]; - 30 [label="Const: Boolean(true)"]; - 31 [label="Exit when branch condition"]; - } - subgraph cluster_12 { - color=blue - 32 [label="Enter when branch condition else"]; - 33 [label="Exit when branch condition"]; - } - 34 [label="Enter when branch result"]; - subgraph cluster_13 { - color=blue - 35 [label="Enter block"]; - subgraph cluster_14 { - color=blue - 36 [label="Enter when"]; - subgraph cluster_15 { - color=blue - 37 [label="Enter when branch condition "]; - 38 [label="Const: Boolean(false)"]; - 39 [label="Exit when branch condition"]; - } - subgraph cluster_16 { - color=blue - 40 [label="Enter when branch condition else"]; - 41 [label="Exit when branch condition"]; - } - 42 [label="Enter when branch result"]; - subgraph cluster_17 { - color=blue - 43 [label="Enter block"]; - 44 [label="Access variable R|/y|"]; - 45 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 46 [label="Access variable R|/z|"]; - 47 [label="Function call: R|/z|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 48 [label="Jump: ^foo Unit"]; - 49 [label="Stub" style="filled" fillcolor=gray]; - 50 [label="Exit block" style="filled" fillcolor=gray]; - } - 51 [label="Exit when branch result" style="filled" fillcolor=gray]; - 52 [label="Enter when branch result"]; - subgraph cluster_18 { - color=blue - 53 [label="Enter block"]; - 54 [label="Access variable R|/y|"]; - 55 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 56 [label="Exit block"]; - } - 57 [label="Exit when branch result"]; - 58 [label="Exit when"]; - } - 59 [label="Exit block"]; - } - 60 [label="Exit when branch result"]; - 61 [label="Enter when branch result"]; - subgraph cluster_19 { - color=blue - 62 [label="Enter block"]; - subgraph cluster_20 { - color=blue - 63 [label="Enter block"]; - 64 [label="Const: Int(0)"]; - 65 [label="Const: Int(0)"]; - 66 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)" style="filled" fillcolor=yellow]; - 67 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()" style="filled" fillcolor=yellow]; - 68 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; - subgraph cluster_21 { - color=blue - 69 [label="Enter while loop"]; - subgraph cluster_22 { - color=blue - 70 [label="Enter loop condition"]; - 71 [label="Access variable R|/|"]; - 72 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 73 [label="Exit loop condition"]; - } - subgraph cluster_23 { - color=blue - 74 [label="Enter loop block"]; - subgraph cluster_24 { - color=blue - 75 [label="Enter block"]; - 76 [label="Access variable R|/|"]; - 77 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()" style="filled" fillcolor=yellow]; - 78 [label="Variable declaration: lval i: R|kotlin/Int|"]; - subgraph cluster_25 { - color=blue - 79 [label="Enter block"]; - 80 [label="Access variable R|/x|"]; - 81 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 82 [label="Exit block"]; - } - 83 [label="Exit block"]; - } - 84 [label="Exit loop block"]; - } - 85 [label="Exit while loop"]; - } - 86 [label="Exit block"]; - } - 87 [label="Access variable R|/y|"]; - 88 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 89 [label="Exit block"]; - } - 90 [label="Exit when branch result"]; - 91 [label="Exit when"]; - } - subgraph cluster_26 { - color=blue - 92 [label="Enter do-while loop"]; - subgraph cluster_27 { - color=blue - 93 [label="Enter loop block"]; - subgraph cluster_28 { - color=blue - 94 [label="Enter block"]; - 95 [label="Access variable R|/z|"]; - 96 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 97 [label="Exit block"]; - } - 98 [label="Exit loop block"]; - } - subgraph cluster_29 { - color=blue - 99 [label="Enter loop condition"]; - 100 [label="Const: Boolean(true)"]; - 101 [label="Exit loop condition"]; - } - 102 [label="Exit do-while loop" style="filled" fillcolor=gray]; - } - 103 [label="Exit block" style="filled" fillcolor=gray]; - } - 104 [label="Exit function foo" style="filled" fillcolor=red]; - } + 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {28}; + + subgraph cluster_9 { + color=red + 28 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 29 [label="Enter block"]; + subgraph cluster_11 { + color=blue + 30 [label="Enter block"]; + 31 [label="Exit block"]; + } + subgraph cluster_12 { + color=blue + 32 [label="Enter when"]; + subgraph cluster_13 { + color=blue + 33 [label="Enter when branch condition "]; + 34 [label="Const: Boolean(true)"]; + 35 [label="Exit when branch condition"]; + } + subgraph cluster_14 { + color=blue + 36 [label="Enter when branch condition else"]; + 37 [label="Exit when branch condition"]; + } + 38 [label="Enter when branch result"]; + subgraph cluster_15 { + color=blue + 39 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 40 [label="Enter when"]; + subgraph cluster_17 { + color=blue + 41 [label="Enter when branch condition "]; + 42 [label="Const: Boolean(false)"]; + 43 [label="Exit when branch condition"]; + } + subgraph cluster_18 { + color=blue + 44 [label="Enter when branch condition else"]; + 45 [label="Exit when branch condition"]; + } + 46 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 47 [label="Enter block"]; + subgraph cluster_20 { + color=blue + 48 [label="Function call arguments enter"]; + 49 [label="Access variable R|/y|"]; + 50 [label="Function call arguments exit"]; + } + 51 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + subgraph cluster_21 { + color=blue + 52 [label="Function call arguments enter"]; + 53 [label="Access variable R|/z|"]; + 54 [label="Function call arguments exit"]; + } + 55 [label="Function call: R|/z|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 56 [label="Jump: ^foo Unit"]; + 57 [label="Stub" style="filled" fillcolor=gray]; + 58 [label="Exit block" style="filled" fillcolor=gray]; + } + 59 [label="Exit when branch result" style="filled" fillcolor=gray]; + 60 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 61 [label="Enter block"]; + subgraph cluster_23 { + color=blue + 62 [label="Function call arguments enter"]; + 63 [label="Access variable R|/y|"]; + 64 [label="Function call arguments exit"]; + } + 65 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 66 [label="Exit block"]; + } + 67 [label="Exit when branch result"]; + 68 [label="Exit when"]; + } + 69 [label="Exit block"]; + } + 70 [label="Exit when branch result"]; + 71 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 72 [label="Enter block"]; + subgraph cluster_25 { + color=blue + 73 [label="Enter block"]; + subgraph cluster_26 { + color=blue + 74 [label="Function call arguments enter"]; + subgraph cluster_27 { + color=blue + 75 [label="Function call arguments enter"]; + 76 [label="Const: Int(0)"]; + 77 [label="Const: Int(0)"]; + 78 [label="Function call arguments exit"]; + } + 79 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)" style="filled" fillcolor=yellow]; + 80 [label="Function call arguments exit"]; + } + 81 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()" style="filled" fillcolor=yellow]; + 82 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; + subgraph cluster_28 { + color=blue + 83 [label="Enter while loop"]; + subgraph cluster_29 { + color=blue + 84 [label="Enter loop condition"]; + subgraph cluster_30 { + color=blue + 85 [label="Function call arguments enter"]; + 86 [label="Access variable R|/|"]; + 87 [label="Function call arguments exit"]; + } + 88 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 89 [label="Exit loop condition"]; + } + subgraph cluster_31 { + color=blue + 90 [label="Enter loop block"]; + subgraph cluster_32 { + color=blue + 91 [label="Enter block"]; + subgraph cluster_33 { + color=blue + 92 [label="Function call arguments enter"]; + 93 [label="Access variable R|/|"]; + 94 [label="Function call arguments exit"]; + } + 95 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()" style="filled" fillcolor=yellow]; + 96 [label="Variable declaration: lval i: R|kotlin/Int|"]; + subgraph cluster_34 { + color=blue + 97 [label="Enter block"]; + subgraph cluster_35 { + color=blue + 98 [label="Function call arguments enter"]; + 99 [label="Access variable R|/x|"]; + 100 [label="Function call arguments exit"]; + } + 101 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 102 [label="Exit block"]; + } + 103 [label="Exit block"]; + } + 104 [label="Exit loop block"]; + } + 105 [label="Exit while loop"]; + } + 106 [label="Exit block"]; + } + subgraph cluster_36 { + color=blue + 107 [label="Function call arguments enter"]; + 108 [label="Access variable R|/y|"]; + 109 [label="Function call arguments exit"]; + } + 110 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 111 [label="Exit block"]; + } + 112 [label="Exit when branch result"]; + 113 [label="Exit when"]; + } + subgraph cluster_37 { + color=blue + 114 [label="Enter do-while loop"]; + subgraph cluster_38 { + color=blue + 115 [label="Enter loop block"]; + subgraph cluster_39 { + color=blue + 116 [label="Enter block"]; + subgraph cluster_40 { + color=blue + 117 [label="Function call arguments enter"]; + 118 [label="Access variable R|/z|"]; + 119 [label="Function call arguments exit"]; + } + 120 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 121 [label="Exit block"]; + } + 122 [label="Exit loop block"]; + } + subgraph cluster_41 { + color=blue + 123 [label="Enter loop condition"]; + 124 [label="Const: Boolean(true)"]; + 125 [label="Exit loop condition"]; + } + 126 [label="Exit do-while loop" style="filled" fillcolor=gray]; + } + 127 [label="Exit block" style="filled" fillcolor=gray]; + } + 128 [label="Exit function foo" style="filled" fillcolor=red]; + } 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32 61}; + 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {36 71}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40 52}; + 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {44}; + 43 -> {44 60}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {104}; - 48 -> {49} [style=dotted]; - 49 -> {50} [style=dotted]; - 50 -> {51} [style=dotted]; - 51 -> {58} [style=dotted]; + 48 -> {49}; + 49 -> {50}; + 50 -> {51}; + 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57}; - 57 -> {58}; - 58 -> {59}; - 59 -> {60}; - 60 -> {91}; + 56 -> {128}; + 56 -> {57} [style=dotted]; + 57 -> {58} [style=dotted]; + 58 -> {59} [style=dotted]; + 59 -> {68} [style=dotted]; + 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; @@ -270,10 +330,10 @@ digraph flow_kt { 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; + 70 -> {113}; 71 -> {72}; 72 -> {73}; - 73 -> {74 85}; + 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; @@ -284,12 +344,12 @@ digraph flow_kt { 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {70} [color=green style=dashed]; + 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; - 89 -> {90}; + 89 -> {90 105}; 90 -> {91}; 91 -> {92}; 92 -> {93}; @@ -301,9 +361,33 @@ digraph flow_kt { 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {93} [color=green style=dashed]; - 101 -> {102} [style=dotted]; - 102 -> {103} [style=dotted]; - 103 -> {104} [style=dotted]; + 101 -> {102}; + 102 -> {103}; + 103 -> {104}; + 104 -> {84} [color=green style=dashed]; + 105 -> {106}; + 106 -> {107}; + 107 -> {108}; + 108 -> {109}; + 109 -> {110}; + 110 -> {111}; + 111 -> {112}; + 112 -> {113}; + 113 -> {114}; + 114 -> {115}; + 115 -> {116}; + 116 -> {117}; + 117 -> {118}; + 118 -> {119}; + 119 -> {120}; + 120 -> {121}; + 121 -> {122}; + 122 -> {123}; + 123 -> {124}; + 124 -> {125}; + 125 -> {115} [color=green style=dashed]; + 125 -> {126} [style=dotted]; + 126 -> {127} [style=dotted]; + 127 -> {128} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot index de5e52aed14..4a69c65493b 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot @@ -35,15 +35,20 @@ digraph inPlaceLambda_kt { subgraph cluster_6 { color=blue 12 [label="Enter block"]; - 13 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; + subgraph cluster_7 { + color=blue + 13 [label="Function call arguments enter"]; + 14 [label="Function call arguments exit"]; + } + 15 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 16 [label="Exit block"]; } - 15 [label="Exit when branch result"]; - 16 [label="Exit when"]; + 17 [label="Exit when branch result"]; + 18 [label="Exit when"]; } - 17 [label="Exit block"]; + 19 [label="Exit block"]; } - 18 [label="Exit function bar" style="filled" fillcolor=red]; + 20 [label="Exit function bar" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -53,7 +58,7 @@ digraph inPlaceLambda_kt { 7 -> {8}; 8 -> {9}; 9 -> {10 11}; - 10 -> {16}; + 10 -> {18}; 11 -> {12}; 12 -> {13}; 13 -> {14}; @@ -61,51 +66,74 @@ digraph inPlaceLambda_kt { 15 -> {16}; 16 -> {17}; 17 -> {18}; + 18 -> {19}; + 19 -> {20}; - subgraph cluster_7 { + subgraph cluster_8 { color=red - 19 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_8 { + 21 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 20 [label="Enter block"]; - subgraph cluster_9 { - color=blue - 21 [label="Enter block"]; - 22 [label="Exit block"]; - } - 23 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 24 [label="Postponed enter to lambda"]; + 22 [label="Enter block"]; subgraph cluster_10 { color=blue - 25 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 26 [label="Enter block"]; - 27 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; - } - 29 [label="Exit function " style="filled" fillcolor=red]; + 23 [label="Enter block"]; + 24 [label="Exit block"]; } - 30 [label="Postponed exit from lambda"]; - 31 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; + subgraph cluster_11 { + color=blue + 25 [label="Function call arguments enter"]; + 26 [label="Function call arguments exit"]; + } + 27 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + subgraph cluster_12 { + color=blue + 28 [label="Function call arguments enter"]; + 29 [label="Postponed enter to lambda"]; + subgraph cluster_13 { + color=blue + 30 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 31 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 32 [label="Function call arguments enter"]; + 33 [label="Function call arguments exit"]; + } + 34 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 35 [label="Exit block"]; + } + 36 [label="Exit function " style="filled" fillcolor=red]; + } + 37 [label="Function call arguments exit"]; + } + 38 [label="Postponed exit from lambda"]; + 39 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 40 [label="Exit block"]; } - 33 [label="Exit function foo" style="filled" fillcolor=red]; + 41 [label="Exit function foo" style="filled" fillcolor=red]; } - 19 -> {20}; - 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25 30 31}; - 24 -> {25} [style=dashed]; + 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {30}; + 29 -> {30 37 38}; + 29 -> {30} [style=dashed]; 30 -> {31}; 31 -> {32}; 32 -> {33}; + 33 -> {34}; + 34 -> {35}; + 35 -> {36}; + 36 -> {38}; + 37 -> {39}; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot index 2a9fa3258e0..ad7db3b41db 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot @@ -21,11 +21,16 @@ digraph simple_kt { 4 [label="Enter block"]; 5 [label="Exit block"]; } - 6 [label="Access variable R|/x|"]; - 7 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 8 [label="Exit block"]; + subgraph cluster_4 { + color=blue + 6 [label="Function call arguments enter"]; + 7 [label="Access variable R|/x|"]; + 8 [label="Function call arguments exit"]; + } + 9 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 10 [label="Exit block"]; } - 9 [label="Exit function bar" style="filled" fillcolor=red]; + 11 [label="Exit function bar" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -34,48 +39,63 @@ digraph simple_kt { 6 -> {7}; 7 -> {8}; 8 -> {9}; + 9 -> {10}; + 10 -> {11}; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 10 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_5 { + 12 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 11 [label="Enter block"]; - subgraph cluster_6 { - color=blue - 12 [label="Enter block"]; - 13 [label="Exit block"]; - } - 14 [label="Access variable R|/x|"]; - 15 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 13 [label="Enter block"]; subgraph cluster_7 { color=blue - 16 [label="Enter when"]; - subgraph cluster_8 { - color=blue - 17 [label="Enter when branch condition "]; - 18 [label="Const: Boolean(true)"]; - 19 [label="Exit when branch condition"]; - } - 20 [label="Synthetic else branch"]; - 21 [label="Enter when branch result"]; - subgraph cluster_9 { - color=blue - 22 [label="Enter block"]; - 23 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 24 [label="Exit block"]; - } - 25 [label="Exit when branch result"]; - 26 [label="Exit when"]; + 14 [label="Enter block"]; + 15 [label="Exit block"]; } - 27 [label="Access variable R|/z|"]; - 28 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 29 [label="Exit block"]; + subgraph cluster_8 { + color=blue + 16 [label="Function call arguments enter"]; + 17 [label="Access variable R|/x|"]; + 18 [label="Function call arguments exit"]; + } + 19 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + subgraph cluster_9 { + color=blue + 20 [label="Enter when"]; + subgraph cluster_10 { + color=blue + 21 [label="Enter when branch condition "]; + 22 [label="Const: Boolean(true)"]; + 23 [label="Exit when branch condition"]; + } + 24 [label="Synthetic else branch"]; + 25 [label="Enter when branch result"]; + subgraph cluster_11 { + color=blue + 26 [label="Enter block"]; + subgraph cluster_12 { + color=blue + 27 [label="Function call arguments enter"]; + 28 [label="Function call arguments exit"]; + } + 29 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit when branch result"]; + 32 [label="Exit when"]; + } + subgraph cluster_13 { + color=blue + 33 [label="Function call arguments enter"]; + 34 [label="Access variable R|/z|"]; + 35 [label="Function call arguments exit"]; + } + 36 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 37 [label="Exit block"]; } - 30 [label="Exit function foo" style="filled" fillcolor=red]; + 38 [label="Exit function foo" style="filled" fillcolor=red]; } - 10 -> {11}; - 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; @@ -83,16 +103,24 @@ digraph simple_kt { 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 21}; - 20 -> {26}; + 19 -> {20}; + 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {24}; - 24 -> {25}; + 23 -> {24 25}; + 24 -> {32}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; + 30 -> {31}; + 31 -> {32}; + 32 -> {33}; + 33 -> {34}; + 34 -> {35}; + 35 -> {36}; + 36 -> {37}; + 37 -> {38}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot index 7b2e63fa1a4..ad82787208c 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot @@ -21,10 +21,15 @@ digraph unknown_kt { 4 [label="Enter block"]; 5 [label="Exit block"]; } - 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 7 [label="Exit block"]; + subgraph cluster_4 { + color=blue + 6 [label="Function call arguments enter"]; + 7 [label="Function call arguments exit"]; + } + 8 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 9 [label="Exit block"]; } - 8 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 10 [label="Exit function inlineRun" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -32,120 +37,157 @@ digraph unknown_kt { 5 -> {6}; 6 -> {7}; 7 -> {8}; - - subgraph cluster_4 { - color=red - 9 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 10 [label="Enter block"]; - subgraph cluster_6 { - color=blue - 11 [label="Enter block"]; - 12 [label="Exit block"]; - } - 13 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; - } - 15 [label="Exit function myRun" style="filled" fillcolor=red]; - } + 8 -> {9}; 9 -> {10}; - 10 -> {11}; + + subgraph cluster_5 { + color=red + 11 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 12 [label="Enter block"]; + subgraph cluster_7 { + color=blue + 13 [label="Enter block"]; + 14 [label="Exit block"]; + } + subgraph cluster_8 { + color=blue + 15 [label="Function call arguments enter"]; + 16 [label="Function call arguments exit"]; + } + 17 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 18 [label="Exit block"]; + } + 19 [label="Exit function myRun" style="filled" fillcolor=red]; + } 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - - subgraph cluster_7 { - color=red - 16 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 17 [label="Enter block"]; - 18 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 19 [label="Postponed enter to lambda"]; - subgraph cluster_9 { - color=blue - 20 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 21 [label="Enter block"]; - 22 [label="Const: Int(1)"]; - 23 [label="Assignment: R|/x|"]; - 24 [label="Exit block"]; - } - 25 [label="Exit function " style="filled" fillcolor=red]; - } - 26 [label="Postponed exit from lambda"]; - 27 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 28 [label="Access variable R|/x|"]; - 29 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; - } - 31 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 26 27}; - 19 -> {20} [style=dashed]; + + subgraph cluster_9 { + color=red + 20 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 21 [label="Enter block"]; + 22 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_11 { + color=blue + 23 [label="Function call arguments enter"]; + 24 [label="Postponed enter to lambda"]; + subgraph cluster_12 { + color=blue + 25 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 26 [label="Enter block"]; + 27 [label="Const: Int(1)"]; + 28 [label="Assignment: R|/x|"]; + 29 [label="Exit block"]; + } + 30 [label="Exit function " style="filled" fillcolor=red]; + } + 31 [label="Function call arguments exit"]; + } + 32 [label="Postponed exit from lambda"]; + 33 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_14 { + color=blue + 34 [label="Function call arguments enter"]; + 35 [label="Access variable R|/x|"]; + 36 [label="Function call arguments exit"]; + } + 37 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; + } + 39 [label="Exit function test_1" style="filled" fillcolor=red]; + } 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25}; + 24 -> {25 31 32}; + 24 -> {25} [style=dashed]; 25 -> {26}; 26 -> {27}; - 26 -> {19} [color=green style=dashed]; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31}; - - subgraph cluster_11 { - color=red - 32 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 33 [label="Enter block"]; - 34 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 35 [label="Postponed enter to lambda"]; - subgraph cluster_13 { - color=blue - 36 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 37 [label="Enter block"]; - 38 [label="Const: Int(1)"]; - 39 [label="Assignment: R|/x|"]; - 40 [label="Exit block"]; - } - 41 [label="Exit function " style="filled" fillcolor=red]; - } - 42 [label="Postponed exit from lambda"]; - 43 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 44 [label="Access variable R|/x|"]; - 45 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 46 [label="Exit block"]; - } - 47 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 30 -> {32}; + 31 -> {33}; 32 -> {33}; + 32 -> {24} [color=green style=dashed]; 33 -> {34}; 34 -> {35}; - 35 -> {36 42 43}; - 35 -> {36} [style=dashed]; + 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40}; + + subgraph cluster_15 { + color=red + 40 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 41 [label="Enter block"]; + 42 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_17 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Postponed enter to lambda"]; + subgraph cluster_18 { + color=blue + 45 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_19 { + color=blue + 46 [label="Enter block"]; + 47 [label="Const: Int(1)"]; + 48 [label="Assignment: R|/x|"]; + 49 [label="Exit block"]; + } + 50 [label="Exit function " style="filled" fillcolor=red]; + } + 51 [label="Function call arguments exit"]; + } + 52 [label="Postponed exit from lambda"]; + 53 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_20 { + color=blue + 54 [label="Function call arguments enter"]; + 55 [label="Access variable R|/x|"]; + 56 [label="Function call arguments exit"]; + } + 57 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 58 [label="Exit block"]; + } + 59 [label="Exit function test_2" style="filled" fillcolor=red]; + } 40 -> {41}; 41 -> {42}; 42 -> {43}; - 42 -> {35} [color=green style=dashed]; 43 -> {44}; - 44 -> {45}; + 44 -> {45 51 52}; + 44 -> {45} [style=dashed]; 45 -> {46}; 46 -> {47}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50}; + 50 -> {52}; + 51 -> {53}; + 52 -> {53}; + 52 -> {44} [color=green style=dashed]; + 53 -> {54}; + 54 -> {55}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot index f1f7f2262ec..7baa8e4520f 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot @@ -90,167 +90,216 @@ digraph delegateWithAnonymousObject_kt { subgraph cluster_10 { color=blue 26 [label="Enter property" style="filled" fillcolor=red]; - 27 [label="Postponed enter to lambda"]; subgraph cluster_11 { color=blue - 28 [label="Enter function " style="filled" fillcolor=red]; + 27 [label="Function call arguments enter"]; + 28 [label="Postponed enter to lambda"]; subgraph cluster_12 { color=blue - 29 [label="Enter block"]; - 30 [label="Enter anonymous object"]; + 29 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 31 [label="Enter class " style="filled" fillcolor=red]; + 30 [label="Enter block"]; + 31 [label="Enter anonymous object"]; subgraph cluster_14 { color=blue - 32 [label="Enter function " style="filled" fillcolor=red]; - 33 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 34 [label="Exit function " style="filled" fillcolor=red]; + 32 [label="Enter class " style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 33 [label="Enter function " style="filled" fillcolor=red]; + 34 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 35 [label="Exit function " style="filled" fillcolor=red]; + } + 36 [label="Exit class " style="filled" fillcolor=red]; } - 35 [label="Exit class " style="filled" fillcolor=red]; + 37 [label="Exit anonymous object expression"]; + 38 [label="Exit block"]; } - 36 [label="Exit anonymous object expression"]; - 37 [label="Exit block"]; + 39 [label="Exit function " style="filled" fillcolor=red]; } - 38 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_15 { - color=blue - 39 [label="Enter function setValue" style="filled" fillcolor=red]; subgraph cluster_16 { color=blue - 40 [label="Enter block"]; - 41 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; - 42 [label="Access variable R|/value|"]; - 43 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)" style="filled" fillcolor=yellow]; - 44 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|/value|)"]; - 45 [label="Stub" style="filled" fillcolor=gray]; - 46 [label="Exit block" style="filled" fillcolor=gray]; + 40 [label="Enter function setValue" style="filled" fillcolor=red]; + subgraph cluster_17 { + color=blue + 41 [label="Enter block"]; + subgraph cluster_18 { + color=blue + 42 [label="Function call arguments enter"]; + subgraph cluster_19 { + color=blue + 43 [label="Function call arguments enter"]; + 44 [label="Function call arguments exit"]; + } + 45 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; + 46 [label="Access variable R|/value|"]; + 47 [label="Function call arguments exit"]; + } + 48 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)" style="filled" fillcolor=yellow]; + 49 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|/value|)"]; + 50 [label="Stub" style="filled" fillcolor=gray]; + 51 [label="Exit block" style="filled" fillcolor=gray]; + } + 52 [label="Exit function setValue" style="filled" fillcolor=red]; } - 47 [label="Exit function setValue" style="filled" fillcolor=red]; - } - subgraph cluster_17 { - color=blue - 48 [label="Enter function getValue" style="filled" fillcolor=red]; - subgraph cluster_18 { + subgraph cluster_20 { color=blue - 49 [label="Enter block"]; - 50 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; - 51 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"]; - 52 [label="Stub" style="filled" fillcolor=gray]; - 53 [label="Exit block" style="filled" fillcolor=gray]; + 53 [label="Enter function getValue" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 54 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 55 [label="Function call arguments enter"]; + 56 [label="Function call arguments exit"]; + } + 57 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; + 58 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"]; + 59 [label="Stub" style="filled" fillcolor=gray]; + 60 [label="Exit block" style="filled" fillcolor=gray]; + } + 61 [label="Exit function getValue" style="filled" fillcolor=red]; } - 54 [label="Exit function getValue" style="filled" fillcolor=red]; + 62 [label="Function call arguments exit"]; } - 55 [label="Postponed exit from lambda"]; - 56 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)" style="filled" fillcolor=yellow]; - 57 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...).R?C|special/error|(...)" style="filled" fillcolor=yellow]; - 58 [label="Exit property delegate" style="filled" fillcolor=yellow]; - 59 [label="Exit property" style="filled" fillcolor=red]; + 63 [label="Postponed exit from lambda"]; + 64 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_23 { + color=blue + 65 [label="Function call arguments enter"]; + 66 [label="Function call arguments exit"]; + } + 67 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...).R?C|special/error|(...)" style="filled" fillcolor=yellow]; + 68 [label="Exit property delegate" style="filled" fillcolor=yellow]; + 69 [label="Exit property" style="filled" fillcolor=red]; } - subgraph cluster_19 { + subgraph cluster_24 { color=blue - 60 [label="Enter function " style="filled" fillcolor=red]; - 61 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; - 62 [label="Exit function " style="filled" fillcolor=red]; + 70 [label="Enter function " style="filled" fillcolor=red]; + 71 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; + 72 [label="Exit function " style="filled" fillcolor=red]; } - 63 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red]; + 73 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red]; } 25 -> {26} [color=green]; - 25 -> {63} [style=dotted]; - 25 -> {26 60} [style=dashed]; + 25 -> {73} [style=dotted]; + 25 -> {26 70} [style=dashed]; 26 -> {27}; - 27 -> {28 55 56}; - 27 -> {28} [style=dashed]; - 28 -> {29}; + 27 -> {28}; + 28 -> {29 62 63}; + 28 -> {29} [style=dashed]; 29 -> {30}; 30 -> {31}; - 30 -> {36} [style=dotted]; - 30 -> {31} [style=dashed]; 31 -> {32}; - 31 -> {39 48} [color=red]; - 31 -> {35} [style=dotted]; + 31 -> {37} [style=dotted]; 31 -> {32} [style=dashed]; 32 -> {33}; + 32 -> {40 53} [color=red]; + 32 -> {36} [style=dotted]; + 32 -> {33} [style=dashed]; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 35 -> {39 48} [color=green]; - 35 -> {39 48} [style=dashed]; 36 -> {37}; + 36 -> {40 53} [color=green]; + 36 -> {40 53} [style=dashed]; 37 -> {38}; - 39 -> {40}; + 38 -> {39}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {47}; - 44 -> {45} [style=dotted]; - 45 -> {46} [style=dotted]; - 46 -> {47} [style=dotted]; + 44 -> {45}; + 45 -> {46}; + 46 -> {47}; + 47 -> {48}; 48 -> {49}; - 49 -> {50}; - 50 -> {51}; - 51 -> {54}; + 49 -> {52}; + 49 -> {50} [style=dotted]; + 50 -> {51} [style=dotted]; 51 -> {52} [style=dotted]; - 52 -> {53} [style=dotted]; - 53 -> {54} [style=dotted]; - 55 -> {56} [color=green]; - 55 -> {58} [color=red]; + 53 -> {54}; + 54 -> {55}; + 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {59}; - 59 -> {60} [color=green]; - 60 -> {61}; - 61 -> {62}; - 62 -> {63} [color=green]; - - subgraph cluster_20 { - color=red - 64 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 65 [label="Enter block"]; - 66 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; - 67 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 68 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; - 69 [label="Stub" style="filled" fillcolor=gray]; - 70 [label="Exit block" style="filled" fillcolor=gray]; - } - 71 [label="Exit function " style="filled" fillcolor=red]; - } + 58 -> {61}; + 58 -> {59} [style=dotted]; + 59 -> {60} [style=dotted]; + 60 -> {61} [style=dotted]; + 62 -> {64}; + 63 -> {64} [color=green]; + 63 -> {68} [color=red]; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - 68 -> {71}; - 68 -> {69} [style=dotted]; - 69 -> {70} [style=dotted]; - 70 -> {71} [style=dotted]; + 68 -> {69}; + 69 -> {70} [color=green]; + 70 -> {71}; + 71 -> {72}; + 72 -> {73} [color=green]; - subgraph cluster_22 { + subgraph cluster_25 { color=red - 72 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_23 { + 74 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_26 { color=blue - 73 [label="Enter block"]; - 74 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; - 75 [label="Access variable R|/issueListView|"]; - 76 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 77 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|, R|/issueListView|)"]; - 78 [label="Stub" style="filled" fillcolor=gray]; - 79 [label="Exit block" style="filled" fillcolor=gray]; + 75 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 76 [label="Function call arguments enter"]; + 77 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; + 78 [label="Function call arguments exit"]; + } + 79 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 80 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; + 81 [label="Stub" style="filled" fillcolor=gray]; + 82 [label="Exit block" style="filled" fillcolor=gray]; } - 80 [label="Exit function " style="filled" fillcolor=red]; + 83 [label="Exit function " style="filled" fillcolor=red]; } - 72 -> {73}; - 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {80}; - 77 -> {78} [style=dotted]; - 78 -> {79} [style=dotted]; - 79 -> {80} [style=dotted]; + 77 -> {78}; + 78 -> {79}; + 79 -> {80}; + 80 -> {83}; + 80 -> {81} [style=dotted]; + 81 -> {82} [style=dotted]; + 82 -> {83} [style=dotted]; + + subgraph cluster_28 { + color=red + 84 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 85 [label="Enter block"]; + subgraph cluster_30 { + color=blue + 86 [label="Function call arguments enter"]; + 87 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; + 88 [label="Access variable R|/issueListView|"]; + 89 [label="Function call arguments exit"]; + } + 90 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 91 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|, R|/issueListView|)"]; + 92 [label="Stub" style="filled" fillcolor=gray]; + 93 [label="Exit block" style="filled" fillcolor=gray]; + } + 94 [label="Exit function " style="filled" fillcolor=red]; + } + 84 -> {85}; + 85 -> {86}; + 86 -> {87}; + 87 -> {88}; + 88 -> {89}; + 89 -> {90}; + 90 -> {91}; + 91 -> {94}; + 91 -> {92} [style=dotted]; + 92 -> {93} [style=dotted]; + 93 -> {94} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot index 4deedf29d46..27721aaabaa 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot @@ -89,73 +89,101 @@ digraph plusAssignWithLambdaInRhs_kt { subgraph cluster_9 { color=blue 28 [label="Enter block"]; - 29 [label="Function call: R|kotlin/collections/mutableListOf| kotlin/Unit|>()" style="filled" fillcolor=yellow]; - 30 [label="Variable declaration: lval queue: R|kotlin/collections/MutableList>|"]; - 31 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue - 32 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 33 [label="Enter block"]; - 34 [label="Access variable R|/queue|"]; - 35 [label="Postponed enter to lambda"]; - subgraph cluster_12 { - color=blue - 36 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 37 [label="Enter block"]; - 38 [label="Function call: R|/computation|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 39 [label="Function call: R|/resolve|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 40 [label="Exit block"]; - } - 41 [label="Exit function " style="filled" fillcolor=red]; - } - 42 [label="Postponed exit from lambda"]; - 43 [label="Function call: R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; - 44 [label="Exit block"]; - } - 45 [label="Exit function " style="filled" fillcolor=red]; + 29 [label="Function call arguments enter"]; + 30 [label="Function call arguments exit"]; } - 46 [label="Postponed exit from lambda"]; - 47 [label="Function call: R|/A.A|(...)" style="filled" fillcolor=yellow]; - 48 [label="Jump: ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { + 31 [label="Function call: R|kotlin/collections/mutableListOf| kotlin/Unit|>()" style="filled" fillcolor=yellow]; + 32 [label="Variable declaration: lval queue: R|kotlin/collections/MutableList>|"]; + subgraph cluster_11 { + color=blue + 33 [label="Function call arguments enter"]; + 34 [label="Postponed enter to lambda"]; + subgraph cluster_12 { + color=blue + 35 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 36 [label="Enter block"]; + 37 [label="Access variable R|/queue|"]; + 38 [label="Postponed enter to lambda"]; + subgraph cluster_14 { + color=blue + 39 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 40 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 41 [label="Function call arguments enter"]; + subgraph cluster_17 { + color=blue + 42 [label="Function call arguments enter"]; + 43 [label="Function call arguments exit"]; + } + 44 [label="Function call: R|/computation|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 45 [label="Function call arguments exit"]; + } + 46 [label="Function call: R|/resolve|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 47 [label="Exit block"]; + } + 48 [label="Exit function " style="filled" fillcolor=red]; + } + 49 [label="Postponed exit from lambda"]; + 50 [label="Function call: R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; + 51 [label="Exit block"]; + } + 52 [label="Exit function " style="filled" fillcolor=red]; + } + 53 [label="Function call arguments exit"]; + } + 54 [label="Postponed exit from lambda"]; + 55 [label="Function call: R|/A.A|(...)" style="filled" fillcolor=yellow]; + 56 [label="Jump: ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(fun (): R|kotlin/Unit| { R|/resolve|.R|SubstitutionOverride|(R|/computation|.R|SubstitutionOverride|()) } ) } )"]; - 49 [label="Stub" style="filled" fillcolor=gray]; - 50 [label="Exit block" style="filled" fillcolor=gray]; + 57 [label="Stub" style="filled" fillcolor=gray]; + 58 [label="Exit block" style="filled" fillcolor=gray]; } - 51 [label="Exit function postpone" style="filled" fillcolor=red]; + 59 [label="Exit function postpone" style="filled" fillcolor=red]; } 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32 46 47}; - 31 -> {32} [style=dashed]; + 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {35}; - 35 -> {36 42 43}; - 35 -> {36} [style=dashed]; + 34 -> {35 53 54}; + 34 -> {35} [style=dashed]; + 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {39}; + 38 -> {39 49 50}; + 38 -> {39} [style=dashed]; 39 -> {40}; 40 -> {41}; + 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; + 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {51}; - 48 -> {49} [style=dotted]; - 49 -> {50} [style=dotted]; - 50 -> {51} [style=dotted]; + 49 -> {50}; + 50 -> {51}; + 51 -> {52}; + 53 -> {55}; + 54 -> {55}; + 55 -> {56}; + 56 -> {59}; + 56 -> {57} [style=dotted]; + 57 -> {58} [style=dotted]; + 58 -> {59} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot index 75de9b9536f..fc069b94662 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot @@ -60,38 +60,43 @@ digraph tryWithLambdaInside_kt { subgraph cluster_9 { color=blue 17 [label="Enter block"]; - 18 [label="Access variable R|/list|"]; - 19 [label="Postponed enter to lambda"]; subgraph cluster_10 { color=blue - 20 [label="Enter function " style="filled" fillcolor=red]; + 18 [label="Function call arguments enter"]; + 19 [label="Access variable R|/list|"]; + 20 [label="Postponed enter to lambda"]; subgraph cluster_11 { color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/it|"]; - 23 [label="Exit block"]; + 21 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 22 [label="Enter block"]; + 23 [label="Access variable R|/it|"]; + 24 [label="Exit block"]; + } + 25 [label="Exit function " style="filled" fillcolor=red]; } - 24 [label="Exit function " style="filled" fillcolor=red]; + 26 [label="Function call arguments exit"]; } - 25 [label="Postponed exit from lambda"]; - 26 [label="Function call: R|/list|.R|kotlin/collections/filter|(...)" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; + 27 [label="Postponed exit from lambda"]; + 28 [label="Function call: R|/list|.R|kotlin/collections/filter|(...)" style="filled" fillcolor=yellow]; + 29 [label="Exit block"]; } - 28 [label="Try main block exit"]; + 30 [label="Try main block exit"]; } - subgraph cluster_12 { + subgraph cluster_13 { color=blue - 29 [label="Enter finally"]; - subgraph cluster_13 { + 31 [label="Enter finally"]; + subgraph cluster_14 { color=blue - 30 [label="Enter block"]; - 31 [label="Exit block"]; + 32 [label="Enter block"]; + 33 [label="Exit block"]; } - 32 [label="Exit finally"]; + 34 [label="Exit finally"]; } - 33 [label="Try expression exit"]; + 35 [label="Try expression exit"]; } - 34 [label="Jump: ^testInPlace try { + 36 [label="Jump: ^testInPlace try { R|/list|.R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } @@ -100,88 +105,95 @@ digraph tryWithLambdaInside_kt { finally { } "]; - 35 [label="Stub" style="filled" fillcolor=gray]; - 36 [label="Exit block" style="filled" fillcolor=gray]; + 37 [label="Stub" style="filled" fillcolor=gray]; + 38 [label="Exit block" style="filled" fillcolor=gray]; } - 37 [label="Exit function testInPlace" style="filled" fillcolor=red]; + 39 [label="Exit function testInPlace" style="filled" fillcolor=red]; } 13 -> {14}; 14 -> {15}; 15 -> {16}; - 15 -> {29} [label="onUncaughtException"]; + 15 -> {31} [label="onUncaughtException"]; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20 25 26}; - 19 -> {20} [style=dashed]; - 20 -> {21}; + 19 -> {20}; + 20 -> {21 26 27}; + 20 -> {21} [style=dashed]; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {19} [color=green style=dashed]; - 25 -> {26} [color=green]; - 25 -> {33} [color=red]; - 26 -> {27}; - 27 -> {28}; + 25 -> {27}; + 26 -> {28}; + 27 -> {20} [color=green style=dashed]; + 27 -> {28} [color=green]; + 27 -> {35} [color=red]; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {37}; - 34 -> {35} [style=dotted]; - 35 -> {36} [style=dotted]; + 34 -> {35}; + 35 -> {36}; + 36 -> {39}; 36 -> {37} [style=dotted]; + 37 -> {38} [style=dotted]; + 38 -> {39} [style=dotted]; - subgraph cluster_14 { + subgraph cluster_15 { color=red - 38 [label="Enter function testNotInPlace" style="filled" fillcolor=red]; - subgraph cluster_15 { + 40 [label="Enter function testNotInPlace" style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 39 [label="Enter block"]; - subgraph cluster_16 { + 41 [label="Enter block"]; + subgraph cluster_17 { color=blue - 40 [label="Try expression enter"]; - subgraph cluster_17 { + 42 [label="Try expression enter"]; + subgraph cluster_18 { color=blue - 41 [label="Try main block enter"]; - subgraph cluster_18 { + 43 [label="Try main block enter"]; + subgraph cluster_19 { color=blue - 42 [label="Enter block"]; - 43 [label="Access variable R|/list|"]; - 44 [label="Postponed enter to lambda"]; - subgraph cluster_19 { + 44 [label="Enter block"]; + subgraph cluster_20 { color=blue - 45 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_20 { + 45 [label="Function call arguments enter"]; + 46 [label="Access variable R|/list|"]; + 47 [label="Postponed enter to lambda"]; + subgraph cluster_21 { color=blue - 46 [label="Enter block"]; - 47 [label="Access variable R|/it|"]; - 48 [label="Exit block"]; + 48 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 49 [label="Enter block"]; + 50 [label="Access variable R|/it|"]; + 51 [label="Exit block"]; + } + 52 [label="Exit function " style="filled" fillcolor=red]; } - 49 [label="Exit function " style="filled" fillcolor=red]; + 53 [label="Function call arguments exit"]; } - 50 [label="Postponed exit from lambda"]; - 51 [label="Function call: R|/list|.R|/notInPlaceFilter|(...)" style="filled" fillcolor=yellow]; - 52 [label="Exit block"]; - } - 53 [label="Try main block exit"]; - } - subgraph cluster_21 { - color=blue - 54 [label="Enter finally"]; - subgraph cluster_22 { - color=blue - 55 [label="Enter block"]; + 54 [label="Postponed exit from lambda"]; + 55 [label="Function call: R|/list|.R|/notInPlaceFilter|(...)" style="filled" fillcolor=yellow]; 56 [label="Exit block"]; } - 57 [label="Exit finally"]; + 57 [label="Try main block exit"]; } - 58 [label="Try expression exit"]; + subgraph cluster_23 { + color=blue + 58 [label="Enter finally"]; + subgraph cluster_24 { + color=blue + 59 [label="Enter block"]; + 60 [label="Exit block"]; + } + 61 [label="Exit finally"]; + } + 62 [label="Try expression exit"]; } - 59 [label="Jump: ^testNotInPlace try { + 63 [label="Jump: ^testNotInPlace try { R|/list|.R|/notInPlaceFilter|( = notInPlaceFilter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } @@ -190,37 +202,39 @@ finally { finally { } "]; - 60 [label="Stub" style="filled" fillcolor=gray]; - 61 [label="Exit block" style="filled" fillcolor=gray]; + 64 [label="Stub" style="filled" fillcolor=gray]; + 65 [label="Exit block" style="filled" fillcolor=gray]; } - 62 [label="Exit function testNotInPlace" style="filled" fillcolor=red]; + 66 [label="Exit function testNotInPlace" style="filled" fillcolor=red]; } - 38 -> {39}; - 39 -> {40}; 40 -> {41}; - 40 -> {54} [label="onUncaughtException"]; 41 -> {42}; 42 -> {43}; + 42 -> {58} [label="onUncaughtException"]; 43 -> {44}; - 44 -> {45 50 51}; - 44 -> {45} [style=dashed]; + 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; + 47 -> {48 53 54}; + 47 -> {48} [style=dashed]; 48 -> {49}; - 50 -> {51} [color=green]; - 50 -> {58} [color=red]; + 49 -> {50}; + 50 -> {51}; 51 -> {52}; - 52 -> {53}; - 53 -> {54}; - 54 -> {55}; + 53 -> {55}; + 54 -> {55} [color=green]; + 54 -> {62} [color=red]; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; - 59 -> {62}; - 59 -> {60} [style=dotted]; - 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; + 59 -> {60}; + 60 -> {61}; + 61 -> {62}; + 62 -> {63}; + 63 -> {66}; + 63 -> {64} [style=dotted]; + 64 -> {65} [style=dotted]; + 65 -> {66} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java index 93ec9d3265e..0efc4aee455 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java @@ -43098,6 +43098,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt"); } + @Test + @TestMetadata("invokeRecieverUnsafe.kt") + public void testInvokeRecieverUnsafe() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.kt"); + } + @Test @TestMetadata("kt10463.kt") public void testKt10463() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java index 06e8ef6b581..dcfe054351f 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java @@ -43218,6 +43218,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt"); } + @Test + @TestMetadata("invokeRecieverUnsafe.kt") + public void testInvokeRecieverUnsafe() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.kt"); + } + @Test @TestMetadata("kt10463.kt") public void testKt10463() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index e8bb6a0a3e1..13c16fd93d3 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -51249,6 +51249,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index 08c536531e2..1c9b52638be 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -51249,6 +51249,18 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index da7c310a2de..2ae8df818e0 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -51249,6 +51249,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/ResolveUtils.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/ResolveUtils.kt index b8215593f92..e9a421034e6 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/ResolveUtils.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/ResolveUtils.kt @@ -366,8 +366,9 @@ private fun BodyResolveComponents.typeFromSymbol(symbol: FirBasedSymbol<*>): Fir fun BodyResolveComponents.transformQualifiedAccessUsingSmartcastInfo( qualifiedAccessExpression: FirQualifiedAccessExpression, + ignoreCallArguments: Boolean, ): FirExpression { - val (stability, typesFromSmartCast) = dataFlowAnalyzer.getTypeUsingSmartcastInfo(qualifiedAccessExpression) + val (stability, typesFromSmartCast) = dataFlowAnalyzer.getTypeUsingSmartcastInfo(qualifiedAccessExpression, ignoreCallArguments) ?: return qualifiedAccessExpression return transformExpressionUsingSmartcastInfo(qualifiedAccessExpression, stability, typesFromSmartCast) ?: qualifiedAccessExpression @@ -376,7 +377,7 @@ fun BodyResolveComponents.transformQualifiedAccessUsingSmartcastInfo( fun BodyResolveComponents.transformWhenSubjectExpressionUsingSmartcastInfo( whenSubjectExpression: FirWhenSubjectExpression, ): FirExpression { - val (stability, typesFromSmartCast) = dataFlowAnalyzer.getTypeUsingSmartcastInfo(whenSubjectExpression) + val (stability, typesFromSmartCast) = dataFlowAnalyzer.getTypeUsingSmartcastInfo(whenSubjectExpression, ignoreCallArguments = false) ?: return whenSubjectExpression return transformExpressionUsingSmartcastInfo(whenSubjectExpression, stability, typesFromSmartCast) ?: whenSubjectExpression @@ -385,8 +386,9 @@ fun BodyResolveComponents.transformWhenSubjectExpressionUsingSmartcastInfo( fun BodyResolveComponents.transformDesugaredAssignmentValueUsingSmartcastInfo( expression: FirDesugaredAssignmentValueReferenceExpression, ): FirExpression { - val (stability, typesFromSmartCast) = dataFlowAnalyzer.getTypeUsingSmartcastInfo(expression.expressionRef.value) - ?: return expression + val (stability, typesFromSmartCast) = + dataFlowAnalyzer.getTypeUsingSmartcastInfo(expression.expressionRef.value, ignoreCallArguments = false) + ?: return expression return transformExpressionUsingSmartcastInfo(expression, stability, typesFromSmartCast) ?: expression } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/FirInvokeResolveTowerExtension.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/FirInvokeResolveTowerExtension.kt index 9703a4abfb4..802d0f2aaae 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/FirInvokeResolveTowerExtension.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/FirInvokeResolveTowerExtension.kt @@ -326,7 +326,7 @@ private fun BodyResolveComponents.createExplicitReceiverForInvokeByCallable( }.build().let { callCompleter.completeCall(it, ResolutionMode.ReceiverResolution) }.let { - transformQualifiedAccessUsingSmartcastInfo(it) + transformQualifiedAccessUsingSmartcastInfo(it, ignoreCallArguments = true) } } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt index 703e74f79c1..ca4bcd40b23 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt @@ -129,8 +129,18 @@ abstract class FirDataFlowAnalyzer( fun isAccessToUnstableLocalVariable(expression: FirExpression): Boolean = context.variableAssignmentAnalyzer.isAccessToUnstableLocalVariable(expression) - open fun getTypeUsingSmartcastInfo(expression: FirExpression): Pair>? { - val flow = graphBuilder.lastNode.flow + /** + * @param ignoreCallArguments Should be set to `true` when call argument flow should not be used for smart-casting. This is important + * because the receiver of implicit `invoke` calls is visited *after* the call arguments due to tower resolution. + */ + open fun getTypeUsingSmartcastInfo( + expression: FirExpression, + ignoreCallArguments: Boolean, + ): Pair>? { + // TODO(KT-64094): Consider moving logic to tower resolution instead. + val node = graphBuilder.lastNode + .let { if (ignoreCallArguments && it is FunctionCallArgumentsExitNode) it.enterNode else it } + val flow = node.flow val variable = variableStorage.getRealVariableWithoutUnwrappingAlias(flow, expression) ?: return null val types = flow.getTypeStatement(variable)?.exactType?.ifEmpty { null } ?: return null return variable.stability to types.toMutableList() @@ -871,14 +881,27 @@ abstract class FirDataFlowAnalyzer( } fun enterCallArguments(call: FirStatement, arguments: List) { + graphBuilder.enterCall() + val lambdas = arguments.mapNotNull { it.unwrapAnonymousFunctionExpression() } context.variableAssignmentAnalyzer.enterFunctionCall(lambdas) - graphBuilder.enterCall() - graphBuilder.enterCallArguments(call, lambdas) + graphBuilder.enterCallArguments(call, lambdas)?.mergeIncomingFlow() } fun exitCallArguments() { - graphBuilder.exitCallArguments()?.mergeIncomingFlow() + val (splitNode, exitNode) = graphBuilder.exitCallArguments() + splitNode?.mergeIncomingFlow() + + if (exitNode != null) { + exitNode.mergeIncomingFlow() + + // Reset implicit receivers back to their state *before* call arguments as tower resolve will use receiver types to lookup + // functions after call arguments have been processed. + // TODO(KT-64094): Consider moving logic to tower resolution instead. + val flow = exitNode.enterNode.flow + updateAllReceivers(currentReceiverState, flow) + currentReceiverState = flow + } } fun exitFunctionCall(functionCall: FirFunctionCall, callCompleted: Boolean) { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt index 0f26cc4220a..6c0633b117f 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt @@ -77,6 +77,7 @@ class ControlFlowGraphBuilder { private val finallyBlocksInProgress: Stack = stackOf() private val finallyBlocksInProgressSet = mutableSetOf() + private val exitFunctionCallArgumentsNodes: Stack = stackOf() private val exitSafeCallNodes: Stack = stackOf() private val exitElvisExpressionNodes: Stack = stackOf() private val elvisRhsEnterNodes: Stack = stackOf() @@ -1172,18 +1173,33 @@ class ControlFlowGraphBuilder { splitDataFlowForPostponedLambdas() } - fun enterCallArguments(fir: FirStatement, anonymousFunctions: List) { + fun enterCallArguments(call: FirStatement, anonymousFunctions: List): FunctionCallArgumentsEnterNode? { if (anonymousFunctions.isEmpty()) { argumentListSplitNodes.push(null) } else { - val splitNode = createSplitPostponedLambdasNode(fir, anonymousFunctions) + val splitNode = createSplitPostponedLambdasNode(call, anonymousFunctions) anonymousFunctions.associateTo(postponedAnonymousFunctionNodes) { it.symbol to (splitNode to null) } argumentListSplitNodes.push(splitNode) } + + if (call is FirFunctionCall) { + val enterNode = createFunctionCallArgumentsEnterNode(call) + val exitNode = createFunctionCallArgumentsExitNode(call, enterNode) + + exitFunctionCallArgumentsNodes.push(exitNode) + addNewSimpleNode(enterNode) + + return enterNode + } else { + exitFunctionCallArgumentsNodes.push(null) + return null + } } - fun exitCallArguments(): SplitPostponedLambdasNode? { - return argumentListSplitNodes.pop()?.also { addNewSimpleNode(it) } + fun exitCallArguments(): Pair { + val splitNode = argumentListSplitNodes.pop()?.also { addNewSimpleNode(it) } + val exitNode = exitFunctionCallArgumentsNodes.pop()?.also { addNewSimpleNode(it) } + return splitNode to exitNode } fun exitFunctionCall(functionCall: FirFunctionCall, callCompleted: Boolean): FunctionCallNode { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt index 350a7ea98af..38eb9f48261 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt @@ -118,6 +118,15 @@ fun ControlFlowGraphBuilder.createLoopBlockEnterNode(fir: FirLoop): LoopBlockEnt fun ControlFlowGraphBuilder.createLoopBlockExitNode(fir: FirLoop): LoopBlockExitNode = LoopBlockExitNode(currentGraph, fir, levelCounter) +fun ControlFlowGraphBuilder.createFunctionCallArgumentsEnterNode(fir: FirFunctionCall): FunctionCallArgumentsEnterNode = + FunctionCallArgumentsEnterNode(currentGraph, fir, levelCounter) + +fun ControlFlowGraphBuilder.createFunctionCallArgumentsExitNode( + fir: FirFunctionCall, + enterNode: FunctionCallArgumentsEnterNode, +): FunctionCallArgumentsExitNode = + FunctionCallArgumentsExitNode(currentGraph, fir, enterNode, levelCounter) + fun ControlFlowGraphBuilder.createFunctionCallNode(fir: FirFunctionCall): FunctionCallNode = FunctionCallNode(currentGraph, fir, levelCounter) @@ -202,7 +211,10 @@ fun ControlFlowGraphBuilder.createEnterSafeCallNode(fir: FirSafeCallExpression): fun ControlFlowGraphBuilder.createPostponedLambdaExitNode(fir: FirAnonymousFunctionExpression): PostponedLambdaExitNode = PostponedLambdaExitNode(currentGraph, fir, levelCounter) -fun ControlFlowGraphBuilder.createSplitPostponedLambdasNode(fir: FirStatement, lambdas: List): SplitPostponedLambdasNode = +fun ControlFlowGraphBuilder.createSplitPostponedLambdasNode( + fir: FirStatement, + lambdas: List, +): SplitPostponedLambdasNode = SplitPostponedLambdasNode(currentGraph, fir, lambdas, levelCounter) fun ControlFlowGraphBuilder.createMergePostponedLambdaExitsNode(fir: FirElement): MergePostponedLambdaExitsNode = diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt index 263ef937765..8fae49b6b79 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt @@ -178,7 +178,7 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT when (result) { is FirQualifiedAccessExpression -> { dataFlowAnalyzer.exitQualifiedAccessExpression(result) - result = components.transformQualifiedAccessUsingSmartcastInfo(result) + result = components.transformQualifiedAccessUsingSmartcastInfo(result, ignoreCallArguments = false) if (result is FirSmartCastExpression) { dataFlowAnalyzer.exitSmartCastExpression(result) } diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNode.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNode.kt index 59be999c684..706ed280756 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNode.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNode.kt @@ -703,6 +703,24 @@ class ResolvedQualifierNode( } } +class FunctionCallArgumentsEnterNode(owner: ControlFlowGraph, override val fir: FirFunctionCall, level: Int) : + CFGNode(owner, level), EnterNodeMarker { + override fun accept(visitor: ControlFlowGraphVisitor, data: D): R { + return visitor.visitFunctionCallArgumentsEnterNode(this, data) + } +} + +class FunctionCallArgumentsExitNode( + owner: ControlFlowGraph, + override val fir: FirFunctionCall, + val enterNode: FunctionCallArgumentsEnterNode, + level: Int, +) : CFGNode(owner, level), ExitNodeMarker { + override fun accept(visitor: ControlFlowGraphVisitor, data: D): R { + return visitor.visitFunctionCallArgumentsExitNode(this, data) + } +} + class FunctionCallNode(owner: ControlFlowGraph, override val fir: FirFunctionCall, level: Int) : CFGNode(owner, level) { override val isUnion: Boolean diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt index 2f1ed70b784..63342eda9c3 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt @@ -57,6 +57,8 @@ fun CFGNode<*>.render(): String = }" is VariableAssignmentNode -> "Assignment: ${fir.calleeReference?.let(CfgRenderer::renderElementAsString)}" + is FunctionCallArgumentsEnterNode -> "Function call arguments enter" + is FunctionCallArgumentsExitNode -> "Function call arguments exit" is FunctionCallNode -> "Function call: ${CfgRenderer.renderElementAsString(fir)}" is DelegatedConstructorCallNode -> "Delegated constructor call: ${CfgRenderer.renderElementAsString(fir)}" is StringConcatenationCallNode -> "String concatenation call: ${CfgRenderer.renderElementAsString(fir)}" diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitor.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitor.kt index 182f5d79431..6e14a763ef5 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitor.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitor.kt @@ -319,6 +319,14 @@ abstract class ControlFlowGraphVisitor { return visitNode(node, data) } + open fun visitFunctionCallArgumentsEnterNode(node: FunctionCallArgumentsEnterNode, data: D): R { + return visitNode(node, data) + } + + open fun visitFunctionCallArgumentsExitNode(node: FunctionCallArgumentsExitNode, data: D): R { + return visitNode(node, data) + } + open fun visitFunctionCallNode(node: FunctionCallNode, data: D): R { return visitNode(node, data) } diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitorVoid.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitorVoid.kt index f8c23f32ecf..f44206617a7 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitorVoid.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitorVoid.kt @@ -239,6 +239,14 @@ abstract class ControlFlowGraphVisitorVoid : ControlFlowGraphVisitor "OK" + else -> result + } +} + +fun explicitArgumentCast(): String { + val a: Any = "" + return when (val result = a.invoke(a as String)) { + "Any.invoke(String)" -> "OK" + else -> result + } +} + +fun implicitReceiverCast(): String { + val a: Any = "" + return when (val result = (a as String)(a)) { + "String.invoke(Any)" -> "OK" // Unique to K1 + else -> result + } +} + + +fun explicitReceiverCast(): String { + val a: Any = "" + return when (val result = (a as String).invoke(a)) { + "String.invoke(String)" -> "OK" + else -> result + } +} + +fun implicitInvokeExplicitRecieverArgumentCast(): String { + val a: Any = "" + with (a) { + return when (val result = this(this as String)) { + "Any.invoke(String)" -> "OK" + else -> result + } + } +} + +fun explicitInvokeImplicitRecieverArgumentCast(): String { + val a: Any = "" + with (a) { + return when (val result = invoke(this as String)) { + "Any.invoke(String)" -> "OK" + else -> result + } + } +} + +fun explicitInvokeExplicitRecieverArgumentCast(): String { + val a: Any = "" + with (a) { + return when (val result = this.invoke(this as String)) { + "Any.invoke(String)" -> "OK" + else -> result + } + } +} diff --git a/compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt b/compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt new file mode 100644 index 00000000000..897c558896c --- /dev/null +++ b/compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt @@ -0,0 +1,82 @@ +// IGNORE_BACKEND_K1: ANY +// ISSUE: KT-63709 + +operator fun String.invoke(unused: String): String = "String.invoke(String)" +operator fun String.invoke(unused: Any): String = "String.invoke(Any)" +operator fun Any.invoke(unused: String): String = "Any.invoke(String)" + +fun box(): String { + var result = "" + implicitArgumentCast().let { if (it != "OK") result += "FAIL: implicitArgumentCast(): $it\n" } + explicitArgumentCast().let { if (it != "OK") result += "FAIL: explicitArgumentCast(): $it\n" } + implicitReceiverCast().let { if (it != "OK") result += "FAIL: implicitReceiverCast(): $it\n" } + explicitReceiverCast().let { if (it != "OK") result += "FAIL: explicitReceiverCast(): $it\n" } + implicitInvokeExplicitRecieverArgumentCast().let { if (it != "OK") result += "FAIL: implicitInvokeExplicitRecieverArgumentCast(): $it\n" } + explicitInvokeImplicitRecieverArgumentCast().let { if (it != "OK") result += "FAIL: explicitInvokeImplicitRecieverArgumentCast(): $it\n" } + explicitInvokeExplicitRecieverArgumentCast().let { if (it != "OK") result += "FAIL: explicitInvokeExplicitRecieverArgumentCast(): $it\n" } + + return if (result.length == 0) "OK" else result +} + +fun implicitArgumentCast(): String { + val a: Any = "" + return when (val result = a(a as String)) { + "Any.invoke(String)" -> "OK" + else -> result + } +} + +fun explicitArgumentCast(): String { + val a: Any = "" + return when (val result = a.invoke(a as String)) { + "Any.invoke(String)" -> "OK" + else -> result + } +} + +fun implicitReceiverCast(): String { + val a: Any = "" + return when (val result = (a as String)(a)) { + "String.invoke(String)" -> "OK" // Unique to K2 + else -> result + } +} + + +fun explicitReceiverCast(): String { + val a: Any = "" + return when (val result = (a as String).invoke(a)) { + "String.invoke(String)" -> "OK" + else -> result + } +} + +fun implicitInvokeExplicitRecieverArgumentCast(): String { + val a: Any = "" + with (a) { + return when (val result = this(this as String)) { + "Any.invoke(String)" -> "OK" + else -> result + } + } +} + +fun explicitInvokeImplicitRecieverArgumentCast(): String { + val a: Any = "" + with (a) { + return when (val result = invoke(this as String)) { + "Any.invoke(String)" -> "OK" + else -> result + } + } +} + +fun explicitInvokeExplicitRecieverArgumentCast(): String { + val a: Any = "" + with (a) { + return when (val result = this.invoke(this as String)) { + "Any.invoke(String)" -> "OK" + else -> result + } + } +} diff --git a/compiler/testData/codegen/box/smartCasts/kt44814.dot b/compiler/testData/codegen/box/smartCasts/kt44814.dot index 81e5d96fd78..e60350658f3 100644 --- a/compiler/testData/codegen/box/smartCasts/kt44814.dot +++ b/compiler/testData/codegen/box/smartCasts/kt44814.dot @@ -186,17 +186,22 @@ digraph kt44814_kt { subgraph cluster_22 { color=blue 57 [label="Enter default value of _children [4]" style="filled" fillcolor=red]; - 58 [label="Function call: R|kotlin/collections/emptyList|() [4]" style="filled" fillcolor=yellow]; - 59 [label="Exit default value of _children [4]" style="filled" fillcolor=red]; + subgraph cluster_23 { + color=blue + 58 [label="Function call arguments enter [4]"]; + 59 [label="Function call arguments exit [4]"]; + } + 60 [label="Function call: R|kotlin/collections/emptyList|() [4]" style="filled" fillcolor=yellow]; + 61 [label="Exit default value of _children [4]" style="filled" fillcolor=red]; } - 60 [label="Exit default value of _children [3]"]; - 61 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 62 [label="Exit function [3]" style="filled" fillcolor=red]; + 62 [label="Exit default value of _children [3]"]; + 63 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 64 [label="Exit function [3]" style="filled" fillcolor=red]; } - 63 [label="Exit class LighterASTNode [2]" style="filled" fillcolor=red]; + 65 [label="Exit class LighterASTNode [2]" style="filled" fillcolor=red]; } 47 -> {48} [color=green]; - 47 -> {63} [style=dotted]; + 47 -> {65} [style=dotted]; 47 -> {48 51 55} [style=dashed]; 48 -> {49}; 49 -> {50}; @@ -206,280 +211,276 @@ digraph kt44814_kt { 53 -> {54}; 54 -> {55} [color=green]; 55 -> {56}; - 56 -> {57 60}; + 56 -> {57 62}; 56 -> {57} [style=dashed]; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {63} [color=green]; + 62 -> {63}; + 63 -> {64}; + 64 -> {65} [color=green]; - subgraph cluster_23 { + subgraph cluster_24 { color=red - 64 [label="Enter function getChildren [3]" style="filled" fillcolor=red]; - subgraph cluster_24 { + 66 [label="Enter function getChildren [3]" style="filled" fillcolor=red]; + subgraph cluster_25 { color=blue - 65 [label="Enter block [3]"]; - 66 [label="Access variable R|/LighterASTNode._children| [3]"]; - 67 [label="Jump: ^getChildren this@R|/LighterASTNode|.R|/LighterASTNode._children| [3]"]; - 68 [label="Stub [3]" style="filled" fillcolor=gray]; - 69 [label="Exit block [3]" style="filled" fillcolor=gray]; + 67 [label="Enter block [3]"]; + 68 [label="Access variable R|/LighterASTNode._children| [3]"]; + 69 [label="Jump: ^getChildren this@R|/LighterASTNode|.R|/LighterASTNode._children| [3]"]; + 70 [label="Stub [3]" style="filled" fillcolor=gray]; + 71 [label="Exit block [3]" style="filled" fillcolor=gray]; } - 70 [label="Exit function getChildren [3]" style="filled" fillcolor=red]; + 72 [label="Exit function getChildren [3]" style="filled" fillcolor=red]; } - 64 -> {65}; - 65 -> {66}; 66 -> {67}; - 67 -> {70}; - 67 -> {68} [style=dotted]; - 68 -> {69} [style=dotted]; + 67 -> {68}; + 68 -> {69}; + 69 -> {72}; 69 -> {70} [style=dotted]; + 70 -> {71} [style=dotted]; + 71 -> {72} [style=dotted]; - subgraph cluster_25 { + subgraph cluster_26 { color=red - 71 [label="Enter class TokenType [2]" style="filled" fillcolor=red]; - subgraph cluster_26 { + 73 [label="Enter class TokenType [2]" style="filled" fillcolor=red]; + subgraph cluster_27 { color=blue - 72 [label="Enter function [3]" style="filled" fillcolor=red]; - 73 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 74 [label="Exit function [3]" style="filled" fillcolor=red]; + 74 [label="Enter function [3]" style="filled" fillcolor=red]; + 75 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 76 [label="Exit function [3]" style="filled" fillcolor=red]; } - 75 [label="Exit class TokenType [2]" style="filled" fillcolor=red]; + 77 [label="Exit class TokenType [2]" style="filled" fillcolor=red]; } - 71 -> {72} [color=green]; - 71 -> {75} [style=dotted]; - 71 -> {72} [style=dashed]; - 72 -> {73}; - 73 -> {74}; - 74 -> {75} [color=green]; + 73 -> {74} [color=green]; + 73 -> {77} [style=dotted]; + 73 -> {74} [style=dashed]; + 74 -> {75}; + 75 -> {76}; + 76 -> {77} [color=green]; - subgraph cluster_27 { + subgraph cluster_28 { color=red - 76 [label="Enter class Companion [3]" style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 77 [label="Enter property [4]" style="filled" fillcolor=red]; - 78 [label="Function call: R|/TokenType.TokenType|() [4]" style="filled" fillcolor=yellow]; - 79 [label="Exit property [4]" style="filled" fillcolor=red]; - } + 78 [label="Enter class Companion [3]" style="filled" fillcolor=red]; subgraph cluster_29 { color=blue - 80 [label="Enter function [4]" style="filled" fillcolor=red]; - 81 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; - 82 [label="Exit function [4]" style="filled" fillcolor=red]; + 79 [label="Enter property [4]" style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 80 [label="Function call arguments enter [4]"]; + 81 [label="Function call arguments exit [4]"]; + } + 82 [label="Function call: R|/TokenType.TokenType|() [4]" style="filled" fillcolor=yellow]; + 83 [label="Exit property [4]" style="filled" fillcolor=red]; } - 83 [label="Exit class Companion [3]" style="filled" fillcolor=red]; - } - 76 -> {77} [color=green]; - 76 -> {83} [style=dotted]; - 76 -> {77 80} [style=dashed]; - 77 -> {78}; - 78 -> {79}; - 79 -> {80} [color=green]; - 80 -> {81}; - 81 -> {82}; - 82 -> {83} [color=green]; - - subgraph cluster_30 { - color=red - 84 [label="Enter class KtModifierKeywordToken [2]" style="filled" fillcolor=red]; subgraph cluster_31 { color=blue - 85 [label="Enter function [3]" style="filled" fillcolor=red]; - 86 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 87 [label="Exit function [3]" style="filled" fillcolor=red]; + 84 [label="Enter function [4]" style="filled" fillcolor=red]; + 85 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; + 86 [label="Exit function [4]" style="filled" fillcolor=red]; } - 88 [label="Exit class KtModifierKeywordToken [2]" style="filled" fillcolor=red]; + 87 [label="Exit class Companion [3]" style="filled" fillcolor=red]; } - 84 -> {85} [color=green]; - 84 -> {88} [style=dotted]; - 84 -> {85} [style=dashed]; + 78 -> {79} [color=green]; + 78 -> {87} [style=dotted]; + 78 -> {79 84} [style=dashed]; + 79 -> {80}; + 80 -> {81}; + 81 -> {82}; + 82 -> {83}; + 83 -> {84} [color=green]; + 84 -> {85}; 85 -> {86}; - 86 -> {87}; - 87 -> {88} [color=green]; + 86 -> {87} [color=green]; subgraph cluster_32 { color=red - 89 [label="Enter class KtModifierList [2]" style="filled" fillcolor=red]; + 88 [label="Enter class KtModifierKeywordToken [2]" style="filled" fillcolor=red]; subgraph cluster_33 { color=blue - 90 [label="Enter function [3]" style="filled" fillcolor=red]; - 91 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 92 [label="Exit function [3]" style="filled" fillcolor=red]; + 89 [label="Enter function [3]" style="filled" fillcolor=red]; + 90 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 91 [label="Exit function [3]" style="filled" fillcolor=red]; } - 93 [label="Exit class KtModifierList [2]" style="filled" fillcolor=red]; + 92 [label="Exit class KtModifierKeywordToken [2]" style="filled" fillcolor=red]; } - 89 -> {90} [color=green]; - 89 -> {93} [style=dotted]; - 89 -> {90} [style=dashed]; + 88 -> {89} [color=green]; + 88 -> {92} [style=dotted]; + 88 -> {89} [style=dashed]; + 89 -> {90}; 90 -> {91}; - 91 -> {92}; - 92 -> {93} [color=green]; + 91 -> {92} [color=green]; subgraph cluster_34 { color=red - 94 [label="Enter class KtModifierListOwner [2]" style="filled" fillcolor=red]; + 93 [label="Enter class KtModifierList [2]" style="filled" fillcolor=red]; subgraph cluster_35 { color=blue - 95 [label="Enter property [3]" style="filled" fillcolor=red]; - 96 [label="Function call: R|/KtModifierList.KtModifierList|() [3]" style="filled" fillcolor=yellow]; - 97 [label="Exit property [3]" style="filled" fillcolor=red]; + 94 [label="Enter function [3]" style="filled" fillcolor=red]; + 95 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 96 [label="Exit function [3]" style="filled" fillcolor=red]; } - subgraph cluster_36 { - color=blue - 98 [label="Enter function [3]" style="filled" fillcolor=red]; - 99 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 100 [label="Exit function [3]" style="filled" fillcolor=red]; - } - 101 [label="Exit class KtModifierListOwner [2]" style="filled" fillcolor=red]; + 97 [label="Exit class KtModifierList [2]" style="filled" fillcolor=red]; } - 94 -> {95} [color=green]; - 94 -> {101} [style=dotted]; - 94 -> {95 98} [style=dashed]; + 93 -> {94} [color=green]; + 93 -> {97} [style=dotted]; + 93 -> {94} [style=dashed]; + 94 -> {95}; 95 -> {96}; - 96 -> {97}; - 97 -> {98} [color=green]; - 98 -> {99}; - 99 -> {100}; - 100 -> {101} [color=green]; + 96 -> {97} [color=green]; - subgraph cluster_37 { + subgraph cluster_36 { color=red - 102 [label="Enter class FirModifier [2]" style="filled" fillcolor=red]; - subgraph cluster_38 { + 98 [label="Enter class KtModifierListOwner [2]" style="filled" fillcolor=red]; + subgraph cluster_37 { color=blue - 103 [label="Enter property [3]" style="filled" fillcolor=red]; - 104 [label="Access variable R|/node| [3]"]; - 105 [label="Exit property [3]" style="filled" fillcolor=red]; + 99 [label="Enter property [3]" style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 100 [label="Function call arguments enter [3]"]; + 101 [label="Function call arguments exit [3]"]; + } + 102 [label="Function call: R|/KtModifierList.KtModifierList|() [3]" style="filled" fillcolor=yellow]; + 103 [label="Exit property [3]" style="filled" fillcolor=red]; } subgraph cluster_39 { color=blue - 106 [label="Enter property [3]" style="filled" fillcolor=red]; - 107 [label="Access variable R|/token| [3]"]; - 108 [label="Exit property [3]" style="filled" fillcolor=red]; + 104 [label="Enter function [3]" style="filled" fillcolor=red]; + 105 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 106 [label="Exit function [3]" style="filled" fillcolor=red]; } - subgraph cluster_40 { - color=blue - 109 [label="Enter function [3]" style="filled" fillcolor=red]; - 110 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 111 [label="Exit function [3]" style="filled" fillcolor=red]; - } - 112 [label="Exit class FirModifier [2]" style="filled" fillcolor=red]; + 107 [label="Exit class KtModifierListOwner [2]" style="filled" fillcolor=red]; } - 102 -> {103} [color=green]; - 102 -> {112} [style=dotted]; - 102 -> {103 106 109} [style=dashed]; - 103 -> {104}; + 98 -> {99} [color=green]; + 98 -> {107} [style=dotted]; + 98 -> {99 104} [style=dashed]; + 99 -> {100}; + 100 -> {101}; + 101 -> {102}; + 102 -> {103}; + 103 -> {104} [color=green]; 104 -> {105}; - 105 -> {106} [color=green]; - 106 -> {107}; - 107 -> {108}; + 105 -> {106}; + 106 -> {107} [color=green]; + + subgraph cluster_40 { + color=red + 108 [label="Enter class FirModifier [2]" style="filled" fillcolor=red]; + subgraph cluster_41 { + color=blue + 109 [label="Enter property [3]" style="filled" fillcolor=red]; + 110 [label="Access variable R|/node| [3]"]; + 111 [label="Exit property [3]" style="filled" fillcolor=red]; + } + subgraph cluster_42 { + color=blue + 112 [label="Enter property [3]" style="filled" fillcolor=red]; + 113 [label="Access variable R|/token| [3]"]; + 114 [label="Exit property [3]" style="filled" fillcolor=red]; + } + subgraph cluster_43 { + color=blue + 115 [label="Enter function [3]" style="filled" fillcolor=red]; + 116 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 117 [label="Exit function [3]" style="filled" fillcolor=red]; + } + 118 [label="Exit class FirModifier [2]" style="filled" fillcolor=red]; + } 108 -> {109} [color=green]; + 108 -> {118} [style=dotted]; + 108 -> {109 112 115} [style=dashed]; 109 -> {110}; 110 -> {111}; 111 -> {112} [color=green]; - - subgraph cluster_41 { - color=red - 113 [label="Enter class FirPsiModifier [3]" style="filled" fillcolor=red]; - subgraph cluster_42 { - color=blue - 114 [label="Enter function [4]" style="filled" fillcolor=red]; - 115 [label="Access variable R|/node| [4]"]; - 116 [label="Access variable R|/token| [4]"]; - 117 [label="Delegated constructor call: super|>(...) [4]" style="filled" fillcolor=yellow]; - 118 [label="Exit function [4]" style="filled" fillcolor=red]; - } - 119 [label="Exit class FirPsiModifier [3]" style="filled" fillcolor=red]; - } - 113 -> {114} [color=green]; - 113 -> {119} [style=dotted]; - 113 -> {114} [style=dashed]; - 114 -> {115}; + 112 -> {113}; + 113 -> {114}; + 114 -> {115} [color=green]; 115 -> {116}; 116 -> {117}; - 117 -> {118}; - 118 -> {119} [color=green]; + 117 -> {118} [color=green]; - subgraph cluster_43 { + subgraph cluster_44 { color=red - 120 [label="Enter class FirLightModifier [3]" style="filled" fillcolor=red]; - subgraph cluster_44 { - color=blue - 121 [label="Enter property [4]" style="filled" fillcolor=red]; - 122 [label="Access variable R|/tree| [4]"]; - 123 [label="Exit property [4]" style="filled" fillcolor=red]; - } + 119 [label="Enter class FirPsiModifier [3]" style="filled" fillcolor=red]; subgraph cluster_45 { color=blue - 124 [label="Enter function [4]" style="filled" fillcolor=red]; - 125 [label="Access variable R|/node| [4]"]; - 126 [label="Access variable R|/token| [4]"]; - 127 [label="Delegated constructor call: super|>(...) [4]" style="filled" fillcolor=yellow]; - 128 [label="Exit function [4]" style="filled" fillcolor=red]; + 120 [label="Enter function [4]" style="filled" fillcolor=red]; + 121 [label="Access variable R|/node| [4]"]; + 122 [label="Access variable R|/token| [4]"]; + 123 [label="Delegated constructor call: super|>(...) [4]" style="filled" fillcolor=yellow]; + 124 [label="Exit function [4]" style="filled" fillcolor=red]; } - 129 [label="Exit class FirLightModifier [3]" style="filled" fillcolor=red]; + 125 [label="Exit class FirPsiModifier [3]" style="filled" fillcolor=red]; } - 120 -> {121} [color=green]; - 120 -> {129} [style=dotted]; - 120 -> {121 124} [style=dashed]; + 119 -> {120} [color=green]; + 119 -> {125} [style=dotted]; + 119 -> {120} [style=dashed]; + 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124} [color=green]; - 124 -> {125}; - 125 -> {126}; - 126 -> {127}; - 127 -> {128}; - 128 -> {129} [color=green]; + 123 -> {124}; + 124 -> {125} [color=green]; subgraph cluster_46 { color=red - 130 [label="Enter class FirModifierList [2]" style="filled" fillcolor=red]; + 126 [label="Enter class FirLightModifier [3]" style="filled" fillcolor=red]; subgraph cluster_47 { color=blue - 131 [label="Enter property [3]" style="filled" fillcolor=red]; - 132 [label="Function call: R|kotlin/collections/emptyList||>() [3]" style="filled" fillcolor=yellow]; - 133 [label="Exit property [3]" style="filled" fillcolor=red]; + 127 [label="Enter property [4]" style="filled" fillcolor=red]; + 128 [label="Access variable R|/tree| [4]"]; + 129 [label="Exit property [4]" style="filled" fillcolor=red]; } subgraph cluster_48 { color=blue - 134 [label="Enter function [3]" style="filled" fillcolor=red]; - 135 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 136 [label="Exit function [3]" style="filled" fillcolor=red]; + 130 [label="Enter function [4]" style="filled" fillcolor=red]; + 131 [label="Access variable R|/node| [4]"]; + 132 [label="Access variable R|/token| [4]"]; + 133 [label="Delegated constructor call: super|>(...) [4]" style="filled" fillcolor=yellow]; + 134 [label="Exit function [4]" style="filled" fillcolor=red]; } - 137 [label="Exit class FirModifierList [2]" style="filled" fillcolor=red]; + 135 [label="Exit class FirLightModifier [3]" style="filled" fillcolor=red]; } - 130 -> {131} [color=green]; - 130 -> {137} [style=dotted]; - 130 -> {131 134} [style=dashed]; + 126 -> {127} [color=green]; + 126 -> {135} [style=dotted]; + 126 -> {127 130} [style=dashed]; + 127 -> {128}; + 128 -> {129}; + 129 -> {130} [color=green]; + 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {134} [color=green]; - 134 -> {135}; - 135 -> {136}; - 136 -> {137} [color=green]; + 133 -> {134}; + 134 -> {135} [color=green]; subgraph cluster_49 { color=red - 138 [label="Enter class FirPsiModifierList [3]" style="filled" fillcolor=red]; + 136 [label="Enter class FirModifierList [2]" style="filled" fillcolor=red]; subgraph cluster_50 { color=blue - 139 [label="Enter property [4]" style="filled" fillcolor=red]; - 140 [label="Access variable R|/modifierList| [4]"]; - 141 [label="Exit property [4]" style="filled" fillcolor=red]; + 137 [label="Enter property [3]" style="filled" fillcolor=red]; + subgraph cluster_51 { + color=blue + 138 [label="Function call arguments enter [3]"]; + 139 [label="Function call arguments exit [3]"]; + } + 140 [label="Function call: R|kotlin/collections/emptyList||>() [3]" style="filled" fillcolor=yellow]; + 141 [label="Exit property [3]" style="filled" fillcolor=red]; } - subgraph cluster_51 { + subgraph cluster_52 { color=blue - 142 [label="Enter function [4]" style="filled" fillcolor=red]; - 143 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; - 144 [label="Exit function [4]" style="filled" fillcolor=red]; + 142 [label="Enter function [3]" style="filled" fillcolor=red]; + 143 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 144 [label="Exit function [3]" style="filled" fillcolor=red]; } - 145 [label="Exit class FirPsiModifierList [3]" style="filled" fillcolor=red]; + 145 [label="Exit class FirModifierList [2]" style="filled" fillcolor=red]; } - 138 -> {139} [color=green]; - 138 -> {145} [style=dotted]; - 138 -> {139 142} [style=dashed]; + 136 -> {137} [color=green]; + 136 -> {145} [style=dotted]; + 136 -> {137 142} [style=dashed]; + 137 -> {138}; + 138 -> {139}; 139 -> {140}; 140 -> {141}; 141 -> {142} [color=green]; @@ -487,174 +488,226 @@ digraph kt44814_kt { 143 -> {144}; 144 -> {145} [color=green]; - subgraph cluster_52 { + subgraph cluster_53 { color=red - 146 [label="Enter class FirLightModifierList [3]" style="filled" fillcolor=red]; - subgraph cluster_53 { + 146 [label="Enter class FirPsiModifierList [3]" style="filled" fillcolor=red]; + subgraph cluster_54 { color=blue 147 [label="Enter property [4]" style="filled" fillcolor=red]; 148 [label="Access variable R|/modifierList| [4]"]; 149 [label="Exit property [4]" style="filled" fillcolor=red]; } - subgraph cluster_54 { - color=blue - 150 [label="Enter property [4]" style="filled" fillcolor=red]; - 151 [label="Access variable R|/tree| [4]"]; - 152 [label="Exit property [4]" style="filled" fillcolor=red]; - } subgraph cluster_55 { color=blue - 153 [label="Enter function [4]" style="filled" fillcolor=red]; - 154 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; - 155 [label="Exit function [4]" style="filled" fillcolor=red]; + 150 [label="Enter function [4]" style="filled" fillcolor=red]; + 151 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; + 152 [label="Exit function [4]" style="filled" fillcolor=red]; } - 156 [label="Exit class FirLightModifierList [3]" style="filled" fillcolor=red]; + 153 [label="Exit class FirPsiModifierList [3]" style="filled" fillcolor=red]; } 146 -> {147} [color=green]; - 146 -> {156} [style=dotted]; - 146 -> {147 150 153} [style=dashed]; + 146 -> {153} [style=dotted]; + 146 -> {147 150} [style=dashed]; 147 -> {148}; 148 -> {149}; 149 -> {150} [color=green]; 150 -> {151}; 151 -> {152}; 152 -> {153} [color=green]; - 153 -> {154}; - 154 -> {155}; - 155 -> {156} [color=green]; subgraph cluster_56 { color=red - 157 [label="Enter class Companion [3]" style="filled" fillcolor=red]; + 154 [label="Enter class FirLightModifierList [3]" style="filled" fillcolor=red]; subgraph cluster_57 { color=blue - 158 [label="Enter function [4]" style="filled" fillcolor=red]; - 159 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; - 160 [label="Exit function [4]" style="filled" fillcolor=red]; + 155 [label="Enter property [4]" style="filled" fillcolor=red]; + 156 [label="Access variable R|/modifierList| [4]"]; + 157 [label="Exit property [4]" style="filled" fillcolor=red]; } - 161 [label="Exit class Companion [3]" style="filled" fillcolor=red]; + subgraph cluster_58 { + color=blue + 158 [label="Enter property [4]" style="filled" fillcolor=red]; + 159 [label="Access variable R|/tree| [4]"]; + 160 [label="Exit property [4]" style="filled" fillcolor=red]; + } + subgraph cluster_59 { + color=blue + 161 [label="Enter function [4]" style="filled" fillcolor=red]; + 162 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; + 163 [label="Exit function [4]" style="filled" fillcolor=red]; + } + 164 [label="Exit class FirLightModifierList [3]" style="filled" fillcolor=red]; } + 154 -> {155} [color=green]; + 154 -> {164} [style=dotted]; + 154 -> {155 158 161} [style=dashed]; + 155 -> {156}; + 156 -> {157}; 157 -> {158} [color=green]; - 157 -> {161} [style=dotted]; - 157 -> {158} [style=dashed]; 158 -> {159}; 159 -> {160}; 160 -> {161} [color=green]; + 161 -> {162}; + 162 -> {163}; + 163 -> {164} [color=green]; - subgraph cluster_58 { + subgraph cluster_60 { color=red - 162 [label="Enter function getModifierList [4]" style="filled" fillcolor=red]; - subgraph cluster_59 { + 165 [label="Enter class Companion [3]" style="filled" fillcolor=red]; + subgraph cluster_61 { color=blue - 163 [label="Enter block [4]"]; - subgraph cluster_60 { + 166 [label="Enter function [4]" style="filled" fillcolor=red]; + 167 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; + 168 [label="Exit function [4]" style="filled" fillcolor=red]; + } + 169 [label="Exit class Companion [3]" style="filled" fillcolor=red]; + } + 165 -> {166} [color=green]; + 165 -> {169} [style=dotted]; + 165 -> {166} [style=dashed]; + 166 -> {167}; + 167 -> {168}; + 168 -> {169} [color=green]; + + subgraph cluster_62 { + color=red + 170 [label="Enter function getModifierList [4]" style="filled" fillcolor=red]; + subgraph cluster_63 { + color=blue + 171 [label="Enter block [4]"]; + subgraph cluster_64 { color=blue - 164 [label="Enter when [4]"]; - 165 [label="Access variable this@R|/FirModifierList.Companion.getModifierList| [4]"]; - subgraph cluster_61 { + 172 [label="Enter when [4]"]; + 173 [label="Access variable this@R|/FirModifierList.Companion.getModifierList| [4]"]; + subgraph cluster_65 { color=blue - 166 [label="Enter when branch condition [4]"]; - 167 [label="Exit $subj [4]"]; - 168 [label="Const: Null(null) [4]"]; - 169 [label="Equality operator == [4]"]; - 170 [label="Exit when branch condition [4]"]; - } - subgraph cluster_62 { - color=blue - 171 [label="Enter when branch condition [4]"]; - 172 [label="Exit $subj [4]"]; - 173 [label="Type operator: ($subj$ is R|FirPsiSourceElement|) [4]"]; - 174 [label="Exit when branch condition [4]"]; - } - subgraph cluster_63 { - color=blue - 175 [label="Enter when branch condition [4]"]; - 176 [label="Exit $subj [4]"]; - 177 [label="Type operator: ($subj$ is R|FirLightSourceElement|) [4]"]; + 174 [label="Enter when branch condition [4]"]; + 175 [label="Exit $subj [4]"]; + 176 [label="Const: Null(null) [4]"]; + 177 [label="Equality operator == [4]"]; 178 [label="Exit when branch condition [4]"]; } - 179 [label="Enter when branch result [4]"]; - subgraph cluster_64 { + subgraph cluster_66 { color=blue - 180 [label="Enter block [4]"]; - 181 [label="Access variable R|/FirLightSourceElement.lighterASTNode| [4]"]; - 182 [label="Access variable R|/FirLightSourceElement.treeStructure| [4]"]; - 183 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...) [4]" style="filled" fillcolor=yellow]; - 184 [label="Postponed enter to lambda [4]"]; - subgraph cluster_65 { - color=blue - 185 [label="Enter function [5]" style="filled" fillcolor=red]; - subgraph cluster_66 { - color=blue - 186 [label="Enter block [5]"]; - 187 [label="Access variable R|/it| [5]"]; - 188 [label="Enter safe call [5]"]; - 189 [label="Access variable R|/LighterASTNode.tokenType| [5]"]; - 190 [label="Exit safe call [5]"]; - 191 [label="Access qualifier /TokenType [5]"]; - 192 [label="Access variable R|/TokenType.Companion.MODIFIER_LIST| [5]"]; - 193 [label="Equality operator == [5]"]; - 194 [label="Exit block [5]"]; - } - 195 [label="Exit function [5]" style="filled" fillcolor=red]; - } - 196 [label="Postponed exit from lambda [4]"]; - 197 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...).R|kotlin/collections/find|(...) [4]" style="filled" fillcolor=yellow]; - 198 [label="Exit lhs of ?: [4]"]; - 199 [label="Enter rhs of ?: [4]"]; - 200 [label="Const: Null(null) [4]"]; - 201 [label="Jump: ^getModifierList Null(null) [4]"]; - 202 [label="Stub [4]" style="filled" fillcolor=gray]; - 203 [label="Lhs of ?: is not null [4]"]; - 204 [label="Exit ?: [4]"]; - 205 [label="Variable declaration: lval modifierListNode: R|LighterASTNode| [4]"]; - 206 [label="Access variable R|/modifierListNode| [4]"]; - 207 [label="Access variable R|/FirLightSourceElement.treeStructure| [4]"]; - 208 [label="Function call: R|/FirModifierList.FirLightModifierList.FirLightModifierList|(...) [4]" style="filled" fillcolor=yellow]; - 209 [label="Exit block [4]"]; + 179 [label="Enter when branch condition [4]"]; + 180 [label="Exit $subj [4]"]; + 181 [label="Type operator: ($subj$ is R|FirPsiSourceElement|) [4]"]; + 182 [label="Exit when branch condition [4]"]; } - 210 [label="Exit when branch result [4]"]; - 211 [label="Enter when branch result [4]"]; subgraph cluster_67 { color=blue - 212 [label="Enter block [4]"]; - 213 [label="Access variable R|/FirPsiSourceElement.psi| [4]"]; - 214 [label="Type operator: (this@R|/FirModifierList.Companion.getModifierList|.R|/FirPsiSourceElement.psi| as? R|KtModifierListOwner|) [4]"]; - 215 [label="Enter safe call [4]"]; - 216 [label="Access variable R|/KtModifierListOwner.modifierList| [4]"]; - 217 [label="Enter safe call [4]"]; - 218 [label="Postponed enter to lambda [4]"]; - subgraph cluster_68 { - color=blue - 219 [label="Enter function [5]" style="filled" fillcolor=red]; - subgraph cluster_69 { - color=blue - 220 [label="Enter block [5]"]; - 221 [label="Access variable R|/it| [5]"]; - 222 [label="Function call: R|/FirModifierList.FirPsiModifierList.FirPsiModifierList|(...) [5]" style="filled" fillcolor=yellow]; - 223 [label="Exit block [5]"]; - } - 224 [label="Exit function [5]" style="filled" fillcolor=red]; - } - 225 [label="Postponed exit from lambda [4]"]; - 226 [label="Function call: $subj$.R|kotlin/let|(...) [4]" style="filled" fillcolor=yellow]; - 227 [label="Exit safe call [4]"]; - 228 [label="Exit safe call [4]"]; - 229 [label="Exit block [4]"]; + 183 [label="Enter when branch condition [4]"]; + 184 [label="Exit $subj [4]"]; + 185 [label="Type operator: ($subj$ is R|FirLightSourceElement|) [4]"]; + 186 [label="Exit when branch condition [4]"]; } - 230 [label="Exit when branch result [4]"]; - 231 [label="Merge postponed lambda exits [4]"]; - 232 [label="Enter when branch result [4]"]; - subgraph cluster_70 { + 187 [label="Enter when branch result [4]"]; + subgraph cluster_68 { color=blue - 233 [label="Enter block [4]"]; - 234 [label="Const: Null(null) [4]"]; - 235 [label="Exit block [4]"]; + 188 [label="Enter block [4]"]; + subgraph cluster_69 { + color=blue + 189 [label="Function call arguments enter [4]"]; + subgraph cluster_70 { + color=blue + 190 [label="Function call arguments enter [4]"]; + 191 [label="Access variable R|/FirLightSourceElement.lighterASTNode| [4]"]; + 192 [label="Access variable R|/FirLightSourceElement.treeStructure| [4]"]; + 193 [label="Function call arguments exit [4]"]; + } + 194 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...) [4]" style="filled" fillcolor=yellow]; + 195 [label="Postponed enter to lambda [4]"]; + subgraph cluster_71 { + color=blue + 196 [label="Enter function [5]" style="filled" fillcolor=red]; + subgraph cluster_72 { + color=blue + 197 [label="Enter block [5]"]; + 198 [label="Access variable R|/it| [5]"]; + 199 [label="Enter safe call [5]"]; + 200 [label="Access variable R|/LighterASTNode.tokenType| [5]"]; + 201 [label="Exit safe call [5]"]; + 202 [label="Access qualifier /TokenType [5]"]; + 203 [label="Access variable R|/TokenType.Companion.MODIFIER_LIST| [5]"]; + 204 [label="Equality operator == [5]"]; + 205 [label="Exit block [5]"]; + } + 206 [label="Exit function [5]" style="filled" fillcolor=red]; + } + 207 [label="Function call arguments exit [4]"]; + } + 208 [label="Postponed exit from lambda [4]"]; + 209 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...).R|kotlin/collections/find|(...) [4]" style="filled" fillcolor=yellow]; + 210 [label="Exit lhs of ?: [4]"]; + 211 [label="Enter rhs of ?: [4]"]; + 212 [label="Const: Null(null) [4]"]; + 213 [label="Jump: ^getModifierList Null(null) [4]"]; + 214 [label="Stub [4]" style="filled" fillcolor=gray]; + 215 [label="Lhs of ?: is not null [4]"]; + 216 [label="Exit ?: [4]"]; + 217 [label="Variable declaration: lval modifierListNode: R|LighterASTNode| [4]"]; + subgraph cluster_73 { + color=blue + 218 [label="Function call arguments enter [4]"]; + 219 [label="Access variable R|/modifierListNode| [4]"]; + 220 [label="Access variable R|/FirLightSourceElement.treeStructure| [4]"]; + 221 [label="Function call arguments exit [4]"]; + } + 222 [label="Function call: R|/FirModifierList.FirLightModifierList.FirLightModifierList|(...) [4]" style="filled" fillcolor=yellow]; + 223 [label="Exit block [4]"]; } - 236 [label="Exit when branch result [4]"]; - 237 [label="Exit when [4]"]; + 224 [label="Exit when branch result [4]"]; + 225 [label="Enter when branch result [4]"]; + subgraph cluster_74 { + color=blue + 226 [label="Enter block [4]"]; + 227 [label="Access variable R|/FirPsiSourceElement.psi| [4]"]; + 228 [label="Type operator: (this@R|/FirModifierList.Companion.getModifierList|.R|/FirPsiSourceElement.psi| as? R|KtModifierListOwner|) [4]"]; + 229 [label="Enter safe call [4]"]; + 230 [label="Access variable R|/KtModifierListOwner.modifierList| [4]"]; + 231 [label="Enter safe call [4]"]; + subgraph cluster_75 { + color=blue + 232 [label="Function call arguments enter [4]"]; + 233 [label="Postponed enter to lambda [4]"]; + subgraph cluster_76 { + color=blue + 234 [label="Enter function [5]" style="filled" fillcolor=red]; + subgraph cluster_77 { + color=blue + 235 [label="Enter block [5]"]; + subgraph cluster_78 { + color=blue + 236 [label="Function call arguments enter [5]"]; + 237 [label="Access variable R|/it| [5]"]; + 238 [label="Function call arguments exit [5]"]; + } + 239 [label="Function call: R|/FirModifierList.FirPsiModifierList.FirPsiModifierList|(...) [5]" style="filled" fillcolor=yellow]; + 240 [label="Exit block [5]"]; + } + 241 [label="Exit function [5]" style="filled" fillcolor=red]; + } + 242 [label="Function call arguments exit [4]"]; + } + 243 [label="Postponed exit from lambda [4]"]; + 244 [label="Function call: $subj$.R|kotlin/let|(...) [4]" style="filled" fillcolor=yellow]; + 245 [label="Exit safe call [4]"]; + 246 [label="Exit safe call [4]"]; + 247 [label="Exit block [4]"]; + } + 248 [label="Exit when branch result [4]"]; + 249 [label="Merge postponed lambda exits [4]"]; + 250 [label="Enter when branch result [4]"]; + subgraph cluster_79 { + color=blue + 251 [label="Enter block [4]"]; + 252 [label="Const: Null(null) [4]"]; + 253 [label="Exit block [4]"]; + } + 254 [label="Exit when branch result [4]"]; + 255 [label="Exit when [4]"]; } - 238 [label="Jump: ^getModifierList when (this@R|/FirModifierList.Companion.getModifierList|) { + 256 [label="Jump: ^getModifierList when (this@R|/FirModifierList.Companion.getModifierList|) { ==($subj$, Null(null)) -> { Null(null) } @@ -673,38 +726,29 @@ digraph kt44814_kt { } } [4]"]; - 239 [label="Stub [4]" style="filled" fillcolor=gray]; - 240 [label="Exit block [4]" style="filled" fillcolor=gray]; + 257 [label="Stub [4]" style="filled" fillcolor=gray]; + 258 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 241 [label="Exit function getModifierList [4]" style="filled" fillcolor=red]; + 259 [label="Exit function getModifierList [4]" style="filled" fillcolor=red]; } - 162 -> {163}; - 163 -> {164}; - 164 -> {165}; - 165 -> {166}; - 166 -> {167}; - 167 -> {168}; - 168 -> {169}; - 169 -> {170}; - 170 -> {171 232}; + 170 -> {171}; 171 -> {172}; 172 -> {173}; 173 -> {174}; - 174 -> {175 211}; + 174 -> {175}; 175 -> {176}; 176 -> {177}; 177 -> {178}; - 178 -> {179}; + 178 -> {179 250}; 179 -> {180}; 180 -> {181}; 181 -> {182}; - 182 -> {183}; + 182 -> {183 225}; 183 -> {184}; - 184 -> {185 196 197}; - 184 -> {185} [style=dashed]; + 184 -> {185}; 185 -> {186}; 186 -> {187}; - 187 -> {188 190}; + 187 -> {188}; 188 -> {189}; 189 -> {190}; 190 -> {191}; @@ -712,109 +756,158 @@ digraph kt44814_kt { 192 -> {193}; 193 -> {194}; 194 -> {195}; - 195 -> {196}; - 196 -> {184} [color=green style=dashed]; - 196 -> {197} [color=green]; - 196 -> {204} [style=dotted]; + 195 -> {196 207 208}; + 195 -> {196} [style=dashed]; + 196 -> {197}; 197 -> {198}; - 198 -> {199 203}; + 198 -> {199 201}; 199 -> {200}; 200 -> {201}; - 201 -> {241}; - 201 -> {202} [style=dotted]; - 202 -> {204} [style=dotted]; + 201 -> {202}; + 202 -> {203}; 203 -> {204}; 204 -> {205}; 205 -> {206}; - 206 -> {207}; - 207 -> {208}; - 208 -> {209}; + 206 -> {208}; + 207 -> {209}; + 208 -> {195} [color=green style=dashed]; + 208 -> {209} [color=green]; + 208 -> {216} [style=dotted]; 209 -> {210}; - 210 -> {237}; + 210 -> {211 215}; 211 -> {212}; 212 -> {213}; - 213 -> {214}; - 214 -> {215 227}; + 213 -> {259}; + 213 -> {214} [style=dotted]; + 214 -> {216} [style=dotted]; 215 -> {216}; - 216 -> {217 227}; + 216 -> {217}; 217 -> {218}; - 218 -> {219 226}; - 218 -> {225} [style=dotted]; - 218 -> {219} [style=dashed]; + 218 -> {219}; 219 -> {220}; 220 -> {221}; 221 -> {222}; 222 -> {223}; 223 -> {224}; - 224 -> {225}; - 225 -> {226} [color=green]; - 225 -> {231} [color=red]; - 226 -> {228}; + 224 -> {255}; + 225 -> {226}; + 226 -> {227}; 227 -> {228}; - 228 -> {229 231}; + 228 -> {229 245}; 229 -> {230}; - 230 -> {237}; - 231 -> {237} [color=red]; + 230 -> {231 245}; + 231 -> {232}; 232 -> {233}; - 233 -> {234}; + 233 -> {234 242}; + 233 -> {243} [style=dotted]; + 233 -> {234} [style=dashed]; 234 -> {235}; 235 -> {236}; 236 -> {237}; 237 -> {238}; - 238 -> {241}; - 238 -> {239} [style=dotted]; - 239 -> {240} [style=dotted]; - 240 -> {241} [style=dotted]; + 238 -> {239}; + 239 -> {240}; + 240 -> {241}; + 241 -> {243}; + 242 -> {244}; + 243 -> {244} [color=green]; + 243 -> {249} [color=red]; + 244 -> {246}; + 245 -> {246}; + 246 -> {247 249}; + 247 -> {248}; + 248 -> {255}; + 249 -> {255} [color=red]; + 250 -> {251}; + 251 -> {252}; + 252 -> {253}; + 253 -> {254}; + 254 -> {255}; + 255 -> {256}; + 256 -> {259}; + 256 -> {257} [style=dotted]; + 257 -> {258} [style=dotted]; + 258 -> {259} [style=dotted]; - subgraph cluster_71 { + subgraph cluster_80 { color=red - 242 [label="Enter function boxImpl [4]" style="filled" fillcolor=red]; - subgraph cluster_72 { + 260 [label="Enter function boxImpl [4]" style="filled" fillcolor=red]; + subgraph cluster_81 { color=blue - 243 [label="Enter block [4]"]; - 244 [label="Function call: R|/LighterASTNode.LighterASTNode|() [4]" style="filled" fillcolor=yellow]; - 245 [label="Function call: R|kotlin/collections/listOf|(...) [4]" style="filled" fillcolor=yellow]; - 246 [label="Function call: R|/LighterASTNode.LighterASTNode|(...) [4]" style="filled" fillcolor=yellow]; - 247 [label="Function call: R|/FlyweightCapableTreeStructure.FlyweightCapableTreeStructure|() [4]" style="filled" fillcolor=yellow]; - 248 [label="Function call: R|/FirLightSourceElement.FirLightSourceElement|(...) [4]" style="filled" fillcolor=yellow]; - 249 [label="Variable declaration: lval sourceElement: R|FirSourceElement?| [4]"]; - 250 [label="Access variable R|/sourceElement| [4]"]; - 251 [label="Function call: (this@R|/FirModifierList.Companion|, R|/sourceElement|).R|/FirModifierList.Companion.getModifierList|() [4]" style="filled" fillcolor=yellow]; - 252 [label="Variable declaration: lval result: R|FirModifierList?| [4]"]; - subgraph cluster_73 { + 261 [label="Enter block [4]"]; + subgraph cluster_82 { color=blue - 253 [label="Enter when [4]"]; - subgraph cluster_74 { + 262 [label="Function call arguments enter [4]"]; + subgraph cluster_83 { color=blue - 254 [label="Enter when branch condition [4]"]; - 255 [label="Access variable R|/result| [4]"]; - 256 [label="Type operator: (R|/result| is R|FirModifierList.FirLightModifierList|) [4]"]; - 257 [label="Exit when branch condition [4]"]; + 263 [label="Function call arguments enter [4]"]; + subgraph cluster_84 { + color=blue + 264 [label="Function call arguments enter [4]"]; + subgraph cluster_85 { + color=blue + 265 [label="Function call arguments enter [4]"]; + 266 [label="Function call arguments exit [4]"]; + } + 267 [label="Function call: R|/LighterASTNode.LighterASTNode|() [4]" style="filled" fillcolor=yellow]; + 268 [label="Function call arguments exit [4]"]; + } + 269 [label="Function call: R|kotlin/collections/listOf|(...) [4]" style="filled" fillcolor=yellow]; + 270 [label="Function call arguments exit [4]"]; } - subgraph cluster_75 { + 271 [label="Function call: R|/LighterASTNode.LighterASTNode|(...) [4]" style="filled" fillcolor=yellow]; + subgraph cluster_86 { color=blue - 258 [label="Enter when branch condition else [4]"]; - 259 [label="Exit when branch condition [4]"]; + 272 [label="Function call arguments enter [4]"]; + 273 [label="Function call arguments exit [4]"]; } - 260 [label="Enter when branch result [4]"]; - subgraph cluster_76 { - color=blue - 261 [label="Enter block [4]"]; - 262 [label="Const: String(Fail) [4]"]; - 263 [label="Exit block [4]"]; - } - 264 [label="Exit when branch result [4]"]; - 265 [label="Enter when branch result [4]"]; - subgraph cluster_77 { - color=blue - 266 [label="Enter block [4]"]; - 267 [label="Const: String(OK) [4]"]; - 268 [label="Exit block [4]"]; - } - 269 [label="Exit when branch result [4]"]; - 270 [label="Exit when [4]"]; + 274 [label="Function call: R|/FlyweightCapableTreeStructure.FlyweightCapableTreeStructure|() [4]" style="filled" fillcolor=yellow]; + 275 [label="Function call arguments exit [4]"]; } - 271 [label="Jump: ^boxImpl when () { + 276 [label="Function call: R|/FirLightSourceElement.FirLightSourceElement|(...) [4]" style="filled" fillcolor=yellow]; + 277 [label="Variable declaration: lval sourceElement: R|FirSourceElement?| [4]"]; + subgraph cluster_87 { + color=blue + 278 [label="Function call arguments enter [4]"]; + 279 [label="Access variable R|/sourceElement| [4]"]; + 280 [label="Function call arguments exit [4]"]; + } + 281 [label="Function call: (this@R|/FirModifierList.Companion|, R|/sourceElement|).R|/FirModifierList.Companion.getModifierList|() [4]" style="filled" fillcolor=yellow]; + 282 [label="Variable declaration: lval result: R|FirModifierList?| [4]"]; + subgraph cluster_88 { + color=blue + 283 [label="Enter when [4]"]; + subgraph cluster_89 { + color=blue + 284 [label="Enter when branch condition [4]"]; + 285 [label="Access variable R|/result| [4]"]; + 286 [label="Type operator: (R|/result| is R|FirModifierList.FirLightModifierList|) [4]"]; + 287 [label="Exit when branch condition [4]"]; + } + subgraph cluster_90 { + color=blue + 288 [label="Enter when branch condition else [4]"]; + 289 [label="Exit when branch condition [4]"]; + } + 290 [label="Enter when branch result [4]"]; + subgraph cluster_91 { + color=blue + 291 [label="Enter block [4]"]; + 292 [label="Const: String(Fail) [4]"]; + 293 [label="Exit block [4]"]; + } + 294 [label="Exit when branch result [4]"]; + 295 [label="Enter when branch result [4]"]; + subgraph cluster_92 { + color=blue + 296 [label="Enter block [4]"]; + 297 [label="Const: String(OK) [4]"]; + 298 [label="Exit block [4]"]; + } + 299 [label="Exit when branch result [4]"]; + 300 [label="Exit when [4]"]; + } + 301 [label="Jump: ^boxImpl when () { (R|/result| is R|FirModifierList.FirLightModifierList|) -> { String(OK) } @@ -823,66 +916,85 @@ digraph kt44814_kt { } } [4]"]; - 272 [label="Stub [4]" style="filled" fillcolor=gray]; - 273 [label="Exit block [4]" style="filled" fillcolor=gray]; + 302 [label="Stub [4]" style="filled" fillcolor=gray]; + 303 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 274 [label="Exit function boxImpl [4]" style="filled" fillcolor=red]; + 304 [label="Exit function boxImpl [4]" style="filled" fillcolor=red]; } - 242 -> {243}; - 243 -> {244}; - 244 -> {245}; - 245 -> {246}; - 246 -> {247}; - 247 -> {248}; - 248 -> {249}; - 249 -> {250}; - 250 -> {251}; - 251 -> {252}; - 252 -> {253}; - 253 -> {254}; - 254 -> {255}; - 255 -> {256}; - 256 -> {257}; - 257 -> {258 265}; - 258 -> {259}; - 259 -> {260}; 260 -> {261}; 261 -> {262}; 262 -> {263}; 263 -> {264}; - 264 -> {270}; + 264 -> {265}; 265 -> {266}; 266 -> {267}; 267 -> {268}; 268 -> {269}; 269 -> {270}; 270 -> {271}; - 271 -> {274}; - 271 -> {272} [style=dotted]; - 272 -> {273} [style=dotted]; - 273 -> {274} [style=dotted]; - - subgraph cluster_78 { - color=red - 275 [label="Enter function box [2]" style="filled" fillcolor=red]; - subgraph cluster_79 { - color=blue - 276 [label="Enter block [2]"]; - 277 [label="Access qualifier /FirModifierList [2]"]; - 278 [label="Function call: Q|FirModifierList|.R|/FirModifierList.Companion.boxImpl|() [2]" style="filled" fillcolor=yellow]; - 279 [label="Jump: ^box Q|FirModifierList|.R|/FirModifierList.Companion.boxImpl|() [2]"]; - 280 [label="Stub [2]" style="filled" fillcolor=gray]; - 281 [label="Exit block [2]" style="filled" fillcolor=gray]; - } - 282 [label="Exit function box [2]" style="filled" fillcolor=red]; - } + 271 -> {272}; + 272 -> {273}; + 273 -> {274}; + 274 -> {275}; 275 -> {276}; 276 -> {277}; 277 -> {278}; 278 -> {279}; - 279 -> {282}; - 279 -> {280} [style=dotted]; - 280 -> {281} [style=dotted]; - 281 -> {282} [style=dotted]; + 279 -> {280}; + 280 -> {281}; + 281 -> {282}; + 282 -> {283}; + 283 -> {284}; + 284 -> {285}; + 285 -> {286}; + 286 -> {287}; + 287 -> {288 295}; + 288 -> {289}; + 289 -> {290}; + 290 -> {291}; + 291 -> {292}; + 292 -> {293}; + 293 -> {294}; + 294 -> {300}; + 295 -> {296}; + 296 -> {297}; + 297 -> {298}; + 298 -> {299}; + 299 -> {300}; + 300 -> {301}; + 301 -> {304}; + 301 -> {302} [style=dotted]; + 302 -> {303} [style=dotted]; + 303 -> {304} [style=dotted]; + + subgraph cluster_93 { + color=red + 305 [label="Enter function box [2]" style="filled" fillcolor=red]; + subgraph cluster_94 { + color=blue + 306 [label="Enter block [2]"]; + subgraph cluster_95 { + color=blue + 307 [label="Function call arguments enter [2]"]; + 308 [label="Access qualifier /FirModifierList [2]"]; + 309 [label="Function call arguments exit [2]"]; + } + 310 [label="Function call: Q|FirModifierList|.R|/FirModifierList.Companion.boxImpl|() [2]" style="filled" fillcolor=yellow]; + 311 [label="Jump: ^box Q|FirModifierList|.R|/FirModifierList.Companion.boxImpl|() [2]"]; + 312 [label="Stub [2]" style="filled" fillcolor=gray]; + 313 [label="Exit block [2]" style="filled" fillcolor=gray]; + } + 314 [label="Exit function box [2]" style="filled" fillcolor=red]; + } + 305 -> {306}; + 306 -> {307}; + 307 -> {308}; + 308 -> {309}; + 309 -> {310}; + 310 -> {311}; + 311 -> {314}; + 311 -> {312} [style=dotted]; + 312 -> {313} [style=dotted]; + 313 -> {314} [style=dotted]; } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/singleReturnFromTry.dot b/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/singleReturnFromTry.dot index e33b43b2533..f79d5c486f6 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/singleReturnFromTry.dot +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/singleReturnFromTry.dot @@ -16,389 +16,424 @@ digraph singleReturnFromTry_kt { subgraph cluster_2 { color=blue 3 [label="Enter block"]; - 4 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 5 [label="Jump: ^myRun R|/block|.R|SubstitutionOverride|()"]; - 6 [label="Stub" style="filled" fillcolor=gray]; - 7 [label="Exit block" style="filled" fillcolor=gray]; + subgraph cluster_3 { + color=blue + 4 [label="Function call arguments enter"]; + 5 [label="Function call arguments exit"]; + } + 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 7 [label="Jump: ^myRun R|/block|.R|SubstitutionOverride|()"]; + 8 [label="Stub" style="filled" fillcolor=gray]; + 9 [label="Exit block" style="filled" fillcolor=gray]; } - 8 [label="Exit function myRun" style="filled" fillcolor=red]; + 10 [label="Exit function myRun" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; - 5 -> {8}; - 5 -> {6} [style=dotted]; - 6 -> {7} [style=dotted]; + 5 -> {6}; + 6 -> {7}; + 7 -> {10}; 7 -> {8} [style=dotted]; + 8 -> {9} [style=dotted]; + 9 -> {10} [style=dotted]; - subgraph cluster_3 { + subgraph cluster_4 { color=red - 9 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_4 { + 11 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Postponed enter to lambda"]; - subgraph cluster_5 { + 12 [label="Enter block"]; + subgraph cluster_6 { color=blue - 12 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_6 { + 13 [label="Function call arguments enter"]; + 14 [label="Postponed enter to lambda"]; + subgraph cluster_7 { color=blue - 13 [label="Enter block"]; - 14 [label="Const: Int(2)"]; - 15 [label="Jump: ^test_1 Int(2)"]; - 16 [label="Stub" style="filled" fillcolor=gray]; - 17 [label="Exit block" style="filled" fillcolor=gray]; + 15 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 16 [label="Enter block"]; + 17 [label="Const: Int(2)"]; + 18 [label="Jump: ^test_1 Int(2)"]; + 19 [label="Stub" style="filled" fillcolor=gray]; + 20 [label="Exit block" style="filled" fillcolor=gray]; + } + 21 [label="Exit function " style="filled" fillcolor=gray]; } - 18 [label="Exit function " style="filled" fillcolor=gray]; + 22 [label="Function call arguments exit"]; } - 19 [label="Postponed exit from lambda"]; - 20 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 21 [label="Stub" style="filled" fillcolor=gray]; - 22 [label="Exit block" style="filled" fillcolor=gray]; + 23 [label="Postponed exit from lambda"]; + 24 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 25 [label="Stub" style="filled" fillcolor=gray]; + 26 [label="Exit block" style="filled" fillcolor=gray]; } - 23 [label="Exit function test_1" style="filled" fillcolor=red]; + 27 [label="Exit function test_1" style="filled" fillcolor=red]; } - 9 -> {10}; - 10 -> {11}; - 11 -> {12 19 20}; - 11 -> {12} [style=dashed]; + 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15}; - 15 -> {23}; - 15 -> {16} [style=dotted]; - 16 -> {17} [style=dotted]; - 17 -> {18} [style=dotted]; + 14 -> {15 22 23}; + 14 -> {15} [style=dashed]; + 15 -> {16}; + 16 -> {17}; + 17 -> {18}; + 18 -> {27}; 18 -> {19} [style=dotted]; - 19 -> {20}; - 19 -> {11} [color=green style=dashed]; + 19 -> {20} [style=dotted]; 20 -> {21} [style=dotted]; - 21 -> {22} [style=dotted]; - 22 -> {23} [style=dotted]; + 21 -> {23} [style=dotted]; + 22 -> {24}; + 23 -> {24}; + 23 -> {14} [color=green style=dashed]; + 24 -> {25} [style=dotted]; + 25 -> {26} [style=dotted]; + 26 -> {27} [style=dotted]; - subgraph cluster_7 { + subgraph cluster_9 { color=red - 24 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_8 { + 28 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 25 [label="Enter block"]; - subgraph cluster_9 { + 29 [label="Enter block"]; + subgraph cluster_11 { color=blue - 26 [label="Try expression enter"]; - subgraph cluster_10 { - color=blue - 27 [label="Try main block enter"]; - subgraph cluster_11 { - color=blue - 28 [label="Enter block"]; - 29 [label="Const: Int(2)"]; - 30 [label="Jump: ^test_2 Int(2)"]; - 31 [label="Stub" style="filled" fillcolor=gray]; - 32 [label="Exit block" style="filled" fillcolor=gray]; - } - 33 [label="Try main block exit" style="filled" fillcolor=gray]; - } + 30 [label="Try expression enter"]; subgraph cluster_12 { color=blue - 34 [label="Enter finally"]; + 31 [label="Try main block enter"]; subgraph cluster_13 { color=blue - 35 [label="Enter block"]; - 36 [label="Exit block"]; + 32 [label="Enter block"]; + 33 [label="Const: Int(2)"]; + 34 [label="Jump: ^test_2 Int(2)"]; + 35 [label="Stub" style="filled" fillcolor=gray]; + 36 [label="Exit block" style="filled" fillcolor=gray]; } - 37 [label="Exit finally"]; + 37 [label="Try main block exit" style="filled" fillcolor=gray]; } - 38 [label="Try expression exit" style="filled" fillcolor=gray]; + subgraph cluster_14 { + color=blue + 38 [label="Enter finally"]; + subgraph cluster_15 { + color=blue + 39 [label="Enter block"]; + 40 [label="Exit block"]; + } + 41 [label="Exit finally"]; + } + 42 [label="Try expression exit" style="filled" fillcolor=gray]; } - 39 [label="Exit block" style="filled" fillcolor=gray]; + 43 [label="Exit block" style="filled" fillcolor=gray]; } - 40 [label="Exit function test_2" style="filled" fillcolor=red]; + 44 [label="Exit function test_2" style="filled" fillcolor=red]; } - 24 -> {25}; - 25 -> {26}; - 26 -> {27}; - 26 -> {34} [label="onUncaughtException"]; - 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {34} [label="return@/test_2"]; - 30 -> {31} [style=dotted]; - 31 -> {32} [style=dotted]; - 32 -> {33} [style=dotted]; - 33 -> {34} [style=dotted]; - 34 -> {35}; - 35 -> {36}; - 36 -> {37}; - 37 -> {40} [label="return@/test_2"]; + 30 -> {31}; + 30 -> {38} [label="onUncaughtException"]; + 31 -> {32}; + 32 -> {33}; + 33 -> {34}; + 34 -> {38} [label="return@/test_2"]; + 34 -> {35} [style=dotted]; + 35 -> {36} [style=dotted]; + 36 -> {37} [style=dotted]; 37 -> {38} [style=dotted]; - 38 -> {39} [style=dotted]; - 39 -> {40} [style=dotted]; + 38 -> {39}; + 39 -> {40}; + 40 -> {41}; + 41 -> {44} [label="return@/test_2"]; + 41 -> {42} [style=dotted]; + 42 -> {43} [style=dotted]; + 43 -> {44} [style=dotted]; - subgraph cluster_14 { + subgraph cluster_16 { color=red - 41 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_15 { + 45 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_17 { color=blue - 42 [label="Enter block"]; - subgraph cluster_16 { + 46 [label="Enter block"]; + subgraph cluster_18 { color=blue - 43 [label="Try expression enter"]; - subgraph cluster_17 { + 47 [label="Try expression enter"]; + subgraph cluster_19 { color=blue - 44 [label="Try main block enter"]; - subgraph cluster_18 { + 48 [label="Try main block enter"]; + subgraph cluster_20 { color=blue - 45 [label="Enter block"]; - 46 [label="Postponed enter to lambda"]; - subgraph cluster_19 { + 49 [label="Enter block"]; + subgraph cluster_21 { color=blue - 47 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_20 { + 50 [label="Function call arguments enter"]; + 51 [label="Postponed enter to lambda"]; + subgraph cluster_22 { color=blue - 48 [label="Enter block"]; - 49 [label="Const: Int(2)"]; - 50 [label="Jump: ^test_3 Int(2)"]; - 51 [label="Stub" style="filled" fillcolor=gray]; - 52 [label="Exit block" style="filled" fillcolor=gray]; + 52 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_23 { + color=blue + 53 [label="Enter block"]; + 54 [label="Const: Int(2)"]; + 55 [label="Jump: ^test_3 Int(2)"]; + 56 [label="Stub" style="filled" fillcolor=gray]; + 57 [label="Exit block" style="filled" fillcolor=gray]; + } + 58 [label="Exit function " style="filled" fillcolor=gray]; } - 53 [label="Exit function " style="filled" fillcolor=gray]; + 59 [label="Function call arguments exit"]; } - 54 [label="Postponed exit from lambda"]; - 55 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 56 [label="Stub" style="filled" fillcolor=gray]; - 57 [label="Exit block" style="filled" fillcolor=gray]; + 60 [label="Postponed exit from lambda"]; + 61 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 62 [label="Stub" style="filled" fillcolor=gray]; + 63 [label="Exit block" style="filled" fillcolor=gray]; } - 58 [label="Try main block exit" style="filled" fillcolor=gray]; + 64 [label="Try main block exit" style="filled" fillcolor=gray]; } - subgraph cluster_21 { + subgraph cluster_24 { color=blue - 59 [label="Enter finally"]; - subgraph cluster_22 { + 65 [label="Enter finally"]; + subgraph cluster_25 { color=blue - 60 [label="Enter block"]; - 61 [label="Exit block"]; + 66 [label="Enter block"]; + 67 [label="Exit block"]; } - 62 [label="Exit finally"]; + 68 [label="Exit finally"]; } - 63 [label="Try expression exit" style="filled" fillcolor=gray]; + 69 [label="Try expression exit" style="filled" fillcolor=gray]; } - 64 [label="Exit block" style="filled" fillcolor=gray]; + 70 [label="Exit block" style="filled" fillcolor=gray]; } - 65 [label="Exit function test_3" style="filled" fillcolor=red]; + 71 [label="Exit function test_3" style="filled" fillcolor=red]; } - 41 -> {42}; - 42 -> {43}; - 43 -> {44}; - 43 -> {59} [label="onUncaughtException"]; - 44 -> {45}; 45 -> {46}; - 46 -> {47 54 55}; - 46 -> {47} [style=dashed]; + 46 -> {47}; 47 -> {48}; + 47 -> {65} [label="onUncaughtException"]; 48 -> {49}; 49 -> {50}; - 50 -> {59} [label="return@/test_3"]; - 50 -> {51} [style=dotted]; - 51 -> {52} [style=dotted]; - 52 -> {53} [style=dotted]; - 53 -> {54} [style=dotted]; - 54 -> {46} [color=green style=dashed]; - 54 -> {55} [color=green]; - 54 -> {63} [style=dotted]; + 50 -> {51}; + 51 -> {52 59 60}; + 51 -> {52} [style=dashed]; + 52 -> {53}; + 53 -> {54}; + 54 -> {55}; + 55 -> {65} [label="return@/test_3"]; 55 -> {56} [style=dotted]; 56 -> {57} [style=dotted]; 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; - 59 -> {60}; - 60 -> {61}; - 61 -> {62}; - 62 -> {65} [label="return@/test_3"]; + 58 -> {60} [style=dotted]; + 59 -> {61}; + 60 -> {51} [color=green style=dashed]; + 60 -> {61} [color=green]; + 60 -> {69} [style=dotted]; + 61 -> {62} [style=dotted]; 62 -> {63} [style=dotted]; 63 -> {64} [style=dotted]; 64 -> {65} [style=dotted]; - - subgraph cluster_23 { - color=red - 66 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 67 [label="Enter block"]; - 68 [label="Postponed enter to lambda"]; - subgraph cluster_25 { - color=blue - 69 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_26 { - color=blue - 70 [label="Enter block"]; - subgraph cluster_27 { - color=blue - 71 [label="Try expression enter"]; - subgraph cluster_28 { - color=blue - 72 [label="Try main block enter"]; - subgraph cluster_29 { - color=blue - 73 [label="Enter block"]; - 74 [label="Const: Int(2)"]; - 75 [label="Jump: ^test_4 Int(2)"]; - 76 [label="Stub" style="filled" fillcolor=gray]; - 77 [label="Exit block" style="filled" fillcolor=gray]; - } - 78 [label="Try main block exit" style="filled" fillcolor=gray]; - } - subgraph cluster_30 { - color=blue - 79 [label="Enter finally"]; - subgraph cluster_31 { - color=blue - 80 [label="Enter block"]; - 81 [label="Exit block"]; - } - 82 [label="Exit finally"]; - } - 83 [label="Try expression exit" style="filled" fillcolor=gray]; - } - 84 [label="Exit block" style="filled" fillcolor=gray]; - } - 85 [label="Exit function " style="filled" fillcolor=gray]; - } - 86 [label="Postponed exit from lambda"]; - 87 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 88 [label="Stub" style="filled" fillcolor=gray]; - 89 [label="Exit block" style="filled" fillcolor=gray]; - } - 90 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 65 -> {66}; 66 -> {67}; 67 -> {68}; - 68 -> {69 86 87}; - 68 -> {69} [style=dashed]; - 69 -> {70}; - 70 -> {71}; - 71 -> {72}; - 71 -> {79} [label="onUncaughtException"]; + 68 -> {71} [label="return@/test_3"]; + 68 -> {69} [style=dotted]; + 69 -> {70} [style=dotted]; + 70 -> {71} [style=dotted]; + + subgraph cluster_26 { + color=red + 72 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_27 { + color=blue + 73 [label="Enter block"]; + subgraph cluster_28 { + color=blue + 74 [label="Function call arguments enter"]; + 75 [label="Postponed enter to lambda"]; + subgraph cluster_29 { + color=blue + 76 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 77 [label="Enter block"]; + subgraph cluster_31 { + color=blue + 78 [label="Try expression enter"]; + subgraph cluster_32 { + color=blue + 79 [label="Try main block enter"]; + subgraph cluster_33 { + color=blue + 80 [label="Enter block"]; + 81 [label="Const: Int(2)"]; + 82 [label="Jump: ^test_4 Int(2)"]; + 83 [label="Stub" style="filled" fillcolor=gray]; + 84 [label="Exit block" style="filled" fillcolor=gray]; + } + 85 [label="Try main block exit" style="filled" fillcolor=gray]; + } + subgraph cluster_34 { + color=blue + 86 [label="Enter finally"]; + subgraph cluster_35 { + color=blue + 87 [label="Enter block"]; + 88 [label="Exit block"]; + } + 89 [label="Exit finally"]; + } + 90 [label="Try expression exit" style="filled" fillcolor=gray]; + } + 91 [label="Exit block" style="filled" fillcolor=gray]; + } + 92 [label="Exit function " style="filled" fillcolor=gray]; + } + 93 [label="Function call arguments exit"]; + } + 94 [label="Postponed exit from lambda"]; + 95 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 96 [label="Stub" style="filled" fillcolor=gray]; + 97 [label="Exit block" style="filled" fillcolor=gray]; + } + 98 [label="Exit function test_4" style="filled" fillcolor=red]; + } 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {79} [label="return@/test_4"]; - 75 -> {76} [style=dotted]; - 76 -> {77} [style=dotted]; - 77 -> {78} [style=dotted]; - 78 -> {79} [style=dotted]; + 75 -> {76 93 94}; + 75 -> {76} [style=dashed]; + 76 -> {77}; + 77 -> {78}; + 78 -> {79}; + 78 -> {86} [label="onUncaughtException"]; 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {90} [label="return@/test_4"]; + 82 -> {86} [label="return@/test_4"]; 82 -> {83} [style=dotted]; 83 -> {84} [style=dotted]; 84 -> {85} [style=dotted]; 85 -> {86} [style=dotted]; 86 -> {87}; - 86 -> {68} [color=green style=dashed]; - 87 -> {88} [style=dotted]; - 88 -> {89} [style=dotted]; + 87 -> {88}; + 88 -> {89}; + 89 -> {98} [label="return@/test_4"]; 89 -> {90} [style=dotted]; + 90 -> {91} [style=dotted]; + 91 -> {92} [style=dotted]; + 92 -> {94} [style=dotted]; + 93 -> {95}; + 94 -> {95}; + 94 -> {75} [color=green style=dashed]; + 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; + 97 -> {98} [style=dotted]; - subgraph cluster_32 { + subgraph cluster_36 { color=red - 91 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_33 { + 99 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_37 { color=blue - 92 [label="Enter block"]; - subgraph cluster_34 { + 100 [label="Enter block"]; + subgraph cluster_38 { color=blue - 93 [label="Try expression enter"]; - subgraph cluster_35 { - color=blue - 94 [label="Try main block enter"]; - subgraph cluster_36 { - color=blue - 95 [label="Enter block"]; - 96 [label="Postponed enter to lambda"]; - subgraph cluster_37 { - color=blue - 97 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 98 [label="Enter block"]; - 99 [label="Const: Int(2)"]; - 100 [label="Jump: ^test_5 Int(2)"]; - 101 [label="Stub" style="filled" fillcolor=gray]; - 102 [label="Exit block" style="filled" fillcolor=gray]; - } - 103 [label="Exit function " style="filled" fillcolor=gray]; - } - 104 [label="Postponed exit from lambda"]; - 105 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 106 [label="Stub" style="filled" fillcolor=gray]; - 107 [label="Exit block" style="filled" fillcolor=gray]; - } - 108 [label="Try main block exit" style="filled" fillcolor=gray]; - } + 101 [label="Try expression enter"]; subgraph cluster_39 { color=blue - 109 [label="Catch enter"]; - 110 [label="Variable declaration: e: R|kotlin/Exception|"]; + 102 [label="Try main block enter"]; subgraph cluster_40 { color=blue - 111 [label="Enter block"]; - 112 [label="Const: String(hello)"]; - 113 [label="Exit block"]; + 103 [label="Enter block"]; + subgraph cluster_41 { + color=blue + 104 [label="Function call arguments enter"]; + 105 [label="Postponed enter to lambda"]; + subgraph cluster_42 { + color=blue + 106 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_43 { + color=blue + 107 [label="Enter block"]; + 108 [label="Const: Int(2)"]; + 109 [label="Jump: ^test_5 Int(2)"]; + 110 [label="Stub" style="filled" fillcolor=gray]; + 111 [label="Exit block" style="filled" fillcolor=gray]; + } + 112 [label="Exit function " style="filled" fillcolor=gray]; + } + 113 [label="Function call arguments exit"]; + } + 114 [label="Postponed exit from lambda"]; + 115 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 116 [label="Stub" style="filled" fillcolor=gray]; + 117 [label="Exit block" style="filled" fillcolor=gray]; } - 114 [label="Catch exit"]; + 118 [label="Try main block exit" style="filled" fillcolor=gray]; } - subgraph cluster_41 { + subgraph cluster_44 { color=blue - 115 [label="Enter finally"]; - subgraph cluster_42 { + 119 [label="Catch enter"]; + 120 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_45 { color=blue - 116 [label="Enter block"]; - 117 [label="Exit block"]; + 121 [label="Enter block"]; + 122 [label="Const: String(hello)"]; + 123 [label="Exit block"]; } - 118 [label="Exit finally"]; + 124 [label="Catch exit"]; } - 119 [label="Try expression exit"]; + subgraph cluster_46 { + color=blue + 125 [label="Enter finally"]; + subgraph cluster_47 { + color=blue + 126 [label="Enter block"]; + 127 [label="Exit block"]; + } + 128 [label="Exit finally"]; + } + 129 [label="Try expression exit"]; } - 120 [label="Exit block"]; + 130 [label="Exit block"]; } - 121 [label="Exit function test_5" style="filled" fillcolor=red]; + 131 [label="Exit function test_5" style="filled" fillcolor=red]; } - 91 -> {92}; - 92 -> {93}; - 93 -> {94 109}; - 93 -> {115} [label="onUncaughtException"]; - 94 -> {95}; - 95 -> {96}; - 96 -> {97 104 105}; - 96 -> {97} [style=dashed]; - 97 -> {98}; - 98 -> {99}; 99 -> {100}; - 100 -> {115} [label="return@/test_5"]; - 100 -> {101} [style=dotted]; - 101 -> {102} [style=dotted]; - 102 -> {103} [style=dotted]; - 103 -> {104} [style=dotted]; - 104 -> {96} [color=green style=dashed]; - 104 -> {105} [color=green]; - 104 -> {119} [color=red]; - 105 -> {106} [style=dotted]; - 106 -> {107} [style=dotted]; - 107 -> {108} [style=dotted]; - 108 -> {109 115} [style=dotted]; - 109 -> {110}; - 109 -> {115} [label="onUncaughtException"]; - 110 -> {111}; - 111 -> {112}; - 112 -> {113}; - 113 -> {114}; - 114 -> {115}; - 115 -> {116}; - 116 -> {117}; - 117 -> {118}; - 118 -> {119}; - 118 -> {121} [label="return@/test_5"]; + 100 -> {101}; + 101 -> {102 119}; + 101 -> {125} [label="onUncaughtException"]; + 102 -> {103}; + 103 -> {104}; + 104 -> {105}; + 105 -> {106 113 114}; + 105 -> {106} [style=dashed]; + 106 -> {107}; + 107 -> {108}; + 108 -> {109}; + 109 -> {125} [label="return@/test_5"]; + 109 -> {110} [style=dotted]; + 110 -> {111} [style=dotted]; + 111 -> {112} [style=dotted]; + 112 -> {114} [style=dotted]; + 113 -> {115}; + 114 -> {105} [color=green style=dashed]; + 114 -> {115} [color=green]; + 114 -> {129} [color=red]; + 115 -> {116} [style=dotted]; + 116 -> {117} [style=dotted]; + 117 -> {118} [style=dotted]; + 118 -> {119 125} [style=dotted]; 119 -> {120}; + 119 -> {125} [label="onUncaughtException"]; 120 -> {121}; + 121 -> {122}; + 122 -> {123}; + 123 -> {124}; + 124 -> {125}; + 125 -> {126}; + 126 -> {127}; + 127 -> {128}; + 128 -> {129}; + 128 -> {131} [label="return@/test_5"]; + 129 -> {130}; + 130 -> {131}; } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedConstructorArguments.dot b/compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedConstructorArguments.dot index f3a720dd6d3..cc4f671e850 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedConstructorArguments.dot +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedConstructorArguments.dot @@ -16,168 +16,182 @@ digraph delegatedConstructorArguments_kt { subgraph cluster_2 { color=blue 3 [label="Enter function " style="filled" fillcolor=red]; - 4 [label="Access variable R|/set|"]; - 5 [label="Postponed enter to lambda"]; subgraph cluster_3 { color=blue - 6 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Function call arguments enter"]; + 5 [label="Access variable R|/set|"]; + 6 [label="Postponed enter to lambda"]; subgraph cluster_4 { color=blue - 7 [label="Enter block"]; - 8 [label="Access variable R|/it|"]; - 9 [label="Exit block"]; + 7 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 8 [label="Enter block"]; + 9 [label="Access variable R|/it|"]; + 10 [label="Exit block"]; + } + 11 [label="Exit function " style="filled" fillcolor=red]; } - 10 [label="Exit function " style="filled" fillcolor=red]; + 12 [label="Function call arguments exit"]; } - 11 [label="Postponed exit from lambda"]; - 12 [label="Function call: R|/set|.R|kotlin/collections/map|(...)" style="filled" fillcolor=yellow]; - 13 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; - subgraph cluster_5 { + 13 [label="Postponed exit from lambda"]; + 14 [label="Function call: R|/set|.R|kotlin/collections/map|(...)" style="filled" fillcolor=yellow]; + 15 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; + subgraph cluster_6 { color=blue - 14 [label="Enter function " style="filled" fillcolor=red]; - 15 [label="Access variable R|/map|"]; - 16 [label="Access variable R|SubstitutionOverride|>|"]; - 17 [label="Postponed enter to lambda"]; - subgraph cluster_6 { + 16 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 18 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_7 { + 17 [label="Function call arguments enter"]; + 18 [label="Access variable R|/map|"]; + 19 [label="Access variable R|SubstitutionOverride|>|"]; + 20 [label="Postponed enter to lambda"]; + subgraph cluster_8 { color=blue - 19 [label="Enter block"]; - 20 [label="Access variable R|/it|"]; - 21 [label="Exit block"]; + 21 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 22 [label="Enter block"]; + 23 [label="Access variable R|/it|"]; + 24 [label="Exit block"]; + } + 25 [label="Exit function " style="filled" fillcolor=red]; } - 22 [label="Exit function " style="filled" fillcolor=red]; - } - 23 [label="Postponed exit from lambda"]; - 24 [label="Function call: R|/map|.R|SubstitutionOverride|>|.R|kotlin/collections/map|(...)" style="filled" fillcolor=yellow]; - 25 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; - subgraph cluster_8 { - color=blue - 26 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 27 [label="Enter block"]; - 28 [label="Access variable this@R|/Test|"]; - 29 [label="Const: Int(0)"]; - 30 [label="Assignment: R|/Test.size|"]; - 31 [label="Exit block"]; - } - 32 [label="Exit init block" style="filled" fillcolor=red]; + 26 [label="Function call arguments exit"]; } + 27 [label="Postponed exit from lambda"]; + 28 [label="Function call: R|/map|.R|SubstitutionOverride|>|.R|kotlin/collections/map|(...)" style="filled" fillcolor=yellow]; + 29 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; subgraph cluster_10 { color=blue - 33 [label="Enter function " style="filled" fillcolor=red]; - 34 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 30 [label="Enter init block" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 35 [label="Enter block"]; - 36 [label="Access variable this@R|/Test|"]; - 37 [label="Access variable R|/list|"]; - 38 [label="Assignment: R|/Test.values|"]; - 39 [label="Exit block"]; + 31 [label="Enter block"]; + 32 [label="Access variable this@R|/Test|"]; + 33 [label="Const: Int(0)"]; + 34 [label="Assignment: R|/Test.size|"]; + 35 [label="Exit block"]; } - 40 [label="Exit function " style="filled" fillcolor=red]; + 36 [label="Exit init block" style="filled" fillcolor=red]; } subgraph cluster_12 { color=blue - 41 [label="Enter block"]; - 42 [label="Access variable this@R|/Test|"]; - 43 [label="Access variable R|/Test.size|"]; - 44 [label="Access variable this@R|/Test|"]; - 45 [label="Access variable R|/Test.values|"]; - 46 [label="Access variable R|SubstitutionOverride|"]; - 47 [label="Function call: this@R|/Test|.R|/Test.size|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; - 48 [label="Assignment: R|/Test.size|"]; - 49 [label="Exit block"]; + 37 [label="Enter function " style="filled" fillcolor=red]; + 38 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + subgraph cluster_13 { + color=blue + 39 [label="Enter block"]; + 40 [label="Access variable this@R|/Test|"]; + 41 [label="Access variable R|/list|"]; + 42 [label="Assignment: R|/Test.values|"]; + 43 [label="Exit block"]; + } + 44 [label="Exit function " style="filled" fillcolor=red]; } - 50 [label="Exit function " style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 45 [label="Enter block"]; + 46 [label="Access variable this@R|/Test|"]; + 47 [label="Access variable R|/Test.size|"]; + 48 [label="Access variable this@R|/Test|"]; + 49 [label="Access variable R|/Test.values|"]; + 50 [label="Access variable R|SubstitutionOverride|"]; + 51 [label="Function call: this@R|/Test|.R|/Test.size|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; + 52 [label="Assignment: R|/Test.size|"]; + 53 [label="Exit block"]; + } + 54 [label="Exit function " style="filled" fillcolor=red]; } - subgraph cluster_13 { + subgraph cluster_15 { color=blue - 51 [label="Enter block"]; - 52 [label="Access variable this@R|/Test|"]; - 53 [label="Access variable R|/Test.size|"]; - 54 [label="Access variable this@R|/Test|"]; - 55 [label="Access variable R|/Test.values|"]; - 56 [label="Access variable R|SubstitutionOverride|"]; - 57 [label="Function call: this@R|/Test|.R|/Test.size|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; - 58 [label="Assignment: R|/Test.size|"]; - 59 [label="Exit block"]; + 55 [label="Enter block"]; + 56 [label="Access variable this@R|/Test|"]; + 57 [label="Access variable R|/Test.size|"]; + 58 [label="Access variable this@R|/Test|"]; + 59 [label="Access variable R|/Test.values|"]; + 60 [label="Access variable R|SubstitutionOverride|"]; + 61 [label="Function call: this@R|/Test|.R|/Test.size|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; + 62 [label="Assignment: R|/Test.size|"]; + 63 [label="Exit block"]; } - 60 [label="Exit function " style="filled" fillcolor=red]; + 64 [label="Exit function " style="filled" fillcolor=red]; } - 61 [label="Exit class Test" style="filled" fillcolor=red]; + 65 [label="Exit class Test" style="filled" fillcolor=red]; } - 2 -> {3 14 26} [color=green]; - 2 -> {61} [style=dotted]; - 2 -> {3 14 26 33} [style=dashed]; + 2 -> {3 16 30} [color=green]; + 2 -> {65} [style=dotted]; + 2 -> {3 16 30 37} [style=dashed]; 3 -> {4}; 4 -> {5}; - 5 -> {6 11 12}; - 5 -> {6} [style=dashed]; - 6 -> {7}; + 5 -> {6}; + 6 -> {7 12 13}; + 6 -> {7} [style=dashed]; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {5} [color=green style=dashed]; - 11 -> {12} [color=green]; - 11 -> {13} [color=red]; - 12 -> {13}; - 13 -> {26} [color=green label="return@/Test.Test"]; - 13 -> {41} [color=red]; + 11 -> {13}; + 12 -> {14}; + 13 -> {6} [color=green style=dashed]; + 13 -> {14} [color=green]; + 13 -> {15} [color=red]; 14 -> {15}; - 15 -> {16}; + 15 -> {30} [color=green label="return@/Test.Test"]; + 15 -> {45} [color=red]; 16 -> {17}; - 17 -> {18 23 24}; - 17 -> {18} [style=dashed]; + 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21}; + 20 -> {21 26 27}; + 20 -> {21} [style=dashed]; 21 -> {22}; 22 -> {23}; - 23 -> {17} [color=green style=dashed]; - 23 -> {24} [color=green]; - 23 -> {25} [color=red]; + 23 -> {24}; 24 -> {25}; - 25 -> {26} [color=green label="return@/Test.Test"]; - 25 -> {51} [color=red]; - 26 -> {27}; - 27 -> {28}; + 25 -> {27}; + 26 -> {28}; + 27 -> {20} [color=green style=dashed]; + 27 -> {28} [color=green]; + 27 -> {29} [color=red]; 28 -> {29}; - 29 -> {30}; + 29 -> {30} [color=green label="return@/Test.Test"]; + 29 -> {55} [color=red]; 30 -> {31}; 31 -> {32}; - 32 -> {33} [color=green]; + 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37}; + 36 -> {37} [color=green]; 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {41 51} [color=green label="return@/Test.Test"]; - 40 -> {61} [color=green]; + 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45}; + 44 -> {45 55} [color=green label="return@/Test.Test"]; + 44 -> {65} [color=green]; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {61} [color=green]; + 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {55}; + 54 -> {65} [color=green]; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {61} [color=green]; + 60 -> {61}; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; + 64 -> {65} [color=green]; } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/smartCastInCatch.dot b/compiler/testData/diagnostics/tests/controlFlowAnalysis/smartCastInCatch.dot index 36aaf7eff6b..888a79aab80 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/smartCastInCatch.dot +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/smartCastInCatch.dot @@ -30,17 +30,22 @@ digraph smartCastInCatch_fir_kt { subgraph cluster_5 { color=blue 10 [label="Enter block"]; - 11 [label="Function call: R|java/lang/RuntimeException.RuntimeException|()" style="filled" fillcolor=yellow]; - 12 [label="Throw: throw R|java/lang/RuntimeException.RuntimeException|()"]; - 13 [label="Stub" style="filled" fillcolor=gray]; - 14 [label="Exit block" style="filled" fillcolor=gray]; + subgraph cluster_6 { + color=blue + 11 [label="Function call arguments enter"]; + 12 [label="Function call arguments exit"]; + } + 13 [label="Function call: R|java/lang/RuntimeException.RuntimeException|()" style="filled" fillcolor=yellow]; + 14 [label="Throw: throw R|java/lang/RuntimeException.RuntimeException|()"]; + 15 [label="Stub" style="filled" fillcolor=gray]; + 16 [label="Exit block" style="filled" fillcolor=gray]; } - 15 [label="Exit when branch result" style="filled" fillcolor=gray]; - 16 [label="Exit when"]; + 17 [label="Exit when branch result" style="filled" fillcolor=gray]; + 18 [label="Exit when"]; } - 17 [label="Exit block"]; + 19 [label="Exit block"]; } - 18 [label="Exit function exc" style="filled" fillcolor=red]; + 20 [label="Exit function exc" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; @@ -48,115 +53,140 @@ digraph smartCastInCatch_fir_kt { 5 -> {6}; 6 -> {7}; 7 -> {8 9}; - 8 -> {16}; + 8 -> {18}; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {13} [style=dotted]; - 13 -> {14} [style=dotted]; + 12 -> {13}; + 13 -> {14}; 14 -> {15} [style=dotted]; 15 -> {16} [style=dotted]; - 16 -> {17}; - 17 -> {18}; - - subgraph cluster_6 { - color=red - 19 [label="Enter function notNull" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 20 [label="Enter block"]; - 21 [label="Function call: this@R|/notNull|.R|kotlin/Any.toString|()" style="filled" fillcolor=yellow]; - 22 [label="Jump: ^notNull this@R|/notNull|.R|kotlin/Any.toString|()"]; - 23 [label="Stub" style="filled" fillcolor=gray]; - 24 [label="Exit block" style="filled" fillcolor=gray]; - } - 25 [label="Exit function notNull" style="filled" fillcolor=red]; - } + 16 -> {17} [style=dotted]; + 17 -> {18} [style=dotted]; + 18 -> {19}; 19 -> {20}; - 20 -> {21}; - 21 -> {22}; - 22 -> {25}; - 22 -> {23} [style=dotted]; - 23 -> {24} [style=dotted]; - 24 -> {25} [style=dotted]; - subgraph cluster_8 { + subgraph cluster_7 { color=red - 26 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_9 { + 21 [label="Enter function notNull" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 27 [label="Enter block"]; - 28 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 29 [label="Const: String()"]; - 30 [label="Assignment: R|/x|"]; - subgraph cluster_10 { + 22 [label="Enter block"]; + subgraph cluster_9 { color=blue - 31 [label="Try expression enter"]; - subgraph cluster_11 { - color=blue - 32 [label="Try main block enter"]; - subgraph cluster_12 { - color=blue - 33 [label="Enter block"]; - 34 [label="Const: Null(null)"]; - 35 [label="Assignment: R|/x|"]; - 36 [label="Access variable R|/flag|"]; - 37 [label="Function call: R|/exc|(...)" style="filled" fillcolor=yellow]; - 38 [label="Const: Int(1)"]; - 39 [label="Assignment: R|/x|"]; - 40 [label="Access variable R|/flag|"]; - 41 [label="Function call: R|/flag|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 42 [label="Function call: R|/exc|(...)" style="filled" fillcolor=yellow]; - 43 [label="Const: String()"]; - 44 [label="Assignment: R|/x|"]; - 45 [label="Exit block"]; - } - 46 [label="Try main block exit"]; - } + 23 [label="Function call arguments enter"]; + 24 [label="Function call arguments exit"]; + } + 25 [label="Function call: this@R|/notNull|.R|kotlin/Any.toString|()" style="filled" fillcolor=yellow]; + 26 [label="Jump: ^notNull this@R|/notNull|.R|kotlin/Any.toString|()"]; + 27 [label="Stub" style="filled" fillcolor=gray]; + 28 [label="Exit block" style="filled" fillcolor=gray]; + } + 29 [label="Exit function notNull" style="filled" fillcolor=red]; + } + 21 -> {22}; + 22 -> {23}; + 23 -> {24}; + 24 -> {25}; + 25 -> {26}; + 26 -> {29}; + 26 -> {27} [style=dotted]; + 27 -> {28} [style=dotted]; + 28 -> {29} [style=dotted]; + + subgraph cluster_10 { + color=red + 30 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 31 [label="Enter block"]; + 32 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 33 [label="Const: String()"]; + 34 [label="Assignment: R|/x|"]; + subgraph cluster_12 { + color=blue + 35 [label="Try expression enter"]; subgraph cluster_13 { color=blue - 47 [label="Catch enter"]; - 48 [label="Variable declaration: e: R|kotlin/Throwable|"]; + 36 [label="Try main block enter"]; subgraph cluster_14 { color=blue - 49 [label="Enter block"]; - 50 [label="Access variable R|/x|"]; - 51 [label="Smart cast: R|/x|"]; - 52 [label="Access variable #"]; - 53 [label="Access variable R|/x|"]; - 54 [label="Smart cast: R|/x|"]; - 55 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 56 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Const: Null(null)"]; + 39 [label="Assignment: R|/x|"]; + subgraph cluster_15 { + color=blue + 40 [label="Function call arguments enter"]; + 41 [label="Access variable R|/flag|"]; + 42 [label="Function call arguments exit"]; + } + 43 [label="Function call: R|/exc|(...)" style="filled" fillcolor=yellow]; + 44 [label="Const: Int(1)"]; + 45 [label="Assignment: R|/x|"]; + subgraph cluster_16 { + color=blue + 46 [label="Function call arguments enter"]; + subgraph cluster_17 { + color=blue + 47 [label="Function call arguments enter"]; + 48 [label="Access variable R|/flag|"]; + 49 [label="Function call arguments exit"]; + } + 50 [label="Function call: R|/flag|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 51 [label="Function call arguments exit"]; + } + 52 [label="Function call: R|/exc|(...)" style="filled" fillcolor=yellow]; + 53 [label="Const: String()"]; + 54 [label="Assignment: R|/x|"]; + 55 [label="Exit block"]; } - 57 [label="Catch exit"]; + 56 [label="Try main block exit"]; } - 58 [label="Try expression exit"]; + subgraph cluster_18 { + color=blue + 57 [label="Catch enter"]; + 58 [label="Variable declaration: e: R|kotlin/Throwable|"]; + subgraph cluster_19 { + color=blue + 59 [label="Enter block"]; + 60 [label="Access variable R|/x|"]; + 61 [label="Smart cast: R|/x|"]; + 62 [label="Access variable #"]; + subgraph cluster_20 { + color=blue + 63 [label="Function call arguments enter"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Smart cast: R|/x|"]; + 66 [label="Function call arguments exit"]; + } + 67 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 68 [label="Exit block"]; + } + 69 [label="Catch exit"]; + } + 70 [label="Try expression exit"]; } - 59 [label="Exit block"]; + 71 [label="Exit block"]; } - 60 [label="Exit function test" style="filled" fillcolor=red]; + 72 [label="Exit function test" style="filled" fillcolor=red]; } - 26 -> {27}; - 27 -> {28}; - 28 -> {29}; - 29 -> {30}; 30 -> {31}; - 31 -> {32 47}; + 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36 47}; + 35 -> {36 57}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40 47}; + 39 -> {40 57}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45 47}; - 45 -> {46}; - 46 -> {47 58}; + 44 -> {45}; + 45 -> {46 57}; + 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; @@ -164,61 +194,13 @@ digraph smartCastInCatch_fir_kt { 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {55}; + 54 -> {55 57}; 55 -> {56}; - 56 -> {57}; + 56 -> {57 70}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - - subgraph cluster_15 { - color=red - 61 [label="Enter function testGetClassThrows" style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 62 [label="Enter block"]; - 63 [label="Access qualifier kotlin/String"]; - 64 [label="::class call"]; - 65 [label="Variable declaration: lvar x: R|kotlin/reflect/KClass?|"]; - 66 [label="Access variable R|/x|"]; - 67 [label="Type operator: (R|/x| as R|kotlin/reflect/KClass|)"]; - subgraph cluster_17 { - color=blue - 68 [label="Try expression enter"]; - subgraph cluster_18 { - color=blue - 69 [label="Try main block enter"]; - subgraph cluster_19 { - color=blue - 70 [label="Enter block"]; - 71 [label="Const: Null(null)"]; - 72 [label="Assignment: R|/x|"]; - 73 [label="Access qualifier kotlin/String"]; - 74 [label="::class call"]; - 75 [label="Assignment: R|/x|"]; - 76 [label="Exit block"]; - } - 77 [label="Try main block exit"]; - } - subgraph cluster_20 { - color=blue - 78 [label="Catch enter"]; - 79 [label="Variable declaration: e: R|kotlin/Throwable|"]; - subgraph cluster_21 { - color=blue - 80 [label="Enter block"]; - 81 [label="Access variable R|/x|"]; - 82 [label="Function call: R|/x|.R|/notNull#|()" style="filled" fillcolor=yellow]; - 83 [label="Exit block"]; - } - 84 [label="Catch exit"]; - } - 85 [label="Try expression exit"]; - } - 86 [label="Exit block"]; - } - 87 [label="Exit function testGetClassThrows" style="filled" fillcolor=red]; - } + 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; @@ -226,277 +208,365 @@ digraph smartCastInCatch_fir_kt { 65 -> {66}; 66 -> {67}; 67 -> {68}; - 68 -> {69 78}; + 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {73 78}; + + subgraph cluster_21 { + color=red + 73 [label="Enter function testGetClassThrows" style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 74 [label="Enter block"]; + 75 [label="Access qualifier kotlin/String"]; + 76 [label="::class call"]; + 77 [label="Variable declaration: lvar x: R|kotlin/reflect/KClass?|"]; + 78 [label="Access variable R|/x|"]; + 79 [label="Type operator: (R|/x| as R|kotlin/reflect/KClass|)"]; + subgraph cluster_23 { + color=blue + 80 [label="Try expression enter"]; + subgraph cluster_24 { + color=blue + 81 [label="Try main block enter"]; + subgraph cluster_25 { + color=blue + 82 [label="Enter block"]; + 83 [label="Const: Null(null)"]; + 84 [label="Assignment: R|/x|"]; + 85 [label="Access qualifier kotlin/String"]; + 86 [label="::class call"]; + 87 [label="Assignment: R|/x|"]; + 88 [label="Exit block"]; + } + 89 [label="Try main block exit"]; + } + subgraph cluster_26 { + color=blue + 90 [label="Catch enter"]; + 91 [label="Variable declaration: e: R|kotlin/Throwable|"]; + subgraph cluster_27 { + color=blue + 92 [label="Enter block"]; + subgraph cluster_28 { + color=blue + 93 [label="Function call arguments enter"]; + 94 [label="Access variable R|/x|"]; + 95 [label="Function call arguments exit"]; + } + 96 [label="Function call: R|/x|.R|/notNull#|()" style="filled" fillcolor=yellow]; + 97 [label="Exit block"]; + } + 98 [label="Catch exit"]; + } + 99 [label="Try expression exit"]; + } + 100 [label="Exit block"]; + } + 101 [label="Exit function testGetClassThrows" style="filled" fillcolor=red]; + } 73 -> {74}; 74 -> {75}; - 75 -> {76 78}; + 75 -> {76}; 76 -> {77}; - 77 -> {78 85}; + 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {81}; + 80 -> {81 90}; 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {85}; + 84 -> {85 90}; 85 -> {86}; 86 -> {87}; - - subgraph cluster_22 { - color=red - 88 [label="Enter function testMemberReferenceThrows" style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 89 [label="Enter block"]; - 90 [label="Const: String()"]; - 91 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 92 [label="Access variable R|/x|"]; - 93 [label="Type operator: (R|/x| as R|kotlin/Any|)"]; - subgraph cluster_24 { - color=blue - 94 [label="Try expression enter"]; - subgraph cluster_25 { - color=blue - 95 [label="Try main block enter"]; - subgraph cluster_26 { - color=blue - 96 [label="Enter block"]; - 97 [label="Const: Null(null)"]; - 98 [label="Assignment: R|/x|"]; - 99 [label="Access qualifier kotlin/String"]; - 100 [label="Callable reference: Q|kotlin/String|::R|kotlin/String.length|"]; - 101 [label="Assignment: R|/x|"]; - 102 [label="Exit block"]; - } - 103 [label="Try main block exit"]; - } - subgraph cluster_27 { - color=blue - 104 [label="Catch enter"]; - 105 [label="Variable declaration: ex: R|kotlin/Throwable|"]; - subgraph cluster_28 { - color=blue - 106 [label="Enter block"]; - 107 [label="Access variable R|/x|"]; - 108 [label="Function call: R|/x|.R|/notNull#|()" style="filled" fillcolor=yellow]; - 109 [label="Exit block"]; - } - 110 [label="Catch exit"]; - } - 111 [label="Try expression exit"]; - } - 112 [label="Exit block"]; - } - 113 [label="Exit function testMemberReferenceThrows" style="filled" fillcolor=red]; - } + 87 -> {88 90}; 88 -> {89}; - 89 -> {90}; + 89 -> {90 99}; 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; - 94 -> {95 104}; + 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {99 104}; + 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {102 104}; + + subgraph cluster_29 { + color=red + 102 [label="Enter function testMemberReferenceThrows" style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 103 [label="Enter block"]; + 104 [label="Const: String()"]; + 105 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 106 [label="Access variable R|/x|"]; + 107 [label="Type operator: (R|/x| as R|kotlin/Any|)"]; + subgraph cluster_31 { + color=blue + 108 [label="Try expression enter"]; + subgraph cluster_32 { + color=blue + 109 [label="Try main block enter"]; + subgraph cluster_33 { + color=blue + 110 [label="Enter block"]; + 111 [label="Const: Null(null)"]; + 112 [label="Assignment: R|/x|"]; + 113 [label="Access qualifier kotlin/String"]; + 114 [label="Callable reference: Q|kotlin/String|::R|kotlin/String.length|"]; + 115 [label="Assignment: R|/x|"]; + 116 [label="Exit block"]; + } + 117 [label="Try main block exit"]; + } + subgraph cluster_34 { + color=blue + 118 [label="Catch enter"]; + 119 [label="Variable declaration: ex: R|kotlin/Throwable|"]; + subgraph cluster_35 { + color=blue + 120 [label="Enter block"]; + subgraph cluster_36 { + color=blue + 121 [label="Function call arguments enter"]; + 122 [label="Access variable R|/x|"]; + 123 [label="Function call arguments exit"]; + } + 124 [label="Function call: R|/x|.R|/notNull#|()" style="filled" fillcolor=yellow]; + 125 [label="Exit block"]; + } + 126 [label="Catch exit"]; + } + 127 [label="Try expression exit"]; + } + 128 [label="Exit block"]; + } + 129 [label="Exit function testMemberReferenceThrows" style="filled" fillcolor=red]; + } 102 -> {103}; - 103 -> {104 111}; + 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {109}; + 108 -> {109 118}; 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113}; - - subgraph cluster_29 { - color=red - 114 [label="Enter function testExceptionBeforeLambda" style="filled" fillcolor=red]; - subgraph cluster_30 { - color=blue - 115 [label="Enter block"]; - 116 [label="Const: String()"]; - 117 [label="Variable declaration: lvar x: R|kotlin/String?|"]; - 118 [label="Access variable R|/x|"]; - 119 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - subgraph cluster_31 { - color=blue - 120 [label="Try expression enter"]; - subgraph cluster_32 { - color=blue - 121 [label="Try main block enter"]; - subgraph cluster_33 { - color=blue - 122 [label="Enter block"]; - 123 [label="Const: Null(null)"]; - 124 [label="Assignment: R|/x|"]; - 125 [label="Postponed enter to lambda"]; - subgraph cluster_34 { - color=blue - 126 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_35 { - color=blue - 127 [label="Enter block"]; - 128 [label="Const: String()"]; - 129 [label="Assignment: R|/x|"]; - 130 [label="Exit block"]; - } - 131 [label="Exit function " style="filled" fillcolor=red]; - } - 132 [label="Postponed exit from lambda"]; - 133 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 134 [label="Exit block"]; - } - 135 [label="Try main block exit"]; - } - subgraph cluster_36 { - color=blue - 136 [label="Catch enter"]; - 137 [label="Variable declaration: ex: R|kotlin/Throwable|"]; - subgraph cluster_37 { - color=blue - 138 [label="Enter block"]; - 139 [label="Access variable R|/x|"]; - 140 [label="Function call: R|/x|.R|/notNull#|()" style="filled" fillcolor=yellow]; - 141 [label="Exit block"]; - } - 142 [label="Catch exit"]; - } - 143 [label="Try expression exit"]; - } - 144 [label="Exit block"]; - } - 145 [label="Exit function testExceptionBeforeLambda" style="filled" fillcolor=red]; - } + 112 -> {113 118}; + 113 -> {114}; 114 -> {115}; - 115 -> {116}; + 115 -> {116 118}; 116 -> {117}; - 117 -> {118}; + 117 -> {118 127}; 118 -> {119}; 119 -> {120}; - 120 -> {121 136}; + 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; - 124 -> {125 136}; - 125 -> {126 133}; - 125 -> {132} [style=dotted]; - 125 -> {126} [style=dashed]; + 124 -> {125}; + 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; - 129 -> {130 136}; - 130 -> {131}; - 131 -> {132}; - 132 -> {133} [color=green]; - 132 -> {143} [color=red]; - 133 -> {134}; - 134 -> {135}; - 135 -> {136 143}; - 136 -> {137}; - 137 -> {138}; - 138 -> {139}; - 139 -> {140}; - 140 -> {141}; - 141 -> {142}; - 142 -> {143}; - 143 -> {144}; - 144 -> {145}; - subgraph cluster_38 { + subgraph cluster_37 { color=red - 146 [label="Enter function testExceptionWithinLocalFunction" style="filled" fillcolor=red]; - subgraph cluster_39 { + 130 [label="Enter function testExceptionBeforeLambda" style="filled" fillcolor=red]; + subgraph cluster_38 { color=blue - 147 [label="Enter block"]; - 148 [label="Const: String()"]; - 149 [label="Variable declaration: lvar x: R|kotlin/Any|"]; - 150 [label="Access variable R|/x|"]; - 151 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - subgraph cluster_40 { + 131 [label="Enter block"]; + 132 [label="Const: String()"]; + 133 [label="Variable declaration: lvar x: R|kotlin/String?|"]; + 134 [label="Access variable R|/x|"]; + 135 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + subgraph cluster_39 { color=blue - 152 [label="Try expression enter"]; - subgraph cluster_41 { + 136 [label="Try expression enter"]; + subgraph cluster_40 { color=blue - 153 [label="Try main block enter"]; - subgraph cluster_42 { + 137 [label="Try main block enter"]; + subgraph cluster_41 { color=blue - 154 [label="Enter block"]; - 155 [label="Local function declaration"]; - 156 [label="Exit block"]; + 138 [label="Enter block"]; + 139 [label="Const: Null(null)"]; + 140 [label="Assignment: R|/x|"]; + subgraph cluster_42 { + color=blue + 141 [label="Function call arguments enter"]; + 142 [label="Postponed enter to lambda"]; + subgraph cluster_43 { + color=blue + 143 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_44 { + color=blue + 144 [label="Enter block"]; + 145 [label="Const: String()"]; + 146 [label="Assignment: R|/x|"]; + 147 [label="Exit block"]; + } + 148 [label="Exit function " style="filled" fillcolor=red]; + } + 149 [label="Function call arguments exit"]; + } + 150 [label="Postponed exit from lambda"]; + 151 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 152 [label="Exit block"]; } - 157 [label="Try main block exit"]; - } - subgraph cluster_43 { - color=blue - 158 [label="Enter function local" style="filled" fillcolor=red]; - subgraph cluster_44 { - color=blue - 159 [label="Enter block"]; - 160 [label="Const: Int(1)"]; - 161 [label="Assignment: R|/x|"]; - 162 [label="Exit block"]; - } - 163 [label="Exit function local" style="filled" fillcolor=red]; + 153 [label="Try main block exit"]; } subgraph cluster_45 { color=blue - 164 [label="Catch enter"]; - 165 [label="Variable declaration: e: R|kotlin/Exception|"]; + 154 [label="Catch enter"]; + 155 [label="Variable declaration: ex: R|kotlin/Throwable|"]; subgraph cluster_46 { color=blue - 166 [label="Enter block"]; - 167 [label="Access variable R|/x|"]; - 168 [label="Smart cast: R|/x|"]; - 169 [label="Access variable #"]; - 170 [label="Exit block"]; + 156 [label="Enter block"]; + subgraph cluster_47 { + color=blue + 157 [label="Function call arguments enter"]; + 158 [label="Access variable R|/x|"]; + 159 [label="Function call arguments exit"]; + } + 160 [label="Function call: R|/x|.R|/notNull#|()" style="filled" fillcolor=yellow]; + 161 [label="Exit block"]; } - 171 [label="Catch exit"]; + 162 [label="Catch exit"]; } - 172 [label="Try expression exit"]; + 163 [label="Try expression exit"]; } - 173 [label="Exit block"]; + 164 [label="Exit block"]; } - 174 [label="Exit function testExceptionWithinLocalFunction" style="filled" fillcolor=red]; + 165 [label="Exit function testExceptionBeforeLambda" style="filled" fillcolor=red]; } - 146 -> {147}; + 130 -> {131}; + 131 -> {132}; + 132 -> {133}; + 133 -> {134}; + 134 -> {135}; + 135 -> {136}; + 136 -> {137 154}; + 137 -> {138}; + 138 -> {139}; + 139 -> {140}; + 140 -> {141 154}; + 141 -> {142}; + 142 -> {143 149}; + 142 -> {150} [style=dotted]; + 142 -> {143} [style=dashed]; + 143 -> {144}; + 144 -> {145}; + 145 -> {146}; + 146 -> {147 154}; 147 -> {148}; - 148 -> {149}; - 149 -> {150}; - 150 -> {151}; + 148 -> {150}; + 149 -> {151}; + 150 -> {151} [color=green]; + 150 -> {163} [color=red]; 151 -> {152}; - 152 -> {153 164}; - 153 -> {154}; + 152 -> {153}; + 153 -> {154 163}; 154 -> {155}; - 155 -> {156 158}; - 155 -> {158} [style=dashed]; + 155 -> {156}; 156 -> {157}; - 157 -> {164 172}; + 157 -> {158}; 158 -> {159}; 159 -> {160}; 160 -> {161}; 161 -> {162}; - 161 -> {164} [color=red]; 162 -> {163}; + 163 -> {164}; 164 -> {165}; - 165 -> {166}; + + subgraph cluster_48 { + color=red + 166 [label="Enter function testExceptionWithinLocalFunction" style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 167 [label="Enter block"]; + 168 [label="Const: String()"]; + 169 [label="Variable declaration: lvar x: R|kotlin/Any|"]; + 170 [label="Access variable R|/x|"]; + 171 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + subgraph cluster_50 { + color=blue + 172 [label="Try expression enter"]; + subgraph cluster_51 { + color=blue + 173 [label="Try main block enter"]; + subgraph cluster_52 { + color=blue + 174 [label="Enter block"]; + 175 [label="Local function declaration"]; + 176 [label="Exit block"]; + } + 177 [label="Try main block exit"]; + } + subgraph cluster_53 { + color=blue + 178 [label="Enter function local" style="filled" fillcolor=red]; + subgraph cluster_54 { + color=blue + 179 [label="Enter block"]; + 180 [label="Const: Int(1)"]; + 181 [label="Assignment: R|/x|"]; + 182 [label="Exit block"]; + } + 183 [label="Exit function local" style="filled" fillcolor=red]; + } + subgraph cluster_55 { + color=blue + 184 [label="Catch enter"]; + 185 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_56 { + color=blue + 186 [label="Enter block"]; + 187 [label="Access variable R|/x|"]; + 188 [label="Smart cast: R|/x|"]; + 189 [label="Access variable #"]; + 190 [label="Exit block"]; + } + 191 [label="Catch exit"]; + } + 192 [label="Try expression exit"]; + } + 193 [label="Exit block"]; + } + 194 [label="Exit function testExceptionWithinLocalFunction" style="filled" fillcolor=red]; + } 166 -> {167}; 167 -> {168}; 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; - 172 -> {173}; + 172 -> {173 184}; 173 -> {174}; + 174 -> {175}; + 175 -> {176 178}; + 175 -> {178} [style=dashed]; + 176 -> {177}; + 177 -> {184 192}; + 178 -> {179}; + 179 -> {180}; + 180 -> {181}; + 181 -> {182}; + 181 -> {184} [color=red]; + 182 -> {183}; + 184 -> {185}; + 185 -> {186}; + 186 -> {187}; + 187 -> {188}; + 188 -> {189}; + 189 -> {190}; + 190 -> {191}; + 191 -> {192}; + 192 -> {193}; + 193 -> {194}; } diff --git a/compiler/testData/diagnostics/tests/script/ComplexScript.dot b/compiler/testData/diagnostics/tests/script/ComplexScript.dot index 1a095de690d..2f778862fec 100644 --- a/compiler/testData/diagnostics/tests/script/ComplexScript.dot +++ b/compiler/testData/diagnostics/tests/script/ComplexScript.dot @@ -43,12 +43,19 @@ digraph ComplexScript_kts { subgraph cluster_4 { color=red 12 [label="Enter property [3]" style="filled" fillcolor=red]; - 13 [label="Access variable R|/y| [3]"]; - 14 [label="Function call: R|/foo|(...) [3]" style="filled" fillcolor=yellow]; - 15 [label="Exit property [3]" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 13 [label="Function call arguments enter [3]"]; + 14 [label="Access variable R|/y| [3]"]; + 15 [label="Function call arguments exit [3]"]; + } + 16 [label="Function call: R|/foo|(...) [3]" style="filled" fillcolor=yellow]; + 17 [label="Exit property [3]" style="filled" fillcolor=red]; } 12 -> {13}; 13 -> {14}; 14 -> {15}; + 15 -> {16}; + 16 -> {17}; } diff --git a/compiler/testData/diagnostics/tests/script/NestedInnerClass.dot b/compiler/testData/diagnostics/tests/script/NestedInnerClass.dot index 01101761dbe..f7c3e780715 100644 --- a/compiler/testData/diagnostics/tests/script/NestedInnerClass.dot +++ b/compiler/testData/diagnostics/tests/script/NestedInnerClass.dot @@ -64,199 +64,204 @@ digraph NestedInnerClass_fir_kts { subgraph cluster_7 { color=blue 18 [label="Enter block [4]"]; - 19 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow]; - 20 [label="Jump: ^f R|/function|() [4]"]; - 21 [label="Stub [4]" style="filled" fillcolor=gray]; - 22 [label="Exit block [4]" style="filled" fillcolor=gray]; + subgraph cluster_8 { + color=blue + 19 [label="Function call arguments enter [4]"]; + 20 [label="Function call arguments exit [4]"]; + } + 21 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow]; + 22 [label="Jump: ^f R|/function|() [4]"]; + 23 [label="Stub [4]" style="filled" fillcolor=gray]; + 24 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 23 [label="Exit function f [4]" style="filled" fillcolor=red]; + 25 [label="Exit function f [4]" style="filled" fillcolor=red]; } 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {23}; - 20 -> {21} [style=dotted]; - 21 -> {22} [style=dotted]; + 20 -> {21}; + 21 -> {22}; + 22 -> {25}; 22 -> {23} [style=dotted]; + 23 -> {24} [style=dotted]; + 24 -> {25} [style=dotted]; - subgraph cluster_8 { + subgraph cluster_9 { color=red - 24 [label="Enter function g [4]" style="filled" fillcolor=red]; - subgraph cluster_9 { + 26 [label="Enter function g [4]" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 25 [label="Enter block [4]"]; - 26 [label="Access variable R|/property| [4]"]; - 27 [label="Jump: ^g R|/property| [4]"]; - 28 [label="Stub [4]" style="filled" fillcolor=gray]; - 29 [label="Exit block [4]" style="filled" fillcolor=gray]; + 27 [label="Enter block [4]"]; + 28 [label="Access variable R|/property| [4]"]; + 29 [label="Jump: ^g R|/property| [4]"]; + 30 [label="Stub [4]" style="filled" fillcolor=gray]; + 31 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 30 [label="Exit function g [4]" style="filled" fillcolor=red]; + 32 [label="Exit function g [4]" style="filled" fillcolor=red]; } - 24 -> {25}; - 25 -> {26}; 26 -> {27}; - 27 -> {30}; - 27 -> {28} [style=dotted]; - 28 -> {29} [style=dotted]; + 27 -> {28}; + 28 -> {29}; + 29 -> {32}; 29 -> {30} [style=dotted]; + 30 -> {31} [style=dotted]; + 31 -> {32} [style=dotted]; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 31 [label="Enter class Inner [3]" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 32 [label="Enter property [4]" style="filled" fillcolor=red]; - 33 [label="Access variable R|/property| [4]"]; - 34 [label="Exit property [4]" style="filled" fillcolor=red]; - } + 33 [label="Enter class Inner [3]" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 35 [label="Enter property [4]" style="filled" fillcolor=red]; - 36 [label="Access variable this@NestedInnerClass# [4]"]; - 37 [label="Access variable # [4]"]; - 38 [label="Exit property [4]" style="filled" fillcolor=red]; + 34 [label="Enter property [4]" style="filled" fillcolor=red]; + 35 [label="Access variable R|/property| [4]"]; + 36 [label="Exit property [4]" style="filled" fillcolor=red]; } subgraph cluster_13 { color=blue - 39 [label="Enter function [4]" style="filled" fillcolor=red]; - 40 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; - 41 [label="Exit function [4]" style="filled" fillcolor=red]; + 37 [label="Enter property [4]" style="filled" fillcolor=red]; + 38 [label="Access variable this@NestedInnerClass# [4]"]; + 39 [label="Access variable # [4]"]; + 40 [label="Exit property [4]" style="filled" fillcolor=red]; } - 42 [label="Exit class Inner [3]" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 41 [label="Enter function [4]" style="filled" fillcolor=red]; + 42 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; + 43 [label="Exit function [4]" style="filled" fillcolor=red]; + } + 44 [label="Exit class Inner [3]" style="filled" fillcolor=red]; } - 31 -> {32} [color=green]; - 31 -> {42} [style=dotted]; - 31 -> {32 35 39} [style=dashed]; - 32 -> {33}; - 33 -> {34}; - 34 -> {35} [color=green]; + 33 -> {34} [color=green]; + 33 -> {44} [style=dotted]; + 33 -> {34 37 41} [style=dashed]; + 34 -> {35}; 35 -> {36}; - 36 -> {37}; + 36 -> {37} [color=green]; 37 -> {38}; - 38 -> {39} [color=green]; + 38 -> {39}; 39 -> {40}; - 40 -> {41}; - 41 -> {42} [color=green]; + 40 -> {41} [color=green]; + 41 -> {42}; + 42 -> {43}; + 43 -> {44} [color=green]; - subgraph cluster_14 { + subgraph cluster_15 { color=red - 43 [label="Enter function innerFun [4]" style="filled" fillcolor=red]; - subgraph cluster_15 { + 45 [label="Enter function innerFun [4]" style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 44 [label="Enter block [4]"]; - 45 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow]; - 46 [label="Jump: ^innerFun R|/function|() [4]"]; - 47 [label="Stub [4]" style="filled" fillcolor=gray]; - 48 [label="Exit block [4]" style="filled" fillcolor=gray]; + 46 [label="Enter block [4]"]; + subgraph cluster_17 { + color=blue + 47 [label="Function call arguments enter [4]"]; + 48 [label="Function call arguments exit [4]"]; + } + 49 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow]; + 50 [label="Jump: ^innerFun R|/function|() [4]"]; + 51 [label="Stub [4]" style="filled" fillcolor=gray]; + 52 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 49 [label="Exit function innerFun [4]" style="filled" fillcolor=red]; + 53 [label="Exit function innerFun [4]" style="filled" fillcolor=red]; } - 43 -> {44}; - 44 -> {45}; 45 -> {46}; - 46 -> {49}; - 46 -> {47} [style=dotted]; - 47 -> {48} [style=dotted]; - 48 -> {49} [style=dotted]; - - subgraph cluster_16 { - color=red - 50 [label="Enter function innerThisFun [4]" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 51 [label="Enter block [4]"]; - 52 [label="Access variable this@NestedInnerClass# [4]"]; - 53 [label="Function call: this@NestedInnerClass#.#() [4]" style="filled" fillcolor=yellow]; - 54 [label="Jump: ^innerThisFun this@NestedInnerClass#.#() [4]"]; - 55 [label="Stub [4]" style="filled" fillcolor=gray]; - 56 [label="Exit block [4]" style="filled" fillcolor=gray]; - } - 57 [label="Exit function innerThisFun [4]" style="filled" fillcolor=red]; - } - 50 -> {51}; - 51 -> {52}; - 52 -> {53}; - 53 -> {54}; - 54 -> {57}; - 54 -> {55} [style=dotted]; - 55 -> {56} [style=dotted]; - 56 -> {57} [style=dotted]; + 46 -> {47}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50}; + 50 -> {53}; + 50 -> {51} [style=dotted]; + 51 -> {52} [style=dotted]; + 52 -> {53} [style=dotted]; subgraph cluster_18 { color=red - 58 [label="Enter class InnerInner [4]" style="filled" fillcolor=red]; + 54 [label="Enter function innerThisFun [4]" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 59 [label="Enter function [5]" style="filled" fillcolor=red]; - 60 [label="Delegated constructor call: super() [5]" style="filled" fillcolor=yellow]; - 61 [label="Exit function [5]" style="filled" fillcolor=red]; + 55 [label="Enter block [4]"]; + subgraph cluster_20 { + color=blue + 56 [label="Function call arguments enter [4]"]; + 57 [label="Access variable this@NestedInnerClass# [4]"]; + 58 [label="Function call arguments exit [4]"]; + } + 59 [label="Function call: this@NestedInnerClass#.#() [4]" style="filled" fillcolor=yellow]; + 60 [label="Jump: ^innerThisFun this@NestedInnerClass#.#() [4]"]; + 61 [label="Stub [4]" style="filled" fillcolor=gray]; + 62 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 62 [label="Exit class InnerInner [4]" style="filled" fillcolor=red]; + 63 [label="Exit function innerThisFun [4]" style="filled" fillcolor=red]; } - 58 -> {59} [color=green]; - 58 -> {62} [style=dotted]; - 58 -> {59} [style=dashed]; + 54 -> {55}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; 59 -> {60}; - 60 -> {61}; - 61 -> {62} [color=green]; + 60 -> {63}; + 60 -> {61} [style=dotted]; + 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; - subgraph cluster_20 { + subgraph cluster_21 { color=red - 63 [label="Enter function f [5]" style="filled" fillcolor=red]; - subgraph cluster_21 { + 64 [label="Enter class InnerInner [4]" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 64 [label="Enter block [5]"]; - 65 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow]; - 66 [label="Jump: ^f this@R|/Inner|.R|/Inner.innerFun|() [5]"]; - 67 [label="Stub [5]" style="filled" fillcolor=gray]; - 68 [label="Exit block [5]" style="filled" fillcolor=gray]; + 65 [label="Enter function [5]" style="filled" fillcolor=red]; + 66 [label="Delegated constructor call: super() [5]" style="filled" fillcolor=yellow]; + 67 [label="Exit function [5]" style="filled" fillcolor=red]; } - 69 [label="Exit function f [5]" style="filled" fillcolor=red]; + 68 [label="Exit class InnerInner [4]" style="filled" fillcolor=red]; } - 63 -> {64}; - 64 -> {65}; + 64 -> {65} [color=green]; + 64 -> {68} [style=dotted]; + 64 -> {65} [style=dashed]; 65 -> {66}; - 66 -> {69}; - 66 -> {67} [style=dotted]; - 67 -> {68} [style=dotted]; - 68 -> {69} [style=dotted]; + 66 -> {67}; + 67 -> {68} [color=green]; - subgraph cluster_22 { + subgraph cluster_23 { color=red - 70 [label="Enter function g [5]" style="filled" fillcolor=red]; - subgraph cluster_23 { + 69 [label="Enter function f [5]" style="filled" fillcolor=red]; + subgraph cluster_24 { color=blue - 71 [label="Enter block [5]"]; - 72 [label="Access variable R|/Inner.innerProp| [5]"]; - 73 [label="Jump: ^g this@R|/Inner|.R|/Inner.innerProp| [5]"]; - 74 [label="Stub [5]" style="filled" fillcolor=gray]; - 75 [label="Exit block [5]" style="filled" fillcolor=gray]; + 70 [label="Enter block [5]"]; + subgraph cluster_25 { + color=blue + 71 [label="Function call arguments enter [5]"]; + 72 [label="Function call arguments exit [5]"]; + } + 73 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow]; + 74 [label="Jump: ^f this@R|/Inner|.R|/Inner.innerFun|() [5]"]; + 75 [label="Stub [5]" style="filled" fillcolor=gray]; + 76 [label="Exit block [5]" style="filled" fillcolor=gray]; } - 76 [label="Exit function g [5]" style="filled" fillcolor=red]; + 77 [label="Exit function f [5]" style="filled" fillcolor=red]; } + 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {76}; - 73 -> {74} [style=dotted]; + 73 -> {74}; + 74 -> {77}; 74 -> {75} [style=dotted]; 75 -> {76} [style=dotted]; + 76 -> {77} [style=dotted]; - subgraph cluster_24 { + subgraph cluster_26 { color=red - 77 [label="Enter function h [5]" style="filled" fillcolor=red]; - subgraph cluster_25 { + 78 [label="Enter function g [5]" style="filled" fillcolor=red]; + subgraph cluster_27 { color=blue - 78 [label="Enter block [5]"]; - 79 [label="Access variable this@R|/Inner| [5]"]; - 80 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow]; - 81 [label="Jump: ^h this@R|/Inner|.R|/Inner.innerFun|() [5]"]; + 79 [label="Enter block [5]"]; + 80 [label="Access variable R|/Inner.innerProp| [5]"]; + 81 [label="Jump: ^g this@R|/Inner|.R|/Inner.innerProp| [5]"]; 82 [label="Stub [5]" style="filled" fillcolor=gray]; 83 [label="Exit block [5]" style="filled" fillcolor=gray]; } - 84 [label="Exit function h [5]" style="filled" fillcolor=red]; + 84 [label="Exit function g [5]" style="filled" fillcolor=red]; } - 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; @@ -265,27 +270,57 @@ digraph NestedInnerClass_fir_kts { 82 -> {83} [style=dotted]; 83 -> {84} [style=dotted]; - subgraph cluster_26 { + subgraph cluster_28 { color=red - 85 [label="Enter function i [5]" style="filled" fillcolor=red]; - subgraph cluster_27 { + 85 [label="Enter function h [5]" style="filled" fillcolor=red]; + subgraph cluster_29 { color=blue 86 [label="Enter block [5]"]; - 87 [label="Access variable this@R|/Inner| [5]"]; - 88 [label="Access variable R|/Inner.innerProp| [5]"]; - 89 [label="Jump: ^i this@R|/Inner|.R|/Inner.innerProp| [5]"]; - 90 [label="Stub [5]" style="filled" fillcolor=gray]; - 91 [label="Exit block [5]" style="filled" fillcolor=gray]; + subgraph cluster_30 { + color=blue + 87 [label="Function call arguments enter [5]"]; + 88 [label="Access variable this@R|/Inner| [5]"]; + 89 [label="Function call arguments exit [5]"]; + } + 90 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow]; + 91 [label="Jump: ^h this@R|/Inner|.R|/Inner.innerFun|() [5]"]; + 92 [label="Stub [5]" style="filled" fillcolor=gray]; + 93 [label="Exit block [5]" style="filled" fillcolor=gray]; } - 92 [label="Exit function i [5]" style="filled" fillcolor=red]; + 94 [label="Exit function h [5]" style="filled" fillcolor=red]; } 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; - 89 -> {92}; - 89 -> {90} [style=dotted]; - 90 -> {91} [style=dotted]; + 89 -> {90}; + 90 -> {91}; + 91 -> {94}; 91 -> {92} [style=dotted]; + 92 -> {93} [style=dotted]; + 93 -> {94} [style=dotted]; + + subgraph cluster_31 { + color=red + 95 [label="Enter function i [5]" style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 96 [label="Enter block [5]"]; + 97 [label="Access variable this@R|/Inner| [5]"]; + 98 [label="Access variable R|/Inner.innerProp| [5]"]; + 99 [label="Jump: ^i this@R|/Inner|.R|/Inner.innerProp| [5]"]; + 100 [label="Stub [5]" style="filled" fillcolor=gray]; + 101 [label="Exit block [5]" style="filled" fillcolor=gray]; + } + 102 [label="Exit function i [5]" style="filled" fillcolor=red]; + } + 95 -> {96}; + 96 -> {97}; + 97 -> {98}; + 98 -> {99}; + 99 -> {102}; + 99 -> {100} [style=dotted]; + 100 -> {101} [style=dotted]; + 101 -> {102} [style=dotted]; } diff --git a/compiler/testData/diagnostics/tests/script/NestedInnerClass.ll.dot b/compiler/testData/diagnostics/tests/script/NestedInnerClass.ll.dot index 980f509f196..3883e071f0e 100644 --- a/compiler/testData/diagnostics/tests/script/NestedInnerClass.ll.dot +++ b/compiler/testData/diagnostics/tests/script/NestedInnerClass.ll.dot @@ -64,199 +64,204 @@ digraph NestedInnerClass_ll_kts { subgraph cluster_7 { color=blue 18 [label="Enter block [4]"]; - 19 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow]; - 20 [label="Jump: ^f R|/function|() [4]"]; - 21 [label="Stub [4]" style="filled" fillcolor=gray]; - 22 [label="Exit block [4]" style="filled" fillcolor=gray]; + subgraph cluster_8 { + color=blue + 19 [label="Function call arguments enter [4]"]; + 20 [label="Function call arguments exit [4]"]; + } + 21 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow]; + 22 [label="Jump: ^f R|/function|() [4]"]; + 23 [label="Stub [4]" style="filled" fillcolor=gray]; + 24 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 23 [label="Exit function f [4]" style="filled" fillcolor=red]; + 25 [label="Exit function f [4]" style="filled" fillcolor=red]; } 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {23}; - 20 -> {21} [style=dotted]; - 21 -> {22} [style=dotted]; + 20 -> {21}; + 21 -> {22}; + 22 -> {25}; 22 -> {23} [style=dotted]; + 23 -> {24} [style=dotted]; + 24 -> {25} [style=dotted]; - subgraph cluster_8 { + subgraph cluster_9 { color=red - 24 [label="Enter function g [4]" style="filled" fillcolor=red]; - subgraph cluster_9 { + 26 [label="Enter function g [4]" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 25 [label="Enter block [4]"]; - 26 [label="Access variable R|/property| [4]"]; - 27 [label="Jump: ^g R|/property| [4]"]; - 28 [label="Stub [4]" style="filled" fillcolor=gray]; - 29 [label="Exit block [4]" style="filled" fillcolor=gray]; + 27 [label="Enter block [4]"]; + 28 [label="Access variable R|/property| [4]"]; + 29 [label="Jump: ^g R|/property| [4]"]; + 30 [label="Stub [4]" style="filled" fillcolor=gray]; + 31 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 30 [label="Exit function g [4]" style="filled" fillcolor=red]; + 32 [label="Exit function g [4]" style="filled" fillcolor=red]; } - 24 -> {25}; - 25 -> {26}; 26 -> {27}; - 27 -> {30}; - 27 -> {28} [style=dotted]; - 28 -> {29} [style=dotted]; + 27 -> {28}; + 28 -> {29}; + 29 -> {32}; 29 -> {30} [style=dotted]; + 30 -> {31} [style=dotted]; + 31 -> {32} [style=dotted]; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 31 [label="Enter class Inner [3]" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 32 [label="Enter property [4]" style="filled" fillcolor=red]; - 33 [label="Access variable R|/property| [4]"]; - 34 [label="Exit property [4]" style="filled" fillcolor=red]; - } + 33 [label="Enter class Inner [3]" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 35 [label="Enter property [4]" style="filled" fillcolor=red]; - 36 [label="Access variable this@NestedInnerClass# [4]"]; - 37 [label="Access variable # [4]"]; - 38 [label="Exit property [4]" style="filled" fillcolor=red]; + 34 [label="Enter property [4]" style="filled" fillcolor=red]; + 35 [label="Access variable R|/property| [4]"]; + 36 [label="Exit property [4]" style="filled" fillcolor=red]; } subgraph cluster_13 { color=blue - 39 [label="Enter function [4]" style="filled" fillcolor=red]; - 40 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; - 41 [label="Exit function [4]" style="filled" fillcolor=red]; + 37 [label="Enter property [4]" style="filled" fillcolor=red]; + 38 [label="Access variable this@NestedInnerClass# [4]"]; + 39 [label="Access variable # [4]"]; + 40 [label="Exit property [4]" style="filled" fillcolor=red]; } - 42 [label="Exit class Inner [3]" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 41 [label="Enter function [4]" style="filled" fillcolor=red]; + 42 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; + 43 [label="Exit function [4]" style="filled" fillcolor=red]; + } + 44 [label="Exit class Inner [3]" style="filled" fillcolor=red]; } - 31 -> {32} [color=green]; - 31 -> {42} [style=dotted]; - 31 -> {32 35 39} [style=dashed]; - 32 -> {33}; - 33 -> {34}; - 34 -> {35} [color=green]; + 33 -> {34} [color=green]; + 33 -> {44} [style=dotted]; + 33 -> {34 37 41} [style=dashed]; + 34 -> {35}; 35 -> {36}; - 36 -> {37}; + 36 -> {37} [color=green]; 37 -> {38}; - 38 -> {39} [color=green]; + 38 -> {39}; 39 -> {40}; - 40 -> {41}; - 41 -> {42} [color=green]; + 40 -> {41} [color=green]; + 41 -> {42}; + 42 -> {43}; + 43 -> {44} [color=green]; - subgraph cluster_14 { + subgraph cluster_15 { color=red - 43 [label="Enter function innerFun [4]" style="filled" fillcolor=red]; - subgraph cluster_15 { + 45 [label="Enter function innerFun [4]" style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 44 [label="Enter block [4]"]; - 45 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow]; - 46 [label="Jump: ^innerFun R|/function|() [4]"]; - 47 [label="Stub [4]" style="filled" fillcolor=gray]; - 48 [label="Exit block [4]" style="filled" fillcolor=gray]; + 46 [label="Enter block [4]"]; + subgraph cluster_17 { + color=blue + 47 [label="Function call arguments enter [4]"]; + 48 [label="Function call arguments exit [4]"]; + } + 49 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow]; + 50 [label="Jump: ^innerFun R|/function|() [4]"]; + 51 [label="Stub [4]" style="filled" fillcolor=gray]; + 52 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 49 [label="Exit function innerFun [4]" style="filled" fillcolor=red]; + 53 [label="Exit function innerFun [4]" style="filled" fillcolor=red]; } - 43 -> {44}; - 44 -> {45}; 45 -> {46}; - 46 -> {49}; - 46 -> {47} [style=dotted]; - 47 -> {48} [style=dotted]; - 48 -> {49} [style=dotted]; - - subgraph cluster_16 { - color=red - 50 [label="Enter function innerThisFun [4]" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 51 [label="Enter block [4]"]; - 52 [label="Access variable this@NestedInnerClass# [4]"]; - 53 [label="Function call: this@NestedInnerClass#.#() [4]" style="filled" fillcolor=yellow]; - 54 [label="Jump: ^innerThisFun this@NestedInnerClass#.#() [4]"]; - 55 [label="Stub [4]" style="filled" fillcolor=gray]; - 56 [label="Exit block [4]" style="filled" fillcolor=gray]; - } - 57 [label="Exit function innerThisFun [4]" style="filled" fillcolor=red]; - } - 50 -> {51}; - 51 -> {52}; - 52 -> {53}; - 53 -> {54}; - 54 -> {57}; - 54 -> {55} [style=dotted]; - 55 -> {56} [style=dotted]; - 56 -> {57} [style=dotted]; + 46 -> {47}; + 47 -> {48}; + 48 -> {49}; + 49 -> {50}; + 50 -> {53}; + 50 -> {51} [style=dotted]; + 51 -> {52} [style=dotted]; + 52 -> {53} [style=dotted]; subgraph cluster_18 { color=red - 58 [label="Enter class InnerInner [4]" style="filled" fillcolor=red]; + 54 [label="Enter function innerThisFun [4]" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 59 [label="Enter function [5]" style="filled" fillcolor=red]; - 60 [label="Delegated constructor call: super() [5]" style="filled" fillcolor=yellow]; - 61 [label="Exit function [5]" style="filled" fillcolor=red]; + 55 [label="Enter block [4]"]; + subgraph cluster_20 { + color=blue + 56 [label="Function call arguments enter [4]"]; + 57 [label="Access variable this@NestedInnerClass# [4]"]; + 58 [label="Function call arguments exit [4]"]; + } + 59 [label="Function call: this@NestedInnerClass#.#() [4]" style="filled" fillcolor=yellow]; + 60 [label="Jump: ^innerThisFun this@NestedInnerClass#.#() [4]"]; + 61 [label="Stub [4]" style="filled" fillcolor=gray]; + 62 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 62 [label="Exit class InnerInner [4]" style="filled" fillcolor=red]; + 63 [label="Exit function innerThisFun [4]" style="filled" fillcolor=red]; } - 58 -> {59} [color=green]; - 58 -> {62} [style=dotted]; - 58 -> {59} [style=dashed]; + 54 -> {55}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; 59 -> {60}; - 60 -> {61}; - 61 -> {62} [color=green]; + 60 -> {63}; + 60 -> {61} [style=dotted]; + 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; - subgraph cluster_20 { + subgraph cluster_21 { color=red - 63 [label="Enter function f [5]" style="filled" fillcolor=red]; - subgraph cluster_21 { + 64 [label="Enter class InnerInner [4]" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 64 [label="Enter block [5]"]; - 65 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow]; - 66 [label="Jump: ^f this@R|/Inner|.R|/Inner.innerFun|() [5]"]; - 67 [label="Stub [5]" style="filled" fillcolor=gray]; - 68 [label="Exit block [5]" style="filled" fillcolor=gray]; + 65 [label="Enter function [5]" style="filled" fillcolor=red]; + 66 [label="Delegated constructor call: super() [5]" style="filled" fillcolor=yellow]; + 67 [label="Exit function [5]" style="filled" fillcolor=red]; } - 69 [label="Exit function f [5]" style="filled" fillcolor=red]; + 68 [label="Exit class InnerInner [4]" style="filled" fillcolor=red]; } - 63 -> {64}; - 64 -> {65}; + 64 -> {65} [color=green]; + 64 -> {68} [style=dotted]; + 64 -> {65} [style=dashed]; 65 -> {66}; - 66 -> {69}; - 66 -> {67} [style=dotted]; - 67 -> {68} [style=dotted]; - 68 -> {69} [style=dotted]; + 66 -> {67}; + 67 -> {68} [color=green]; - subgraph cluster_22 { + subgraph cluster_23 { color=red - 70 [label="Enter function g [5]" style="filled" fillcolor=red]; - subgraph cluster_23 { + 69 [label="Enter function f [5]" style="filled" fillcolor=red]; + subgraph cluster_24 { color=blue - 71 [label="Enter block [5]"]; - 72 [label="Access variable R|/Inner.innerProp| [5]"]; - 73 [label="Jump: ^g this@R|/Inner|.R|/Inner.innerProp| [5]"]; - 74 [label="Stub [5]" style="filled" fillcolor=gray]; - 75 [label="Exit block [5]" style="filled" fillcolor=gray]; + 70 [label="Enter block [5]"]; + subgraph cluster_25 { + color=blue + 71 [label="Function call arguments enter [5]"]; + 72 [label="Function call arguments exit [5]"]; + } + 73 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow]; + 74 [label="Jump: ^f this@R|/Inner|.R|/Inner.innerFun|() [5]"]; + 75 [label="Stub [5]" style="filled" fillcolor=gray]; + 76 [label="Exit block [5]" style="filled" fillcolor=gray]; } - 76 [label="Exit function g [5]" style="filled" fillcolor=red]; + 77 [label="Exit function f [5]" style="filled" fillcolor=red]; } + 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; - 73 -> {76}; - 73 -> {74} [style=dotted]; + 73 -> {74}; + 74 -> {77}; 74 -> {75} [style=dotted]; 75 -> {76} [style=dotted]; + 76 -> {77} [style=dotted]; - subgraph cluster_24 { + subgraph cluster_26 { color=red - 77 [label="Enter function h [5]" style="filled" fillcolor=red]; - subgraph cluster_25 { + 78 [label="Enter function g [5]" style="filled" fillcolor=red]; + subgraph cluster_27 { color=blue - 78 [label="Enter block [5]"]; - 79 [label="Access variable this@R|/Inner| [5]"]; - 80 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow]; - 81 [label="Jump: ^h this@R|/Inner|.R|/Inner.innerFun|() [5]"]; + 79 [label="Enter block [5]"]; + 80 [label="Access variable R|/Inner.innerProp| [5]"]; + 81 [label="Jump: ^g this@R|/Inner|.R|/Inner.innerProp| [5]"]; 82 [label="Stub [5]" style="filled" fillcolor=gray]; 83 [label="Exit block [5]" style="filled" fillcolor=gray]; } - 84 [label="Exit function h [5]" style="filled" fillcolor=red]; + 84 [label="Exit function g [5]" style="filled" fillcolor=red]; } - 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; @@ -265,27 +270,57 @@ digraph NestedInnerClass_ll_kts { 82 -> {83} [style=dotted]; 83 -> {84} [style=dotted]; - subgraph cluster_26 { + subgraph cluster_28 { color=red - 85 [label="Enter function i [5]" style="filled" fillcolor=red]; - subgraph cluster_27 { + 85 [label="Enter function h [5]" style="filled" fillcolor=red]; + subgraph cluster_29 { color=blue 86 [label="Enter block [5]"]; - 87 [label="Access variable this@R|/Inner| [5]"]; - 88 [label="Access variable R|/Inner.innerProp| [5]"]; - 89 [label="Jump: ^i this@R|/Inner|.R|/Inner.innerProp| [5]"]; - 90 [label="Stub [5]" style="filled" fillcolor=gray]; - 91 [label="Exit block [5]" style="filled" fillcolor=gray]; + subgraph cluster_30 { + color=blue + 87 [label="Function call arguments enter [5]"]; + 88 [label="Access variable this@R|/Inner| [5]"]; + 89 [label="Function call arguments exit [5]"]; + } + 90 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow]; + 91 [label="Jump: ^h this@R|/Inner|.R|/Inner.innerFun|() [5]"]; + 92 [label="Stub [5]" style="filled" fillcolor=gray]; + 93 [label="Exit block [5]" style="filled" fillcolor=gray]; } - 92 [label="Exit function i [5]" style="filled" fillcolor=red]; + 94 [label="Exit function h [5]" style="filled" fillcolor=red]; } 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; - 89 -> {92}; - 89 -> {90} [style=dotted]; - 90 -> {91} [style=dotted]; + 89 -> {90}; + 90 -> {91}; + 91 -> {94}; 91 -> {92} [style=dotted]; + 92 -> {93} [style=dotted]; + 93 -> {94} [style=dotted]; + + subgraph cluster_31 { + color=red + 95 [label="Enter function i [5]" style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 96 [label="Enter block [5]"]; + 97 [label="Access variable this@R|/Inner| [5]"]; + 98 [label="Access variable R|/Inner.innerProp| [5]"]; + 99 [label="Jump: ^i this@R|/Inner|.R|/Inner.innerProp| [5]"]; + 100 [label="Stub [5]" style="filled" fillcolor=gray]; + 101 [label="Exit block [5]" style="filled" fillcolor=gray]; + } + 102 [label="Exit function i [5]" style="filled" fillcolor=red]; + } + 95 -> {96}; + 96 -> {97}; + 97 -> {98}; + 98 -> {99}; + 99 -> {102}; + 99 -> {100} [style=dotted]; + 100 -> {101} [style=dotted]; + 101 -> {102} [style=dotted]; } diff --git a/compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithJump.dot b/compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithJump.dot index d6e83231d5f..b83b8e765a3 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithJump.dot +++ b/compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithJump.dot @@ -119,49 +119,89 @@ digraph castInTryWithJump_fir_kt { subgraph cluster_22 { color=blue 43 [label="Enter block"]; - 44 [label="Access variable R|/x|"]; - 45 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 46 [label="Access variable R|/x|"]; - 47 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 48 [label="Exit block"]; + subgraph cluster_23 { + color=blue + 44 [label="Function call arguments enter"]; + 45 [label="Access variable R|/x|"]; + 46 [label="Function call arguments exit"]; + } + 47 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_24 { + color=blue + 48 [label="Function call arguments enter"]; + 49 [label="Access variable R|/x|"]; + 50 [label="Function call arguments exit"]; + } + 51 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 52 [label="Exit block"]; } - 49 [label="Exit finally"]; + 53 [label="Exit finally"]; } - 50 [label="Try expression exit"]; + 54 [label="Try expression exit"]; } - 51 [label="Access variable R|/x|"]; - 52 [label="Smart cast: R|/x|"]; - 53 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 54 [label="Access variable R|/x|"]; - 55 [label="Smart cast: R|/x|"]; - 56 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; - 57 [label="Exit block"]; + subgraph cluster_25 { + color=blue + 55 [label="Function call arguments enter"]; + 56 [label="Access variable R|/x|"]; + 57 [label="Smart cast: R|/x|"]; + 58 [label="Function call arguments exit"]; + } + 59 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_26 { + color=blue + 60 [label="Function call arguments enter"]; + 61 [label="Access variable R|/x|"]; + 62 [label="Smart cast: R|/x|"]; + 63 [label="Function call arguments exit"]; + } + 64 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; + 65 [label="Exit block"]; } - 58 [label="Exit finally"]; + 66 [label="Exit finally"]; } - 59 [label="Try expression exit" style="filled" fillcolor=gray]; + 67 [label="Try expression exit" style="filled" fillcolor=gray]; } - 60 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 61 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; - 62 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 63 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 64 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; - 65 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=gray]; - 66 [label="Exit block" style="filled" fillcolor=gray]; + subgraph cluster_27 { + color=blue + 68 [label="Function call arguments enter" style="filled" fillcolor=gray]; + 69 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 70 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; + 71 [label="Function call arguments exit" style="filled" fillcolor=gray]; + } + 72 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + subgraph cluster_28 { + color=blue + 73 [label="Function call arguments enter" style="filled" fillcolor=gray]; + 74 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 75 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; + 76 [label="Function call arguments exit" style="filled" fillcolor=gray]; + } + 77 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=gray]; + 78 [label="Exit block" style="filled" fillcolor=gray]; } - 67 [label="Exit loop block" style="filled" fillcolor=gray]; + 79 [label="Exit loop block" style="filled" fillcolor=gray]; } - 68 [label="Exit while loop"]; + 80 [label="Exit while loop"]; } - 69 [label="Access variable R|/x|"]; - 70 [label="Smart cast: R|/x|"]; - 71 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; - 72 [label="Access variable R|/x|"]; - 73 [label="Smart cast: R|/x|"]; - 74 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; - 75 [label="Exit block"]; + subgraph cluster_29 { + color=blue + 81 [label="Function call arguments enter"]; + 82 [label="Access variable R|/x|"]; + 83 [label="Smart cast: R|/x|"]; + 84 [label="Function call arguments exit"]; + } + 85 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; + subgraph cluster_30 { + color=blue + 86 [label="Function call arguments enter"]; + 87 [label="Access variable R|/x|"]; + 88 [label="Smart cast: R|/x|"]; + 89 [label="Function call arguments exit"]; + } + 90 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; + 91 [label="Exit block"]; } - 76 [label="Exit function breakInTry_withNestedFinally" style="filled" fillcolor=red]; + 92 [label="Exit function breakInTry_withNestedFinally" style="filled" fillcolor=red]; } 14 -> {15}; 15 -> {16}; @@ -171,7 +211,7 @@ digraph castInTryWithJump_fir_kt { 19 -> {20}; 20 -> {21}; 21 -> {22}; - 21 -> {68} [style=dotted]; + 21 -> {80} [style=dotted]; 22 -> {23}; 23 -> {24}; 24 -> {25}; @@ -211,269 +251,331 @@ digraph castInTryWithJump_fir_kt { 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {68} [label="break"]; - 58 -> {59} [style=dotted]; - 59 -> {60} [style=dotted]; - 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; - 62 -> {63} [style=dotted]; - 63 -> {64} [style=dotted]; - 64 -> {65} [style=dotted]; - 65 -> {66} [style=dotted]; + 58 -> {59}; + 59 -> {60}; + 60 -> {61}; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; + 64 -> {65}; + 65 -> {66}; + 66 -> {80} [label="break"]; 66 -> {67} [style=dotted]; - 67 -> {19} [color=green style=dotted]; - 68 -> {69}; - 69 -> {70}; - 70 -> {71}; - 71 -> {72}; - 72 -> {73}; - 73 -> {74}; - 74 -> {75}; - 75 -> {76}; - - subgraph cluster_23 { - color=red - 77 [label="Enter function returnInCatch" style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 78 [label="Enter block"]; - 79 [label="Const: Null(null)"]; - 80 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - subgraph cluster_25 { - color=blue - 81 [label="Try expression enter"]; - subgraph cluster_26 { - color=blue - 82 [label="Try main block enter"]; - subgraph cluster_27 { - color=blue - 83 [label="Enter block"]; - 84 [label="Access variable R|/x|"]; - 85 [label="Type operator: (R|/x| as R|A|)"]; - 86 [label="Exit block"]; - } - 87 [label="Try main block exit"]; - } - subgraph cluster_28 { - color=blue - 88 [label="Catch enter"]; - 89 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_29 { - color=blue - 90 [label="Enter block"]; - 91 [label="Access variable R|/x|"]; - 92 [label="Type operator: (R|/x| as R|B|)"]; - 93 [label="Jump: ^returnInCatch Unit"]; - 94 [label="Stub" style="filled" fillcolor=gray]; - 95 [label="Exit block" style="filled" fillcolor=gray]; - } - 96 [label="Catch exit" style="filled" fillcolor=gray]; - } - subgraph cluster_30 { - color=blue - 97 [label="Enter finally"]; - subgraph cluster_31 { - color=blue - 98 [label="Enter block"]; - 99 [label="Access variable R|/x|"]; - 100 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 101 [label="Access variable R|/x|"]; - 102 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 103 [label="Exit block"]; - } - 104 [label="Exit finally"]; - } - 105 [label="Try expression exit"]; - } - 106 [label="Access variable R|/x|"]; - 107 [label="Smart cast: R|/x|"]; - 108 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; - 109 [label="Access variable R|/x|"]; - 110 [label="Smart cast: R|/x|"]; - 111 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 112 [label="Exit block"]; - } - 113 [label="Exit function returnInCatch" style="filled" fillcolor=red]; - } - 77 -> {78}; - 78 -> {79}; - 79 -> {80}; + 67 -> {68} [style=dotted]; + 68 -> {69} [style=dotted]; + 69 -> {70} [style=dotted]; + 70 -> {71} [style=dotted]; + 71 -> {72} [style=dotted]; + 72 -> {73} [style=dotted]; + 73 -> {74} [style=dotted]; + 74 -> {75} [style=dotted]; + 75 -> {76} [style=dotted]; + 76 -> {77} [style=dotted]; + 77 -> {78} [style=dotted]; + 78 -> {79} [style=dotted]; + 79 -> {19} [color=green style=dotted]; 80 -> {81}; - 81 -> {82 88}; - 81 -> {97} [label="onUncaughtException"]; + 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; - 87 -> {88 97}; + 87 -> {88}; 88 -> {89}; - 88 -> {97} [label="onUncaughtException"]; 89 -> {90}; 90 -> {91}; 91 -> {92}; - 92 -> {93}; - 93 -> {97} [label="return@/returnInCatch"]; - 93 -> {94} [style=dotted]; - 94 -> {95} [style=dotted]; - 95 -> {96} [style=dotted]; - 96 -> {97} [style=dotted]; - 97 -> {98}; + + subgraph cluster_31 { + color=red + 93 [label="Enter function returnInCatch" style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 94 [label="Enter block"]; + 95 [label="Const: Null(null)"]; + 96 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + subgraph cluster_33 { + color=blue + 97 [label="Try expression enter"]; + subgraph cluster_34 { + color=blue + 98 [label="Try main block enter"]; + subgraph cluster_35 { + color=blue + 99 [label="Enter block"]; + 100 [label="Access variable R|/x|"]; + 101 [label="Type operator: (R|/x| as R|A|)"]; + 102 [label="Exit block"]; + } + 103 [label="Try main block exit"]; + } + subgraph cluster_36 { + color=blue + 104 [label="Catch enter"]; + 105 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_37 { + color=blue + 106 [label="Enter block"]; + 107 [label="Access variable R|/x|"]; + 108 [label="Type operator: (R|/x| as R|B|)"]; + 109 [label="Jump: ^returnInCatch Unit"]; + 110 [label="Stub" style="filled" fillcolor=gray]; + 111 [label="Exit block" style="filled" fillcolor=gray]; + } + 112 [label="Catch exit" style="filled" fillcolor=gray]; + } + subgraph cluster_38 { + color=blue + 113 [label="Enter finally"]; + subgraph cluster_39 { + color=blue + 114 [label="Enter block"]; + subgraph cluster_40 { + color=blue + 115 [label="Function call arguments enter"]; + 116 [label="Access variable R|/x|"]; + 117 [label="Function call arguments exit"]; + } + 118 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_41 { + color=blue + 119 [label="Function call arguments enter"]; + 120 [label="Access variable R|/x|"]; + 121 [label="Function call arguments exit"]; + } + 122 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 123 [label="Exit block"]; + } + 124 [label="Exit finally"]; + } + 125 [label="Try expression exit"]; + } + subgraph cluster_42 { + color=blue + 126 [label="Function call arguments enter"]; + 127 [label="Access variable R|/x|"]; + 128 [label="Smart cast: R|/x|"]; + 129 [label="Function call arguments exit"]; + } + 130 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; + subgraph cluster_43 { + color=blue + 131 [label="Function call arguments enter"]; + 132 [label="Access variable R|/x|"]; + 133 [label="Smart cast: R|/x|"]; + 134 [label="Function call arguments exit"]; + } + 135 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 136 [label="Exit block"]; + } + 137 [label="Exit function returnInCatch" style="filled" fillcolor=red]; + } + 93 -> {94}; + 94 -> {95}; + 95 -> {96}; + 96 -> {97}; + 97 -> {98 104}; + 97 -> {113} [label="onUncaughtException"]; 98 -> {99}; 99 -> {100}; 100 -> {101}; 101 -> {102}; 102 -> {103}; - 103 -> {104}; + 103 -> {104 113}; 104 -> {105}; - 104 -> {113} [label="return@/returnInCatch"]; + 104 -> {113} [label="onUncaughtException"]; 105 -> {106}; 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {110}; - 110 -> {111}; - 111 -> {112}; - 112 -> {113}; - - subgraph cluster_32 { - color=red - 114 [label="Enter function returnInCatch_insideFinally" style="filled" fillcolor=red]; - subgraph cluster_33 { - color=blue - 115 [label="Enter block"]; - 116 [label="Const: Null(null)"]; - 117 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - subgraph cluster_34 { - color=blue - 118 [label="Try expression enter"]; - subgraph cluster_35 { - color=blue - 119 [label="Try main block enter"]; - subgraph cluster_36 { - color=blue - 120 [label="Enter block"]; - 121 [label="Access variable R|/x|"]; - 122 [label="Type operator: (R|/x| as R|C|)"]; - 123 [label="Exit block"]; - } - 124 [label="Try main block exit"]; - } - subgraph cluster_37 { - color=blue - 125 [label="Enter finally"]; - subgraph cluster_38 { - color=blue - 126 [label="Enter block"]; - subgraph cluster_39 { - color=blue - 127 [label="Try expression enter"]; - subgraph cluster_40 { - color=blue - 128 [label="Try main block enter"]; - subgraph cluster_41 { - color=blue - 129 [label="Enter block"]; - 130 [label="Access variable R|/x|"]; - 131 [label="Type operator: (R|/x| as R|A|)"]; - 132 [label="Exit block"]; - } - 133 [label="Try main block exit"]; - } - subgraph cluster_42 { - color=blue - 134 [label="Catch enter"]; - 135 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_43 { - color=blue - 136 [label="Enter block"]; - 137 [label="Access variable R|/x|"]; - 138 [label="Type operator: (R|/x| as R|B|)"]; - 139 [label="Jump: ^returnInCatch_insideFinally Unit"]; - 140 [label="Stub" style="filled" fillcolor=gray]; - 141 [label="Exit block" style="filled" fillcolor=gray]; - } - 142 [label="Catch exit" style="filled" fillcolor=gray]; - } - subgraph cluster_44 { - color=blue - 143 [label="Enter finally"]; - subgraph cluster_45 { - color=blue - 144 [label="Enter block"]; - 145 [label="Access variable R|/x|"]; - 146 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 147 [label="Access variable R|/x|"]; - 148 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 149 [label="Access variable R|/x|"]; - 150 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 151 [label="Exit block"]; - } - 152 [label="Exit finally"]; - } - 153 [label="Try expression exit"]; - } - 154 [label="Access variable R|/x|"]; - 155 [label="Smart cast: R|/x|"]; - 156 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; - 157 [label="Access variable R|/x|"]; - 158 [label="Smart cast: R|/x|"]; - 159 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 160 [label="Access variable R|/x|"]; - 161 [label="Smart cast: R|/x|"]; - 162 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 163 [label="Exit block"]; - } - 164 [label="Exit finally"]; - } - 165 [label="Try expression exit"]; - } - 166 [label="Access variable R|/x|"]; - 167 [label="Smart cast: R|/x|"]; - 168 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; - 169 [label="Access variable R|/x|"]; - 170 [label="Smart cast: R|/x|"]; - 171 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 172 [label="Access variable R|/x|"]; - 173 [label="Smart cast: R|/x|"]; - 174 [label="Function call: R|/x|.R|/C.ccc|()" style="filled" fillcolor=yellow]; - 175 [label="Exit block"]; - } - 176 [label="Exit function returnInCatch_insideFinally" style="filled" fillcolor=red]; - } + 109 -> {113} [label="return@/returnInCatch"]; + 109 -> {110} [style=dotted]; + 110 -> {111} [style=dotted]; + 111 -> {112} [style=dotted]; + 112 -> {113} [style=dotted]; + 113 -> {114}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; 118 -> {119}; - 118 -> {125} [label="onUncaughtException"]; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; + 124 -> {137} [label="return@/returnInCatch"]; 125 -> {126}; 126 -> {127}; - 127 -> {128 134}; - 127 -> {143} [label="onUncaughtException"]; + 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {134 143}; + 133 -> {134}; 134 -> {135}; - 134 -> {143} [label="onUncaughtException"]; 135 -> {136}; 136 -> {137}; - 137 -> {138}; + + subgraph cluster_44 { + color=red + 138 [label="Enter function returnInCatch_insideFinally" style="filled" fillcolor=red]; + subgraph cluster_45 { + color=blue + 139 [label="Enter block"]; + 140 [label="Const: Null(null)"]; + 141 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + subgraph cluster_46 { + color=blue + 142 [label="Try expression enter"]; + subgraph cluster_47 { + color=blue + 143 [label="Try main block enter"]; + subgraph cluster_48 { + color=blue + 144 [label="Enter block"]; + 145 [label="Access variable R|/x|"]; + 146 [label="Type operator: (R|/x| as R|C|)"]; + 147 [label="Exit block"]; + } + 148 [label="Try main block exit"]; + } + subgraph cluster_49 { + color=blue + 149 [label="Enter finally"]; + subgraph cluster_50 { + color=blue + 150 [label="Enter block"]; + subgraph cluster_51 { + color=blue + 151 [label="Try expression enter"]; + subgraph cluster_52 { + color=blue + 152 [label="Try main block enter"]; + subgraph cluster_53 { + color=blue + 153 [label="Enter block"]; + 154 [label="Access variable R|/x|"]; + 155 [label="Type operator: (R|/x| as R|A|)"]; + 156 [label="Exit block"]; + } + 157 [label="Try main block exit"]; + } + subgraph cluster_54 { + color=blue + 158 [label="Catch enter"]; + 159 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_55 { + color=blue + 160 [label="Enter block"]; + 161 [label="Access variable R|/x|"]; + 162 [label="Type operator: (R|/x| as R|B|)"]; + 163 [label="Jump: ^returnInCatch_insideFinally Unit"]; + 164 [label="Stub" style="filled" fillcolor=gray]; + 165 [label="Exit block" style="filled" fillcolor=gray]; + } + 166 [label="Catch exit" style="filled" fillcolor=gray]; + } + subgraph cluster_56 { + color=blue + 167 [label="Enter finally"]; + subgraph cluster_57 { + color=blue + 168 [label="Enter block"]; + subgraph cluster_58 { + color=blue + 169 [label="Function call arguments enter"]; + 170 [label="Access variable R|/x|"]; + 171 [label="Function call arguments exit"]; + } + 172 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_59 { + color=blue + 173 [label="Function call arguments enter"]; + 174 [label="Access variable R|/x|"]; + 175 [label="Function call arguments exit"]; + } + 176 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_60 { + color=blue + 177 [label="Function call arguments enter"]; + 178 [label="Access variable R|/x|"]; + 179 [label="Function call arguments exit"]; + } + 180 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 181 [label="Exit block"]; + } + 182 [label="Exit finally"]; + } + 183 [label="Try expression exit"]; + } + subgraph cluster_61 { + color=blue + 184 [label="Function call arguments enter"]; + 185 [label="Access variable R|/x|"]; + 186 [label="Smart cast: R|/x|"]; + 187 [label="Function call arguments exit"]; + } + 188 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; + subgraph cluster_62 { + color=blue + 189 [label="Function call arguments enter"]; + 190 [label="Access variable R|/x|"]; + 191 [label="Smart cast: R|/x|"]; + 192 [label="Function call arguments exit"]; + } + 193 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_63 { + color=blue + 194 [label="Function call arguments enter"]; + 195 [label="Access variable R|/x|"]; + 196 [label="Smart cast: R|/x|"]; + 197 [label="Function call arguments exit"]; + } + 198 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 199 [label="Exit block"]; + } + 200 [label="Exit finally"]; + } + 201 [label="Try expression exit"]; + } + subgraph cluster_64 { + color=blue + 202 [label="Function call arguments enter"]; + 203 [label="Access variable R|/x|"]; + 204 [label="Smart cast: R|/x|"]; + 205 [label="Function call arguments exit"]; + } + 206 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; + subgraph cluster_65 { + color=blue + 207 [label="Function call arguments enter"]; + 208 [label="Access variable R|/x|"]; + 209 [label="Smart cast: R|/x|"]; + 210 [label="Function call arguments exit"]; + } + 211 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_66 { + color=blue + 212 [label="Function call arguments enter"]; + 213 [label="Access variable R|/x|"]; + 214 [label="Smart cast: R|/x|"]; + 215 [label="Function call arguments exit"]; + } + 216 [label="Function call: R|/x|.R|/C.ccc|()" style="filled" fillcolor=yellow]; + 217 [label="Exit block"]; + } + 218 [label="Exit function returnInCatch_insideFinally" style="filled" fillcolor=red]; + } 138 -> {139}; - 139 -> {143} [label="return@/returnInCatch_insideFinally"]; - 139 -> {140} [style=dotted]; - 140 -> {141} [style=dotted]; - 141 -> {142} [style=dotted]; - 142 -> {143} [style=dotted]; + 139 -> {140}; + 140 -> {141}; + 141 -> {142}; + 142 -> {143}; + 142 -> {149} [label="onUncaughtException"]; 143 -> {144}; 144 -> {145}; 145 -> {146}; @@ -482,23 +584,25 @@ digraph castInTryWithJump_fir_kt { 148 -> {149}; 149 -> {150}; 150 -> {151}; - 151 -> {152}; + 151 -> {152 158}; + 151 -> {167} [label="onUncaughtException"]; 152 -> {153}; - 152 -> {176} [label="return@/returnInCatch_insideFinally"]; 153 -> {154}; 154 -> {155}; 155 -> {156}; 156 -> {157}; - 157 -> {158}; + 157 -> {158 167}; 158 -> {159}; + 158 -> {167} [label="onUncaughtException"]; 159 -> {160}; 160 -> {161}; 161 -> {162}; 162 -> {163}; - 163 -> {164}; - 164 -> {165}; - 165 -> {166}; - 166 -> {167}; + 163 -> {167} [label="return@/returnInCatch_insideFinally"]; + 163 -> {164} [style=dotted]; + 164 -> {165} [style=dotted]; + 165 -> {166} [style=dotted]; + 166 -> {167} [style=dotted]; 167 -> {168}; 168 -> {169}; 169 -> {170}; @@ -508,128 +612,34 @@ digraph castInTryWithJump_fir_kt { 173 -> {174}; 174 -> {175}; 175 -> {176}; - - subgraph cluster_46 { - color=red - 177 [label="Enter function breakInCatch" style="filled" fillcolor=red]; - subgraph cluster_47 { - color=blue - 178 [label="Enter block"]; - 179 [label="Const: Null(null)"]; - 180 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - subgraph cluster_48 { - color=blue - 181 [label="Enter while loop"]; - subgraph cluster_49 { - color=blue - 182 [label="Enter loop condition"]; - 183 [label="Const: Boolean(true)"]; - 184 [label="Exit loop condition"]; - } - subgraph cluster_50 { - color=blue - 185 [label="Enter loop block"]; - subgraph cluster_51 { - color=blue - 186 [label="Enter block"]; - subgraph cluster_52 { - color=blue - 187 [label="Try expression enter"]; - subgraph cluster_53 { - color=blue - 188 [label="Try main block enter"]; - subgraph cluster_54 { - color=blue - 189 [label="Enter block"]; - 190 [label="Access variable R|/x|"]; - 191 [label="Type operator: (R|/x| as R|A|)"]; - 192 [label="Exit block"]; - } - 193 [label="Try main block exit"]; - } - subgraph cluster_55 { - color=blue - 194 [label="Catch enter"]; - 195 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_56 { - color=blue - 196 [label="Enter block"]; - 197 [label="Access variable R|/x|"]; - 198 [label="Type operator: (R|/x| as R|B|)"]; - 199 [label="Jump: break@@@[Boolean(true)] "]; - 200 [label="Stub" style="filled" fillcolor=gray]; - 201 [label="Exit block" style="filled" fillcolor=gray]; - } - 202 [label="Catch exit" style="filled" fillcolor=gray]; - } - subgraph cluster_57 { - color=blue - 203 [label="Enter finally"]; - subgraph cluster_58 { - color=blue - 204 [label="Enter block"]; - 205 [label="Access variable R|/x|"]; - 206 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 207 [label="Access variable R|/x|"]; - 208 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 209 [label="Exit block"]; - } - 210 [label="Exit finally"]; - } - 211 [label="Try expression exit"]; - } - 212 [label="Access variable R|/x|"]; - 213 [label="Smart cast: R|/x|"]; - 214 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; - 215 [label="Access variable R|/x|"]; - 216 [label="Smart cast: R|/x|"]; - 217 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 218 [label="Exit block"]; - } - 219 [label="Exit loop block"]; - } - 220 [label="Exit while loop"]; - } - 221 [label="Access variable R|/x|"]; - 222 [label="Smart cast: R|/x|"]; - 223 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 224 [label="Access variable R|/x|"]; - 225 [label="Smart cast: R|/x|"]; - 226 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; - 227 [label="Exit block"]; - } - 228 [label="Exit function breakInCatch" style="filled" fillcolor=red]; - } + 176 -> {177}; 177 -> {178}; 178 -> {179}; 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; + 182 -> {218} [label="return@/returnInCatch_insideFinally"]; 183 -> {184}; 184 -> {185}; - 184 -> {220} [style=dotted]; 185 -> {186}; 186 -> {187}; - 187 -> {188 194}; - 187 -> {203} [label="onUncaughtException"]; + 187 -> {188}; 188 -> {189}; 189 -> {190}; 190 -> {191}; 191 -> {192}; 192 -> {193}; - 193 -> {194 203}; + 193 -> {194}; 194 -> {195}; - 194 -> {203} [label="onUncaughtException"]; 195 -> {196}; 196 -> {197}; 197 -> {198}; 198 -> {199}; - 199 -> {203} [label="break"]; - 199 -> {200} [style=dotted]; - 200 -> {201} [style=dotted]; - 201 -> {202} [style=dotted]; - 202 -> {203} [style=dotted]; + 199 -> {200}; + 200 -> {201}; + 201 -> {202}; + 202 -> {203}; 203 -> {204}; 204 -> {205}; 205 -> {206}; @@ -638,7 +648,6 @@ digraph castInTryWithJump_fir_kt { 208 -> {209}; 209 -> {210}; 210 -> {211}; - 210 -> {220} [label="break"]; 211 -> {212}; 212 -> {213}; 213 -> {214}; @@ -646,8 +655,129 @@ digraph castInTryWithJump_fir_kt { 215 -> {216}; 216 -> {217}; 217 -> {218}; - 218 -> {219}; - 219 -> {182} [color=green style=dashed]; + + subgraph cluster_67 { + color=red + 219 [label="Enter function breakInCatch" style="filled" fillcolor=red]; + subgraph cluster_68 { + color=blue + 220 [label="Enter block"]; + 221 [label="Const: Null(null)"]; + 222 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + subgraph cluster_69 { + color=blue + 223 [label="Enter while loop"]; + subgraph cluster_70 { + color=blue + 224 [label="Enter loop condition"]; + 225 [label="Const: Boolean(true)"]; + 226 [label="Exit loop condition"]; + } + subgraph cluster_71 { + color=blue + 227 [label="Enter loop block"]; + subgraph cluster_72 { + color=blue + 228 [label="Enter block"]; + subgraph cluster_73 { + color=blue + 229 [label="Try expression enter"]; + subgraph cluster_74 { + color=blue + 230 [label="Try main block enter"]; + subgraph cluster_75 { + color=blue + 231 [label="Enter block"]; + 232 [label="Access variable R|/x|"]; + 233 [label="Type operator: (R|/x| as R|A|)"]; + 234 [label="Exit block"]; + } + 235 [label="Try main block exit"]; + } + subgraph cluster_76 { + color=blue + 236 [label="Catch enter"]; + 237 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_77 { + color=blue + 238 [label="Enter block"]; + 239 [label="Access variable R|/x|"]; + 240 [label="Type operator: (R|/x| as R|B|)"]; + 241 [label="Jump: break@@@[Boolean(true)] "]; + 242 [label="Stub" style="filled" fillcolor=gray]; + 243 [label="Exit block" style="filled" fillcolor=gray]; + } + 244 [label="Catch exit" style="filled" fillcolor=gray]; + } + subgraph cluster_78 { + color=blue + 245 [label="Enter finally"]; + subgraph cluster_79 { + color=blue + 246 [label="Enter block"]; + subgraph cluster_80 { + color=blue + 247 [label="Function call arguments enter"]; + 248 [label="Access variable R|/x|"]; + 249 [label="Function call arguments exit"]; + } + 250 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_81 { + color=blue + 251 [label="Function call arguments enter"]; + 252 [label="Access variable R|/x|"]; + 253 [label="Function call arguments exit"]; + } + 254 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 255 [label="Exit block"]; + } + 256 [label="Exit finally"]; + } + 257 [label="Try expression exit"]; + } + subgraph cluster_82 { + color=blue + 258 [label="Function call arguments enter"]; + 259 [label="Access variable R|/x|"]; + 260 [label="Smart cast: R|/x|"]; + 261 [label="Function call arguments exit"]; + } + 262 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; + subgraph cluster_83 { + color=blue + 263 [label="Function call arguments enter"]; + 264 [label="Access variable R|/x|"]; + 265 [label="Smart cast: R|/x|"]; + 266 [label="Function call arguments exit"]; + } + 267 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 268 [label="Exit block"]; + } + 269 [label="Exit loop block"]; + } + 270 [label="Exit while loop"]; + } + subgraph cluster_84 { + color=blue + 271 [label="Function call arguments enter"]; + 272 [label="Access variable R|/x|"]; + 273 [label="Smart cast: R|/x|"]; + 274 [label="Function call arguments exit"]; + } + 275 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_85 { + color=blue + 276 [label="Function call arguments enter"]; + 277 [label="Access variable R|/x|"]; + 278 [label="Smart cast: R|/x|"]; + 279 [label="Function call arguments exit"]; + } + 280 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; + 281 [label="Exit block"]; + } + 282 [label="Exit function breakInCatch" style="filled" fillcolor=red]; + } + 219 -> {220}; 220 -> {221}; 221 -> {222}; 222 -> {223}; @@ -655,128 +785,28 @@ digraph castInTryWithJump_fir_kt { 224 -> {225}; 225 -> {226}; 226 -> {227}; + 226 -> {270} [style=dotted]; 227 -> {228}; - - subgraph cluster_59 { - color=red - 229 [label="Enter function returnInFinally_insideTry_nonLocal" style="filled" fillcolor=red]; - subgraph cluster_60 { - color=blue - 230 [label="Enter block"]; - 231 [label="Const: Null(null)"]; - 232 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 233 [label="Postponed enter to lambda"]; - subgraph cluster_61 { - color=blue - 234 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_62 { - color=blue - 235 [label="Enter block"]; - subgraph cluster_63 { - color=blue - 236 [label="Try expression enter"]; - subgraph cluster_64 { - color=blue - 237 [label="Try main block enter"]; - subgraph cluster_65 { - color=blue - 238 [label="Enter block"]; - 239 [label="Access variable R|/x|"]; - 240 [label="Type operator: (R|/x| as R|B|)"]; - subgraph cluster_66 { - color=blue - 241 [label="Try expression enter"]; - subgraph cluster_67 { - color=blue - 242 [label="Try main block enter"]; - subgraph cluster_68 { - color=blue - 243 [label="Enter block"]; - 244 [label="Access variable R|/x|"]; - 245 [label="Smart cast: R|/x|"]; - 246 [label="Type operator: (R|/x| as R|A|)"]; - 247 [label="Exit block"]; - } - 248 [label="Try main block exit"]; - } - subgraph cluster_69 { - color=blue - 249 [label="Enter finally"]; - subgraph cluster_70 { - color=blue - 250 [label="Enter block"]; - 251 [label="Access variable R|/x|"]; - 252 [label="Smart cast: R|/x|"]; - 253 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 254 [label="Access variable R|/x|"]; - 255 [label="Smart cast: R|/x|"]; - 256 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; - 257 [label="Jump: ^returnInFinally_insideTry_nonLocal Unit"]; - 258 [label="Stub" style="filled" fillcolor=gray]; - 259 [label="Exit block" style="filled" fillcolor=gray]; - } - 260 [label="Exit finally" style="filled" fillcolor=gray]; - } - 261 [label="Try expression exit" style="filled" fillcolor=gray]; - } - 262 [label="Exit block" style="filled" fillcolor=gray]; - } - 263 [label="Try main block exit" style="filled" fillcolor=gray]; - } - subgraph cluster_71 { - color=blue - 264 [label="Enter finally"]; - subgraph cluster_72 { - color=blue - 265 [label="Enter block"]; - 266 [label="Access variable R|/x|"]; - 267 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 268 [label="Access variable R|/x|"]; - 269 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 270 [label="Exit block"]; - } - 271 [label="Exit finally"]; - } - 272 [label="Try expression exit" style="filled" fillcolor=gray]; - } - 273 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 274 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 275 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 276 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 277 [label="Exit block" style="filled" fillcolor=gray]; - } - 278 [label="Exit function " style="filled" fillcolor=gray]; - } - 279 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 280 [label="Function call: R|kotlin/run#|<>(...)" style="filled" fillcolor=gray]; - 281 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 282 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 283 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 284 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 285 [label="Exit block" style="filled" fillcolor=gray]; - } - 286 [label="Exit function returnInFinally_insideTry_nonLocal" style="filled" fillcolor=red]; - } - 229 -> {230}; + 228 -> {229}; + 229 -> {230 236}; + 229 -> {245} [label="onUncaughtException"]; 230 -> {231}; 231 -> {232}; 232 -> {233}; 233 -> {234}; - 233 -> {279 280} [style=dotted]; - 233 -> {234} [style=dashed]; 234 -> {235}; - 235 -> {236}; + 235 -> {236 245}; 236 -> {237}; - 236 -> {264} [label="onUncaughtException"]; + 236 -> {245} [label="onUncaughtException"]; 237 -> {238}; 238 -> {239}; 239 -> {240}; 240 -> {241}; - 241 -> {242}; - 241 -> {249} [label="onUncaughtException"]; - 242 -> {243}; - 243 -> {244}; - 244 -> {245}; + 241 -> {245} [label="break"]; + 241 -> {242} [style=dotted]; + 242 -> {243} [style=dotted]; + 243 -> {244} [style=dotted]; + 244 -> {245} [style=dotted]; 245 -> {246}; 246 -> {247}; 247 -> {248}; @@ -789,37 +819,259 @@ digraph castInTryWithJump_fir_kt { 254 -> {255}; 255 -> {256}; 256 -> {257}; - 257 -> {264} [label="return@/returnInFinally_insideTry_nonLocal"]; - 257 -> {258} [style=dotted]; - 258 -> {259} [style=dotted]; - 259 -> {260} [style=dotted]; - 260 -> {264} [style=dotted label="onUncaughtException"]; - 260 -> {261} [style=dotted]; - 261 -> {262} [style=dotted]; - 262 -> {263} [style=dotted]; - 263 -> {264} [style=dotted]; + 256 -> {270} [label="break"]; + 257 -> {258}; + 258 -> {259}; + 259 -> {260}; + 260 -> {261}; + 261 -> {262}; + 262 -> {263}; + 263 -> {264}; 264 -> {265}; 265 -> {266}; 266 -> {267}; 267 -> {268}; 268 -> {269}; - 269 -> {270}; + 269 -> {224} [color=green style=dashed]; 270 -> {271}; - 271 -> {286} [label="return@/returnInFinally_insideTry_nonLocal"]; - 271 -> {272} [style=dotted]; - 272 -> {273} [style=dotted]; - 273 -> {274} [style=dotted]; - 274 -> {275} [style=dotted]; - 275 -> {276} [style=dotted]; - 276 -> {277} [style=dotted]; - 277 -> {278} [style=dotted]; - 278 -> {279} [style=dotted]; - 279 -> {280} [style=dotted]; - 280 -> {281} [style=dotted]; - 281 -> {282} [style=dotted]; - 282 -> {283} [style=dotted]; - 283 -> {284} [style=dotted]; - 284 -> {285} [style=dotted]; - 285 -> {286} [style=dotted]; + 271 -> {272}; + 272 -> {273}; + 273 -> {274}; + 274 -> {275}; + 275 -> {276}; + 276 -> {277}; + 277 -> {278}; + 278 -> {279}; + 279 -> {280}; + 280 -> {281}; + 281 -> {282}; + + subgraph cluster_86 { + color=red + 283 [label="Enter function returnInFinally_insideTry_nonLocal" style="filled" fillcolor=red]; + subgraph cluster_87 { + color=blue + 284 [label="Enter block"]; + 285 [label="Const: Null(null)"]; + 286 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + subgraph cluster_88 { + color=blue + 287 [label="Function call arguments enter"]; + 288 [label="Postponed enter to lambda"]; + subgraph cluster_89 { + color=blue + 289 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_90 { + color=blue + 290 [label="Enter block"]; + subgraph cluster_91 { + color=blue + 291 [label="Try expression enter"]; + subgraph cluster_92 { + color=blue + 292 [label="Try main block enter"]; + subgraph cluster_93 { + color=blue + 293 [label="Enter block"]; + 294 [label="Access variable R|/x|"]; + 295 [label="Type operator: (R|/x| as R|B|)"]; + subgraph cluster_94 { + color=blue + 296 [label="Try expression enter"]; + subgraph cluster_95 { + color=blue + 297 [label="Try main block enter"]; + subgraph cluster_96 { + color=blue + 298 [label="Enter block"]; + 299 [label="Access variable R|/x|"]; + 300 [label="Smart cast: R|/x|"]; + 301 [label="Type operator: (R|/x| as R|A|)"]; + 302 [label="Exit block"]; + } + 303 [label="Try main block exit"]; + } + subgraph cluster_97 { + color=blue + 304 [label="Enter finally"]; + subgraph cluster_98 { + color=blue + 305 [label="Enter block"]; + subgraph cluster_99 { + color=blue + 306 [label="Function call arguments enter"]; + 307 [label="Access variable R|/x|"]; + 308 [label="Smart cast: R|/x|"]; + 309 [label="Function call arguments exit"]; + } + 310 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_100 { + color=blue + 311 [label="Function call arguments enter"]; + 312 [label="Access variable R|/x|"]; + 313 [label="Smart cast: R|/x|"]; + 314 [label="Function call arguments exit"]; + } + 315 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; + 316 [label="Jump: ^returnInFinally_insideTry_nonLocal Unit"]; + 317 [label="Stub" style="filled" fillcolor=gray]; + 318 [label="Exit block" style="filled" fillcolor=gray]; + } + 319 [label="Exit finally" style="filled" fillcolor=gray]; + } + 320 [label="Try expression exit" style="filled" fillcolor=gray]; + } + 321 [label="Exit block" style="filled" fillcolor=gray]; + } + 322 [label="Try main block exit" style="filled" fillcolor=gray]; + } + subgraph cluster_101 { + color=blue + 323 [label="Enter finally"]; + subgraph cluster_102 { + color=blue + 324 [label="Enter block"]; + subgraph cluster_103 { + color=blue + 325 [label="Function call arguments enter"]; + 326 [label="Access variable R|/x|"]; + 327 [label="Function call arguments exit"]; + } + 328 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_104 { + color=blue + 329 [label="Function call arguments enter"]; + 330 [label="Access variable R|/x|"]; + 331 [label="Function call arguments exit"]; + } + 332 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 333 [label="Exit block"]; + } + 334 [label="Exit finally"]; + } + 335 [label="Try expression exit" style="filled" fillcolor=gray]; + } + subgraph cluster_105 { + color=blue + 336 [label="Function call arguments enter" style="filled" fillcolor=gray]; + 337 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 338 [label="Function call arguments exit" style="filled" fillcolor=gray]; + } + 339 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + subgraph cluster_106 { + color=blue + 340 [label="Function call arguments enter" style="filled" fillcolor=gray]; + 341 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 342 [label="Function call arguments exit" style="filled" fillcolor=gray]; + } + 343 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + 344 [label="Exit block" style="filled" fillcolor=gray]; + } + 345 [label="Exit function " style="filled" fillcolor=gray]; + } + 346 [label="Function call arguments exit"]; + } + 347 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 348 [label="Function call: R|kotlin/run#|<>(...)" style="filled" fillcolor=gray]; + subgraph cluster_107 { + color=blue + 349 [label="Function call arguments enter" style="filled" fillcolor=gray]; + 350 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 351 [label="Function call arguments exit" style="filled" fillcolor=gray]; + } + 352 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + subgraph cluster_108 { + color=blue + 353 [label="Function call arguments enter" style="filled" fillcolor=gray]; + 354 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 355 [label="Function call arguments exit" style="filled" fillcolor=gray]; + } + 356 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + 357 [label="Exit block" style="filled" fillcolor=gray]; + } + 358 [label="Exit function returnInFinally_insideTry_nonLocal" style="filled" fillcolor=red]; + } + 283 -> {284}; + 284 -> {285}; + 285 -> {286}; + 286 -> {287}; + 287 -> {288}; + 288 -> {289 346}; + 288 -> {347} [style=dotted]; + 288 -> {289} [style=dashed]; + 289 -> {290}; + 290 -> {291}; + 291 -> {292}; + 291 -> {323} [label="onUncaughtException"]; + 292 -> {293}; + 293 -> {294}; + 294 -> {295}; + 295 -> {296}; + 296 -> {297}; + 296 -> {304} [label="onUncaughtException"]; + 297 -> {298}; + 298 -> {299}; + 299 -> {300}; + 300 -> {301}; + 301 -> {302}; + 302 -> {303}; + 303 -> {304}; + 304 -> {305}; + 305 -> {306}; + 306 -> {307}; + 307 -> {308}; + 308 -> {309}; + 309 -> {310}; + 310 -> {311}; + 311 -> {312}; + 312 -> {313}; + 313 -> {314}; + 314 -> {315}; + 315 -> {316}; + 316 -> {323} [label="return@/returnInFinally_insideTry_nonLocal"]; + 316 -> {317} [style=dotted]; + 317 -> {318} [style=dotted]; + 318 -> {319} [style=dotted]; + 319 -> {323} [style=dotted label="onUncaughtException"]; + 319 -> {320} [style=dotted]; + 320 -> {321} [style=dotted]; + 321 -> {322} [style=dotted]; + 322 -> {323} [style=dotted]; + 323 -> {324}; + 324 -> {325}; + 325 -> {326}; + 326 -> {327}; + 327 -> {328}; + 328 -> {329}; + 329 -> {330}; + 330 -> {331}; + 331 -> {332}; + 332 -> {333}; + 333 -> {334}; + 334 -> {358} [label="return@/returnInFinally_insideTry_nonLocal"]; + 334 -> {335} [style=dotted]; + 335 -> {336} [style=dotted]; + 336 -> {337} [style=dotted]; + 337 -> {338} [style=dotted]; + 338 -> {339} [style=dotted]; + 339 -> {340} [style=dotted]; + 340 -> {341} [style=dotted]; + 341 -> {342} [style=dotted]; + 342 -> {343} [style=dotted]; + 343 -> {344} [style=dotted]; + 344 -> {345} [style=dotted]; + 345 -> {347} [style=dotted]; + 346 -> {348} [style=dotted]; + 347 -> {348} [style=dotted]; + 348 -> {349} [style=dotted]; + 349 -> {350} [style=dotted]; + 350 -> {351} [style=dotted]; + 351 -> {352} [style=dotted]; + 352 -> {353} [style=dotted]; + 353 -> {354} [style=dotted]; + 354 -> {355} [style=dotted]; + 355 -> {356} [style=dotted]; + 356 -> {357} [style=dotted]; + 357 -> {358} [style=dotted]; } diff --git a/compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.fir.kt new file mode 100644 index 00000000000..4efe1f0b854 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.fir.kt @@ -0,0 +1,14 @@ +// SKIP_TXT +// ISSUE: KT-63709 + +operator fun Int.invoke(unused: Int) {} + +fun test1(a: Int?) { + a(a!!) +} + +fun test2(a: Int?) { + with (a) { + invoke(this!!) + } +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.kt b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.kt new file mode 100644 index 00000000000..b003852a20e --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.kt @@ -0,0 +1,14 @@ +// SKIP_TXT +// ISSUE: KT-63709 + +operator fun Int.invoke(unused: Int) {} + +fun test1(a: Int?) { + a(a!!) +} + +fun test2(a: Int?) { + with (a) { + invoke(this!!) + } +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/smartcasts/unsoundSmartcast.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/unsoundSmartcast.fir.kt index e8313ddc9af..18f97e89315 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/smartcasts/unsoundSmartcast.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/unsoundSmartcast.fir.kt @@ -36,6 +36,6 @@ operator fun Int.invoke(y: Int, z: Int) {} fun test5() { var x: Int? = 10 x!! - x(if (true) { x = null; 0 } else 0, x) + x(if (true) { x = null; 0 } else 0, x) x.inv() } diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index d4759be9161..25d57f6b8e1 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -45296,6 +45296,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt"); } + @Test + @TestMetadata("invokeRecieverUnsafe.kt") + public void testInvokeRecieverUnsafe() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.kt"); + } + @Test @TestMetadata("kt10463.kt") public void testKt10463() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 81721557b9e..dcfcfb1f484 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -48231,6 +48231,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 9c25a524972..facaedcfbfb 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -51249,6 +51249,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 347a1f4f220..3df1ef9dcff 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -51249,6 +51249,18 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 0df7ea14c44..cb045c2515d 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -41265,6 +41265,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { runTest("compiler/testData/codegen/box/smartCasts/kt17725.kt"); diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/13.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/13.fir.kt index e4eb9ae86be..d4fa15e2cf3 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/13.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/13.fir.kt @@ -24,7 +24,7 @@ fun case_1(x: Class?) { fun case_2() { var x: Class? = 10 x!! - x(if (true) {x=null;0} else 0, x) + x(if (true) {x=null;0} else 0, x) x x.fun_1() } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/26.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/26.fir.kt index a8f5f7bca19..34c54c89c8a 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/26.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/26.fir.kt @@ -62,7 +62,7 @@ fun case_4() { fun case_5() { var x: Class? = Class() x!! - x(if (true) {x=null;0} else 0, x) + x(if (true) {x=null;0} else 0, x) x.fun_1() } @@ -83,7 +83,7 @@ fun case_6() { fun case_7() { var x: Class? = Class() x!! - x(if (true) {x=null;0} else 0)(x) + x(if (true) {x=null;0} else 0)(x) x.fun_1() } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index a699572a7b7..054b8084875 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -35607,6 +35607,18 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index eabbb9bfc66..d5872367751 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -35607,6 +35607,18 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index bc185af875d..b8ad39af167 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -35607,6 +35607,18 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index 8289c2983b0..6af259b3f0b 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -35607,6 +35607,18 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index 09cd700b955..36abd1513c2 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -39302,6 +39302,18 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index b29a5cb39df..54d5e01de46 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -40306,6 +40306,18 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index 3199c0640c8..aac1d9f91d1 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -38298,6 +38298,18 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index 8d9402b9f56..c01a26002b8 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -39303,6 +39303,18 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index b6a3890c280..5e712ce129b 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -35505,6 +35505,18 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index b174683c120..e75b6440506 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -35505,6 +35505,18 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } + @Test + @TestMetadata("invokeRecieverSmartcastK1.kt") + public void testInvokeRecieverSmartcastK1() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt"); + } + + @Test + @TestMetadata("invokeRecieverSmartcastK2.kt") + public void testInvokeRecieverSmartcastK2() throws Exception { + runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt"); + } + @Test @TestMetadata("kt17725.kt") public void testKt17725() throws Exception {